UDP message distribution method, UDP message distribution apparatus, electronic device and computer readable storage medium

US12120203B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-12120203-B2
Application numberUS-202318506048-A
CountryUS
Kind codeB2
Filing dateNov 9, 2023
Priority dateMay 20, 2022
Publication dateOct 15, 2024
Grant dateOct 15, 2024

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

In response to there being multiple process groups for one application service concurrently, each of the multiple process groups has an independent EBPF resource, and the EBPF resource is used to store information of an FD of each process in each of the multiple process groups. After a UDP message is received, a server is configured to determine a target process group from multiple process groups of a reuseport group according to a quadruple of the UDP message, select a target FD from the FD of each process of the target process group, and receive and transmit data by using the target FD. In this way, since each of the multiple process groups has an independent EBPF resource, the processes belong to different process groups do not preempt the same FD, which ensures that the UDP message is not distributed in disorder.

First claim

Opening claim text (preview).

The invention claimed is: 1. A user datagram protocol (UDP) message distribution method, comprising: receiving a UDP message from a terminal device; determining a target process group from a plurality of process groups of a reuseport group according to a quadruple carried by the UDP message, wherein the plurality of process groups are created in sequence for an application service, and each of the plurality of process groups has an extended Berkeley packet filter (EBPF) resource independent from each other; selecting a target file handle (FD) from FDs of a plurality of processes of the target process group; and distributing the UDP message using the target FD. 2. The UDP message distribution method according to claim 1 , wherein before determining the target process group from the plurality of process groups of the reuseport group according to the quadruple carried by the UDP message, the method further comprises: in response to creating each of the plurality of process groups, creating, by a master process, a second process group, wherein a first process group and the second process group are created in sequence in the plurality of process groups, and the first process group corresponds to a first group of FDs; generating, for the second process group, a second group of FDs; and setting the second group of FDs to standby resources in a resource set to obtain the EBPF resource, wherein the standby resources are pre-created and stored in the resource set, a first number of the standby resources in the resource set is the same as a maximum number of the process groups of the reuseport group, and a second number of the process groups in the plurality of process groups is less than or equal to the first number. 3. The UDP message distribution method according to claim 2 , wherein in before generating, for the second process group, the second group of FDs, the method further comprises: in response the application service being hot-updated to create the second process group, filtering out an FD in a listening structure of the first process group, wherein the first process group and the second process group are both created by a first master process. 4. The UDP message distribution method according to claim 2 , further comprising: in response to each of the plurality of the process groups being created, storing the EBPF resource of the process group created this time in a dynamic array as an element; and in response to a number of the element in the dynamic array being greater than or equal to the first number, storing the EBPF resource of the process group created this time in the dynamic array after the element of the process group created at first according to the sequence in which the plurality of process groups are created. 5. The UDP message distribution method according to claim 2 , wherein before generating, for the second process group, the second group of FDs, the method further comprises: in response to upgrading the application service to create the second process group, transferring, by a first master process, an environment variable to a second master process, wherein the first master process is a master process before the application service is upgraded, and the second master process is a master process after the application service is upgraded; and in response to an FD carrying a preset identifier existing in the environment variable, closing the FD carrying the preset identifier. 6. The UDP message distribution method according to claim 5 , further comprising: in response to each of the plurality of the process groups being created, invoking a resource recovery interface to clean the EBPF resource of the first process group. 7. The UDP message distribution method according to claim 5 , further comprising: creating, by the first master process, a third process group in response to the application services failing to be upgraded; closing an FD in a listening structure of the third process group; generating, for the third process group, a third group of FDs; and creating the EBPF resource corresponding to the third process group according to the third group of FDs. 8. The UDP message distribution method according to claim 1 , further comprising: determining that an abnormal process exists in a process group newly created in the plurality of process groups; and creating, for the newly created process group, a new worker process, wherein an FD of the worker process is an FD of the abnormal process. 9. The UDP message distribution method according to claim 1 , wherein in response to a plurality of IP protocols being bound on a UDP port corresponding to the reuseport group, the UDP port simultaneously serves the plurality of IP protocols. 10. The UDP message distribution method according to claim 1 , wherein the EBPF resource is configured to store information of a file handle of an FD of each process in a corresponding process group. 11. An electronic device, comprising a processor, a memory, wherein a computer program is stored on the memory and is operatable on the processor, the computer program, when being executed by the processor, causes the electronic device to implements the method according to claim 1 . 12. The electronic device according to claim 11 , further comprising a communication component and a bus, wherein the processor, the memory, and the communication component are connected via the bus. 13. A non-transitory computer readable storage medium storing therein a computer program, wherein the computer program, when being executed by a processor, causes the method according to claim 1 to be implemented. 14. A user datagram protocol (UDP) message distribution apparatus, comprising at least one processor and memory storing therein computer program instructions, which, when executed by the at least one processor, cause the at least one processor to provide software modules including: a receiving module configured to receive a UDP message from a terminal device; a processing module configured to determine a target process group from a plurality of process groups of a reuseport group according to a quadruple carried by the UDP message, wherein the plurality of process groups are created in sequence for an application service, and each of the plurality of process groups has an EBPF resource independent from each other; a selecting module configured to select a target FD from FDs of a plurality of processes of the target process group; and a distributing module configured to distribute the UDP message using the target FD. 15. The UDP message distribution apparatus according to claim 14 , wherein before the target process group is determined by the processing module from the multiple process groups of the reuseport group according to the quadruple carried by the UDP message, the processing module is further configured to create, by a master process, a second process group in response to creating each of the plurality of process groups, and generate a second group of FDs for the second process group, wherein a first process group and the second process group are created in sequence in the plurality of process groups, and the first process group corresponds to a first group of FDs. 16. The UDP message distribution apparatus according to claim 15 , wherein before the second group of FDs is generated by the processing module for the second process group, the processing module is further configured to filter out FDs in a listening structure of the first process group, and the first process group and the second process group are both created by a first master process

Assignees

Inventors

Classifications

  • H04L69/167Primary

    Adaptation for transition between two IP versions, e.g. between IPv4 and IPv6 (translation of Internet protocol [IP] addresses H04L61/2503) · CPC title

  • H04L69/164Primary

    Adaptation or special uses of UDP protocol · CPC title

  • Updates (security arrangements therefor G06F21/57) · CPC title

  • considering the load · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US12120203B2 cover?
In response to there being multiple process groups for one application service concurrently, each of the multiple process groups has an independent EBPF resource, and the EBPF resource is used to store information of an FD of each process in each of the multiple process groups. After a UDP message is received, a server is configured to determine a target process group from multiple process grou…
Who is the assignee on this patent?
Wangsu Science & Tech Co Ltd, Wangsu Science And Tech Co Ltd
What technology area does this patent fall under?
Primary CPC classification H04L69/167. Mapped technology areas include Electricity.
When was this patent published?
Publication date Tue Oct 15 2024 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 7 related publications on this page (citations in our corpus or others sharing the same primary CPC).