Load balancing method and apparatus, electronic device, and computer-readable storage medium
By obtaining the correspondence between the device identifier, IP address, and port of the signaling processing device in the UPF network element, and using the predefined bytes in the SEID to determine the signaling processing device, the problem of low computing resource consumption and low efficiency of the load balancer in the prior art is solved, and faster message distribution and higher throughput are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA TELECOM CORP LTD
- Filing Date
- 2023-05-24
- Publication Date
- 2026-05-19
AI Technical Summary
In the existing technology, the load balancer of the UPF network element consumes a lot of computing resources when building the mapping table between SEID and signaling processing equipment, which leads to a decrease in throughput and efficiency. Moreover, the mapping table increases with the number of sessions, further reducing the efficiency of message distribution.
By obtaining the mapping relationship between the device identifier, IP address, and port of the signaling processing device, and using the content of the predetermined bytes in the SEID to determine the signaling processing device, the load balancer is prevented from establishing a mapping relationship again. Messages are sent directly to the corresponding device, reducing the consumption of computing resources and improving the distribution speed.
It improves the load balancer's message distribution capability and throughput, reduces memory usage, and enhances message distribution efficiency.
Smart Images

Figure CN116566911B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of communication technology, and in particular to a load balancing method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] In the field of communication technology, load balancing of network elements is an important way to reduce high concurrency. For example, load balancing of the UPF (User Plane Function) signaling plane can reduce the possibility of high concurrency in session messages.
[0003] In related technologies, the load balancer in the UPF network element dynamically generates a mapping table between SEID (Session Endpoint Identifier) and signaling processing equipment through the response message of the session establishment request to solve the UPF signaling plane load balancing problem.
[0004] However, the way the load balancer constructs the mapping table between SEIDs and signaling processing devices based on response messages consumes the load balancer's computing resources, reduces its message distribution capacity, and lowers the throughput of the load balancing module. Furthermore, the mapping table between SEIDs and signaling processing devices grows larger with the increase in sessions, thereby increasing the time required for the load balancer to distribute messages and reducing its efficiency.
[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] This disclosure provides a load balancing method, apparatus, electronic device, and computer-readable storage medium, which at least to some extent improves the efficiency of message distribution by the load balancer in a UPF network element.
[0007] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.
[0008] According to one aspect of this disclosure, a load balancing method is provided, applied to a load balancer in a User Plane Function (UPF) network element, wherein the UPF network element further includes multiple signaling processing devices, comprising: obtaining a correspondence between the device identifier of each of the multiple signaling processing devices and an Internet Protocol (IP) address and a port (PORT); receiving a pending message sent by a Session Management Function (SMF) network element; determining the type of the pending message; if the type is a Packet Forwarding Control Protocol (PFCP) session message, querying the correspondence based on the content of a predetermined byte in the Session Endpoint Identifier (SEID) of the pending message to obtain a first IP address and a first PORT, wherein the content of the predetermined byte in the SEID is the device identifier of the first signaling processing device; and sending the pending message to the first signaling processing device based on the first IP address and the first PORT, so that the first signaling processing device sends a first response message to the SMF network element based on the pending message.
[0009] In one embodiment of this disclosure, the method further includes: when the type is a PFCP session creation request, generating a device identifier for a second signaling processing device based on the SequenceID of the message to be processed and the number of the plurality of signaling processing devices; querying the correspondence based on the device identifier of the second signaling processing device to obtain a second IP address and a second PORT; and sending the message to be processed to the second signaling processing device based on the second IP address and the second PORT, so that the second signaling processing device can create a PFCP session based on the message to be processed, allocate an SEID to the PFCP session, and send a second response message to the SMF network element; wherein, the content of a predetermined byte in the SEID of the PFCP session is the device identifier of the second signaling processing device.
[0010] In one embodiment of this disclosure, the method further includes: when the type is a node message, generating a device identifier for a second signaling processing device based on the SequenceID of the message to be processed and the number of the plurality of signaling processing devices; querying the correspondence based on the device identifier of the second signaling processing device to obtain a second IP address and a second PORT; and sending the message to be processed to the second signaling processing device based on the second IP address and the second PORT, so that the second signaling processing device can send a third response message to the SMF network element based on the message to be processed.
[0011] In one embodiment of this disclosure, the predetermined byte is one or more bytes in the SEID.
[0012] In one embodiment of this disclosure, the predetermined byte is the first byte in SEID.
[0013] In one embodiment of this disclosure, obtaining the correspondence between the device identifier and the Internet Protocol (IP) address and port (PORT) of each of the plurality of signaling processing devices includes: receiving the device identifier, IP address, and PORT sent by the plurality of signaling processing devices respectively; and generating the correspondence based on the device identifier, IP address, and PORT.
[0014] In one embodiment of this disclosure, generating a device identifier for a second signaling processing device based on the SequenceID of the message to be processed and the quantity value of the plurality of signaling processing devices includes: generating the device identifier for the second signaling processing device according to the SequenceID and the quantity value using the following formula:
[0015] SERVERID = MOD(SequenceID, quantity value)
[0016] Where SERVERID is the device identifier of the signaling processing device, and MOD(,) is the modulo function.
[0017] According to another aspect of this disclosure, a load balancing device is provided, applied to a load balancer in a User Plane Function (UPF) network element. The UPF network element further includes multiple signaling processing devices, comprising: an acquisition module for acquiring the correspondence between the device identifier of each of the multiple signaling processing devices and its Internet Protocol (IP) address and port (PORT); a receiving module for receiving a pending message sent by a Session Management Function (SMF) network element; a judgment module for determining the type of the pending message; a query module for, when the type is a Packet Forwarding Control Protocol (PFCP) session message, querying the correspondence based on a predetermined byte in the Session Endpoint Identifier (SEID) of the pending message to obtain a first IP address and a first PORT, wherein the predetermined byte in the SEID is the device identifier of the first signaling processing device; and a sending module for sending the pending message to the first signaling processing device based on the first IP address and the first PORT, so that the first signaling processing device can send a first response message to the SMF network element based on the pending message.
[0018] In one embodiment of this disclosure, the apparatus further includes: a generation module, configured to generate a device identifier for a second signaling processing device based on the SequenceID of the message to be processed and the number of the plurality of signaling processing devices when the type is a PFCP session creation request; the query module is further configured to query the correspondence based on the device identifier of the second signaling processing device to obtain a second IP address and a second PORT; the sending module is further configured to send the message to be processed to the second signaling processing device based on the second IP address and the second PORT, so that the second signaling processing device can create a PFCP session based on the message to be processed, allocate an SEID to the PFCP session, and send a second response message to the SMF network element; wherein, the content of a predetermined byte in the SEID of the PFCP session is the device identifier of the second signaling processing device.
[0019] In one embodiment of this disclosure, the apparatus further includes: a generation module, which, when the type is a node message, generates a device identifier for a second signaling processing device based on the sequence ID of the message to be processed and the number of the plurality of signaling processing devices; the query module is further configured to query the correspondence based on the device identifier of the second signaling processing device to obtain a second IP address and a second PORT; and the sending module is configured to send the message to be processed to the second signaling processing device based on the second IP address and the second PORT, so that the second signaling processing device can send a third response message to the SMF network element based on the message to be processed.
[0020] In one embodiment of this disclosure, the predetermined byte is one or more bytes in the SEID.
[0021] In one embodiment of this disclosure, the predetermined byte is the first byte in SEID.
[0022] In one embodiment of this disclosure, the acquisition module is configured to receive device identifiers, IP addresses, and PORTs sent by the plurality of signaling processing devices respectively; and generate the correspondence based on the device identifiers, IP addresses, and PORTs.
[0023] In one embodiment of this disclosure, the generation module is configured to generate a device identifier for the second signaling processing device according to the SequenceID and the quantity value, using the following formula:
[0024] SERVERID = MOD(SequenceID, quantity value)
[0025] Where SERVERID is the device identifier of the signaling processing device, and MOD(,) is the modulo function.
[0026] According to another aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform any of the above-described load balancing methods by executing the executable instructions.
[0027] According to another aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements any of the load balancing methods described above.
[0028] According to another aspect of this disclosure, a computer program product is provided, the computer program product comprising a computer program or computer instructions, the computer program or computer instructions being loaded and executed by a processor to enable a computer to implement any of the load balancing methods described above.
[0029] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects:
[0030] The technical solution provided in the embodiments of this disclosure uses the content of the set bytes in SEID as the device identifier of the signaling processing device, and uses the correspondence between the device identifier and the IP address and PORT to determine the signaling processing device corresponding to the SEID. Compared with the method of establishing the correspondence between SEID and signaling processing device based on the response message, this avoids the load balancer needing to receive and establish the correspondence between SEID and signaling processing device based on the response message, thereby reducing the load balancer's computing resource consumption and improving the load balancer's message distribution capability. In addition, the correspondence between the device identifier and the IP address and PORT does not change with the increase of sessions, reducing the load balancer's memory consumption compared with the correspondence established based on the response message. Since the data volume of the correspondence between the device identifier and the IP address and PORT is small, the load balancer can distribute messages faster based on this correspondence, thereby improving the load balancer's throughput and message distribution efficiency.
[0031] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0032] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0033] Figure 1 This diagram illustrates a load balancing system according to one embodiment of the present disclosure;
[0034] Figure 2 This diagram illustrates a flowchart of a load balancing method in one embodiment of the present disclosure.
[0035] Figure 3 A schematic diagram of SEID is shown in one embodiment of this disclosure;
[0036] Figure 4 This illustration shows a signaling diagram of the signaling processing device registering with a load balancer in one embodiment of the present disclosure;
[0037] Figure 5 The following is a signaling diagram of a load balancing method in one embodiment of this disclosure;
[0038] Figure 6 A flowchart of a load balancing method in another embodiment of this disclosure is shown;
[0039] Figure 7 This diagram illustrates a signaling diagram of a load balancing method according to another embodiment of this disclosure;
[0040] Figure 8 This diagram illustrates a load balancing method flowchart in another embodiment of the present disclosure;
[0041] Figure 9 The following is a signaling diagram of a load balancing method in another embodiment of the present disclosure;
[0042] Figure 10 This diagram illustrates a load balancing device according to one embodiment of the present disclosure.
[0043] Figure 11 A structural block diagram of an electronic device according to one embodiment of the present disclosure is shown. Detailed Implementation
[0044] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0045] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0046] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0047] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0048] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0049] Figure 1 The diagram illustrates a load balancing system according to an embodiment of the present disclosure, which can apply the load balancing methods or load balancing devices in various embodiments of the present disclosure.
[0050] like Figure 1 As shown, the load balancing system may include: UPF network element 110 and SMF (Session Management Function) network element 120, wherein UPF network element 110 includes load balancer 111 and multiple signaling processing devices 112.
[0051] The load balancer 111 can receive messages sent by the SMF network element 120, including node messages, PFCP (Packet Forwarding Control Protocol) session creation requests, PFCP session messages, etc. In one embodiment, the node message can be a message sent to the UPF network element that does not include the SEID. For example, the node message can be a heartbeat detection message.
[0052] Specifically, the load balancer 111 can determine the device identifier of a signaling processing device based on the message's SEID, or the message sequence identifier and the number of signaling processing devices 112. Then, it queries the mapping between the device identifier and its IP (Internet Protocol) address and port to obtain the IP address and port of the signaling processing device. Finally, the load balancer 111 can send the message to the signaling processing device based on its IP address and port.
[0053] Any one of the multiple signaling processing devices 112 can receive messages sent by the load balancer 111, execute the business logic corresponding to the message, and send a response message to the SMF network element 120.
[0054] In one embodiment, if the message received by the signaling processing device is a PFCP session establishment request, the signaling processing device creates a PFCP session based on the PFCP session establishment request and assigns a SEID to the PFCP session. The SEID contains a predetermined number of bytes that represent the device identifier of the signaling processing device.
[0055] The SMF network element 120, the load balancer 111, and multiple signaling processing devices 112 communicate with each other via a network, which can be a wired network or a wireless network.
[0056] Optionally, the aforementioned wireless or wired networks use standard communication technologies and / or protocols. The network is typically the Internet, but can also be any network, including but not limited to Local Area Networks (LANs), Metropolitan Area Networks (MANs), Wide Area Networks (WANs), mobile, wired or wireless networks, private networks, or any combination of virtual private networks. In some embodiments, technologies and / or formats including Hyper Text Markup Language (HTML), Extensible Markup Language (XML), etc., are used to represent data exchanged over the network. Furthermore, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Networks (VPNs), and Internet Protocol Security (IPsec) can be used to encrypt all or some links. In other embodiments, custom and / or dedicated data communication technologies can be used to replace or supplement the aforementioned data communication technologies.
[0057] Those skilled in the art will know that Figure 1 The number of signaling processing devices is merely illustrative; any number of terminal devices, networks, and servers can be included depending on actual needs. This disclosure does not limit the scope of the embodiments.
[0058] The following detailed description of this exemplary implementation method is provided in conjunction with the accompanying drawings and embodiments.
[0059] This disclosure provides a load balancing method that can be executed by any electronic device with computing capabilities. For example, the electronic device is a load balancer in a UPF network element, which also includes multiple signaling processing devices.
[0060] Figure 2 A flowchart of a load balancing method according to one embodiment of this disclosure is shown, such as Figure 2 As shown, the load balancing method provided in this embodiment includes the following steps S201 to S205.
[0061] S201, the load balancer obtains the correspondence between the device identifier, IP address and PORT of each of the multiple signaling processing devices.
[0062] In one embodiment, the load balancer obtains the correspondence between the device identifier, IP address, and PORT of each of the multiple signaling processing devices, which may include: receiving the device identifier, IP address, and PORT sent by the multiple signaling processing devices respectively; and generating the correspondence based on the device identifier, IP address, and PORT.
[0063] In one embodiment, after the signaling processing device is configured to a UPF network element, it sends a registration message to the load balancer. The registration message carries the device identifier, IP address, and PORT of the signaling processing device. After receiving the registration message, the load balancer completes the acquisition of the device identifier, IP address, and PORT of the signaling processing device.
[0064] The specific form in which the correspondence is represented is not limited in this embodiment. For example, the correspondence can be represented as a table, a formula, or a model.
[0065] Taking a table as an example, the correspondence between a device identifier, IP address, and PORT can be shown in Table 1 below.
[0066] Table 1
[0067] Equipment identification IP address and port Equipment Identifier 1 IP address 1, PORT-1 … … Equipment Identifier n IP address n, PORT-n
[0068] Where n represents the number of signaling processing devices. The device identifier is an identifier that can be represented using bytes in the SEID. This disclosure does not limit the number of bytes included in the device identifier. For example, the device identifier may include one byte or more bytes.
[0069] In another embodiment, the load balancer generates a mapping relationship based on the device identifier, IP address, and PORT of each signaling processing device, and stores the mapping relationship so that it can be directly retrieved from memory the next time the mapping relationship is applied.
[0070] S202, the load balancer receives pending messages sent by the SMF network element.
[0071] S203, The load balancer determines the type of message to be processed.
[0072] In one embodiment, the type of message to be processed may include: PFCP session creation request, PFCP session message, and node message.
[0073] S204, when the type is PFCP session message, the load balancer queries the corresponding relationship according to the content of the predetermined byte in the SEID of the message to be processed, and obtains the first IP address and the first PORT, wherein the content of the predetermined byte in the SEID is the device identifier of the first signaling processing device.
[0074] The PFCP session message includes a SEID. In one embodiment, the predetermined byte in the SEID can be one or more bytes in the SEID. In another embodiment, the predetermined byte in the SEID is the first byte in the SEID.
[0075] Taking the example where the predefined byte in a SEID is the first byte in the SEID, a SEID is like... Figure 3 As shown, the SEID includes SERVERID (occupying 1 byte of SEID) and LOCAL_SEID (occupying 7 bytes of SEID). SERVERID is the first byte of SEID and corresponds to the device identifier of the signaling processing device. LOCAL_SEID is used to represent the PFCP session. Figure 3 The "0B" before SERVERID indicates binary.
[0076] It should be noted that SERVERID is only one way to represent a device identifier. Other symbols can also be used to represent device identifiers, and this disclosure does not impose any restrictions on this.
[0077] It should be noted that LOCAL_SEID only represents the bytes other than SERVERID in SEID, and the bytes other than SERVERID in SEID can also be represented by other symbols, which are not restricted in this disclosure.
[0078] When the type of message to be processed is a PFCP session message, the message to be processed includes an SEID, in which the content of a predetermined byte is the device identifier of one of the signaling processing devices among the multiple signaling processing devices included in the UPF network element.
[0079] Therefore, the load balancer can directly query the correspondence between the device identifier, IP address, and PORT based on the content of the predetermined bytes in the SEID of the message to be processed, thereby obtaining the first IP address and the first PORT.
[0080] S205, the load balancer sends a message to be processed to the first signaling processing device based on the first IP address and the first PORT, so that the first signaling processing device can send a first response message to the SMF network element based on the message to be processed.
[0081] After receiving the pending message from the load balancer, the first signaling processing device executes the business logic corresponding to the pending message and then directly sends the first response message to the SMF network element, without having to send the first response message to the load balancer and then have the load balancer forward the first response message to the SMF network element, thereby reducing the workload of the load balancer.
[0082] The technical solution provided in the embodiments of this disclosure uses the content of the set bytes in SEID as the device identifier of the signaling processing device, and uses the correspondence between the device identifier and the IP address and PORT to determine the signaling processing device corresponding to the SEID. Compared with the method of establishing the correspondence between SEID and signaling processing device based on the response message, this avoids the load balancer needing to receive and establish the correspondence between SEID and signaling processing device based on the response message, thereby reducing the load balancer's computing resource consumption and improving the load balancer's message distribution capability. In addition, the correspondence between the device identifier and the IP address and PORT does not change with the increase of sessions. Compared with the correspondence established based on the response message, this reduces the load balancer's memory consumption. At the same time, since the data volume of the correspondence between the device identifier and the IP address and PORT is small, the load balancer distributes messages faster based on this correspondence, thereby improving the load balancer's throughput and message distribution efficiency.
[0083] In one embodiment, Figure 2 The process of the signaling processing device registering with the load balancer mentioned in S201 of the corresponding embodiment can be as follows: Figure 4 As shown. The process includes steps S401 to S404.
[0084] S401, Signaling processing equipment starts.
[0085] S402, the signaling processing device sends a registration message to the load balancer, in which the registration message carries the device identifier, IP address and PORT.
[0086] S403, the load balancer stores the device identifier, IP address and PORT accordingly.
[0087] S404, the load balancer sends a feedback message to the signaling processing device.
[0088] The signaling processing device updates the mapping relationship stored in the load balancer by sending a registration message to the load balancer after startup. This allows the mapping relationship in the load balancer to be updated faster after a new signaling processing device is added to the UPF network element, thereby better ensuring the load balance of multiple signaling processing devices in the UPF network element.
[0089] For ease of understanding Figure 2 In the corresponding embodiment, the following example uses SEID including SERVERID (device identifier of signaling processing equipment) as an example, combined with... Figure 5 This describes the load balancing process when the message to be processed is a PFCP session message. The process includes steps S501 to S507.
[0090] S501, the SMF network element sends a message to be processed to the load balancer.
[0091] S502, the load balancer determines the type of message to be processed.
[0092] S503, when the load balancer is a PFCP session message of this type, it calculates the device identifier corresponding to the message to be processed and reads the SERVERID from the SEID.
[0093] S504, the load balancer queries the signaling processing device mapping table (which records the SERVERID and its corresponding IP address and PORT) to obtain the IP address and PORT corresponding to the SERVERID.
[0094] S505: The load balancer sends pending messages to the signaling processing device based on the IP address and PORT.
[0095] S506, the signaling processing equipment executes the business logic corresponding to the message to be processed in order to process the message to be processed.
[0096] S507, the signaling processing equipment sends the first response message to the SMF network element.
[0097] For the specific implementation details of S501 to S507, please refer to [link / reference]. Figure 2 The corresponding implementation examples will not be described in detail here.
[0098] In one embodiment, Figure 2 In the corresponding embodiment, S203 determines that the type of the message to be processed is a PFCP session establishment request. Therefore, the load balancing method provided in this embodiment may further include, for example... Figure 6 S601 to S603 are shown.
[0099] S601, when the load balancer is a PFCP session creation request, it generates the device identifier of the second signaling processing device based on the SequenceID of the message to be processed and the number of multiple signaling processing devices.
[0100] The PCFP session establishment request includes the SequenceID.
[0101] In one embodiment, generating the device identifier of the second signaling processing device based on the SequenceID of the message to be processed and the number of multiple signaling processing devices may include: generating the device identifier of the second signaling processing device according to the following formula 1 based on the SequenceID and the number value:
[0102] SERVERID = MOD(SequenceID, quantity value) Formula 1
[0103] Where SERVERID is the device identifier of the signaling processing device, and MOD(,) is the modulo function.
[0104] S602, the load balancer queries the corresponding relationship based on the device identifier of the second signaling processing device to obtain the second IP address and the second PORT.
[0105] The correspondence is between the device identifier and the IP address and PORT.
[0106] S603, the load balancer sends a pending message to the second signaling processing device based on the second IP address and the second PORT, so that the second signaling processing device can create a PFCP session based on the pending message, assign an SEID to the PFCP session, and send a second response message to the SMF network element. The content of a predetermined byte in the SEID of the PFCP session is the device identifier of the second signaling processing device.
[0107] The SEID assigned by the signaling processing device to the PFCP includes the device identifier of the second signaling processing device, which is the content of a predetermined byte in the SEID.
[0108] In the technical solution provided by the embodiments of this disclosure, after creating a PFCP session, an SEID carrying a device identifier is assigned to the PFCP session, thereby establishing a correspondence between the SEID and the signaling processing device. This avoids the need to send response messages to the load balancer, which then establishes the correspondence between the signaling processing device and the SEID based on the response message. This reduces the computational resource consumption of the load balancer and improves the load balancer's ability to distribute messages.
[0109] Furthermore, by including the device identifier in the SEID, the load balancer can directly obtain the device identifier from the SEID in the PFCP session message, and then quickly determine the IP address and PORT of the signaling processing device from the mapping between the device identifier and the IP address and PORT. Since the mapping between the device identifier and the IP address and PORT does not change with the addition of the SEID, the amount of data corresponding to this mapping is relatively small. This allows the load balancer to distribute messages faster, improving the load balancer's throughput and the efficiency of message distribution.
[0110] For ease of understanding Figure 6 The corresponding embodiments will be described below in conjunction with Figure 7 This describes the load balancing process when a pending message is a PFCP session establishment request. This process includes steps S701 to S707.
[0111] S701, the SMF network element sends pending messages to the load balancer.
[0112] S702, the load balancer determines the type of message to be processed.
[0113] S703, when the load balancer is a PFCP session creation request of this type, it calculates the device identifier corresponding to the message to be processed (generating the device identifier SERVERID based on the SequenceID of the message to be processed and the number of multiple signaling processing devices).
[0114] S704, the load balancer queries the signaling processing device mapping table (which records the SERVERID and its corresponding IP address and PORT) to obtain the IP address and PORT corresponding to the SERVERID.
[0115] S705: The load balancer sends pending messages to the signaling processing device based on the IP address and PORT.
[0116] S706, the signaling processing device creates a PFCP session and assigns an SEID to the PFCP session. The SEID includes SERVERID and LOCAL_SEID (used to identify the PFCP session).
[0117] S707, the signaling processing equipment sends a second response message to the SMF network element.
[0118] For specific implementation details of S701 to S707, please refer to [link / reference]. Figure 2 and Figure 6 The corresponding implementation examples will not be described in detail here.
[0119] In one embodiment, Figure 2 In the corresponding embodiment, S203 determines that the type of the message to be processed is a node message. Therefore, the load balancing method provided in this embodiment may further include, for example... Figure 8 S801 to S803 are shown.
[0120] S801, when the type is a node message, generate the device identifier of the second signaling processing device based on the SequenceID of the message to be processed and the number of multiple signaling processing devices.
[0121] The method for generating the device identifier of the second signaling processing device based on the SequenceID of the message to be processed and the number of multiple signaling processing devices can be referred to as follows: Figure 6 The corresponding embodiment S604 will not be described again here.
[0122] S802: Based on the device identifier of the second signaling processing device, query the corresponding relationship to obtain the second IP address and the second PORT.
[0123] The correspondence refers to the relationship between the device identifier and the IP address and PORT.
[0124] S803 sends a pending message to the second signaling processing device based on the second IP address and the second PORT, so that the second signaling processing device can send a third response message to the SMF network element based on the pending message.
[0125] The technical solution provided in this disclosure allows for the direct generation of device identifiers for node messages that do not include a SEID, using the SequenceID of the node message and the number of multiple signaling processing devices. This enables the distribution of messages even when the message passing through the load balancer does not include a SEID, without requiring the load balancer to maintain additional mappings. This approach expands the capabilities of the load balancer, allowing it to better distribute messages to various signaling processing devices.
[0126] For ease of understanding Figure 8 The corresponding embodiments will be described below in conjunction with Figure 9 This describes the load balancing process when the messages to be processed are node messages. This process includes S901 to S907.
[0127] S901, the SMF network element sends a message to be processed to the load balancer.
[0128] S902, the load balancer determines the type of message to be processed.
[0129] S903, when the type is a node message, the load balancer calculates the device identifier corresponding to the message to be processed (generating the device identifier SERVERID based on the SequenceID of the message to be processed and the number of multiple signaling processing devices).
[0130] S904, the load balancer queries the signaling processing device mapping table (which records the SERVERID and its corresponding IP address and PORT) to obtain the IP address and PORT corresponding to the SERVERID.
[0131] S905: The load balancer sends pending messages to the signaling processing device based on the IP address and PORT.
[0132] S906, the signaling processing equipment executes the business logic corresponding to the data to be processed in order to process the message to be processed.
[0133] S907, the signaling processing equipment sends a third response message to the SMF network element.
[0134] For specific implementation details of S901 to S907, please refer to [link / reference]. Figure 2 and Figure 8The corresponding implementation examples will not be described in detail here.
[0135] Based on the same inventive concept, this disclosure also provides a load balancing device, as described in the following embodiments. Since the principle by which this device solves the problem is similar to that of the method embodiments described above, the implementation of this device embodiment can refer to the implementation of the method embodiments described above, and repeated details will not be repeated.
[0136] Figure 10 A schematic diagram of a load balancing device according to one embodiment of this disclosure is shown, such as... Figure 10 As shown, this device is applied to a load balancer in a UPF network element. The UPF network element also includes multiple signaling processing devices, including: an acquisition module 1001, used to acquire the correspondence between the device identifier and IP address and PORT of each of the multiple signaling processing devices; a receiving module 1002, used to receive a message to be processed sent by the SMF network element; a judgment module 1003, used to determine the type of the message to be processed; a query module 1004, used to query the correspondence based on the content of a predetermined byte in the SEID of the message to be processed when the type is a PFCP session message, to obtain the first IP address and the first PORT, wherein the content of the predetermined byte in the SEID is the device identifier of the first signaling processing device; and a sending module 1005, used to send the message to be processed to the first signaling processing device based on the first IP address and the first PORT, so that the first signaling processing device can send a first response message to the SMF network element based on the message to be processed.
[0137] In one embodiment of this disclosure, the apparatus further includes: a generation module 1006, configured to generate a device identifier for a second signaling processing device based on the SequenceID of the message to be processed and the number of multiple signaling processing devices when the type is a PFCP session creation request; a query module 1004, further configured to query the corresponding relationship based on the device identifier of the second signaling processing device to obtain a second IP address and a second PORT; and a sending module 1005, further configured to send the message to be processed to the second signaling processing device based on the second IP address and the second PORT, so that the second signaling processing device can create a PFCP session based on the message to be processed, allocate an SEID to the PFCP session, and send a second response message to the SMF network element; wherein, the content of a predetermined byte in the SEID of the PFCP session is the device identifier of the second signaling processing device.
[0138] In one embodiment of this disclosure, the apparatus further includes: a generation module 1006, which, when the type is a node message, generates a device identifier for a second signaling processing device based on the sequence ID of the message to be processed and the number of multiple signaling processing devices; a query module 1004, which is further configured to query the corresponding relationship based on the device identifier of the second signaling processing device to obtain a second IP address and a second PORT; and a sending module 1005, which is configured to send the message to be processed to the second signaling processing device based on the second IP address and the second PORT, so that the second signaling processing device can send a third response message to the SMF network element based on the message to be processed.
[0139] In one embodiment of this disclosure, the predetermined byte is one or more bytes in the SEID.
[0140] In one embodiment of this disclosure, the predetermined byte is the first byte in SEID.
[0141] In one embodiment of this disclosure, the acquisition module 1001 is used to receive device identifiers, IP addresses and PORTs sent by multiple signaling processing devices respectively; and generate a corresponding relationship based on the device identifiers, IP addresses and PORTs.
[0142] In one embodiment of this disclosure, the generation module 1006 is used to generate a device identifier for the second signaling processing device according to the SequenceID and the quantity value, in accordance with the formula 1 above.
[0143] The technical solution provided in the embodiments of this disclosure uses the content of the set bytes in SEID as the device identifier of the signaling processing device, and uses the correspondence between the device identifier and the IP address and PORT to determine the signaling processing device corresponding to the SEID. Compared with the method of establishing the correspondence between SEID and signaling processing device based on the response message, this avoids the load balancer needing to receive and establish the correspondence between SEID and signaling processing device based on the response message, thereby reducing the load balancer's computing resource consumption and improving the load balancer's message distribution capability. In addition, the correspondence between the device identifier and the IP address and PORT does not change with the increase of sessions, reducing the load balancer's memory consumption compared with the correspondence established based on the response message. Since the data volume of the correspondence between the device identifier and the IP address and PORT is small, the load balancer can distribute messages faster based on this correspondence, thereby improving the load balancer's throughput and message distribution efficiency.
[0144] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."
[0145] The following reference Figure 11 To describe an electronic device 1100 according to such an embodiment of the present disclosure. Figure 11 The electronic device 1100 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0146] like Figure 11 As shown, the electronic device 1100 is manifested in the form of a general-purpose computing device. The components of the electronic device 1100 may include, but are not limited to: at least one processing unit 1110, at least one storage unit 1120, and a bus 1130 connecting different system components (including storage unit 1120 and processing unit 1110).
[0147] The storage unit stores program code, which can be executed by the processing unit 1110, causing the processing unit 1110 to perform the steps described in the "Detailed Description" section of this specification according to various exemplary embodiments of this disclosure.
[0148] Storage unit 1120 may include readable media in the form of volatile storage units, such as random access memory (RAM) 1121 and / or cache memory 1122, and may further include read-only memory (ROM) 1123.
[0149] Storage unit 1120 may also include a program / utility 1124 having a set (at least one) program module 1125, such program module 1125 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0150] Bus 1130 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0151] Electronic device 1100 can also communicate with one or more external devices 1140 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with the electronic device 1100, and / or with any device that enables the electronic device 1100 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 1150. Furthermore, electronic device 1100 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 1160. Figure 11 As shown, network adapter 1160 communicates with other modules of electronic device 1100 via bus 1130. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with electronic device 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0152] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0153] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, which may be a readable signal medium or a readable storage medium. A program product capable of implementing the methods described above is stored thereon. In some possible implementations, various aspects of this disclosure may also be implemented as a program product including program code, which, when run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of this disclosure described in the "Detailed Description" section above.
[0154] More specific examples of computer-readable storage media in this disclosure may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0155] In this disclosure, a computer-readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of transmitting, propagating, or transmitting a program for use by or in connection with an instruction execution system, apparatus, or device.
[0156] Optionally, the program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0157] In practical implementation, program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0158] In exemplary embodiments of this disclosure, a computer program product is also provided, comprising a computer program or computer instructions, which are loaded and executed by a processor to enable a computer to perform the steps of the various exemplary embodiments of this disclosure described in the foregoing “Detailed Description” section of this specification.
[0159] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0160] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0161] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0162] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope of this disclosure is indicated by the appended claims.
Claims
1. A load balancing method, characterized in that, A load balancer applied in a User Plane Function (UPF) network element, wherein the UPF network element further includes multiple signaling processing devices, including: Obtain the correspondence between the device identifier and the Internet Protocol IP address and port of each of the plurality of signaling processing devices; Receive pending messages sent by the SMF network element for session management function; Determine the type of the message to be processed; When the type is Packet Forwarding Control Protocol (PFCP) session message, the corresponding relationship is queried according to the content of a predetermined byte in the session endpoint identifier (SEID) of the message to be processed to obtain the first IP address and the first PORT, wherein the content of the predetermined byte in the SEID is the device identifier of the first signaling processing device; Based on the first IP address and the first PORT, the pending message is sent to the first signaling processing device so that the first signaling processing device can send a first response message to the SMF network element based on the pending message.
2. The method according to claim 1, characterized in that, Also includes: In the case where the type is a PFCP session creation request, a device identifier for the second signaling processing device is generated based on the SequenceID of the message to be processed and the number of the plurality of signaling processing devices. Based on the device identifier of the second signaling processing device, the corresponding relationship is queried to obtain the second IP address and the second PORT; Based on the second IP address and the second PORT, the pending message is sent to the second signaling processing device so that the second signaling processing device can create a PFCP session based on the pending message, assign an SEID to the PFCP session, and send a second response message to the SMF network element; The content of the predetermined byte in the SEID of the PFCP session is the device identifier of the second signaling processing device.
3. The method according to claim 1, characterized in that, Also includes: In the case that the type is a node message, a device identifier for the second signaling processing device is generated based on the sequence identifier (SequenceID) of the message to be processed and the number of the plurality of signaling processing devices. Based on the device identifier of the second signaling processing device, the corresponding relationship is queried to obtain the second IP address and the second PORT; Based on the second IP address and the second PORT, the pending message is sent to the second signaling processing device so that the second signaling processing device can send a third response message to the SMF network element based on the pending message.
4. The method according to any one of claims 1-3, characterized in that, The predetermined byte is one or more bytes in the SEID.
5. The method according to claim 4, characterized in that, The predefined byte is the first byte in SEID.
6. The method according to any one of claims 1-3, characterized in that, The step of obtaining the correspondence between the device identifier and the Internet Protocol (IP) address and port of each of the plurality of signaling processing devices includes: Receive device identifiers, IP addresses, and ports sent by the plurality of signaling processing devices respectively; The corresponding relationship is generated based on the device identifier, IP address, and PORT.
7. The method according to claim 2 or 3, characterized in that, The step of generating a device identifier for the second signaling processing device based on the SequenceID of the message to be processed and the number of the plurality of signaling processing devices includes: Based on the SequenceID and the quantity value, the device identifier of the second signaling processing device is generated according to the following formula: SERVERID = MOD(SequenceID, quantity value) Where SERVERID is the device identifier of the signaling processing device, and MOD(,) is the modulo function.
8. A load balancing device, characterized in that, A load balancer applied in a User Plane Function (UPF) network element, wherein the UPF network element further includes multiple signaling processing devices, including: The acquisition module is used to acquire the correspondence between the device identifier of each of the plurality of signaling processing devices and the Internet Protocol IP address and port. The receiving module is used to receive pending messages sent by the SMF network element of the session management function; The judgment module is used to determine the type of the message to be processed; The query module is used to query the correspondence based on the content of a predetermined byte in the Session Endpoint Identifier (SEID) of the message to be processed when the type is Packet Forwarding Control Protocol (PFCP) session message, to obtain the first IP address and the first PORT, wherein the content of the predetermined byte in the SEID is the device identifier of the first signaling processing device. The sending module is configured to send the message to be processed to the first signaling processing device according to the first IP address and the first PORT, so that the first signaling processing device can send a first response message to the SMF network element according to the message to be processed.
9. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the load balancing method of any one of claims 1 to 7 by executing the executable instructions.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the load balancing method according to any one of claims 1 to 7.