Load balancing method and device, equipment, storage medium and program
Patent Information
- Application Number
- CN202380100777.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-31
- Publication Date
- 2026-03-17
AI Technical Summary
In the 5G core network architecture, the load balancing flexibility of UPF network elements is poor, mainly because the SMF network elements need to have the function of load balancing management of multiple UPF network elements, resulting in the load balancing of UPF network elements being limited.
By setting up common components in the UPF cluster, receiving PFCP requests sent by SMF network elements, and determining target instances in multiple control surface instances and data surface instances according to the load balancing algorithm, the load balancing processing of UPF network elements on itself is realized.
It improves the load balancing flexibility of UPF network elements, reduces the functional requirements for SMF network elements, makes its functions simpler, and has lower manufacturing complexity and manufacturing costs.
Smart Images

Figure CN121693952A_ABST
Abstract
Description
Load balancing method, device, equipment, storage medium and program Technical Field
[0001] The embodiments of the present application relate to the field of communication technology, and in particular to a load balancing method, apparatus, device, storage medium, and program. Background Art
[0002] In the fifth generation (5G) core network architecture, the user plane function (UPF) network element can process user plane sessions.
[0003] Currently, multiple UPF network elements can run in parallel. The Session Management Function (SMF) network element can obtain the load of multiple UPF network elements and can perform load balancing management on multiple UPF network elements based on the load of each UPF network element and the load balancing algorithm. However, in the above method, the SMF network element needs to have the function of load balancing management for multiple UPF network elements. In other words, the above method has high functional requirements for the SMF network element, making the load balancing flexibility of the UPF network element less flexible.
[0004] Summary of the Invention
[0005] The present application provides a load balancing method, apparatus, device, storage medium and program, by which the load balancing flexibility of UPF network elements can be improved.
[0006] In a first aspect, the present application provides a load balancing method applied to a user plane function (UPF) cluster, wherein a common component is set in the UPF cluster, and multiple control plane instances and multiple data plane instances are deployed in the UPF cluster. The method includes:
[0007] Receiving a PFCP request sent by an SMF network element through the general component;
[0008] Determine a target control plane instance from the multiple control plane instances by using the general component according to a load balancing algorithm;
[0009] Processing the PFCP request through the target control plane instance to obtain a PFCP processing result;
[0010] A target data plane instance is determined from the multiple data plane instances through the target control plane instance, and data processing is performed through the target data plane instance according to the PFCP processing result.
[0011] In a possible implementation, a public cache is further provided in the UPF cluster; and determining a target data plane instance from the multiple data plane instances through the target control plane instance includes:
[0012] Determine the session identifier corresponding to the PFCP request;
[0013] Determining whether the session identifier exists in the public cache;
[0014] If not, obtaining the total load of each data plane instance to obtain multiple total loads, and determining the target data plane instance from the multiple data plane instances according to the multiple total loads;
[0015] If so, determine the target data plane instance according to the session identifier.
[0016] In a possible implementation, determining the target data plane instance from the multiple data plane instances according to the multiple total loads includes:
[0017] Determining a target total load according to the multiple total loads, wherein the target total load is a minimum value among the multiple total loads;
[0018] The data plane instance corresponding to the target total load is determined as the target data plane instance.
[0019] In a possible implementation, determining the target data plane instance according to the session identifier includes:
[0020] Determining a session processing file based on the session identifier, the session processing file including a historical PFCP processing result corresponding to the session and a data plane instance corresponding to the historical PFCP processing result, wherein the data plane instance corresponding to the historical PFCP processing result is a data plane instance for performing data processing based on the historical PFCP processing result;
[0021] The data plane instance corresponding to the historical PFCP processing result is determined as the target data plane instance.
[0022] In a possible implementation, the method further includes:
[0023] Determining a first data plane instance, wherein a total load of the first data plane instance is greater than a preset threshold;
[0024] Obtain multiple groups of IP addresses of the first data plane instance, and obtain the load corresponding to each group of the IP addresses to obtain multiple groups of loads;
[0025] Determine a target IP address based on the multiple groups of loads, wherein a difference between the total load of the first data plane instance and the load corresponding to the target IP address is less than or equal to the preset threshold;
[0026] The data processing task corresponding to the target IP address is migrated to the second data plane instance, and the sum of the total load of the second data plane instance and the load corresponding to the target IP address is less than or equal to the preset threshold.
[0027] In one possible implementation, determining the target IP address according to the multiple groups of load amounts includes:
[0028] Determine at least one to-be-selected load from the multiple groups of loads, where a difference between the total load of the first data plane instance and the to-be-selected load is less than or equal to the preset threshold;
[0029] determining a minimum value among the at least one load to be selected as the target load;
[0030] The IP address corresponding to the target load is determined as the target IP address.
[0031] In one possible implementation, migrating the data processing task corresponding to the target IP address to the second data plane instance includes:
[0032] Send the target IP address to the second data plane instance, and control the second data plane instance to bind the target IP address;
[0033] Send the session processing rule corresponding to the target IP address to the second data plane instance, so that the second data plane instance processes data according to the session processing rule.
[0034] In a second aspect, the present application provides a load balancing device, which is applied to a UPF cluster, in which a general component is set, and multiple control plane instances and multiple data plane instances are deployed in the UPF cluster. The device includes: a receiving module, a determining module, and a processing module, wherein:
[0035] The receiving module is used to receive the PFCP request sent by the SMF network element through the general component;
[0036] The determination module is configured to determine a target control plane instance from the multiple control plane instances using the general component according to a load balancing algorithm;
[0037] The processing module is configured to process the PFCP request through the target control plane instance to obtain a PFCP processing result;
[0038] The determining module is further configured to determine a target data plane instance from the multiple data plane instances through the target control plane instance;
[0039] The processing module is further configured to perform data processing through the target data plane instance according to the PFCP processing result.
[0040] In a possible implementation, a public cache is further provided in the UPF cluster; the determining module is specifically configured to:
[0041] Determine the session identifier corresponding to the PFCP request;
[0042] Determining whether the session identifier exists in the public cache;
[0043] If not, obtaining the total load of each data plane instance to obtain multiple total loads, and determining the target data plane instance from the multiple data plane instances according to the multiple total loads;
[0044] If so, determine the target data plane instance according to the session identifier.
[0045] In a possible implementation, the determining module 12 is specifically configured to:
[0046] Determining a target total load according to the multiple total loads, wherein the target total load is a minimum value among the multiple total loads;
[0047] The data plane instance corresponding to the target total load is determined as the target data plane instance.
[0048] In a possible implementation, the determining module is specifically configured to:
[0049] Determining a session processing file based on the session identifier, the session processing file including a historical PFCP processing result corresponding to the session and a data plane instance corresponding to the historical PFCP processing result, wherein the data plane instance corresponding to the historical PFCP processing result is a data plane instance for performing data processing based on the historical PFCP processing result;
[0050] The data plane instance corresponding to the historical PFCP processing result is determined as the target data plane instance.
[0051] In a possible implementation, the load balancing device further includes an acquisition module and a migration module, wherein:
[0052] The determining module is further configured to determine a first data plane instance, wherein the total load of the first data plane instance is greater than a preset threshold;
[0053] The acquisition module is used to acquire multiple groups of IP addresses of the first data plane instance, and acquire the load corresponding to each group of the IP addresses to obtain multiple groups of loads;
[0054] The determining module is further configured to determine a target IP address based on the multiple groups of loads, wherein a difference between the total load of the first data plane instance and the load corresponding to the target IP address is less than or equal to the preset threshold;
[0055] The migration module is used to migrate the data processing task corresponding to the target IP address to the second data plane instance, and the sum of the total load of the second data plane instance and the load corresponding to the target IP address is less than or equal to the preset threshold.
[0056] In a possible implementation, the determining module is specifically configured to:
[0057] Determine at least one to-be-selected load from the multiple groups of loads, where a difference between the total load of the first data plane instance and the to-be-selected load is less than or equal to the preset threshold;
[0058] determining a minimum value among the at least one load to be selected as the target load;
[0059] The IP address corresponding to the target load is determined as the target IP address.
[0060] In a possible implementation, the migration module is specifically configured to:
[0061] Send the target IP address to the second data plane instance, and control the second data plane instance to bind the target IP address;
[0062] Send the session processing rule corresponding to the target IP address to the second data plane instance, so that the second data plane instance processes data according to the session processing rule.
[0063] In a third aspect, the present application provides a load balancing device, comprising: a processor, and a memory communicatively connected to the processor;
[0064] The memory stores a computer program;
[0065] The processor executes the computer program to implement the method as described in any one of the first aspects.
[0066] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a computer, the method as described in any one of the first aspects is implemented.
[0067] In a fifth aspect, the present application provides a computer program product, comprising a computer program, which implements the method as described in any one of the first aspects when executed by a computer.
[0068] The present application provides a load balancing method, apparatus, device, storage medium and program, which can receive PFCP requests sent by SMF network elements through a general component; can determine the target control plane instance from multiple control plane instances through the general component according to the load balancing algorithm; can process the PFCP request through the target control plane instance to obtain the PFCP processing result; can determine the target data plane instance from multiple data plane instances through the target control plane instance, so that the target data plane instance can perform data processing according to the PFCP processing result. In the above method, there is no need to use the SMF network element to load balance the UPF cluster, so that the load balancing flexibility of the UPF cluster is better. In addition, the above method has low functional requirements for the SMF network element, so that the function of the SMF network element is relatively simple, the manufacturing complexity is low, and the manufacturing cost is low. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0070] FIG1 is a schematic diagram of a 5G core network architecture provided in an embodiment of the present application;
[0071] FIG2 is a schematic diagram of the architecture of a UPF network element provided in an embodiment of the present application;
[0072] FIG3 is a flow chart of a load balancing method provided in an embodiment of the present application;
[0073] FIG4 is a flow chart of another load balancing method provided in an embodiment of the present application;
[0074] FIG5 is a flow chart of another load balancing method provided in an embodiment of the present application;
[0075] FIG6 is a flow chart of another load balancing method provided in an embodiment of the present application;
[0076] FIG7 is a schematic diagram of the structure of a load balancing device provided in an embodiment of the present application;
[0077] FIG8 is a schematic diagram of the structure of another load balancing device provided in an embodiment of the present application;
[0078] FIG9 is a schematic diagram of the hardware structure of a load balancing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0079] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0080] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0081] This application relates to a 5G core network. To facilitate understanding of the embodiments of this application, the 5G core network architecture is first described in conjunction with Figure 1.
[0082] As shown in Figure 1, Figure 1 is a schematic diagram of a 5G core network architecture provided by an embodiment of the present application. Referring to Figure 1, the 5G core network may include a UPF network element, an authentication server function (AUSF) network element, an access and mobility management function (AMF) network element, an SMF network element, a network slice selection function (NSSF) network element, a network exposure function (NEF) network element, a network repository function (NRF) network element, a policy control function (PCF) network element, a unified data management function (UDM) network element, and an application function (AF) network element.
[0083] User Equipment (UE) can be a 5G terminal device such as a mobile phone or a computer.
[0084] The radio access network (R)AN) may be a 5G base station.
[0085] The data network (DN) may be a service server accessed by the UE.
[0086] As shown in Figure 1, AUSF network elements, AMF network elements, SMF network elements, AF network elements, UDM network elements, PCF network elements, NRF network elements, NEF network elements, and NSSF network elements can be connected through a bus. AUSF network elements can access the bus through the AUSF service interface (Nausf), AMF network elements can access the bus through the AMF service interface (Namf), SMF network elements can access the bus through the SMF service interface (Nsmf), AF network elements can access the bus through the AF service interface (Naf), UDM network elements can access the bus through the UDM service interface (Nudm), PCF network elements can access the bus through the PCF service interface (Npcf), NRF network elements can access the bus through the NRF service interface (Nnrf), NEF network elements can access the bus through the NEF service interface (Nnef), and NSSF network elements can access the bus through the NSSF service interface (Nnssf). The UE and the AMF network element can interact through the signaling plane interface (N1), the AMF network element and the (R)AN can interact through the signaling plane interface (N2), the (R)AN and the UPF network element can interact through the data interface (N3), the UPF network elements can interact through the user plane interface (N9), the UPF network element and the SMF network element can interact through the control interface (N4), and the UPF network element and the DN can interact through the data interface (N6).
[0087] The UPF network element can obtain the Packet Forwarding Control Protocol (PFCP) request from the SMF network element through the N4 interface, maintain the Packet Data Unit (PDU) session table according to the PFCP request, and forward the service traffic according to the PDU session table during the uplink and downlink data processing.
[0088] In related technologies, multiple UPF network elements can be set up to run in parallel. The SMF network element can obtain the load of each UPF network element and decide to which UPF network element to send a new session processing task based on the load of each UPF network element to achieve load balancing among the UPF network elements.
[0089] For example, assume that two UPF network elements are set, namely UPF network element 1 and UPF network element 2. The SMF network element obtains the load of UPF network element 1 and the load of UPF network element 2. If there is a new session processing task, the SMF network element can determine the UPF network element for processing the new session processing task from UPF network element 1 and UPF network element 2 based on the load of UPF network element 1, the load of UPF network element 2, and the load balancing algorithm.
[0090] However, in the above method, the SMF network element needs to have the function of load balancing management for multiple UPF network elements. If the SMF network element does not have the function of load balancing management for multiple UPF network elements, it cannot load balance the UPF network elements, making the load balancing of the UPF network elements limited by the SMF network elements, resulting in poor load balancing flexibility of the UPF network elements.
[0091] In view of this, the present application provides a load balancing method in which the control plane and data plane of a UPF network element can be set separately. The UPF network element can perform load balancing on the control plane and load balancing on the data plane. This method enables the UPF network element to perform load balancing on itself, making the load balancing of the UPF network element more flexible. Below, with reference to Figure 2, the architecture of the UPF network element involved in the embodiment of the present application is described.
[0092] Figure 2 is a schematic diagram of the architecture of a UPF network element provided in an embodiment of the present application. Referring to Figure 2 , a UPF network element can be configured with common components and multiple nodes (e.g., Node 1, Node 2, ..., and Node N in Figure 2 ), and the common components can communicate with each node. The UPF network element can communicate with SMF network elements, (R)AN network elements, and UPF network elements.
[0093] The nodes set in the UPF network element can be physical servers or virtual servers, and the number of nodes can be one or more, which is not limited in this application.
[0094] Common components can be container orchestration engines (Kubernetes, K8s), lightweight container orchestration engines (K3s), or multi-container orchestration tools (Docker-compose), etc.
[0095] In the above architecture, the control plane and data plane of the UPF network element can be set separately. Specifically, for any node, one or more control plane instances and / or one or more data plane instances can be deployed in the node.
[0096] The control plane instance may be an independent unit that implements the control plane function of the UPF network element, and the data plane instance may be an independent unit that implements the data plane function of the UPF network element.
[0097] For example, as shown in FIG2 , control plane instance 1, control plane instance 2, ..., and control plane instance n can be deployed in node 1. Data plane instance 1, data plane instance 2, ..., and data plane instance m can also be deployed in node 1. n and m are integers greater than or equal to 0, and n and m can be equal or unequal.
[0098] In the load balancing method provided in this application, the general component can load balance multiple control plane instances in the UPF cluster, and the control plane instance can load balance multiple data plane instances in the UPF cluster. Through the above method, the UPF network element can load balance itself, avoiding the need for other network elements to load balance the UPF network element, making the load balancing of the UPF network element more flexible.
[0099] The technical solutions shown in this application are described below through specific embodiments. It should be noted that the following embodiments can exist independently or in combination with each other, and the same or similar contents will not be repeated in different embodiments.
[0100] FIG3 is a flow chart of a load balancing method provided in an embodiment of the present application. As shown in FIG3 , the method of this embodiment includes:
[0101] S301. Receive a PFCP request sent by an SMF network element through a general component.
[0102] This embodiment can be applied to a UPF cluster, in which a common component is set and multiple control plane instances and multiple data plane instances are deployed.
[0103] Common components can be container orchestration engines (Kubernetes, K8s), lightweight container orchestration engines (K3s), or multi-container orchestration tools (Docker-compose), etc.
[0104] A UPF cluster may be a server cluster that can implement the functions of a UPF network element. The UPF cluster may include several physical servers and / or several virtual servers.
[0105] A control plane instance can be an independent unit that implements the control plane functions of a UPF network element. A control plane instance can be deployed on a physical server or a virtual server.
[0106] A data plane instance can be an independent unit that implements the UPF network data plane function. A data plane instance can be deployed on a physical server or a virtual server.
[0107] In this embodiment, multiple control plane instances and multiple data plane instances can be deployed on the same physical server in the UPF cluster; or, multiple control plane instances and multiple data plane instances can be deployed on the same virtual server in the UPF cluster; or, multiple control plane instances and multiple data plane instances can be deployed on multiple physical servers and / or multiple virtual servers in the UPF cluster. This application does not impose any limitations on this.
[0108] The PFCP request may be a request message sent by the SMF network element to the UPF network element to instruct processing of the user plane session.
[0109] In this embodiment, the UPF network element can receive PFCP requests through a universal component and send the PFCP requests to the control plane instance. The UPF network element does not need to set up a forwarding instance specifically for receiving PFCP requests, parsing the control plane instance corresponding to the request, and forwarding the PFCP request to the control plane instance. This avoids limiting the service capabilities of the UPF network element by the forwarding instance.
[0110] S302: Determine a target control plane instance from multiple control plane instances using a common component according to a load balancing algorithm.
[0111] The target control plane instance may be a control plane instance that needs to process the PFCP request.
[0112] The general component can determine the target control plane instance based on the load balancing algorithm and calculation. The load balancing algorithm includes but is not limited to the polling scheduling algorithm.
[0113] Optionally, the general component may obtain the load of each control plane instance, obtain multiple loads, and determine the target control plane instance based on the multiple loads.
[0114] In this embodiment, the target control plane instance can be determined by the general component, avoiding the load balancing of UPF network elements through SMF network elements, and having lower functional requirements for SMF network elements, making the SMF network elements simpler in function, less complex in manufacturing, and lower in manufacturing cost.
[0115] S303: Process the PFCP request through the target control plane instance to obtain a PFCP processing result.
[0116] In this embodiment, a public cache is also provided in the UPF cluster. The public cache can be a storage space accessible to all control plane instances in the UPF cluster. For example, the public cache can be a Remote Dictionary Server (Redis) component.
[0117] The public cache can be used to store processing information for each PFCP request. For example, after the target control plane instance processes the PFCP request and obtains the PFCP processing result, the PFCP processing result can be stored in the public cache.
[0118] In this embodiment, the target control plane instance may obtain historical processing information of the PFCP request from the public cache, and process the PFCP request according to the historical processing information and the PFCP request to obtain a PFCP processing result.
[0119] The historical processing information of the PFCP request may be historical processing information of the session corresponding to the PFCP request.
[0120] It should be understood that, for any session, the session may be requested by multiple PFCPs. For example, a PFCP request may be used to instruct the creation of a new session, modification of a session, or deletion of a session.
[0121] In this embodiment, for any session, processing information of all PFCP requests corresponding to the session may be stored in a public cache, so that other control plane network elements can further process the session.
[0122] The PFCP request may include a corresponding session identifier, and the target control plane instance may obtain historical processing information of the PFCP request from the cache space according to the session identifier.
[0123] For example, assuming the PFCP request is a modification request for session A, the target control plane instance can retrieve historical PFCP request processing information from the public cache based on the identifier of session A in the PFCP request. This historical PFCP request processing information includes session A establishment information and / or session A modification information. The target control plane instance can process the PFCP request based on the PFCP request and the session A establishment information and / or session A modification information, obtaining a PFCP processing result.
[0124] In this embodiment, after the target control plane instance obtains the PFCP processing result, it may also store the PFCP processing result in the public cache.
[0125] S304: Determine a target data plane instance from multiple data plane instances through the target control plane instance.
[0126] The target data plane instance may be a data plane instance that needs to be processed according to the PFCP processing result obtained in S303 .
[0127] In this embodiment, the target control plane instance can determine the target data plane instance according to the session corresponding to the PFCP request and the total load of multiple data plane instances in the UPF cluster.
[0128] Specifically, if the PFCP request is used to indicate that the session corresponding to the PFCP request is processed for the first time, the target control plane instance can determine the target data plane instance based on the total load of each data plane instance in the UPF cluster. If the PFCP request is used to indicate that the session corresponding to the PFCP request is not processed for the first time, the target control plane instance can obtain the data plane instance that was previously used to process the PFCP request corresponding to the session and determine the data plane instance as the target data plane instance.
[0129] S305: Perform data processing through the target data plane instance according to the PFCP processing result.
[0130] The data processing may include performing General Packet Radio Service Tunneling Protocol (GTP) encapsulation, decapsulation, Quality of Service (QoS), or caching on the data.
[0131] In this embodiment, the target data plane instance may process the data corresponding to the session corresponding to the PFCP request according to the PFCP processing result.
[0132] Specifically, the target data plane instance can receive data corresponding to the session corresponding to the PFCP request sent by upstream and downstream network elements, can process the received data, and can forward the processed data.
[0133] It should be understood that each data plane instance is configured with an IP address for communicating with other network elements.
[0134] It should be noted that in this embodiment, the target data plane instance can notify the relevant network elements of the IP address of the target data plane instance by publishing dynamic routes, thereby guiding the router to forward the data traffic corresponding to the session corresponding to the PFCP request to the target data plane instance. This does not require the additional configuration of a load balancing module for the data plane instance, and does not require the load balancing module to first receive the data traffic and then forward the data traffic to the target data plane instance based on the IP address corresponding to the data traffic. This avoids limiting the processing capacity of the UPF network element data plane instance by the load balancing module.
[0135] Among them, the relevant network element can be a (R)AN that communicates with the UPF network element through the N3 interface, a DN that communicates with the UPF network element through the N6 interface, or a UPF network element that communicates with the UPF network element through the N9 interface.
[0136] The load balancing method provided in this embodiment can receive the PFCP request sent by the SMF network element through the general component; can determine the target control plane instance from multiple control plane instances through the general component according to the load balancing algorithm; can process the PFCP request through the target control plane instance to obtain the PFCP processing result; can determine the target data plane instance from multiple data plane instances through the target control plane instance, so that the target data plane instance can perform data processing according to the PFCP processing result. In the above method, there is no need to use the SMF network element to load balance the UPF cluster, so that the load balancing flexibility of the UPF cluster is better. In addition, the above method has low functional requirements for the SMF network element, so that the function of the SMF network element is relatively simple, the manufacturing complexity is low, and the manufacturing cost is low.
[0137] Based on the embodiment of FIG. 3 , the process of determining the target data plane instance by the target control plane instance is further described in detail in conjunction with FIG. 4 .
[0138] FIG4 is a flow chart of another load balancing method provided in an embodiment of the present application. As shown in FIG4 , the method of this embodiment includes:
[0139] S401. Receive a PFCP request sent by an SMF network element through a general component.
[0140] S402: Determine a target control plane instance from multiple control plane instances using a common component according to a load balancing algorithm.
[0141] S403: Process the PFCP request through the target control plane instance to obtain a PFCP processing result.
[0142] It should be noted that the specific implementation of S401-S403 can be found in S301-S303 and will not be repeated here.
[0143] S404: Determine the session identifier corresponding to the PFCP request through the target control plane instance.
[0144] For any PFCP request, the PFCP request may include a session identifier corresponding to the PFCP request. In other words, the target control plane instance may parse the PFCP request and obtain the corresponding session identifier from the PFCP request.
[0145] S405: Determine whether the session identifier exists in the public cache through the target control plane instance.
[0146] If yes, execute S406;
[0147] If not, execute S407.
[0148] The public cache can be used to store the processing results of each PFCP request. That is, if the PFCP request is used to indicate that the session corresponding to the PFCP request is not being processed for the first time, the public cache can store historical processing information for the PFCP request and the corresponding session identifier. If the PFCP request is used to indicate that the session corresponding to the PFCP request is being processed for the first time, the public cache does not contain historical processing information for the PFCP request and the corresponding session identifier.
[0149] The first processing of a session may be establishing a session, and the non-first processing of a session may be modifying a session, deleting a session, and the like.
[0150] In this embodiment, the target control plane instance may search the public cache for the session identifier corresponding to the PFCP request.
[0151] S406: Determine the target data plane instance through the target control plane instance according to the session identifier.
[0152] In this embodiment, if a session identifier corresponding to a PFCP request exists in the public cache, a session processing file can be determined based on the session identifier. The session processing file includes the historical PFCP processing result corresponding to the session and the data plane instance corresponding to the historical PFCP processing result. The data plane instance corresponding to the historical PFCP processing result is a data plane instance on which data processing is performed based on the historical PFCP processing result. The data plane instance corresponding to the historical PFCP processing result is determined as the target data plane instance.
[0153] The historical PFCP processing result corresponding to the session may be a PFCP processing result obtained after processing the historical PFCP request corresponding to the session.
[0154] In this embodiment, all PFCP processing results of the same session can be processed by the same data plane instance according to the PFCP processing results. Thus, the data plane instance corresponding to the historical PFCP processing results is determined as the target data plane instance.
[0155] For example, assume that the UPF cluster includes data plane instance 1, data plane instance 2, and data plane instance 3. The public cache contains the session identifier corresponding to the PFCP request. The data plane instance corresponding to the session identifier and the historical PFCP processing result is data plane instance 2. The target data plane instance can then determine data plane instance 2 as the target data plane instance.
[0156] S407: Obtain the total load of each data plane instance to obtain multiple total loads.
[0157] In this embodiment, if the session identifier corresponding to the PFCP request does not exist in the public cache, the target control plane instance may determine the target data plane instance according to the total load of each data plane instance.
[0158] The target control plane instance can directly obtain the total load of each data plane instance from multiple data plane instances.
[0159] For example, for any data plane instance, the target control plane instance can send a total payload acquisition request to the data plane instance and receive a payload request response from the data plane instance, which can include the total payload of the data plane instance.
[0160] Optionally, the public cache may store the total load of each data plane instance in the UPF cluster. The target control plane instance may obtain the total load of each data plane instance from the public cache.
[0161] S408: Determine a target data plane instance from multiple data plane instances through the target control plane instance according to the multiple total loads.
[0162] In this embodiment, a target total load can be determined based on multiple total loads, where the target total load is the minimum value among the multiple total loads; and the data plane instance corresponding to the target total load is determined as the target data plane instance.
[0163] Specifically, the data plane instance with the smallest total load may be determined as the target data plane instance.
[0164] For example, assume that the session identifier corresponding to the PFCP request does not exist in the public cache. The UPF cluster includes three data plane instances. These three data plane instances may be data plane instance 1, data plane instance 2, and data plane instance 3. Of the three data plane instances, data plane instance 1 has the smallest total load. Therefore, the target data plane instance may determine data plane instance 1 as the target data plane instance.
[0165] S409: Perform data processing through the target data plane instance according to the PFCP processing result.
[0166] It should be noted that the specific implementation of S408 can be found in S305 and will not be described in detail here.
[0167] The load balancing method provided in this embodiment can determine the target control plane instance through the common component according to the load balancing algorithm; can process the PFCP request through the target control plane instance; can determine the target data plane instance through the target control instance according to the session identifier corresponding to the PFCP request and the total load of each data plane instance; the target data plane instance can perform session processing according to the PFCP request. In the above method, there is no need to use the SMF network element to load balance the UPF cluster, so that the load balancing flexibility of the UPF cluster is better. In addition, the above method has low functional requirements for the SMF network element, which makes the SMF network element simpler in function, less complex in manufacturing, and less expensive in manufacturing.
[0168] Based on any of the above embodiments, the load balancing method provided in this application is described below with reference to FIG5 through a specific example.
[0169] FIG5 is a flow chart of another load balancing method provided in an embodiment of the present application. As shown in FIG5 , the method of this embodiment includes:
[0170] S501. The general component receives a PFCP request sent by an SMF network element.
[0171] It should be noted that the specific implementation of S501 can be found in S301 and will not be repeated here.
[0172] S502: The general component determines a target control plane instance from multiple control plane instances according to a load balancing algorithm.
[0173] As shown in FIG5 , it is assumed that the UPF cluster includes control plane instance 1 and control plane instance 2.
[0174] Assume that the general component determines that the target control plane instance is control plane instance 2 according to the load balancing algorithm.
[0175] S503: The general component sends a PFCP request to the target control plane instance.
[0176] After determining that the target control plane instance is control plane instance 2, the general component can send a PFCP request to control plane instance 2, so that control plane instance 2 can process the PFCP request.
[0177] S504: The target control plane instance processes the PFCP request and obtains a PFCP processing result.
[0178] In this embodiment, the control plane instance 2 may process the PFCP request to obtain a PFCP processing result.
[0179] It should be noted that the method for the control plane instance 2 to process the PFCP request can be found in S303 and will not be described in detail here.
[0180] S505: The target control plane instance sends the PFCP processing result to the public cache.
[0181] In this embodiment, the control plane instance 2 may send the PFCP processing result to the public cache.
[0182] S506: The target control plane instance determines a target data plane instance from multiple data plane instances.
[0183] As shown in FIG5 , it is assumed that the UPF cluster includes data plane instance 1 and data plane instance 2.
[0184] Assume that control plane instance 2 determines that the target data plane instance is data plane instance 2.
[0185] It should be noted that the method for the control plane instance 2 to determine the target data plane instance can be found in S404-S408, which will not be described in detail here.
[0186] S507: The target control plane instance sends the PFCP processing result to the target data plane instance.
[0187] In this embodiment, the PFCP processing result may be sent from the control plane instance 2 to the data plane instance 2.
[0188] S508: The target data plane instance performs data processing according to the PFCP processing result.
[0189] It should be noted that the specific implementation of S508 can be found in S305 and will not be repeated here.
[0190] In the load balancing method provided in this embodiment, the general component can perform load balancing on multiple control plane instances in the UPF cluster, and the control plane instance can perform load balancing on multiple data plane instances in the UPF cluster. In the above method, there is no need to use other network elements to load balance the UPF cluster, which makes the load balancing of the UPF cluster more flexible.
[0191] Based on any of the above embodiments, during the operation of the UPF cluster, it is also possible to migrate part of the load on the data plane instance with a larger total load to the data plane instance with a smaller total load to maintain load balancing among the data plane instances. This method is described below in conjunction with Figure 6.
[0192] FIG6 is a flow chart of another load balancing method provided in an embodiment of the present application. As shown in FIG6 , the method of this embodiment includes:
[0193] S601: Determine a first data plane instance, where the total load of the first data plane instance is greater than a preset threshold.
[0194] The size of the preset threshold can be set according to actual needs, and this embodiment does not limit this.
[0195] The first data plane instance may be a data plane instance in the UPF cluster whose total load is greater than a preset threshold.
[0196] Optionally, the first data plane instance can be determined by a preset control plane instance. The preset control plane instance can be a preset plane instance determined from all control plane instances in the UPF cluster according to a preset strategy. The preset strategy includes but is not limited to a polling scheduling strategy.
[0197] S602: Obtain multiple groups of IP addresses of the first data plane instance, and obtain the load corresponding to each group of IP addresses to obtain multiple groups of loads.
[0198] In this embodiment, for any data plane instance, the IP address of the data plane instance can be one or more groups. Specifically, a data plane instance can have a group of IP addresses consisting of an N3 interface IP address, an N6 interface IP address, and an N9 interface IP address; or a data plane instance can have multiple groups of IP addresses consisting of multiple N3 interface IP addresses, multiple corresponding N6 interface IP addresses, and multiple corresponding N9 interface IP addresses.
[0199] For any data plane instance, multiple groups of IP addresses of the data plane instance and the load corresponding to each group of IP addresses can be stored in the public cache.
[0200] In this embodiment, multiple groups of IP addresses of the first data plane instance and the load corresponding to each group of IP addresses can be obtained from the public cache.
[0201] S603: Determine the target IP address according to the multiple groups of loads.
[0202] The load corresponding to the target IP address may be the load that needs to be migrated to other data plane instances.
[0203] In this embodiment, the difference between the total load of the first data plane instance and the load corresponding to the target IP address is less than or equal to a preset threshold.
[0204] In this embodiment, at least one load amount to be selected can be determined from multiple groups of load amounts, and the difference between the total load amount of the first data plane instance and the load amount to be selected is less than or equal to a preset threshold; the minimum value of at least one load amount to be selected is determined as the target load amount; and the IP address corresponding to the target load amount is determined as the target IP address.
[0205] For example, assume that the first data plane instance has three groups of IP addresses, and the total load corresponding to the three groups of IP addresses is greater than a preset threshold. The difference between the total load and the load corresponding to the first group of IP addresses is less than the preset threshold, the difference between the total load and the load corresponding to the second group of IP addresses is less than the preset threshold, and the difference between the total load and the load corresponding to the third group of IP addresses is greater than the preset threshold. Then, the load corresponding to the first group of IP addresses can be the candidate load, and the load corresponding to the second group of IP addresses can be the candidate load. Assuming that the load corresponding to the first group of IP addresses is less than the load corresponding to the second group of IP addresses, the first group of IP addresses can be determined as the target IP address.
[0206] In this embodiment, the difference between the total load of the first data plane instance and the load corresponding to the target IP address is less than or equal to a preset threshold. This ensures that after migrating the load corresponding to the target IP address to another data plane instance, the total load of the first data plane instance is less than or equal to the preset threshold. Furthermore, determining the minimum value of at least one candidate load as the target load ensures that the migrated load is small, minimizing the impact on the normal operation of the UPF network element.
[0207] S604: Migrate the data processing task corresponding to the target IP address to the second data plane instance.
[0208] The sum of the total load of the second data plane instance and the load corresponding to the target IP address is less than or equal to a preset threshold.
[0209] In this embodiment, the target IP address can be sent to the second data plane instance, and the second data plane instance can be controlled to bind the target IP address; the session processing rules corresponding to the target IP address are sent to the second data plane instance, so that the second data plane instance processes data according to the session processing rules.
[0210] In this embodiment, after the second data plane instance is bound to the target IP address, the target IP address can be notified to relevant network elements by publishing dynamic routes, thereby instructing routers to forward data traffic corresponding to the target IP address to the second data plane instance. It should be noted that for any data plane instance, the process of processing data using the target IP address by the data plane instance can be that the data plane instance processes the received data using the target IP address according to the session processing rules corresponding to the target IP address.
[0211] In this embodiment, the second data plane instance can be bound to the target IP address and create a session processing rule corresponding to the target IP address, so as to process the corresponding traffic data through the target IP address according to the session processing rule corresponding to the target IP address.
[0212] The load balancing method provided in this embodiment allows the UPF cluster to migrate part of the load on the data plane instance with a larger total load to the data plane instance with a smaller total load, so as to maintain the load balance of each data plane instance, thereby achieving better load balancing effect of the UPF network element. In the above method, there is no need to use other network elements to load balance the UPF cluster, which makes the load balancing flexibility of the UPF cluster better.
[0213] FIG7 is a schematic diagram of the structure of a load balancing device provided in an embodiment of the present application. Referring to FIG7, the load balancing device 10 is applied to a user plane function (UPF) cluster, wherein a common component is set in the UPF cluster, and multiple control plane instances and multiple data plane instances are deployed in the UPF cluster. The device 10 includes: a receiving module 11, a determining module 12, and a processing module 13, wherein:
[0214] The receiving module 11 is used to receive the PFCP request sent by the SMF network element through the general component;
[0215] The determining module 12 is configured to determine a target control plane instance from the multiple control plane instances using the general component according to a load balancing algorithm;
[0216] The processing module 13 is configured to process the PFCP request through the target control plane instance to obtain a PFCP processing result;
[0217] The determining module 12 is further configured to determine a target data plane instance from the multiple data plane instances through the target control plane instance;
[0218] The processing module 13 is further configured to perform data processing through the target data plane instance according to the PFCP processing result.
[0219] The load balancing device provided in this embodiment can be used to execute the load balancing method in the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail here.
[0220] In a possible implementation, a public cache is further provided in the UPF cluster; the determining module 12 is specifically configured to:
[0221] Determine the session identifier corresponding to the PFCP request;
[0222] Determining whether the session identifier exists in the public cache;
[0223] If not, obtaining the total load of each data plane instance to obtain multiple total loads, and determining the target data plane instance from the multiple data plane instances according to the multiple total loads;
[0224] If so, determine the target data plane instance according to the session identifier.
[0225] In a possible implementation, the determining module 12 is specifically configured to:
[0226] Determining a target total load according to the multiple total loads, wherein the target total load is a minimum value among the multiple total loads;
[0227] The data plane instance corresponding to the target total load is determined as the target data plane instance.
[0228] In a possible implementation, the determining module 12 is specifically configured to:
[0229] Determining a session processing file based on the session identifier, the session processing file including a historical PFCP processing result corresponding to the session and a data plane instance corresponding to the historical PFCP processing result, wherein the data plane instance corresponding to the historical PFCP processing result is a data plane instance for performing data processing based on the historical PFCP processing result;
[0230] The data plane instance corresponding to the historical PFCP processing result is determined as the target data plane instance.
[0231] FIG8 is a structural diagram of another load balancing device provided by an embodiment of the present application. Referring to FIG8 , the load balancing device 10 further includes an acquisition module 14 and a migration module 15, wherein:
[0232] The determining module 12 is further configured to determine a first data plane instance, wherein the total load of the first data plane instance is greater than a preset threshold;
[0233] The acquisition module 14 is used to acquire multiple groups of IP addresses of the first data plane instance, and acquire the load corresponding to each group of IP addresses to obtain multiple groups of loads;
[0234] The determining module 12 is further configured to determine a target IP address based on the multiple groups of loads, wherein a difference between the total load of the first data plane instance and the load corresponding to the target IP address is less than or equal to the preset threshold;
[0235] The migration module 15 is used to migrate the data processing task corresponding to the target IP address to the second data plane instance, and the sum of the total load of the second data plane instance and the load corresponding to the target IP address is less than or equal to the preset threshold.
[0236] In a possible implementation, the determining module 12 is specifically configured to:
[0237] Determine at least one to-be-selected load from the multiple groups of loads, where a difference between the total load of the first data plane instance and the to-be-selected load is less than or equal to the preset threshold;
[0238] determining a minimum value among the at least one load to be selected as the target load;
[0239] The IP address corresponding to the target load is determined as the target IP address.
[0240] In a possible implementation, the migration module 15 is specifically configured to:
[0241] Send the target IP address to the second data plane instance, and control the second data plane instance to bind the target IP address;
[0242] Send the session processing rule corresponding to the target IP address to the second data plane instance, so that the second data plane instance processes data according to the session processing rule.
[0243] The load balancing device provided in this embodiment can be used to execute the load balancing method in the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail here.
[0244] Figure 9 is a schematic diagram of the hardware structure of a load balancing device provided in an embodiment of the present application. Referring to Figure 9 , the load balancing device 20 may include a processor 21 and a memory 22 . The processor 21 and the memory 22 are capable of communicating; illustratively, the processor 21 and the memory 22 communicate via a communication bus 23 . The memory 22 is configured to store program instructions, and the processor 21 is configured to invoke the program instructions in the memory to execute the load balancing method described in any of the aforementioned method embodiments.
[0245] Optionally, the load balancing device 20 may further include a communication interface, which may include a transmitter and / or a receiver.
[0246] Optionally, the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), or application-specific integrated circuits (ASICs). A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in this application may be directly implemented by a hardware processor or implemented by a combination of hardware and software modules in the processor.
[0247] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a computer, the load balancing method described in any of the above method embodiments is implemented. The implementation principle and technical effects are similar and are not described in detail here.
[0248] An embodiment of the present application also provides a computer program product, including a computer program. When the computer program is executed by a computer, it implements the load balancing method described in any of the above method embodiments. Its implementation principles and technical effects are similar and will not be repeated here.
[0249] All or part of the steps of the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, it performs the steps of the above-mentioned method embodiments; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disc, and any combination thereof.
[0250] The present application embodiment is described with reference to the flow chart and / or block diagram of the method, device (system), and computer program product according to the embodiment of the present application. It should be understood that each process and / or box in the flow chart and / or block diagram and the combination of the process and / or box in the flow chart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processing unit of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable terminal device to produce a machine, so that the instruction executed by the processing unit of the computer or other programmable terminal device produces a device for realizing the function specified in one process or multiple processes and / or one box or multiple boxes of the flow chart.
[0251] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0252] These computer program instructions can also be loaded onto a computer or other programmable terminal device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0253] Obviously, those skilled in the art may make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations.
[0254] In this application, the term "include" and its variations may refer to non-restrictive inclusion; the term "or" and its variations may refer to "and / or". In this application, the terms "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. In this application, "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship.
Claims
1. A load balancing method, characterized in that: Applied to a user plane function UPF cluster, a common component is set in the UPF cluster, and multiple control plane instances and multiple data plane instances are deployed in the UPF cluster. The method includes: Receiving a message forwarding control protocol PFCP request sent by a session management function SMF network element through the general component; Determine a target control plane instance among the multiple control plane instances through the general component according to a load balancing algorithm; Processing the PFCP request through the target control plane instance to obtain a PFCP processing result; A target data plane instance is determined from among the multiple data plane instances through the target control plane instance, and data processing is performed through the target data plane instance according to the PFCP processing result.
2. The method according to claim 1, characterized in that: A public cache is also provided in the UPF cluster; Determining a target data plane instance from among the multiple data plane instances by using the target control plane instance includes: Determine the session identifier corresponding to the PFCP request; Determining whether the session identifier exists in the public cache; If not, obtaining the total load of each data plane instance to obtain multiple total loads, and determining the target data plane instance from the multiple data plane instances according to the multiple total loads; If so, determine the target data plane instance according to the session identifier.
3. The method according to claim 2, characterized in that Determining the target data plane instance from the multiple data plane instances according to the multiple total loads includes: Determine a target total load according to the multiple total loads, wherein the target total load is a minimum value among the multiple total loads; The data plane instance corresponding to the target total load is determined as the target data plane instance.
4. The method according to claim 2, characterized in that: Determining the target data plane instance according to the session identifier includes: Determine a session processing file according to the session identifier, wherein the session processing file includes a historical PFCP processing result corresponding to the session and a data plane instance corresponding to the historical PFCP processing result, wherein the data plane instance corresponding to the historical PFCP processing result is Data plane instance for data processing; The data plane instance corresponding to the historical PFCP processing result is determined as the target data plane instance.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Determining a first data plane instance, wherein a total load of the first data plane instance is greater than a preset threshold; Obtain multiple groups of IP addresses of the first data plane instance, and obtain the load corresponding to each group of the IP addresses to obtain multiple groups of loads; Determine a target IP address according to the multiple groups of loads, wherein a difference between the total load of the first data plane instance and the load corresponding to the target IP address is less than or equal to the preset threshold; The data processing task corresponding to the target IP address is migrated to the second data plane instance, and the sum of the total load of the second data plane instance and the load corresponding to the target IP address is less than or equal to the preset threshold.
6. The method according to claim 5, characterized in that Determining a target IP address according to the plurality of groups of loads includes: Determine at least one load to be selected from the multiple groups of loads, and the difference between the total load of the first data plane instance and the load to be selected is less than or equal to the preset threshold; Determine the minimum value of the at least one load to be selected as the target load; The IP address corresponding to the target load is determined as the target IP address.
7. The method according to claim 5 or 6, characterized in that: Migrating the data processing task corresponding to the target IP address to the second data plane instance includes: Sending the target IP address to the second data plane instance, and controlling the second data plane instance to bind the target IP address; The session processing rule corresponding to the target IP address is sent to the second data plane instance, so that the second data plane instance processes data according to the session processing rule.
8. A load balancing device, the device is applied to a UPF cluster, a common component is set in the UPF cluster, a plurality of control plane instances and a plurality of data plane instances are deployed in the UPF cluster, and the device comprises: A receiving module, a determining module and a processing module, wherein: The receiving module is used to receive the PFCP request sent by the SMF network element through the general component; The determination module is used to determine the target control plane instance among the multiple control plane instances through the general component according to the load balancing algorithm; The processing module is used to process the PFCP request through the target control plane instance, Get the PFCP processing results; The determination module is further configured to determine a target data plane instance from among the multiple data plane instances through the target control plane instance; The processing module is further configured to perform data processing through the target data plane instance according to the PFCP processing result.
9. A load balancing device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores a computer program; The processor executes the computer program to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a computer, the method according to any one of claims 1 to 7 is implemented.
11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a computer.