Gateway load balancing method and device and electronic equipment

By optimizing gateway load balancing using Markov chain models and time decay factors, the problem of insufficient prediction of network element instance load status changes in the 5G core network is solved, thereby improving network stability and the response speed of critical services.

CN121126447APending Publication Date: 2025-12-12CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511360749.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-22
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

The existing 5G core network SCP gateway load balancing strategy lacks predictability and dynamic adjustment capabilities, and cannot effectively cope with sudden signaling surges, resulting in increased response latency and degraded system performance.

Method used

A Markov chain model is used to predict the state transition probability of network element instances. The weights of real-time and historical performance data are adjusted by combining a time decay factor. The allocation of network element instances is optimized through a decision model to ensure the priority of critical services and network stability.

Benefits of technology

It enables accurate prediction and adaptation to changes in network element instance load, improving the overall performance and stability of the 5G core network and avoiding delays in important services and degradation of system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121126447A_ABST
    Figure CN121126447A_ABST
Patent Text Reader

Abstract

The invention discloses a gateway load balancing method, a gateway load balancing device and electronic equipment. The method comprises the following steps: determining an initial load state of a network element instance in a service communication proxy (SCP) gateway; the state transition probability of the network element instance is determined by adopting a Markov chain model according to the initial load state, the future load state of the network element instance is determined according to the state transition probability, and the state transition probability introduces a time decay factor; the time attenuation factor is used for adjusting the weight of the real-time network element performance data in the preset time window relative to the historical network element performance data; and receiving a network element service request, and executing network element instance allocation according to the importance degree of the network element service request and the future load state of the network element instance. The technical problems that the delay of important services is increased and the system performance is reduced due to the fact that the static load balancing strategy in the related technology cannot effectively predict and respond to the load state change of the network element instance are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of network communication, in particular to a gateway load balancing method and device and electronic equipment. BACKGROUND

[0002] In the 5G core network architecture, the SCP (Service Communication Proxy) gateway plays a crucial role in routing and forwarding signaling messages. However, with the continuous development of 5G networks, especially in high-density, high-bandwidth, and low-latency application scenarios such as uRLLC (Ultra-Reliable and Low-Latency Communications), higher requirements are placed on the signaling processing capabilities of SCP gateways. The load balancing methods in related technologies, while capable of distributing signaling requests based on current load conditions, lack sufficient predictive and dynamic adjustment capabilities when facing sudden signaling surges.

[0003] Specifically, current SCP gateway load balancing strategies mainly rely on static load thresholds and real-time load monitoring. For example, when the current load of a certain producer network element service instance is below a preset threshold, the system will allocate new service requests to it. However, this strategy does not take into account the trend of load state changes in instances, especially failing to predict that due to processing speed decline or other factors, the instance may enter an overload state in the near future. Once this happens, continuing to allocate requests to instances with high risk of overload can lead to increased response delays, decreased service quality, and even impact the reliability of critical services.

[0004] In addition, the load balancing strategies in related technologies fail to fully consider the load state transition probabilities of network element instances, making it impossible to predict the likelihood of instances transitioning from their current load state to an overload state. For example, a certain network element instance is currently in a medium load state, but if its processing capacity declines, it may quickly enter a high load state within the next 10 seconds. Without a prediction mechanism, it is still considered an acceptable request target, which not only increases the risk of system overload, but also reduces the stability of the overall network and user experience.

[0005] To address the above problems, no effective solutions have been proposed so far. SUMMARY

[0006] The embodiments of the present application provide a gateway load balancing method, device, and electronic equipment to at least solve the technical problem of increased delay of important services and decreased system performance due to the inability of static load balancing strategies in related technologies to effectively predict and respond to changes in the load state of network element instances.

[0007] According to an aspect of the embodiments of the present application, a gateway load balancing method is provided, comprising: determining an initial load state of a network element instance in a service communication proxy (SCP) gateway; determining a state transition probability of the network element instance according to the initial load state by using a Markov chain model, and determining a future load state of the network element instance according to the state transition probability, wherein the state transition probability introduces a time decay factor, and the time decay factor is used to adjust a weight of real-time network element performance data in a preset time window compared with historical network element performance data; receiving a network element service request, and performing network element instance allocation according to an importance of the network element service request and the future load state of the network element instance.

[0008] Optionally, the determining of the initial load state of the network element instance in the SCP gateway comprises: obtaining network element performance data of the network element instance by a proxy or a probe built in the SCP gateway, wherein the network element performance data comprises real-time network element performance data and historical network element performance data; dividing a load state interval according to the network element performance data, wherein the load state interval comprises a first load interval, a second load interval and a third load interval, a maximum load state index of the first load interval is less than a minimum load state index of the second load interval, and a maximum load state index of the second load interval is less than a minimum load state index of the third load interval; and determining the initial load state of the network element instance according to the load state interval.

[0009] Optionally, after the obtaining of the network element performance data of the network element instance by the proxy or the probe built in the SCP gateway, the method further comprises: determining a load mean value of the network element performance data in a first time window; updating a first weight of the real-time network element performance data in the network element performance data to a second weight by using a preset smoothing factor according to the load mean value, to obtain updated network element performance data, wherein the second weight is higher than the first weight; and performing normalization processing on the updated network element performance data.

[0010] Optionally, the method further comprises: determining a load distribution of the network element performance data in a second time window; determining a high load division threshold corresponding to the network element performance data according to the load distribution, wherein the high load division threshold is a division threshold corresponding to the second load interval and the third load interval; and re-dividing the load state interval of the network element performance data according to the high load division threshold.

