Dynamic load balancing method and system of SCP gateway, medium and equipment
By collecting and processing load status data of network element services, using K-means clustering and Markov chain models to predict load status changes, and combining the Q-learning algorithm to optimize load balancing weights, the problem of uneven load on 5G SCP gateways under signaling surges is solved, achieving more efficient load balancing and improving system performance.
Patent Information
- Application Number
- CN202510924440.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2025-09-05
AI Technical Summary
The existing load balancing method of 5G SCP gateway is prone to local overload or uneven resource allocation in sudden scenarios such as signaling surges, and lacks the ability to predict the dynamic change trend of load status and future transfer probability.
The current and historical load status data of network element services are collected, the load mean is calculated through a time sliding window, the K-means clustering algorithm is used to determine the load status threshold, the state transition probability is calculated in combination with the Markov chain model, the state transition matrix is generated, and the Q-learning algorithm is used to adjust the load balancing weight to achieve dynamic load balancing distribution.
It improves the dynamic response capability to signaling surges, optimizes the load distribution strategy, achieves balanced distribution of network element loads, and improves the overall system performance.
Smart Images

Figure CN120602993A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of 5G communication load balancing, and relates to a dynamic load balancing method, system, medium and device for an SCP gateway. Background Art
[0002] As the integration of digital power grids and the Internet of Things deepens, the demand for reliable data backhaul at key nodes such as metering terminals increases. As the communications infrastructure, the 5G core network's SCP gateway assumes the core functions of signaling routing and load balancing, which directly affects the overall network performance and service reliability.
[0003] In the existing technology, the load balancing method of SCP gateway mainly relies on static or simple allocation strategies based on the current load. Requests are distributed only according to the current load status of the network element instance, without considering the dynamic change trend of the load status and the possible future transfer probability. As a result, local overload or uneven resource allocation may occur in sudden scenarios such as signaling surges. Summary of the Invention
[0004] The present application provides a dynamic load balancing method, system, medium and device for an SCP gateway, which can solve the problems of insufficient dynamic response to signaling surges and lack of ability to predict load state transition probability in the existing 5G SCP gateway load balancing method.
[0005] To achieve the above objectives, in a first aspect, the present invention provides a dynamic load balancing method for an SCP gateway, comprising:
[0006] Collect current and historical load status data of each network element service;
[0007] Performing clustering processing on the historical load status data, determining a load status threshold and dividing the historical load status of each network element service, and determining a first load balancing weight of each network element service;
[0008] Based on each of the historical load states, the state transition probability of each network element service is calculated using a Markov chain model to generate a state transition matrix;
[0009] Based on the state transition matrix and the current load state data, adjusting each of the first load balancing weights according to a preset Q learning algorithm, and outputting a second load balancing weight for each network element service;
[0010] According to the preset policy corresponding to each of the second load balancing weights, load balancing distribution is performed on each of the current network element services of the SCP gateway.
[0011] Compared with the existing technology, the embodiments of the present application have the following beneficial effects: by collecting the current and historical load status data of each network element service, basic data support is provided for subsequent analysis; clustering the historical load data and determining the load status threshold to achieve dynamic division of the load status and avoid instantaneous fluctuation interference; calculating the state transition probability based on the Markov chain model and generating the state transition matrix, it is possible to predict the changing trend of the future load status of the network element service; combining the Q learning algorithm to adjust the load balancing weight, the request allocation strategy can be dynamically optimized according to the real-time status; finally, load balancing distribution is performed according to the adjusted weight to achieve intelligent scheduling of requests. The various steps of the overall solution work together, and through the combination of dynamic state division, state transition prediction and reinforcement learning optimization, the dynamic response capability to signaling surges is effectively improved, and the problem of unreasonable load distribution caused by the lack of state prediction in traditional methods is solved, so that the network element load distribution is more balanced and the overall system performance is improved.
[0012] In some embodiments of the first aspect of the present application, collecting current load status data and historical load status data of each network element service includes:
[0013] Collect current and historical raw load status data of each network element service;
[0014] For each of the original load status data, a load average is calculated through a time sliding window as the current load status data and historical load status data of each of the network element services.
[0015] Compared with the existing technology, the above embodiment has the following beneficial effects: by calculating the load mean through a time sliding window to process the original load data, it can eliminate the interference of instantaneous fluctuations on the load status, so that the collected current and historical load status data can better reflect the actual load level of the network element service, and provide a more stable input basis for subsequent analysis.
[0016] In some embodiments of the first aspect of the present application, clustering the historical load status data, determining a load status threshold, and dividing the historical load status of each network element service includes:
[0017] Clustering the historical load state data using a K-means clustering algorithm to determine each load state threshold;
[0018] At preset intervals, based on the sliding time window and according to the distribution of load status data in each window, the load status threshold is adjusted, and the historical load status of each network element service is obtained by division.
[0019] Compared with the existing technology, the above embodiment has the following beneficial effects: the K-means clustering algorithm is used to cluster historical load data to determine the threshold, and the threshold is dynamically adjusted twice in combination with the sliding time window. The load state division standard can be adaptively updated according to the actual load distribution, avoiding the defect that the fixed threshold cannot adapt to network changes, and improving the accuracy and flexibility of load state division.
[0020] In some embodiments of the first aspect of the present application, the calculating, based on each of the historical load states, the state transition probability of each network element service by a Markov chain model to generate a state transition matrix includes:
[0021] Calculating a state transition probability according to the number of state transitions of each network element service in each of the historical load states;
[0022] At preset intervals, the state transition probabilities are adjusted based on the sliding time window and the time decay factor, and a state transition matrix is generated according to the adjusted state transition probabilities. The adjustment algorithm is as follows: in, and They represent the adjusted probability of transition of the network element service from load state i to state j, the probability calculated based on the historical window, and the probability calculated based on the current window, respectively. λ represents the time decay factor.
[0023] Compared with the existing technology, the above embodiment has the following beneficial effects: the state transition probability is calculated based on the number of historical load state transitions, and the transition probability generation matrix is adjusted through a sliding time window and a time attenuation factor, thereby strengthening the influence weight of recent data on state transition prediction, making the state transition matrix more in line with the current network load change trend, and improving the timeliness and accuracy of load state prediction.
[0024] In some embodiments of the first aspect of the present application, adjusting each of the first load balancing weights according to a preset Q learning algorithm based on the state transition matrix and current load state data, and outputting a second load balancing weight for each network element service, includes:
[0025] Define the current load state set of each network element service as the state space;
[0026] Define the set of load balancing weight adjustment operations for each network element service as the action space;
[0027] Based on the state transfer matrix, the state space and the action space, each of the first load balancing weights is adjusted by a preset Q learning algorithm to output a second load balancing weight of each network element service.
[0028] Compared with the existing technology, the above embodiment has the following beneficial effects: by defining the state space as the current load state set and the action space as the weight adjustment operation set, combining the Q learning algorithm to adjust the weight, the load state is directly associated with the allocation strategy, and adaptive optimization of the request allocation weight is achieved, so that the load balancing strategy can be dynamically adjusted as the network status changes.
[0029] In some embodiments of the first aspect of the present application, performing load balancing distribution on each of the network element services currently provided by the SCP gateway according to a preset policy corresponding to each of the second load balancing weights includes:
[0030] For URLLC requests in each network element service, load instance allocation is performed with the highest priority;
[0031] For non-URLLC requests, load instance distribution is performed according to the corresponding second load balancing weight.
[0032] Compared with the existing technology, the above embodiment has the following beneficial effects: the highest priority is assigned to URLLC requests, non-URLLC requests are assigned according to weight, and a hierarchical decision-making strategy is implemented for different business types, which not only ensures the low latency and high reliability requirements of critical businesses, but also optimizes the resource utilization efficiency of ordinary businesses, and improves the system's adaptability to multiple business types.
[0033] In a second aspect, the present invention further provides a dynamic load balancing system for an SCP gateway, comprising: a data acquisition module, a first weight determination module, a transfer matrix generation module, a second weight determination module, and an execution module;
[0034] The data acquisition module is used to collect the current load status data and historical load status data of each network element service;
[0035] The first weight determination module is configured to perform clustering processing on the historical load status data, determine a load status threshold, divide the historical load status of each network element service, and determine a first load balancing weight for each network element service;
[0036] The transfer matrix generation module is used to calculate the state transition probability of each network element service through a Markov chain model based on each of the historical load states to generate a state transfer matrix;
[0037] The second weight determination module is configured to adjust each of the first load balancing weights according to a preset Q learning algorithm based on the state transition matrix and current load state data, and output a second load balancing weight for each network element service;
[0038] The execution module is configured to perform load balancing distribution on each of the network element services currently provided by the SCP gateway according to a preset policy corresponding to each of the second load balancing weights.
[0039] Compared with the prior art, the above embodiments of the present application have the following beneficial effects: by collecting the current and historical load status data of each network element service, basic data support is provided for subsequent analysis; clustering the historical load data and determining the load status threshold to achieve dynamic division of the load status and avoid instantaneous fluctuation interference; calculating the state transition probability based on the Markov chain model and generating the state transition matrix, it is possible to predict the changing trend of the future load status of the network element service; combining the Q learning algorithm to adjust the load balancing weight, the request allocation strategy can be dynamically optimized according to the real-time status; finally, load balancing distribution is performed according to the adjusted weight to achieve intelligent scheduling of requests. The various steps of the overall solution work together, and through the combination of dynamic state division, state transition prediction and reinforcement learning optimization, the dynamic response capability to signaling surges is effectively improved, and the problem of unreasonable load distribution caused by the lack of state prediction in traditional methods is solved, so that the network element load distribution is more balanced and the overall system performance is improved.
[0040] In some embodiments of the second aspect of the present application, the data acquisition module includes: an acquisition unit and a mean value calculation unit;
[0041] The collection unit is used to collect the current and historical original load status data of each network element service;
[0042] The mean value calculation unit is used to calculate the load mean value of each of the original load status data through a time sliding window as the current load status data and historical load status data of each of the network element services.
[0043] Compared with the existing technology, the above embodiment has the following beneficial effects: by calculating the load mean through a time sliding window to process the original load data, it can eliminate the interference of instantaneous fluctuations on the load status, so that the collected current and historical load status data can better reflect the actual load level of the network element service, and provide a more stable input basis for subsequent analysis.
[0044] In a third aspect, the present invention further provides a dynamic load balancing device for an SCP gateway, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, the steps of any one of the dynamic load balancing methods for an SCP gateway of the present invention are implemented.
[0045] In a fourth aspect, an embodiment of the present application further 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 processor, the computer program implements the steps of any one of the dynamic load balancing methods for an SCP gateway of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 : A flow chart of a dynamic load balancing method for an SCP gateway provided in some embodiments of the present invention.
[0047] Figure 2 : A structural diagram of a dynamic load balancing system for an SCP gateway provided in some embodiments of the present invention.
[0048] Figure 3 : A structural diagram of a dynamic load balancing device of an SCP gateway provided in some embodiments of the present invention.
[0049] Figure 4 : A framework diagram of dynamic load balancing of an SCP gateway provided in some embodiments of the present invention. DETAILED DESCRIPTION
[0050] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0051] Example 1:
[0052] Please refer to Figure 1 To address the problems in the prior art of 5G SCP gateway load balancing methods, such as insufficient dynamic response to signaling surges and lack of ability to predict load state transition probabilities, an embodiment of the present invention provides a dynamic load balancing method for an SCP gateway, including steps S1 to S5:
[0053] Step S1: Collect current load status data and historical load status data of each network element service.
[0054] Furthermore, the step S1 can be implemented by the following preferred implementation, including steps S11-S12, as follows:
[0055] S11: Collect current and historical raw load status data of each network element service.
[0056] S12: For each of the original load status data, a load average is calculated through a time sliding window, and the calculated load average is used as the current load status data and historical load status data of each of the network element services.
[0057] During specific implementation, when collecting data, it is necessary to collect the status data of the network element service, including the load of the network element service, the business request response time of the network element service, etc., and then use the sliding window to calculate the load average to eliminate instantaneous fluctuation interference.
[0058] In this preferred embodiment, the original load data is processed by calculating the load mean through a time sliding window, which can eliminate the interference of instantaneous fluctuations on the load status, so that the collected current and historical load status data can better reflect the actual load level of the network element service, providing a more stable input basis for subsequent analysis.
[0059] Step S2: clustering the historical load status data, determining a load status threshold, dividing the historical load status of each network element service, and determining a first load balancing weight of each network element service.
[0060] Furthermore, the step S2 of dividing the historical load status of each network element service can be implemented by the following preferred implementation, including steps S21-S22, as follows:
[0061] S21: clustering the historical load status data using a K-means clustering algorithm to determine each load status threshold;
[0062] S22: At preset intervals, based on the sliding time window and according to the distribution of load status data in each window, the load status threshold is adjusted, and the historical load status of each network element service is obtained through division.
[0063] In specific implementation, after data collection, K-means clustering can be used to cluster historical load status data, generating three thresholds: low (0-40%), medium (40-70%), and high (70-100%). A sliding window is then used for adaptive updates, with the load distribution calculated based on the sliding window every T time. The high load threshold is adjusted according to the 90th percentile (P90). Finally, the different load states divided according to the adjusted threshold are assigned corresponding first load balancing weights. This design, on the one hand, allows the clustering algorithm to perform unsupervised learning based on the overall distribution of historical data, without relying on manually set thresholds, and can initially identify "what type of load is high." On the other hand, the 90th percentile (P90) is set for runtime adaptive optimization, capturing instantaneous load fluctuation trends based on data in the real-time sliding window. This is more sensitive and real-time. The two work together to improve the flexibility of the division.
[0064] In this preferred embodiment, the K-means clustering algorithm is used to cluster historical load data to determine the threshold, and the sliding time window is combined with the secondary dynamic adjustment of the threshold to adaptively update the load state division standard according to the actual load distribution, avoiding the defect that the fixed threshold cannot adapt to network changes, and improving the accuracy and flexibility of load state division.
[0065] Step S3: Based on each of the historical load states, the state transition probability of each network element service is calculated through a Markov chain model to generate a state transition matrix.
[0066] Furthermore, the step S3 can be implemented by the following preferred implementation, including S31-S32, as follows:
[0067] S31: Calculating a state transition probability according to the number of state transitions of each network element service in each of the historical load states;
[0068] S32: At predetermined intervals, the state transition probabilities are adjusted based on the sliding time window and the time decay factor, and a state transition matrix is generated according to the adjusted state transition probabilities. The adjustment algorithm is as follows: in, and They represent the adjusted probability of transition of the network element service from load state i to state j, the probability calculated based on the historical window, and the probability calculated based on the current window, respectively. λ represents the time decay factor.
[0069] In the specific implementation, the Markov chain model is introduced to calculate the future state transition probability of each instance. The state transition matrix is calculated as follows:
[0070] Among them, P ij represents the state transition probability of state i→j, N i→j represents the number of state transitions from state i to j, and K represents the number of states.
[0071] Based on the state transition probability, some high-load instances, such as P(medium→high)>0.7, can be predicted and marked in advance. Then, the sliding window mechanism is also used to update the sliding window every T seconds, and a time decay factor is introduced to strengthen the weight of recent data. The algorithm is adjusted as described in step S32.
[0072] In this preferred embodiment, the state transition probability is calculated based on the number of historical load state transitions, and the transition probability generation matrix is adjusted through a sliding time window and a time attenuation factor, thereby strengthening the influence weight of recent data on state transition prediction, making the state transition matrix more in line with the current network load change trend, and improving the timeliness and accuracy of load state prediction.
[0073] Step S4: Based on the state transition matrix and current load state data, each of the first load balancing weights is adjusted according to a preset Q learning algorithm, and a second load balancing weight of each network element service is output.
[0074] Furthermore, step S4 can be implemented by the following preferred implementation, including steps S41-S43, as follows:
[0075] S41: define the current load state set of each network element service as a state space;
[0076] S42: defining a set of adjustment operations for the load balancing weights of each network element service as an action space;
[0077] S43: Based on the state transition matrix, the state space and the action space, each of the first load balancing weights is adjusted by a preset Q learning algorithm to output a second load balancing weight of each network element service.
[0078] In specific implementations, the state space contains the load state combinations of all network element instances (e.g., [low, medium, high]), and the action space represents the operation of selecting the target instance ID for request allocation. The reward function can be expressed as: Among them, the response time is the time it takes for the producer network element service to respond to the consumer network element service request; the response time threshold can be dynamically set according to the service type (such as 10ms for URLLC service and 50ms for eMBB service); the load standard deviation is the load standard deviation of all instances of the producer network element service; the violation rate refers to the proportion of network element services that violate the preset service quality (QoS) requirements when processing requests; α, β and γ represent the corresponding weights.
[0079] In this preferred embodiment, by defining the state space as the current load state set and the action space as the weight adjustment operation set, and combining the Q learning algorithm to adjust the weight, the load state is directly associated with the allocation strategy, and adaptive optimization of the request allocation weight is achieved, so that the load balancing strategy can be dynamically adjusted as the network status changes.
[0080] Step S5: performing load balancing distribution on the current network element services of the SCP gateway according to the preset policy corresponding to each of the second load balancing weights.
[0081] Furthermore, step S5 can be implemented by the following preferred implementation, including steps S51-S52, as follows:
[0082] S51: For URLLC requests in each network element service, load instance allocation is performed with the highest priority;
[0083] S52: For non-URLLC requests, load instance allocation is performed according to the corresponding second load balancing weight.
[0084] In specific implementation, for high-priority requests, priority is given to instances predicted to have low load (and the state transition probability meets certain conditions), and capacity expansion can be triggered when necessary; for ordinary requests, they are allocated according to the output second load balancing weight, and the corresponding weight information is transmitted through the HTTP / 2 header, and feedback data is recorded for subsequent policy iteration updates.
[0085] In this preferred embodiment, URLLC requests are assigned the highest priority, non-URLLC requests are allocated according to weight, and a hierarchical decision-making strategy is implemented for different business types. This not only ensures the low latency and high reliability requirements of key businesses, but also optimizes the resource utilization efficiency of ordinary businesses, and improves the system's adaptability to multiple business types.
[0086] like Figure 4 The framework diagram of dynamic load balancing of an SCP gateway shown in the figure first performs data collection and preprocessing (including clustering processing), then uses the Markov chain model for prediction and outputs the state transition matrix. Then, based on the actual load situation, the second load balancing weight is output to obtain the corresponding routing weight table, and finally load balancing is performed.
[0087] In summary, compared with the prior art, the above embodiments of the present application have the following beneficial effects: by collecting the current and historical load status data of each network element service, basic data support is provided for subsequent analysis; clustering the historical load data and determining the load status threshold to achieve dynamic division of the load status and avoid instantaneous fluctuation interference; calculating the state transition probability based on the Markov chain model and generating the state transition matrix, it is possible to predict the changing trend of the future load status of the network element service; combining the Q learning algorithm to adjust the load balancing weight, the request allocation strategy can be dynamically optimized according to the real-time status; finally, load balancing distribution is performed according to the adjusted weight to achieve intelligent scheduling of requests. The various steps of the overall solution work together, and through the combination of dynamic state division, state transition prediction and reinforcement learning optimization, the dynamic response capability to signaling surges is effectively improved, and the problem of unreasonable load distribution caused by the lack of state prediction in traditional methods is solved, so that the network element load distribution is more balanced and the overall system performance is improved.
[0088] Example 2:
[0089] Please refer to Figure 2 Based on the same inventive concept, an embodiment of the present invention discloses a dynamic load balancing system for an SCP gateway, comprising: a data acquisition module M1, a first weight determination module M2, a transfer matrix generation module M3, a second weight determination module M4, and an execution module M5;
[0090] The data acquisition module M1 is used to collect the current load status data and historical load status data of each network element service.
[0091] Furthermore, the data acquisition module M1 includes: a collection unit and a mean value calculation unit;
[0092] The collection unit is used to collect the current and historical original load status data of each network element service;
[0093] The mean value calculation unit is used to calculate the load mean value of each of the original load status data through a time sliding window as the current load status data and historical load status data of each of the network element services.
[0094] In this preferred embodiment, the original load data is processed by calculating the load mean through a time sliding window, which can eliminate the interference of instantaneous fluctuations on the load status, so that the collected current and historical load status data can better reflect the actual load level of the network element service, providing a more stable input basis for subsequent analysis.
[0095] The first weight determination module M2 is configured to perform clustering processing on the historical load status data, determine a load status threshold, divide the historical load status of each network element service, and determine a first load balancing weight for each network element service.
[0096] Furthermore, the first weight determination module M2 includes: a clustering unit and a threshold adjustment unit;
[0097] The clustering unit is configured to cluster the historical load status data using a K-means clustering algorithm to determine each load status threshold;
[0098] The threshold adjustment unit is used to adjust the load status threshold at preset intervals based on the sliding time window and according to the distribution of load status data in each window, and to obtain the historical load status of each network element service.
[0099] In this preferred embodiment, the K-means clustering algorithm is used to cluster historical load data to determine the threshold, and the sliding time window is combined with the secondary dynamic adjustment of the threshold to adaptively update the load state division standard according to the actual load distribution, avoiding the defect that the fixed threshold cannot adapt to network changes, and improving the accuracy and flexibility of load state division.
[0100] The transfer matrix generating module M3 is configured to calculate the state transition probability of each network element service through a Markov chain model based on each of the historical load states, and generate a state transfer matrix.
[0101] Furthermore, the transfer matrix generation module M3 includes: a probability calculation unit and a probability adjustment unit;
[0102] The probability calculation unit is configured to calculate the state transition probability according to the number of state transitions of each network element service in each of the historical load states;
[0103] The probability adjustment unit is configured to adjust each of the state transition probabilities based on the sliding time window and the time decay factor at preset intervals, and generate a state transition matrix according to the adjusted state transition probabilities; wherein the adjustment algorithm is as follows: in, and They represent the adjusted probability of transition of the network element service from load state i to state j, the probability calculated based on the historical window, and the probability calculated based on the current window, respectively. λ represents the time decay factor.
[0104] In this preferred embodiment, the state transition probability is calculated based on the number of historical load state transitions, and the transition probability generation matrix is adjusted through a sliding time window and a time attenuation factor, thereby strengthening the influence weight of recent data on state transition prediction, making the state transition matrix more in line with the current network load change trend, and improving the timeliness and accuracy of load state prediction.
[0105] The second weight determination module M4 is used to adjust each of the first load balancing weights based on the state transition matrix and current load state data according to a preset Q learning algorithm, and output a second load balancing weight for each network element service.
[0106] Furthermore, the second weight determination module M4 includes: a first definition unit, a second definition unit and a weight adjustment unit;
[0107] The first definition unit is configured to define a set of current load states of each network element service as a state space;
[0108] The second definition unit is configured to define a set of adjustment operations for the load balancing weights of each network element service as an action space;
[0109] The weight adjustment unit is used to adjust each of the first load balancing weights based on the state transfer matrix, state space and action space through a preset Q learning algorithm, and output a second load balancing weight of each network element service.
[0110] In this preferred embodiment, by defining the state space as the current load state set and the action space as the weight adjustment operation set, and combining the Q learning algorithm to adjust the weight, the load state is directly associated with the allocation strategy, and adaptive optimization of the request allocation weight is achieved, so that the load balancing strategy can be dynamically adjusted as the network status changes.
[0111] The execution module M5 is configured to perform load balancing distribution on each of the network element services currently provided by the SCP gateway according to a preset policy corresponding to each of the second load balancing weights.
[0112] Furthermore, the execution module M5 includes: a first allocation unit and a second allocation unit;
[0113] The first allocation unit is configured to allocate load instances with the highest priority for URLLC requests in each of the network element services;
[0114] The second allocation unit is used to allocate load instances for non-URLLC requests according to the corresponding second load balancing weight.
[0115] In this preferred embodiment, URLLC requests are assigned the highest priority, non-URLLC requests are allocated according to weight, and a hierarchical decision-making strategy is implemented for different business types. This not only ensures the low latency and high reliability requirements of key businesses, but also optimizes the resource utilization efficiency of ordinary businesses, and improves the system's adaptability to multiple business types.
[0116] In summary, compared with the existing technology, the embodiments of the present application have the following beneficial effects: by collecting the current and historical load status data of each network element service, basic data support is provided for subsequent analysis; historical load data is clustered and processed and the load status threshold is determined to achieve dynamic division of load status and avoid instantaneous fluctuation interference; based on the Markov chain model, the state transition probability is calculated and the state transition matrix is generated, which can predict the changing trend of the future load status of the network element service; the load balancing weight is adjusted in combination with the Q learning algorithm, and the request allocation strategy can be dynamically optimized according to the real-time status; finally, load balancing distribution is performed according to the adjusted weight to achieve intelligent scheduling of requests. The various steps of the overall solution work together, and through the combination of dynamic state division, state transition prediction and reinforcement learning optimization, the dynamic response capability to signaling surges is effectively improved, and the problem of unreasonable load distribution caused by the lack of state prediction in traditional methods is solved, so that the network element load distribution is more balanced and the overall system performance is improved.
[0117] Example 3:
[0118] Figure 3 The structural diagram of a dynamic load balancing device of an SCP gateway of the present application is presented. Figure 3 As shown, the dynamic load balancing device of the SCP gateway may include: a processor N1, a memory N2, a data interface N3 and a communication bus N4.
[0119] The processor N1, the memory N2, and the data interface N3 communicate with each other via a communication bus N4. The data interface N3 is used for data communication with other devices, such as an input device or an output device. The processor N1 is used to execute a program N5, which can specifically execute the relevant steps of any of the above-mentioned embodiments of the dynamic load balancing method for an SCP gateway.
[0120] Specifically, the program N5 may include program code, which includes computer-executable instructions.
[0121] Processor N1 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the dynamic load balancing device of the SCP gateway may be processors of the same type, such as one or more CPUs, or may be processors of different types, such as one or more CPUs and one or more ASICs.
[0122] The memory N2 is used to store the program N5. The memory N2 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0123] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. In addition, the embodiments of the present application are not directed to any particular programming language.
[0124] Example 4:
[0125] An embodiment of the present invention further provides a computer-readable storage medium storing at least one executable instruction. When the executable instruction is executed on a dynamic load balancing device / system of an SCP gateway, the dynamic load balancing device / system of the SCP gateway executes a dynamic load balancing method for an SCP gateway in any of the above method embodiments.
[0126] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. Similarly, in order to streamline the application and help understand one or more of the various inventive aspects, in the above description of the exemplary embodiments of the application, the various features of the embodiments of the application are sometimes grouped together into a single embodiment, figure, or description thereof. Wherein, the claims that follow the specific embodiment are hereby clearly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the application.
[0127] Those skilled in the art will appreciate that the modules in the devices of the embodiments can be adaptively changed and installed in one or more devices different from the embodiments. The modules, units, or components in the embodiments can be combined into one module, unit, or component, and furthermore, they can be divided into multiple submodules, subunits, or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive.
Claims
1. A dynamic load balancing method for an SCP gateway, characterized in that: include: Collect current and historical load status data of each network element service; Performing clustering processing on the historical load status data, determining a load status threshold and dividing the historical load status of each network element service, and determining a first load balancing weight of each network element service; Based on each of the historical load states, the state transition probability of each network element service is calculated using a Markov chain model to generate a state transition matrix; Based on the state transition matrix and the current load state data, adjusting each of the first load balancing weights according to a preset Q learning algorithm, and outputting a second load balancing weight for each network element service; According to the preset policy corresponding to each of the second load balancing weights, load balancing distribution is performed on each of the current network element services of the SCP gateway.
2. The dynamic load balancing method for an SCP gateway according to claim 1, wherein: The collecting of current load status data and historical load status data of each network element service includes: Collect current and historical raw load status data of each network element service; For each of the original load status data, a load average is calculated through a time sliding window as the current load status data and historical load status data of each of the network element services.
3. The dynamic load balancing method for an SCP gateway according to claim 2, wherein: The clustering process of the historical load status data, determining a load status threshold, and dividing the historical load status of each network element service includes: Clustering the historical load state data using a K-means clustering algorithm to determine each load state threshold; At preset intervals, based on the sliding time window and according to the distribution of load status data in each window, the load status threshold is adjusted, and the historical load status of each network element service is obtained by division.
4. The dynamic load balancing method for an SCP gateway according to claim 1, wherein: The step of calculating the state transition probability of each network element service based on each of the historical load states through a Markov chain model to generate a state transition matrix includes: Calculating a state transition probability according to the number of state transitions of each network element service in each of the historical load states; At preset intervals, the state transition probabilities are adjusted based on the sliding time window and the time decay factor, and a state transition matrix is generated according to the adjusted state transition probabilities. The adjustment algorithm is as follows: in, and They represent the adjusted probability of transition of the network element service from load state i to state j, the probability calculated based on the historical window, and the probability calculated based on the current window, respectively. λ represents the time decay factor.
5. The dynamic load balancing method for an SCP gateway according to claim 1, wherein: The adjusting each of the first load balancing weights according to a preset Q learning algorithm based on the state transition matrix and the current load state data to output a second load balancing weight for each network element service includes: Define the current load state set of each network element service as the state space; Define the set of load balancing weight adjustment operations for each network element service as the action space; Based on the state transfer matrix, the state space and the action space, each of the first load balancing weights is adjusted by a preset Q learning algorithm to output a second load balancing weight of each network element service.
6. A dynamic load balancing method for an SCP gateway according to any one of claims 1 to 5, characterized in that: The performing load balancing distribution on each of the network element services currently provided by the SCP gateway according to the preset policy corresponding to each of the second load balancing weights includes: For URLLC requests in each network element service, load instance allocation is performed with the highest priority; For non-URLLC requests, load instance distribution is performed according to the corresponding second load balancing weight.
7. A dynamic load balancing system for SCP gateway, characterized in that: include: A data acquisition module, a first weight determination module, a transfer matrix generation module, a second weight determination module and an execution module; The data acquisition module is used to collect the current load status data and historical load status data of each network element service; The first weight determination module is configured to perform clustering processing on the historical load status data, determine a load status threshold, divide the historical load status of each network element service, and determine a first load balancing weight for each network element service; The transfer matrix generation module is used to calculate the state transition probability of each network element service through a Markov chain model based on each of the historical load states to generate a state transfer matrix; The second weight determination module is configured to adjust each of the first load balancing weights according to a preset Q learning algorithm based on the state transition matrix and current load state data, and output a second load balancing weight for each network element service; The execution module is configured to perform load balancing distribution on each of the current network element services of the SCP gateway according to a preset policy corresponding to each of the second load balancing weights.
8. The dynamic load balancing system for SCP gateway according to claim 7, characterized in that: The data acquisition module includes: a collection unit and a mean value calculation unit; The collection unit is used to collect the current and historical original load status data of each network element service; The mean value calculation unit is used to calculate the load mean value of each of the original load status data through a time sliding window as the current load status data and historical load status data of each of the network element services.
9. A dynamic load balancing device for an SCP gateway, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the computer program is loaded into a processor, the steps of the dynamic load balancing method for an SCP gateway according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the dynamic load balancing method for an SCP gateway according to any one of claims 1 to 6 are implemented.