A load balancing method and device, electronic equipment and storage medium
By collecting multi-dimensional operational data from the network system to generate standardized feature vectors, and using artificial intelligence models to dynamically generate optimal path recommendation strategies, the problems of Layer 4 load balancing being unable to identify application layer content and Layer 7 load balancing having high processing overhead are solved. This achieves intelligent scheduling and load balancing, improving the accuracy and real-time performance of network scheduling.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI JIACHE INFORMATION TECH CO LTD
- Filing Date
- 2026-05-29
- Publication Date
- 2026-07-24
AI Technical Summary
In existing technologies, Layer 4 load balancing cannot identify application layer content, resulting in the inability to achieve intelligent routing. Layer 7 load balancing has high processing overhead and its switching strategy is not flexible enough, making it unable to make dynamic and adaptive optimal decisions based on real-time network conditions and server load.
By collecting multi-dimensional operational data from the network system, standardized feature vectors are generated, and an artificial intelligence model is used to dynamically generate optimal path recommendation strategies, thereby achieving intelligent traffic scheduling and load balancing.
It improved the accuracy and real-time performance of network scheduling, alleviated link congestion and uneven equipment load, and ensured the stable and efficient operation of network services.
Smart Images

Figure CN122457552A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a load balancing method, apparatus, electronic device, and storage medium. Background Technology
[0002] Layer 4 load balancing operates at the transport layer (TCP / UDP layer) of the OSI seven-layer model. It forwards traffic based solely on transport layer information such as source IP, destination IP, source port, and destination port, without parsing application layer packet content. Layer 7 load balancing, on the other hand, operates at the application layer (HTTP / HTTPS layer) of the OSI seven-layer model. It can parse and identify application layer information such as URLs, request headers, cookies, and application protocol content, enabling fine-grained routing and scheduling based on business content.
[0003] In the process of developing this application, the applicant discovered at least the following problems in the prior art:
[0004] In existing technologies, 1) Layer 4 load balancing cannot identify application layer content, thus failing to achieve intelligent routing based on URLs, cookies, etc.; 2) Layer 7 load balancing has relatively high processing overhead, potentially becoming a performance bottleneck. Currently, some solutions exist that simply combine Layer 4 and Layer 7 load balancing, but both are typically statically or semi-statically configured, lacking flexible switching strategies and unable to make dynamic, adaptive optimal decisions based on real-time network conditions, server load, and application content. Summary of the Invention
[0005] This application provides a load balancing method, apparatus, electronic device, and storage medium. By collecting multi-dimensional operational data of the network system and converting it into standardized feature vectors, and using an artificial intelligence model combined with the real-time status of the system to dynamically generate optimal path recommendation strategies, intelligent traffic scheduling is achieved. This balances the overall load of the network system, alleviates link congestion and uneven device load, improves the accuracy and real-time performance of network scheduling, and ensures the stable and efficient operation of network services.
[0006] In a first aspect, embodiments of this application provide a load balancing method, the method comprising:
[0007] Real-time acquisition of raw operational status data of the network system across various dimensions;
[0008] The raw operational status data in each dimension are processed to generate a system feature vector corresponding to all the raw operational status data.
[0009] The system feature vector is input into an artificial intelligence (AI) model, and the AI model outputs the optimal path recommendation strategy matched by the network system in the current state.
[0010] Load balancing is performed on the original operating state data across all dimensions according to the optimal path recommendation strategy matched by the network system in its current state.
[0011] Secondly, embodiments of this application also provide a load balancing device, the device comprising: a data acquisition module, a feature conversion module, an AI decision-making module, and a load balancing module; wherein,
[0012] The data acquisition module is used to collect raw operating status data of the network system in various dimensions in real time;
[0013] The feature conversion module is used to process the original operating state data in each dimension and generate a system feature vector corresponding to all the original operating state data.
[0014] The AI decision module is used to input the system feature vector into the artificial intelligence AI model, and output the optimal path recommendation strategy matched by the network system in the current state through the AI model;
[0015] The load balancing module is used to load balance the service traffic of the network system according to the optimal path recommendation strategy matched by the network system in the current state.
[0016] Thirdly, embodiments of this application provide an electronic device, including:
[0017] One or more processors;
[0018] Memory, used to store one or more programs.
[0019] When the one or more programs are executed by the one or more processors, the one or more processors implement the load balancing method described in any embodiment of this application.
[0020] Fourthly, embodiments of this application provide a storage medium storing a computer program thereon, which, when executed by a processor, implements the load balancing method described in any embodiment of this application.
[0021] This application proposes a load balancing method, apparatus, electronic device, and storage medium. First, it collects raw operational status data of the network system in real time across various dimensions. Then, it processes this raw operational status data to generate system feature vectors corresponding to all raw operational status data. Next, it inputs these system feature vectors into an AI model, which outputs the optimal path recommendation strategy matched to the network system in its current state. Finally, it performs load balancing on the network system's service traffic according to the optimal path recommendation strategy matched to the network system in its current state. This application can transform discrete, multi-dimensional raw data into standardized, structured system feature vectors, achieving data format unification and information condensation. It eliminates redundant information in the raw data while fully preserving the overall operational characteristics of the network system, adapting to the input requirements of the AI model and improving the efficiency of data flow and model computation. Furthermore, relying on the AI model, this application can comprehensively analyze and judge the global operational status. Compared to traditional manual configuration and static rule scheduling methods, it can dynamically generate optimal scheduling strategies based on the real-time operating conditions of the network system, significantly improving the accuracy and responsiveness of path decisions and quickly adapting to dynamic changes in network traffic and device load. Therefore, compared with the prior art, the load balancing method, device, electronic device and storage medium proposed in this application collect multi-dimensional operating data of the network system and convert it into standardized feature vectors. By using an artificial intelligence model combined with the real-time status of the system, the optimal path recommendation strategy is dynamically generated to achieve intelligent traffic scheduling, thereby balancing the overall load of the network system, alleviating the problems of link congestion and uneven device load, improving the accuracy and real-time performance of network scheduling, and ensuring the stable and efficient operation of network services. Furthermore, the technical solution of this application is simple and convenient to implement, easy to popularize, and has a wider range of applications. Attached Figure Description
[0022] Figure 1 A schematic flowchart of a load balancing method provided in an embodiment of this application;
[0023] Figure 2 A schematic flowchart of a load balancing method provided in another embodiment of this application;
[0024] Figure 3 A schematic diagram of a method for load balancing raw operational status data across various dimensions, provided in an embodiment of this application;
[0025] Figure 4 This is a schematic diagram of the structure of a load balancing device provided in an embodiment of this application;
[0026] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0027] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present application, not the entire structure.
[0028] Figure 1 This is a schematic flowchart illustrating a load balancing method provided in an embodiment of this application. The method can be executed by a load balancing device or electronic device, which can be implemented in software and / or hardware, and can be integrated into any smart device with network communication capabilities. Figure 1 As shown, a load balancing method may include the following steps:
[0029] S101. Real-time acquisition of raw operational status data of the network system in various dimensions.
[0030] The network system in this embodiment is an overall network architecture that deploys a control plane, a sandbox environment, a Layer 4 load balancer cluster, a Layer 7 load balancer cluster, and backend business servers. This system can complete the entire process of scheduling policy generation, configuration command verification, command issuance, traffic forwarding, and routing scheduling, so as to achieve reasonable distribution and load balancing of network traffic and ensure stable transmission of business data and normal operation of access services.
[0031] In specific embodiments of this application, the raw operational status data across various dimensions may include: network layer data, application layer data, server resource data, and business metric data; wherein, network layer data includes, but is not limited to, one of the following: TCP / UDP connection count, network throughput, packet loss rate, and network latency; application layer data includes, but is not limited to, one of the following: HTTP request type, URL path, request header, response time, and error code; server resource data includes, but is not limited to, one of the following: CPU utilization, memory usage, disk I / O, network I / O, and GPU utilization; and business metric data includes, but is not limited to, one of the following: transaction success rate, number of user sessions, and API call frequency.
[0032] S102. Process the original operating status data in each dimension to generate system feature vectors corresponding to all the original operating status data.
[0033] In this embodiment, the system feature vector refers to structured quantitative data obtained after cleaning, aggregating, and extracting features from the multi-dimensional raw operational status data of the network system. It is used to centrally characterize the overall operational status of the network system at the current time and can be directly used as input data for an AI model. In one example, processing the raw operational status data in each dimension to generate a system feature vector corresponding to all the raw operational status data can include the following steps: cleaning the raw operational status data in each dimension, removing outliers and filling in missing data to obtain cleaned operational status data; aggregating the cleaned operational status data according to a preset fixed time window to form aggregated statistical indicators; wherein the preset fixed time window is one of 1 minute, 5 minutes, or 15 minutes; extracting features from the aggregated statistical indicators to generate a system feature vector corresponding to all the raw operational status data; wherein feature extraction includes extracting at least one of statistical features, time-series features, and business features.
[0034] S103. Input the system feature vector into the AI model, and output the optimal path recommendation strategy matched by the network system in the current state through the AI model.
[0035] The AI model in this application embodiment may include: a time series prediction sub-model, a traffic classification sub-model, an anomaly detection sub-model, and a reinforcement learning sub-model; wherein, the time series prediction sub-model is used to predict future traffic trends and server load changes based on the original operating status data in various dimensions, and obtain future traffic trend and load prediction results; the traffic classification sub-model is used to identify the business type and classify the traffic pattern of the original operating status data in various dimensions, and obtain traffic business type and traffic pattern; the anomaly detection sub-model is used to identify whether the server has anomalies, performance degradation, or potential faults based on the original operating status data in various dimensions, and obtain server anomaly / normal label or health score; the reinforcement learning sub-model is used to evaluate and iteratively optimize the optimal path recommendation strategy based on the future traffic trend and load prediction results, traffic business type and traffic pattern, server anomaly / normal label or health score, with the goal of optimizing system performance and resource utilization. Furthermore, the optimal path recommendation strategy in this application refers to a scheduling scheme generated by the AI model based on system feature vectors representing the overall operating status of the network system, combined with network traffic type, server load, and device health status. This strategy can include a Layer 4 load balancing distribution strategy, a Layer 7 load balancing routing strategy, and a server health scheduling strategy, used to guide network service traffic to complete forwarding and distribution along reasonable paths, thereby achieving balanced scheduling of network system load. This application inputs the system feature vectors representing the overall operating status of the network system into the AI model, relying on the powerful data analysis and comprehensive judgment capabilities of artificial intelligence to deeply analyze multi-dimensional operating characteristics, and can dynamically generate the optimal path recommendation strategy based on the real-time operating status of the network system. Compared with the traditional method of relying on manually preset fixed scheduling rules, this step gets rid of the limitations of static rules, can quickly respond to dynamic scenarios such as traffic fluctuations, device load changes, and device anomalies, significantly improving the real-time performance, accuracy, and global adaptability of path decisions, and providing a scientific and reasonable decision-making basis for subsequent load balancing scheduling. Furthermore, the optimal path recommendation strategy in this application embodiment may include: a Layer 4 load balancing traffic distribution strategy, a Layer 7 load balancing routing strategy, and a server health scheduling strategy; wherein, the Layer 4 load balancing traffic distribution strategy is used to directly forward high-throughput, low-computation-requirement traffic through the Layer 4 load balancer; the Layer 7 load balancing routing strategy is used to direct traffic that needs to be identified by the application layer to the Layer 7 load balancer for fine-grained routing; and the server health scheduling strategy is used to migrate traffic from abnormal or high-load servers to normal or low-load servers.
[0036] S104. Perform load balancing on the network system's service traffic according to the optimal path recommendation strategy matched by the network system in its current state.
[0037] In one example, load balancing of network system traffic according to the optimal path recommendation strategy matched by the network system in its current state may include the following steps: generating executable configuration instructions based on a Layer 4 load balancing traffic distribution strategy, a Layer 7 load balancing routing strategy, or a server health scheduling strategy; hot-updating the executable configuration instructions to the Layer 4 and / or Layer 7 load balancer clusters via the control plane API; and controlling the load balancers in the Layer 4 and / or Layer 7 load balancer clusters to perform traffic forwarding and routing scheduling according to the executable configuration instructions. The hot-updating method in this embodiment refers to a deployment method that, while maintaining normal business operation of the Layer 4 and Layer 7 load balancers and without interrupting traffic forwarding and routing scheduling, delivers and loads new load balancing configurations and scheduling strategies online, completing rule iteration updates. This method does not require restarting devices or pausing services, enabling seamless policy switching.
[0038] The load balancing method proposed in this application first collects raw operational status data of the network system in real time across various dimensions; then, it processes this raw operational status data to generate system feature vectors corresponding to all raw operational status data; next, it inputs these system feature vectors into an AI model, which outputs the optimal path recommendation strategy matched to the network system in its current state; finally, it performs load balancing on the network system's service traffic according to the optimal path recommendation strategy matched to the network system in its current state. This application can transform discrete, multi-dimensional raw operational status data into standardized, structured system feature vectors, achieving data format unification and information condensation. It eliminates redundant information in the raw operational status data while fully preserving the overall operational characteristics of the network system, adapting to the input requirements of the AI model and improving the efficiency of data flow and model computation. Furthermore, relying on the AI model, this application can comprehensively analyze and judge the global operational status. Compared to traditional manual configuration and static rule scheduling methods, it can dynamically generate optimal scheduling strategies based on the real-time operating conditions of the network system, significantly improving the accuracy and responsiveness of path decisions and quickly adapting to dynamic changes in network traffic and device load. Therefore, compared with the prior art, the load balancing method proposed in this application collects multi-dimensional operational data of the network system and transforms it into standardized feature vectors. By leveraging an artificial intelligence model and combining it with the real-time status of the system, it dynamically generates the optimal path recommendation strategy, thereby achieving intelligent traffic scheduling. This balances the overall load of the network system, alleviates the problems of link congestion and uneven device load, improves the accuracy and real-time performance of network scheduling, and ensures the stable and efficient operation of network services. Furthermore, the technical solution of this application is simple and convenient to implement, easy to popularize, and has a wider range of applications.
[0039] Figure 2This is a flowchart illustrating a load balancing method according to another embodiment of this application. Further optimizations and extensions based on the above technical solution are possible, and it can be combined with the various optional implementation methods described above. For example... Figure 2 As shown, a load balancing method may include the following steps:
[0040] S201. Real-time acquisition of raw operational status data of the network system in various dimensions.
[0041] S202. Clean the original operating status data in each dimension, remove outliers and fill in missing data to obtain cleaned operating status data.
[0042] The data cleaning in this embodiment is a correction and optimization process performed on the original operational status data of the network system in various dimensions. Since data acquisition is prone to issues such as missing data and numerical jumps, this operation identifies and removes abnormal data that deviates from the normal operating range. Simultaneously, it completes and repairs missing data caused by acquisition interruptions, eliminating errors and defects in the original operational status data, ensuring data authenticity and integrity, and preventing abnormal or missing data from affecting subsequent feature vector generation and AI model decision-making.
[0043] S203. Aggregate the cleaned operating status data according to a preset fixed time window to form aggregated statistical indicators; wherein, the preset fixed time window is one of 1 minute, 5 minutes or 15 minutes.
[0044] The time window aggregation in this embodiment uses a preset fixed duration as the statistical interval to integrate, calculate, and summarize cleaned operational status data within a continuous time period, converting discrete instantaneous data into statistical indicators within the corresponding time interval, thereby achieving data dimensionality reduction and condensation. In one example, the cleaned operational status data is aggregated according to a preset fixed time window to form aggregated statistical indicators, which may include the following steps: reading the preset fixed time window duration and using it as a basis to segment and classify the cleaned operational status data; extracting all valid operational status data within a single time window and removing residual invalid and scattered data within the window; performing mean, extreme value, or total statistical calculations on the valid data within the window to obtain sub-item statistical results; and summarizing all sub-item statistical results to generate aggregated statistical indicators that can characterize the operational status of that period. This application integrates scattered time-series data in segments, which can effectively compress the data volume, reduce the computational pressure of subsequent stages, and improve the overall efficiency of data processing and model inference. It uses time-period statistics to weaken instantaneous data fluctuations, improve data stability, and prevent occasional data anomalies from being transmitted to subsequent processing stages. It outputs standardized statistical indicators, which smoothly connect the data cleaning and feature extraction stages, ensuring the continuity and reliability of the entire data processing chain.
[0045] S204. Extract features from the aggregated statistical indicators to generate a system feature vector corresponding to all original operating status data; wherein, feature extraction includes extracting at least one of statistical features, time series features, and business features.
[0046] In one example, feature extraction is performed on the aggregated statistical indicators to generate a system feature vector corresponding to all the original operational status data. This can include the following steps: 1) Filtering out effective features representing network operation, device load, and service status from the aggregated statistical indicators; 2) Standardizing and quantifying each effective feature to unify the data value range and format; 3) Combining all quantified features according to a preset dimensional order to generate the corresponding system feature vector. This step can filter out effective features, remove redundant content, focus on the three core operational information categories of network, device, and service, and improve data effectiveness; 4) Standardized quantification, unifying the data format and value range, can solve the problem of inconsistent dimensions of different indicators and adapt to the computational requirements of AI models; 5) Combining features according to fixed dimensions to form a structured system feature vector ensures data dimension uniformity and regular arrangement, improving overall data processing efficiency and feature representation accuracy.
[0047] S205. Input the system feature vector into the artificial intelligence (AI) model, and output the optimal path recommendation strategy matched by the network system in the current state through the AI model.
[0048] S206. Perform load balancing on the network system's service traffic according to the optimal path recommendation strategy matched by the network system in its current state.
[0049] The load balancing method proposed in this application comprehensively collects multi-dimensional operational status data, fully covering network, device, and service operation information, and comprehensively restoring the real-time operating conditions of the network system. It breaks through the limitations of traditional solutions with their single data source, providing a comprehensive and complete original data source for subsequent data processing and intelligent decision-making, ensuring the completeness of decision-making basis. The original operational status data undergoes error correction and repair, eliminating distorted and abnormal data and supplementing missing data from gaps in the collection process. This purifies the data from the source, preventing the propagation of erroneous data and preventing deviations in subsequent statistics, feature extraction, and model analysis, thus ensuring the data reliability of the entire data link. Furthermore, this application divides statistical intervals into fixed durations of 1 minute, 5 minutes, and 15 minutes, integrating discrete time-series data into time-segmented statistical results. On the one hand, this achieves data dimensionality reduction, reducing data volume and subsequent computational pressure; on the other hand, it smooths instantaneous data disturbances, weakening the impact of occasional fluctuations, allowing statistical indicators to objectively reflect the overall system operation pattern of the corresponding time period. In addition, the AI model in this application conducts comprehensive analysis based on high-quality feature vectors, breaking free from the constraints of manually preset static rules, and can dynamically generate scheduling strategies in conjunction with the real-time system status. The decision-making perspective covers the entire operational situation, with fast response speed and strong adaptability, significantly improving the accuracy and adaptability of path planning. By completing load distribution according to the optimal strategy output by the AI model, network traffic is rationally channeled, and the load pressure of various devices and links is balanced. This can effectively avoid problems such as local overload, resource idleness, and link congestion, reduce service access latency, and ensure the continuous and efficient operation of network services.
[0050] Figure 3 This is a schematic flowchart illustrating a method for load balancing service traffic in a network system according to an embodiment of this application. Further optimizations and extensions can be made based on the above technical solution, and it can be combined with the various optional implementation methods described above. For example... Figure 3 As shown, a method for load balancing service traffic in a network system may include the following steps:
[0051] S301. Generate executable configuration instructions based on Layer 4 load balancing distribution strategy, Layer 7 load balancing routing strategy, or server health scheduling strategy.
[0052] In one example, generating executable configuration instructions based on a Layer 4 load balancing distribution strategy, a Layer 7 load balancing routing strategy, or a server health scheduling strategy may include the following steps: parsing the optimal path recommendation strategy, identifying the Layer 4 load balancing distribution rules, Layer 7 load balancing routing rules, and server health scheduling rules contained within the strategy; mapping and generating corresponding device configuration parameters according to the device configuration specifications corresponding to each type of scheduling rule; and encapsulating all configuration parameters into load balancing configuration instructions that are recognizable by the device and can be loaded and executed in real time. This application, by parsing and distinguishing different types of scheduling rules, fully preserves the strategy design logic, ensuring the accuracy and completeness of strategy interpretation, and laying the foundation for subsequent parameter conversion. Parameter mapping is completed according to the device configuration specifications, making the scheduling rules adapt to the operating requirements of the load balancing device, improving the compatibility and effectiveness of the configuration content. Furthermore, encapsulating the configuration parameters into standardized executable instructions enables strategy instruction conversion, facilitating rapid device loading and execution, ensuring timely implementation of scheduling strategies, and maintaining the continuous and stable operation of network services.
[0053] S302. After generating the executable configuration instructions, send the executable configuration instructions into the sandbox environment to verify the policy security and effectiveness.
[0054] The sandbox environment in this embodiment is an isolated testing environment independent of the formal business network and with the same logical architecture as the production environment. This environment is deployed independently, with completely isolated data and traffic, and does not interact with online business systems. It is primarily used for pre-trial testing, functional verification, and risk assessment of configuration commands and scheduling strategies. After generating executable configuration commands, this step first sends the commands to the sandbox environment for pre-verification of security and effectiveness. Utilizing the complete isolation between the sandbox environment and the production environment, the testing and execution of configuration commands will not interfere with real online business, network traffic, or device operating status, achieving proactive risk assessment. Simultaneously, by simulating real network conditions in the sandbox, rule conflicts, scheduling anomalies, parameter errors, and compatibility defects in the commands can be detected in advance, effectively filtering out unqualified configuration commands and preventing erroneous policies from being directly hot-updated to the production environment, causing traffic chaos, load scheduling failures, link congestion, or even business interruptions. This further improves the security, reliability, and stability of AI dynamic policy iteration updates, ensuring continuous, stable, and compliant operation of network load balancing scheduling.
[0055] S303. After successful verification, execute the operation of hot-updating executable configuration commands to the Layer 4 load balancer cluster and / or Layer 7 load balancer cluster via the control plane API.
[0056] In this step, after successful verification, the executable configuration commands are hot-updated via the control plane API and distributed to the Layer 4 and / or Layer 7 load balancer clusters. This includes the following steps: After the configuration command sandbox verification is successful, the standardized API interface of the load balancing control plane is invoked to establish a trusted communication link with the Layer 4 and / or Layer 7 load balancer clusters; the verified executable configuration commands are encrypted and distributed in batches via the API interface; and the hot-updated method is used to load and enable the new configuration commands online in each load balancer cluster, achieving seamless update of the scheduling policy. This step establishes a trusted communication link using the standardized API of the control plane, enabling a stable and secure interaction channel between the management end and the load balancer clusters, ensuring the standardization of data transmission and access security. Encrypting and batch-distributing the configuration commands prevents them from being tampered with or stolen during transmission and efficiently pushes them to multiple clusters simultaneously, improving the overall efficiency of configuration distribution. Furthermore, this application combines hot update mode to load and enable new configurations online, allowing the load balancing cluster to switch seamlessly without downtime or restart, and without interrupting existing traffic forwarding and service operation. The entire process balances communication security, distribution efficiency, and service continuity, ensuring that the optimal path recommendation strategy is implemented quickly, accurately, and securely, and continuously maintaining the stable operation of network load balancing scheduling.
[0057] S304. Control the load balancers in the Layer 4 load balancer cluster and / or Layer 7 load balancer cluster to perform traffic forwarding and routing scheduling according to executable configuration instructions.
[0058] In this step, controlling the load balancers in the Layer 4 and / or Layer 7 load balancer clusters to perform traffic forwarding and routing scheduling according to executable configuration instructions may include the following steps: loading locally updated configuration instructions into the load balancer, parsing traffic distribution rules, routing rules, and server health scheduling rules; identifying and classifying incoming network traffic, and performing traffic distribution and routing matching based on the parsed rules; and completing traffic forwarding scheduling based on server operating status to continuously output stable traffic forwarding and routing services. This application, by loading locally updated configuration instructions into the load balancer and parsing various scheduling rules, can accurately identify traffic distribution, routing, and server health management logic, ensuring that the scheduling basis is consistent with the preset strategy. Identifying and classifying incoming traffic and matching it with corresponding rules enables refined traffic distribution and routing guidance according to business needs, improving the orderliness of traffic scheduling. Performing forwarding scheduling based on server operating status can prioritize the allocation of traffic to healthy and available service nodes, avoiding access anomalies caused by faulty nodes. The entire process can stably implement load balancing strategies, ensuring efficient and orderly network traffic forwarding, while improving the overall availability of backend services and continuously providing reliable forwarding and routing services for the business.
[0059] The load balancing method proposed in this application first converts various load balancing strategies into standardized executable configuration instructions, unifying device execution specifications. Then, it utilizes a sandbox environment for pre-verification, leveraging environmental isolation to proactively identify instruction defects, rule conflicts, and security risks, preventing abnormal configurations from impacting online services. Encrypted transmission and batch distribution are achieved through the control plane API, ensuring secure communication links and high deployment efficiency. Combined with a hot update mode, configurations are iterated online without requiring device downtime or restart, guaranteeing uninterrupted service. Finally, the load balancing device accurately parses rules based on the effective configuration, identifies traffic, and performs forwarding scheduling in conjunction with server status, strictly implementing pre-set scheduling logic. This entire process controls security, efficiency, and reliability at every level, achieving automated, secure, seamless updates and stable execution of load balancing strategies, effectively optimizing traffic distribution and improving the overall network architecture's operational stability, service availability, and ease of maintenance.
[0060] Figure 4 This is a schematic diagram of the structure of a load balancing device provided in an embodiment of this application. Figure 4 As shown, the load balancing device includes: a data acquisition module 401, a feature conversion module 402, an AI decision-making module 403, and a load balancing module 404; wherein,
[0061] The data acquisition module 401 is used to collect raw operating status data of the network system in various dimensions in real time;
[0062] The feature conversion module 402 is used to process the original operating state data in each dimension and generate a system feature vector corresponding to all the original operating state data.
[0063] The AI decision module 403 is used to input the system feature vector into the artificial intelligence AI model, and output the optimal path recommendation strategy matched by the network system in the current state through the AI model;
[0064] The load balancing module 404 is used to perform load balancing on the service traffic of the network system according to the optimal path recommendation strategy matched by the network system in the current state.
[0065] The load balancing device described above can execute the methods provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects for executing the methods. Technical details not described in detail in this embodiment can be found in the load balancing methods provided in any embodiment of this application.
[0066] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present application is shown. Figure 5 The electronic device 12 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0067] like Figure 5 As shown, the electronic device 12 is represented in the form of a general-purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).
[0068] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0069] Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0070] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (… Figure 5 Not shown; usually referred to as a "hard drive"). Although Figure 5 As not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this application.
[0071] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of this application.
[0072] Electronic device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with electronic device 12, and / or with any device that enables electronic device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, electronic device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of electronic device 12 via bus 18. It should be understood that, although... Figure 5 As not shown, other hardware and / or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0073] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the load balancing method provided in the embodiments of this application.
[0074] This application also provides a computer storage medium.
[0075] The computer-readable storage medium of this application embodiment can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be—but is not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0076] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0077] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0078] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0079] This application also provides a computer program product.
[0080] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer program products, which may include one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be an application-specific or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0081] Note that the above description is merely a preferred embodiment and the technical principles employed in this application. Those skilled in the art will understand that this application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of this application, the scope of which is determined by the scope of the appended claims.
Claims
1. A load balancing method, characterized in that, The method includes: Real-time acquisition of raw operational status data of the network system across various dimensions; The raw operational status data in each dimension are processed to generate a system feature vector corresponding to all the raw operational status data. The system feature vector is input into an artificial intelligence (AI) model, and the AI model outputs the optimal path recommendation strategy matched by the network system in the current state. The network system's service traffic is load balanced according to the optimal path recommendation strategy matched by the network system in its current state.
2. The method according to claim 1, characterized in that, The raw operational status data across various dimensions includes: network layer data, application layer data, server resource data, and business metric data. The network layer data includes, but is not limited to, one of the following: TCP / UDP connection count, network throughput, packet loss rate, and network latency. The application layer data includes, but is not limited to, one of the following: HTTP request type, URL path, request headers, response time, and error code. The server resource data includes, but is not limited to, one of the following: CPU utilization, memory usage, disk I / O, network I / O, and GPU utilization. The business metric data includes, but is not limited to, one of the following: transaction success rate, number of user sessions, and API call frequency.
3. The method according to claim 1, characterized in that, The raw operational status data across all dimensions is processed to generate a system feature vector corresponding to all raw operational status data, including: The original operational status data in each dimension is cleaned to remove outliers and fill in missing data, resulting in cleaned operational status data. The cleaned operational status data is aggregated according to a preset fixed time window to form aggregated statistical indicators; wherein, the preset fixed time window is one of 1 minute, 5 minutes or 15 minutes; The aggregated statistical indicators are subjected to feature extraction to generate a system feature vector corresponding to all original operating status data; wherein, the feature extraction includes extracting at least one of statistical features, time series features, and business features.
4. The method according to claim 1, characterized in that, The AI model includes: a time series prediction sub-model, a traffic classification sub-model, an anomaly detection sub-model, and a reinforcement learning sub-model. The time series prediction sub-model predicts future traffic trends and server load changes based on raw operational status data across various dimensions, yielding future traffic trend and load prediction results. The traffic classification sub-model identifies business types and classifies traffic patterns from raw operational status data across various dimensions, resulting in traffic business types and traffic patterns. The anomaly detection sub-model identifies server anomalies, performance degradation, or potential faults based on raw operational status data across various dimensions, obtaining server anomaly / normal labels or health scores. The reinforcement learning sub-model evaluates and iteratively optimizes the optimal path recommendation strategy based on future traffic trends and load prediction results, traffic business types and traffic patterns, and server anomaly / normal labels or health scores, with the goal of maximizing system performance and resource utilization.
5. The method according to claim 1, characterized in that, The optimal path recommendation strategy includes: a Layer 4 load balancing traffic distribution strategy, a Layer 7 load balancing routing strategy, and a server health scheduling strategy. The Layer 4 load balancing traffic distribution strategy is used to directly forward high-throughput, low-computation-requirement traffic through a Layer 4 load balancer. The Layer 7 load balancing routing strategy is used to direct traffic requiring application-layer identification to a Layer 7 load balancer for fine-grained routing. The server health scheduling strategy is used to migrate traffic from abnormal or high-load servers to normal or low-load servers.
6. The method according to claim 5, characterized in that, Load balancing of the network system's service traffic is performed according to the optimal path recommendation strategy matched by the network system in its current state, including: Executable configuration instructions are generated based on the Layer 4 load balancing distribution strategy, the Layer 7 load balancing routing strategy, or the server health scheduling strategy. The executable configuration instructions are hot-updated and distributed to the Layer 4 load balancer cluster and / or Layer 7 load balancer cluster via the control plane API. Control the load balancers in the Layer 4 load balancer cluster and / or Layer 7 load balancer cluster to perform traffic forwarding and routing scheduling according to the executable configuration instructions.
7. The method according to claim 6, characterized in that, The method further includes: After generating executable configuration instructions, the executable configuration instructions are sent to a sandbox environment for policy security and effectiveness verification. After successful verification, the executable configuration instructions are sent to the Layer 4 load balancer cluster and / or Layer 7 load balancer cluster via hot update through the control plane API.
8. A load balancing device, characterized in that, The device includes: a data acquisition module, a feature conversion module, an AI decision-making module, and a load balancing module; wherein, The data acquisition module is used to collect raw operating status data of the network system in various dimensions in real time; The feature conversion module is used to process the original operating state data in each dimension and generate a system feature vector corresponding to all the original operating state data. The AI decision module is used to input the system feature vector into the artificial intelligence AI model, and output the optimal path recommendation strategy matched by the network system in the current state through the AI model; The load balancing module is used to load balance the service traffic of the network system according to the optimal path recommendation strategy matched by the network system in the current state.
9. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the load balancing method as described in any one of claims 1 to 7.
10. A storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the load balancing method as described in any one of claims 1 to 7.