[0011] Optionally, the state transition probability of the network element instance is determined according to the initial load state by using a Markov chain model, including: determining the number of state transitions of the network element instance according to the initial load state and the load state interval of the network element instance; determining the state transition probability of the network element instance by using the Markov chain model according to the number of state transitions; determining a state transition matrix corresponding to the SCP gateway according to the state transition probability, wherein the state transition matrix contains the state transition probability of all network element instances in the SCP gateway; updating the state transition matrix according to a time decay factor, and normalizing the updated state transition matrix.

[0012] Optionally, the method further includes: determining service data corresponding to the network element instance, wherein the service data includes at least one of the following: a global state of the network element instance, a service type, a historical action value, and performance feedback data, wherein the global state is used to represent the initial load state combination of all network element instances in the SCP gateway, and the historical action value is used to reflect the value estimation of the network element instance on the historical network element service request; processing the state transition matrix and the service data by using a decision model to obtain a routing allocation weight table corresponding to the network element instance, wherein the routing allocation weight table is used to reflect the priority of the network element instance in processing the network element service request under a preset global state.

[0013] Optionally, the decision model includes a state space, an action space, and a reward function, the state space is used to store the global state of the network element instance, the action space is used to store the instance allocation strategy corresponding to the global state, and the reward function is used to evaluate the action value of a first instance allocation strategy under a first global state, the first instance allocation strategy being any one of the instance allocation strategies in the action space, and the first global state being any one of the global states in the state space.

[0014] Optionally, the historical action value is updated by: determining a second global state after the first instance allocation strategy is executed, and determining an expected action value under the second global state, wherein the expected action value is used to represent the value estimation of the network element instance in processing the network element service request under the second global state; updating the historical action value according to a preset learning rate, a preset discount factor, and the expected action value.

[0015] Optionally, the instance allocation is performed according to the importance of the network element service request and the future load state of the network element instance, including: filtering high-load instances with the future load state in a third load interval from the network element instances by using the state transition matrix; processing the network element service request by using low-load instances with the future load state in a first load interval from the network element instances in the case that the importance indicator of the network element service request is greater than or equal to a preset threshold; and allocating the corresponding network element instance for the network element service request according to the routing allocation weight table in the case that the importance indicator of the network element service request is less than the preset threshold.

[0016] According to another aspect of the embodiments of the present application, a gateway load balancing apparatus is also provided, comprising: a first determining module configured to determine an initial load state of a network element instance in a service communication proxy (SCP) gateway; a second determining module configured to determine a state transition probability of the network element instance according to the initial load state by using a Markov chain model, and determine a future load state of the network element instance according to the state transition probability, wherein the state transition probability introduces a time decay factor, and the time decay factor is used to adjust a weight of real-time network element performance data in a preset time window compared with historical network element performance data; and a distribution module configured to receive a network element service request, and perform network element instance distribution according to an importance of the network element service request and the future load state of the network element instance.

[0017] According to still another aspect of the embodiments of the present application, an electronic device is also provided, comprising: a memory and a processor, wherein the memory is configured to store program instructions; and the processor is connected with the memory, and is configured to execute the above-mentioned gateway load balancing method.

[0018] According to yet another aspect of the embodiments of the present application, a non-volatile storage medium is also provided, comprising a stored computer program, wherein a device where the non-volatile storage medium is located executes the above-mentioned gateway load balancing method by running the computer program.

[0019] According to still another aspect of the embodiments of the present application, a computer program product is also provided, comprising computer instructions, which, when executed by a processor, implement the above-mentioned gateway load balancing method.

[0020] In the embodiments of the present application, by determining an initial load state of a network element instance in a service communication proxy (SCP) gateway, determining a state transition probability of the network element instance according to the initial load state by using a Markov chain model, and determining a future load state of the network element instance according to the state transition probability, wherein the state transition probability introduces a time decay factor, and the time decay factor is used to adjust a weight of real-time network element performance data in a preset time window compared with historical network element performance data, receiving a network element service request, and performing network element instance distribution according to an importance of the network element service request and the future load state of the network element instance, the purpose of accurately predicting and adapting to network element instance load changes in the SCP gateway is achieved, thereby realizing the technical effects of effectively balancing network load while guaranteeing key business priority and service quality, and improving overall performance and stability of a 5G core network, and further solving the technical problems of increasing delay of important businesses and decreasing system performance due to the fact that static load balancing strategies in related technologies cannot effectively predict and respond to network element instance load state changes. BRIEF DESCRIPTION OF DRAWINGS

[0021] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:

[0022] Figure 1 Fig. 1 is a hardware structure diagram of a computer terminal for implementing a gateway load balancing method according to an embodiment of the present application;

[0023] Figure 2 Fig. 2 is a flowchart of a gateway load balancing method according to an embodiment of the present application;

[0024] Figure 3 Fig. 3 is a structure diagram of a gateway load balancing system according to an embodiment of the present application;

[0025] Figure 4 Fig. 4 is a flowchart of another gateway load balancing method according to an embodiment of the present application;

[0026] Figure 5 Fig. 5 is a structure diagram of a gateway load balancing device according to an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the personnel in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work should belong to the scope of protection of the present application.

[0028] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] First, some nouns or terms that appear in the process of explaining the embodiments of the present application are applicable to the following explanations:

[0030] SCP(Service Communication Proxy, service communication proxy): As an intermediate layer in the 5G core network, it is responsible for processing and forwarding HTTP signaling messages and realizing communication between network functions. It undertakes the important responsibilities of signaling routing and load balancing, ensuring that requests can be effectively distributed to appropriate network element instances, thereby improving the efficiency and responsiveness of the entire core network.

[0031] MDP(Markov Decision Process, Markov decision process): A mathematical framework for describing the problem of an agent making a series of decisions by interacting with an environment. In this application, MDP is used to predict the load state changes of network element instances, and by constructing a state transition matrix, it predicts the load state that the instance may enter in the future within a certain time, providing a basis for decision-making for dynamic load balancing.

[0032] uRLLC(Ultra-Reliable and Low Latency Communications, ultra-reliable and low latency communications): A key feature of 5G networks, focusing on providing extremely low communication latency and extremely high reliability, suitable for application scenarios that are extremely sensitive to latency and require high reliability, such as industrial automation, remote medical treatment, and autonomous driving.

[0033] K-means clustering: An unsupervised machine learning algorithm for clustering analysis of data sets. In this application, it is used to initialize the thresholds of low, medium and high loads, and by clustering historical load data, it automatically finds data points representing different load levels, and then adjusts the threshold of the high load state based on these points, ensuring that the division of load states is more in line with the actual network situation.

[0034] Q-learning(Q-learning): A reinforcement learning algorithm that can learn what action to take in a given state to maximize long-term rewards without an environment model. It stores and updates the values of different state-action pairs in a Q-value table to guide the agent to make decisions and gradually form an optimal strategy.

[0035] To solve the problem of uneven gateway load in the related art, the embodiment of the present application provides a gateway load balancing method, which can be executed in Figure 1 The computer terminal is illustrated in the following.

[0036] The gateway load balancing method embodiment provided by the embodiment of the present application can be executed in a mobile terminal, a computer terminal, or a similar computing device. Figure 1 A hardware structure block diagram of a computer terminal for implementing the gateway load balancing method is shown. As shown inFigure 1 As shown, the computer terminal 10 may include one or more processors (shown as 102a, 102b, ..., 102n in the figure) (the processor may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission module 106 for communication functions connected via wired and / or wireless networks. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, and a BUS bus. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0037] It should be noted that the aforementioned one or more processors and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be implemented wholly or partially as software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be wholly or partially integrated into any other element in the computer terminal 10. As involved in the embodiments of this application, the data processing circuits serve as processor control (e.g., selection of a variable resistor termination path connected to an interface).

[0038] The memory 104 can be used to store software programs and modules of application software, such as the program instruction / data storage device corresponding to the gateway load balancing method in this embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the aforementioned gateway load balancing method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0039] The transmission module 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission module 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission module 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0040] The display may be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10.

[0041] It should be noted here that, in some optional embodiments, the above... Figure 1 The computer terminal shown may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 1 This is only one instance of a specific particular instance, and is intended to illustrate the types of components that may exist in the aforementioned computer terminal.

[0042] In the above operating environment, this application provides an embodiment of a gateway load balancing method. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Also, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0043] Figure 2 This is a flowchart of a gateway load balancing method according to an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps:

[0044] Step S202: Determine the initial load status of the network element instance in the Service Communication Proxy (SCP) gateway.

[0045] Step S204: Based on the initial load state, the state transition probability of the network element instance is determined using a Markov chain model, and the future load state of the network element instance is determined based on the state transition probability. The state transition probability introduces a time decay factor, which is used to adjust the weight of real-time network element performance data within a preset time window relative to historical network element performance data.

[0046] Step S206: Receive network element service requests and perform network element instance allocation based on the importance of the network element service requests and the future load status of the network element instances.

[0047] Through the above steps S202 to S206, the goal of accurately predicting and adapting to the load changes of network element instances in the SCP gateway is achieved. This realizes the technical effect of effectively balancing network load and improving the overall performance and stability of the 5G core network while ensuring the priority and quality of service of critical services. In turn, it solves the technical problem that the static load balancing strategy in related technologies cannot effectively predict and respond to changes in the load status of network element instances, resulting in increased latency of important services and decreased system performance.

[0048] Figure 3 A structural diagram of a gateway load balancing system according to an embodiment of this application is shown below. Figure 3 As shown, the system mainly consists of a dynamic load balancer comprised of monitoring, prediction, decision-making, and execution modules. Consumer network element services invoke producer network element services through the dynamic load balancer of the 5G core network SCP gateway. A detailed analysis of the specific module functions is as follows:

[0049] (1) Monitoring module: responsible for collecting real-time network element performance data, including load, response time, etc., and eliminating instantaneous fluctuations through data preprocessing (such as calculating the load mean and exponential moving average smoothing) to provide stable and reliable data support to the prediction and decision-making module.

[0050] (2) Prediction Module: Based on the Markov chain model, the module predicts the future load state of producer network element service instances, including three states: low, medium, and high. The key function of the prediction module is to use historical network element performance data and real-time monitoring information to calculate the state transition probability and adjust the weight of recent data through a time decay factor to more accurately predict the upcoming load changes.

[0051] (3) Decision module: Based on the current system status, prediction results and service type identifier, output the routing allocation weight of network element instances through Q-Learning strategy.

[0052] (4) Execution module: distinguishes between high-priority requests and ordinary requests, ensures that critical business (such as URLLC) receives priority service, and reasonably allocates other requests to achieve efficient operation of the overall system.

[0053] The following combination Figure 3 The module implementation logic described above provides a detailed explanation of steps S202 to S206.

[0054] In step S202 above, it is necessary to monitor and collect the real-time load information of each network element instance in the SCP gateway, including but not limited to indicators such as CPU utilization, memory usage, and service processing latency. Then, based on the real-time load information and the pre-divided load status intervals (such as low load interval, medium load interval, and high load interval), the initial load status of each network element instance is classified and marked.

[0055] Optionally, determining the initial load state of a network element instance in the SCP gateway includes: obtaining network element performance data of the network element instance through a proxy or probe built into the SCP gateway, wherein the network element performance data includes real-time network element performance data and historical network element performance data; dividing the load state intervals according to the network element performance data, wherein the load state intervals include a first load interval, a second load interval, and a third load interval, wherein the maximum load state index of the first load interval is less than the minimum load state index of the second load interval, and the maximum load state index of the second load interval is less than the minimum load state index of the third load interval; and determining the initial load state of the network element instance based on the load state intervals.

[0056] In this embodiment of the application, to more accurately determine the initial load state of network element instances in the SCP gateway, a multi-step evaluation process integrating real-time and historical data is proposed. The specific process analysis is as follows:

[0057] 1. Data acquisition.

[0058] First, a monitoring module is embedded in the 5G core network SCP gateway to collect network element performance data of network element instances through built-in agents or probes, including but not limited to indicators such as CPU utilization, memory usage, and service processing latency. This network element performance data not only includes the current real-time performance but also covers historical performance records to provide a comprehensive understanding of the load status of network element instances.

[0059] 2. Data preprocessing.

[0060] After acquiring network element performance data, data preprocessing is also included: determining the average load of network element performance data within the first time window; based on the average load, using a preset smoothing factor, updating the first weight of the real-time network element performance data to a second weight, obtaining updated network element performance data, where the second weight is higher than the first weight; and normalizing the updated network element performance data. The specific operation analysis is as follows:

[0061] (1) Calculation of sliding window mean:

[0062] Within a time window of length W seconds (i.e., the first time window, such as 30 seconds, which can be adjusted according to the business scenario), calculate the moving average load value of the network element performance data to filter out instantaneous peaks or troughs within the sampling interval. The specific expression is as follows:

[0063]

[0064] In the formula, L avg (t) represents the average load of network element performance data at time t, L(i) represents the raw load value collected in the i-th second, and w represents the first time window.

[0065] (2) Exponential Moving Average (EMA) Smoothing:

[0066] L EMA (t)=α·L avg (t)+(1-α)·L EMA (t-1)

[0067] In the formula, α is a preset smoothing factor, used to improve sensitivity to trend changes while eliminating instantaneous fluctuations; L EMA (t) represents the load mean after exponential moving average smoothing; L EMA (t-1) represents the average load of network element performance data at time t-1.

[0068] (3) Data normalization processing:

[0069]

[0070] In the formula, X norm X represents the normalized network element performance data, and X represents the preprocessed original network element performance data. min X represents the minimum value in the network element performance data. max This represents the maximum value in the network element performance data.

[0071] Normalization can avoid the problem of uneven weighting of different network element performance data during algorithm training.

[0072] 3. Load status interval division.

[0073] Based on network element performance data, three load state ranges are defined through K-means clustering (K=3): low load (0%~40%), medium load (40%~70%), and high load (70%~100%). The load state set of the SCP gateway is defined as: S={L,M,H}.

[0074] 4. Dynamically adjust the load status range.

[0075] In this embodiment of the application, in order to cope with the dynamic changes in load in the network environment, a dynamic adjustment mechanism is introduced on the basis of the above-mentioned division based on static thresholds, including: determining the load distribution of network element performance data within a second time window; determining the high load division threshold corresponding to the network element performance data according to the load distribution, wherein the high load division threshold is the division threshold corresponding to the second load interval and the third load interval; and re-dividing the load state interval of the network element performance data according to the high load division threshold.

[0076] Specifically, the system not only relies on real-time performance data but also considers the load distribution within a second time window T (e.g., 30 seconds). Through statistical analysis, a high-load segmentation threshold is determined that matches the current load distribution; that is, the segmentation threshold corresponding to the medium-load and high-load intervals. For example, the high-load threshold is adaptively adjusted based on the 90th percentile (P90) to ensure that the segmentation more closely reflects the actual load situation. Based on the newly determined high-load segmentation threshold, the division of load state intervals (especially the medium-load and high-load intervals) can be adjusted in real time to ensure that the high-load interval accurately reflects the actual potential overload risk.

[0077] This approach allows the system to quickly adjust its perception of the load status of network element instances when the load environment changes, thereby more accurately identifying and avoiding potentially high-risk instances during the decision-making process, and prioritizing the signaling routing requirements of critical services such as URLLC.

[0078] In step S204 above, the aim is to calculate the possible future state transition probabilities of network element instances using a Markov chain model based on the initial load state and network element performance data. It is worth noting that a time decay factor is introduced in the process of determining the state transition probabilities. This factor is used to adjust (increase) the relative weight of real-time network element performance data and historical data within a preset time window, making the model pay more attention to recent data changes to improve the timeliness and accuracy of the prediction.

[0079] Optionally, the state transition probability of a network element instance is determined using a Markov chain model based on the initial load state. This includes: determining the number of state transitions for the network element instance based on its initial load state and load state interval; determining the state transition probability of the network element instance using a Markov chain model based on the number of state transitions; determining the state transition matrix corresponding to the SCP gateway based on the state transition probability, wherein the state transition matrix contains the state transition probabilities of all network element instances in the SCP gateway; updating the state transition matrix based on a time decay factor, and normalizing the updated state transition matrix. The specific process analysis is as follows:

[0080] 1. State transition statistics.

[0081] First, based on the initial load state of network element instances and the dynamically divided load state intervals, the change sequence of the load state of each network element instance within a specific time window is statistically analyzed.

[0082] Subsequently, the sequence of changes is traversed, and the number of state transitions from one load state to another is counted at adjacent time points:

[0083]

[0084] In the formula, C(i,j) represents the number of state transitions. This represents the load state of network element instance k at time t. This indicates the load status of network element instance k at time t+1.

[0085] 2. Determine the state transition probability and the state transition matrix.

[0086] Based on the recorded number of state transitions, the state transition probability of network element instances between different load states is calculated using a Markov chain model, and the state transition matrix P of the SCP gateway is formed by combining the state transition probabilities of all network element instances.

[0087]

[0088] In the formula, P ij Let i,j∈{L,M,H} represent the state transition probability of a network element instance transitioning from load state i to load state j at the next time step, satisfying:

[0089]

[0090] 3. Time decay processing.

[0091] A time decay factor (e.g., λ = 0.8) is introduced to give higher weight to the latest data (real-time network element performance data). When updating the state transition matrix, the influence of earlier data is treated with exponential decay to ensure that the model pays more attention to recent load change trends and reduces the impact of historical network element performance data on current predictions. The specific expression is as follows:

[0092]

[0093] In the formula, P t+1 (i,j) represents the state transition probability at time t+1 after updating with a time decay factor, P t (i,j) represents the state transition probability at time t, λ represents the time decay factor (taken as 0.8), ∑ k C(i,k) represents the total number of transfers issued by load state i.

[0094] After each update, each row of the state transition matrix is ​​normalized to ensure that the sum of the transition probabilities is 1, maintaining the mathematical integrity of the state transition matrix and the rationality of the prediction logic. The specific expression is as follows:

[0095]

[0096] In the formula, ∑ m P t+1 (i,m) represents the sum of probabilities in the i-th row of the updated state transition matrix.

[0097] In this embodiment, to further optimize dynamic load balancing decisions, a decision model integrating global state, business type, historical action value, and performance feedback data is introduced. This decision model not only focuses on current performance metrics but also delves into the value of historical behavior and the possibilities of future states. Utilizing reinforcement learning principles, particularly the Q-learning algorithm, it dynamically adjusts routing allocation strategies to achieve more efficient and accurate request scheduling.

[0098] The Q-learning module is implemented as follows: It determines the service data corresponding to the network element instance, where the service data includes at least one of the following: the global state, service type, historical action value, and performance feedback data of the network element instance. The global state represents the initial load state combination of all network element instances in the SCP gateway, and the historical action value reflects the value estimate of the network element instance for historical network element service requests. A decision model is used to process the state transition matrix and service data to obtain a routing allocation weight table corresponding to the network element instance. This routing allocation weight table reflects the priority of the network element instance in processing network element service requests under a preset global state.

[0099] Overall, the input data for this decision-making model includes:

[0100] Current global state S t : Combinations of all instance load states collected by the monitoring module and categorized by load state, such as [L,M,H][L,M,H][L,M,H];

[0101] State transition matrix P: Predicted by the Markov chain model, it includes the state transition probabilities of all network element instances at the next time step;

[0102] The historical Q-value table Q(S, A) stores state-action pairs (in the preset global state S). t Cumulative value estimation (using any instance allocation strategy);

[0103] Service type: Used to identify the service type of the network element service request, such as URLLC, eMBB, or ordinary service;

[0104] Performance feedback data includes, but is not limited to, performance feedback data such as response time, success rate, and load changes of network element instances.

[0105] The output data of this decision model is a route allocation weight table: {W1,W2,……,Wn}.

[0106] More specifically, this decision-making model comprises three core components: a state space, an action space, and a reward function. The state space stores the global states of network element instances, the action space stores the instance allocation strategies corresponding to the global states, and the reward function evaluates the action value of the first instance allocation strategy in the first global state. The first instance allocation strategy is any instance allocation strategy in the action space, and the first global state is any global state in the state space. A detailed analysis follows:

[0107] 1. State Space: Defines the load state combinations of all network element instances, i.e., the global state S. t For example: [low, medium, high] load state combinations.

[0108] S t =[S1,S2,……,S n ], S k ={L,M,H}

[0109] 2. Action Space: Defines the set A of instance allocation strategies that network element instances should adopt under various global states. t The action is to select a target instance ID for request allocation:

[0110] A t ∈{Select instance 1, Select instance 2, ..., Select instance n}

[0111] 3. Reward Function: Used to quantitatively evaluate the actual utility of different instance allocation strategies under a specific global state. Its design comprehensively considers the priority of load level, response time, and business type, ensuring that the optimization direction of the strategy is consistent with business needs. The specific expression is as follows:

[0112] R t =W1f load +W2f latency

[0113] In the formula, R t Let f represent the reward function. load f represents the load reward component. latency W1 represents the load factor weight, and W2 represents the delay factor weight.

[0114]

[0115] For allocating requests to low-load instances, a positive reward is given, and the reward is relatively high (e.g., +10);

[0116] For requests allocated to medium-load instances, a positive reward is given, with the reward being moderate (e.g., +5).

[0117] For instances that are assigned high load, a negative reward (e.g., -10) is given to reflect the potential overload risk.

[0118]

[0119] For responses with a response time less than or equal to a preset response threshold, i.e., fast response speed, a positive reward (+5) is given;

[0120] For responses that take longer than the preset response threshold (i.e., slow response speed), a negative reward of -5 is given.

[0121] Optionally, the action values ​​in the historical Q-value table above are updated as follows: The second global state after implementing the first instance allocation strategy is determined, and the expected action value in the second global state is determined, where the expected action value represents the value estimate of a network element instance processing a network element service request in the second global state; the historical action values ​​are updated based on a preset learning rate, a preset discount factor, and the expected action value. The specific expression is as follows:

[0122]

[0123] In the formula, Q(S) t A t R represents the updated Q value. t Indicates immediate reward, α represents the preset learning rate, γ represents the preset discount factor, and S t+1 This represents the new state after an action is performed (such as the second global state), max α ′Q(S t+1 ,α′) represents the expected Q value in the new state, and α′ represents any action that can be taken in the new state.

[0124] In step S206 above, when the SCP gateway receives a new network element service request, it will perform intelligent allocation of network element instances based on the importance of the network element service request (such as whether it is a URLLC service) and the predicted future load status.

[0125] Optionally, instance allocation is performed based on the importance of the network element service request and the future load status of the network element instance, including: filtering high-load instances in the network element instance whose future load status is in the third load range through the state transition matrix; if the importance index of the network element service request is greater than or equal to a preset threshold, processing the network element service request through low-load instances in the network element instance whose future load status is in the first load range; if the importance index of the network element service request is less than the preset threshold, allocating the corresponding network element instance for processing the network element service request according to the routing allocation weight table.

[0126] In this embodiment of the application, a ∈∈-greedy hierarchical strategy is adopted for requests of different priorities:

[0127]

[0128] In the formula, ∈ represents the exploration probability.

[0129] The following section provides a detailed explanation based on the future load status of network element instances predicted by the Markov chain model:

[0130] 1. High-load instance filtering:

[0131] First, the state transition matrix is ​​used to identify and mark high-load network element instances that may be in the third load range (high load range) in the future, such as P(M→H)>0.7P or P(L→H)>0.5, in order to reduce the possibility of system overload.

[0132] 2. Matching importance with load status:

[0133] (1) For network element service requests such as URRLC with high priority (importance index greater than or equal to the preset threshold), priority is given to processing low-load instances that are in the first load range (low load range) in the future forecast, to ensure timely response and high-quality service of critical business, and to maintain the stability and reliability of critical communication even in the case of signaling surge.

[0134] (2) For network element service requests with low importance (importance index less than the preset threshold), i.e. ordinary services, intelligent allocation is performed based on the routing allocation weight table generated by the Q-Learning strategy. This routing allocation weight table reflects the processing capacity and expected performance of network element instances under various states, enabling requests to be allocated to the most suitable service instance based on real-time load status and historical performance.

[0135] The weights in the route assignment weight table can be generated based on the Q value:

[0136]

[0137] In the formula, W i A represents the routing weight of network element instance i. i This represents the action of selecting network element instance i, max(Q(S) t A i ),0) indicates that negative Q values ​​are truncated to avoid logical errors caused by negative weights.

[0138] Finally, the execution module performs route allocation and feedback, including:

[0139] 1. Route execution: The route allocation weights in the decision module are transmitted to the corresponding producer network elements through HTTP / 2 header fields (such as X-LB-Weight).

[0140] 2. Data Feedback: Record the actual network element service request processing results and response performance, and import the feedback data into the monitoring module for subsequent updates of the state transition matrix and further optimization of the Q-learning strategy.

[0141] 3. Strategy Iteration and Update: The system periodically (e.g., every T seconds) collects data and updates model parameters to form a closed-loop dynamic optimization control, thereby improving the stability and response speed of the overall 5G network element system.

[0142] Figure 4 This is a flowchart of another gateway load balancing method according to an embodiment of this application, such as... Figure 4 As shown, the workflow of the SCP gateway dynamic load balancing method is illustrated in more detail. The overall steps are as follows:

[0143] Step 1: Status monitoring and dynamic partitioning.

[0144] Real-time collection of key network element performance metrics such as load and response time for producer network element services. Based on dynamic thresholds, the load status of network element service instances is divided into three categories: low, medium, and high.

[0145] Step 2: Markov prediction.

[0146] Calculate the state transition probability of each network element service instance, use the Markov chain model to predict the future state, and specifically mark those instances whose probability of transitioning from "medium" to "high" exceeds 0.7 as high-risk objects.

[0147] Step 3: Q-learning decision optimization.

[0148] Routing decisions are optimized based on the different priorities of network element service requests. URRLC requests are preferentially allocated to instances with low predicted load and stable state; while ordinary requests are allocated according to a weight table generated by the Q-learning strategy, which reflects the processing capacity and expected performance of different instances under various states.

[0149] Step 4: Route execution and feedback.

[0150] The SCP gateway executes the decision result from step 3, allocating requests to producer network element service instances according to the weights output by the decision module. Simultaneously, this weight value is transmitted via the X-LB-Weight header field of the HTTP / 2 protocol so that the producer side can understand and adapt. After completing request processing, the actual processing results of network element performance data (such as response time, processing success or failure) are recorded and fed back to the decision module for subsequent prediction and iterative updates of decision-making strategies.

[0151] Step 5: Iterative update of the strategy.

[0152] The system periodically (e.g., every T seconds) checks the effectiveness of the current policy. If the cycle trigger condition is met, i.e., the update cycle has been reached, the algorithm returns to step 1, re-performs state monitoring and dynamic partitioning, and updates the state transition matrix and Q-learning policy to adapt to changes in the network environment. If the update cycle has not been reached, the system continues to execute the current policy until the next cycle arrives.

[0153] In addition, there is a cyclic trigger condition (every T seconds), which indicates the update frequency of the dynamic load balancing strategy, ensuring that the system can respond to changes in network load in a timely manner and maintain high efficiency and stability.

[0154] The system continuously executes the above steps in a loop until there are no new requests or dynamic load balancing is no longer needed. At the end of each loop, the system checks whether it needs to return to step 1 for a new round of monitoring and prediction, or continues the current strategy until external conditions change.

[0155] This application embodiment integrates predictive load management and intelligent decision-making mechanisms, enabling dynamic and proactive adjustment of signaling traffic allocation to address highly variable network loads. By monitoring the performance data of network element service instances in real time and predicting future load states based on historical trends, and optimizing request scheduling using Q-learning strategies based on prediction results and service priorities, it avoids the limitations of traditional load balancing methods when handling critical services such as URRLC. This not only significantly improves the stability and response speed of 5G core network signaling processing but also ensures service quality and efficient resource utilization in complex network environments. It provides strong technical support for building high-performance, highly resilient 5G network infrastructure, especially when handling high-priority, low-latency services, effectively reducing overload risks and enhancing the overall reliability and performance of the system.

[0156] According to embodiments of this application, a gateway load balancing device is provided. It should be noted that the gateway load balancing device of this application embodiment can be used to execute the gateway load balancing method provided in this application embodiment. The gateway load balancing device provided in this application embodiment is described below.

[0157] Figure 5 This is a structural diagram of a gateway load balancing device provided according to an embodiment of this application. Figure 5 As shown, the device includes:

[0158] The first determining module 50 is used to determine the initial load state of the network element instance in the Service Communication Proxy (SCP) gateway;

[0159] The second determining module 52 is used to determine the state transition probability of a network element instance based on the initial load state using a Markov chain model, and to determine the future load state of the network element instance based on the state transition probability. The state transition probability introduces a time decay factor, which is used to adjust the weight of real-time network element performance data within a preset time window relative to historical network element performance data.

[0160] The allocation module 54 is used to receive network element service requests and perform network element instance allocation based on the importance of the network element service request and the future load status of the network element instance.

[0161] Through the first determining module, the second determining module, and the allocation module in the aforementioned gateway load balancing device, the goal of accurately predicting and adapting to changes in the load of network element instances in the SCP gateway is achieved. This enables the effective balancing of network load while ensuring the priority and quality of service for critical businesses, thereby improving the overall performance and stability of the 5G core network. Furthermore, it solves the technical problem that static load balancing strategies in related technologies cannot effectively predict and respond to changes in the load status of network element instances, leading to increased latency for important services and decreased system performance.

[0162] In the gateway load balancing device provided in this application embodiment, the first determining module is further configured to obtain network element performance data of the network element instance through the agent or probe built into the SCP gateway, wherein the network element performance data includes real-time network element performance data and historical network element performance data; divide the load state intervals according to the network element performance data, wherein the load state intervals include a first load interval, a second load interval and a third load interval, wherein the maximum load state index of the first load interval is less than the minimum load state index of the second load interval, and the maximum load state index of the second load interval is less than the minimum load state index of the third load interval; and determine the initial load state of the network element instance according to the load state intervals.

[0163] In the gateway load balancing device provided in this application embodiment, the first determining module is further configured to determine the average load of network element performance data within a first time window; based on the average load, update the first weight of the real-time network element performance data in the network element performance data to a second weight using a preset smoothing factor to obtain the updated network element performance data, wherein the second weight is higher than the first weight; and perform normalization processing on the updated network element performance data.

[0164] In the gateway load balancing device provided in this application embodiment, the first determining module is further configured to determine the load distribution of network element performance data within a second time window; determine a high load partitioning threshold corresponding to the network element performance data based on the load distribution, wherein the high load partitioning threshold is a partitioning threshold corresponding to the second load interval and the third load interval; and re-partition the load state interval of the network element performance data based on the high load partitioning threshold.

[0165] In the gateway load balancing device provided in this application embodiment, the second determining module is further configured to determine the number of state transitions of a network element instance based on the initial load state and load state interval of the network element instance; determine the state transition probability of the network element instance using a Markov chain model based on the number of state transitions; determine the state transition matrix corresponding to the SCP gateway based on the state transition probability, wherein the state transition matrix contains the state transition probabilities of all network element instances in the SCP gateway; update the state transition matrix based on the time decay factor, and normalize the updated state transition matrix.

[0166] The gateway load balancing device provided in this application embodiment further includes a third determining module 56, used to determine service data corresponding to a network element instance. The service data includes at least one of the following: the global state of the network element instance, service type, historical action value, and performance feedback data. The global state is used to represent the initial load state combination of all network element instances in the SCP gateway, and the historical action value is used to reflect the value estimate of the network element instance for historical network element service requests. A decision model is used to process the state transition matrix and service data to obtain a routing allocation weight table corresponding to the network element instance. The routing allocation weight table is used to reflect the priority of the network element instance in processing network element service requests under a preset global state.

[0167] In the gateway load balancing device provided in this application embodiment, the third determining module is further configured to determine the second global state after executing the first instance allocation strategy, and determine the expected action value in the second global state, wherein the expected action value is used to represent the value estimate of the network element instance processing network element service requests in the second global state; and update the historical action value according to the preset learning rate, the preset discount factor and the expected action value.

[0168] In the gateway load balancing device provided in this application embodiment, the allocation module is further configured to filter high-load instances in the network element instances whose future load state is in the third load range through the state transition matrix; when the importance index of the network element service request is greater than or equal to a preset threshold, the network element service request is processed through low-load instances in the network element instances whose future load state is in the first load range; when the importance index of the network element service request is less than the preset threshold, the corresponding network element instance is allocated to the network element service request for processing according to the routing allocation weight table.

[0169] This application also provides an electronic device, including: a memory and a processor, wherein the memory is used to store program instructions; and the processor is connected to the memory and used to execute the above-described gateway load balancing method.

[0170] It should be noted that the aforementioned electronic equipment is used to perform Figure 2 The gateway load balancing method shown above is also applicable to this electronic device, and will not be repeated here.

[0171] This application embodiment also provides a non-volatile storage medium, which includes a stored computer program, wherein the device containing the non-volatile storage medium executes the above-described gateway load balancing method by running the computer program.

[0172] It should be noted that the aforementioned non-volatile storage media is used for execution. Figure 2 The gateway load balancing method shown above is also applicable to this non-volatile storage medium, and will not be repeated here.

[0173] This application also provides a computer program product, including computer instructions that, when executed by a processor, implement the above-described gateway load balancing method.

[0174] It should be noted that the above-mentioned computer program product is used to execute Figure 2 The gateway load balancing method shown above is also applicable to this computer program product, and will not be repeated here.

[0175] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0176] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0177] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0178] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0179] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0180] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0181] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A gateway load balancing method, characterized in that, include: Determine the initial load state of the network element instance in the Service Communication Proxy (SCP) gateway; Based on the initial load state, a Markov chain model is used to determine the state transition probability of the network element instance, and the future load state of the network element instance is determined based on the state transition probability. The state transition probability introduces a time decay factor, which is used to adjust the weight of real-time network element performance data within a preset time window relative to historical network element performance data. Receive network element service requests and perform network element instance allocation based on the importance of the network element service request and the future load status of the network element instance.

2. The method according to claim 1, characterized in that, Determine the initial load state of the network element instances in the SCP gateway, including: The network element performance data of the network element instance is obtained through the agent or probe built into the SCP gateway, wherein the network element performance data includes the real-time network element performance data and the historical network element performance data; The load state intervals are divided based on the network element performance data. The load state intervals include a first load interval, a second load interval, and a third load interval. The maximum load state index of the first load interval is less than the minimum load state index of the second load interval, and the maximum load state index of the second load interval is less than the minimum load state index of the third load interval. The initial load state of the network element instance is determined based on the load state range.

3. The method according to claim 2, characterized in that, After obtaining the network element performance data of the network element instance through the agent or probe built into the SCP gateway, the method further includes: Determine the average load of the network element performance data within the first time window; Based on the average load, a preset smoothing factor is used to update the first weight of the real-time network element performance data in the network element performance data to a second weight, resulting in updated network element performance data, wherein the second weight is higher than the first weight; The updated network element performance data is then normalized.

4. The method according to claim 2, characterized in that, The method further includes: Determine the load distribution of the network element performance data within the second time window; Based on the load distribution, a high load partitioning threshold corresponding to the network element performance data is determined, wherein the high load partitioning threshold is a partitioning threshold corresponding to the second load interval and the third load interval; The load status intervals of the network element performance data are redefined based on the high load threshold.

5. The method according to claim 2, characterized in that, Based on the initial load state, a Markov chain model is used to determine the state transition probability of the network element instance, including: The number of state transitions for the network element instance is determined based on its initial load state and the load state range. The state transition probability of the network element instance is determined using the Markov chain model based on the number of state transitions. A state transition matrix corresponding to the SCP gateway is determined based on the state transition probabilities, wherein the state transition matrix contains the state transition probabilities of all network element instances in the SCP gateway; The state transition matrix is ​​updated according to the time decay factor, and the updated state transition matrix is ​​normalized.

6. The method according to claim 5, characterized in that, The method further includes: Determine the service data corresponding to the network element instance, wherein the service data includes at least one of the following: the global state, service type, historical action value, and performance feedback data of the network element instance, wherein the global state is used to represent the initial load state combination of all network element instances in the SCP gateway, and the historical action value is used to reflect the value estimate of the network element instance for historical network element service requests; The state transition matrix and the service data are processed using a decision model to obtain a routing allocation weight table corresponding to the network element instance. The routing allocation weight table is used to reflect the priority of the network element instance in processing the network element service request under a preset global state.

7. The method according to claim 6, characterized in that, The decision model includes a state space, an action space, and a reward function. The state space is used to store the global state of the network element instance. The action space is used to store the instance allocation strategy corresponding to the global state. The reward function is used to evaluate the action value of the first instance allocation strategy in the first global state. The first instance allocation strategy is any instance allocation strategy in the action space, and the first global state is any global state in the state space.

8. The method according to claim 7, characterized in that, The value of historical actions is updated in the following ways: Determine the second global state after executing the first instance allocation strategy, and determine the expected action value in the second global state, wherein the expected action value is used to represent the value estimate of the network element instance processing the network element service request in the second global state; The historical action value is updated based on the preset learning rate, preset discount factor, and the expected action value.

9. The method according to claim 8, characterized in that, Instance allocation is performed based on the importance of the network element service request and the future load status of the network element instance, including: The state transition matrix is ​​used to filter high-load instances among the network element instances whose future load state is in the third load range. If the importance index of the network element service request is greater than or equal to a preset threshold, the network element service request will be processed through a low-load instance in the network element instance whose future load status is in the first load range. If the importance index of the network element service request is less than the preset threshold, the network element service request is assigned a corresponding network element instance for processing according to the routing allocation weight table.

10. A gateway load balancing device, characterized in that, include: The first determining module is used to determine the initial load state of the network element instance in the Service Communication Proxy (SCP) gateway; The second determining module is used to determine the state transition probability of the network element instance based on the initial load state using a Markov chain model, and to determine the future load state of the network element instance based on the state transition probability. The state transition probability introduces a time decay factor, which is used to adjust the weight of real-time network element performance data within a preset time window relative to historical network element performance data. The allocation module is used to receive network element service requests and perform network element instance allocation based on the importance of the network element service request and the future load status of the network element instance.

11. An electronic device, characterized in that, include: A memory and a processor, wherein the memory is used to store program instructions; The processor, connected to the memory, is used to execute the gateway load balancing method according to any one of claims 1 to 9.

12. A non-volatile storage medium, characterized in that, The non-volatile storage medium includes a stored computer program, wherein the device containing the non-volatile storage medium executes the gateway load balancing method according to any one of claims 1 to 9 by running the computer program.

13. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the gateway load balancing method according to any one of claims 1 to 9.