Microservice architecture intelligent load balancing scheduling system based on machine learning
By building an intelligent load balancing and scheduling system based on machine learning, the problems of insufficient generalization and robustness of the microservice architecture in extreme abnormal situations are solved, and the system is able to operate efficiently and stably in extreme environments and simplify operation and maintenance.
Patent Information
- Application Number
- CN202510915533.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-10-17
AI Technical Summary
The existing microservice architecture lacks generalization and robustness when faced with extreme abnormal situations (such as sudden large-scale traffic and unknown failure modes), resulting in prediction errors and delayed scheduling responses, affecting system stability. In addition, model training relies heavily on data quality and feature engineering, increasing the complexity and cost of operations and maintenance.
An intelligent load balancing scheduling system based on machine learning was designed, which includes an abnormal traffic detection module, an abnormal fault pattern recognition module, a generalization-enhanced scheduling decision module, an adaptive resource reallocation module, an elastic control module and a robustness training module. Through technical means such as hierarchical sparse feature extraction, belief propagation mechanism, asynchronous residual correction, and inverse adversarial disturbance generation, the system's adaptability and stability in extreme environments are improved.
It improves the system's adaptability and fault tolerance in extreme environments, reduces operation and maintenance complexity and costs, and ensures the efficient and stable operation of the system in abnormal scenarios.
Smart Images

Figure CN120803716A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence, more particularly, to a machine learning-based microservice architecture intelligent load balancing scheduling system. BACKGROUND
[0002] With the rapid development of information technology, enterprises increasingly rely on information systems in intellectual property management to improve the ability to apply, maintain, operate and risk control of intellectual property. Microservice architecture has been widely used in the construction of enterprise-level intellectual property service systems due to its modularization, scalability and easy deployment.
[0003] However, the system under the microservice architecture is usually composed of a large number of distributed service nodes, each service module calls each other, the number of service instances is large, and the access mode is complex and variable. In this environment, the traditional static load balancing strategy (such as round robin, least connection number, random distribution, etc.) is often difficult to adapt to the dynamic changes of service load, which can easily lead to uneven service response, overload of some nodes, and decline of system throughput, thereby affecting the overall business stability and user experience.
[0004] However, despite the rapid development of this technology, the biggest deficiency is that the system's generalization ability and robustness in the face of extreme abnormal situations (such as sudden super-large-scale traffic, unknown fault patterns) are still insufficient, which can easily lead to prediction errors, scheduling lag, and other problems, resulting in a decline in overall system stability. In addition, model training relies heavily on data quality, feature engineering and continuous updates, increasing the complexity and cost of operation and maintenance. How to improve the adaptability and fault tolerance in abnormal scenarios has become a key problem that needs to be broken through. SUMMARY
[0005] The present application aims to provide a machine learning-based microservice architecture intelligent load balancing scheduling system to solve the problems raised in the background art: the system's generalization ability and robustness in the face of extreme abnormal situations (such as sudden super-large-scale traffic, unknown fault patterns) are still insufficient, which can easily lead to prediction errors, scheduling lag, and other problems, resulting in a decline in overall system stability. In addition, model training relies heavily on data quality, feature engineering and continuous updates, increasing the complexity and cost of operation and maintenance. How to improve the adaptability and fault tolerance in abnormal scenarios has become a key problem that needs to be broken through.
[0006] Technical solution: 1. A machine learning-based microservice architecture intelligent load balancing scheduling system, characterized in that the machine learning-based microservice architecture intelligent load balancing scheduling system comprises an abnormal traffic detection module, an abnormal fault pattern recognition module, a generalization enhancement type scheduling decision module, a self-adaptive resource reallocation module, an elastic control module, a robustness training module and a system linkage coordination module. The abnormal flow detection module forms a feature migration channel with the abnormal fault mode recognition module through hierarchical sparse feature extraction and dynamic abnormal sensitivity modeling, and realizes cross-scene abnormal joint modeling; the generalization enhanced scheduling decision module dynamically adjusts the decision confidence interval based on the abnormal recognition result in a confidence propagation mechanism; the adaptive resource reallocation module uses an asynchronous residual correction method and generalization scheduling linkage according to the scheduling decision output and resource load feedback; the elastic control module combines dynamic prediction error analysis and real-time sliding window reevaluation mechanism to assist the scheduling module in timing consistency control; the robustness training module uses inverse adversarial noise generation and timing consistency regularization double constraint training; the system linkage coordination module based on multi-module confidence consistency verification and dynamic priority switching strategy, overall planning the decision priority order of each module in extreme environment.
[0007] Preferably, the abnormal flow detection module includes a hierarchical feature encoding unit, a multi-scale sensitive hash detector, and a heterogeneous artifact elimination unit. The hierarchical feature encoding unit uses a local convolution-sparse projection joint modeling method to orthogonal sparse encode the density variation, variation speed, and variation momentum of the flow data, respectively, to ensure the minimum mutual information cross between the three types of variation modes.
[0008] Preferably, the generalization enhanced scheduling decision module includes a confidence weighted reinforcement learning unit and a structured disturbance optimizer. The confidence weighted reinforcement learning unit models the confidence of the policy output space based on the Beta-Dirichlet mixed distribution, and uses a dynamic risk adjustment coefficient to adaptively converge the confidence estimate. The structured disturbance optimizer jointly optimizes high-order tensor disturbance injection and sparse regularization constraints to induce a strategy that balances local smoothness and global stability in a high-uncertainty environment.
[0009] Preferably, the multi-scale sensitive hash detector generates local flow change hash vectors at different time scales through a parallel multi-channel adaptive perception network. The hash radius of each channel is dynamically adjusted according to the short-term volatility rate, and the channels are trained by a sparse complementarity constraint optimizer to make the hash vectors complementary and low-redundancy between different scales.
[0010] Preferably, the confidence weighted reinforcement learning unit uses a confidence gradient rescaling mechanism during policy training, which dynamically adjusts the learning rate and target network update frequency by confidence weighted scaling and local sensitive regularization constraint on the policy gradient.
[0011] Preferably, the structured disturbance optimizer periodically introduces a gradient disturbance injection mechanism of L1 regularization constraint in the policy update stage, and adjusts the policy gradient trajectory through the local Hessian matrix positive definite constraint after disturbance injection, to suppress the gradient explosion degradation phenomenon of the policy function in extreme abnormal cases.
[0012] Preferably, the robust training module includes a reverse adversarial disturbance generator and a timing consistency regularizer. The reverse adversarial disturbance generator generates abnormal samples by performing reverse modeling on abnormal trajectories, uses maximum KL divergence change to guide abnormal sample generation, and ensures that the disturbance samples and normal samples maintain a distribution distance less than a set threshold in the first-order statistics and second-order covariance matrix space through a feature distribution alignment mechanism, to maximize the coverage of extreme environments by training samples.
[0013] Preferably, the reverse adversarial disturbance generator introduces a disturbance sample screening mechanism based on importance sampling during disturbance sample generation, screens the disturbed samples according to their influence on the curvature of the policy change, and preferentially retains samples that cause high curvature change as the training set.
[0014] Preferably, the timing consistency regularizer combines skip resampling and sliding window residual control to constrain the residual fluctuation amplitude of the policy output sequence in each training period, and introduces reverse normalization trend control in the time dimension.
[0015] Compared with the prior art, the application has the following advantages: (1) The reverse adversarial disturbance generator and the timing consistency regularizer are designed to guide abnormal samples to cover extreme trajectories and suppress overfitting to local time abnormalities, thereby improving the adaptability and decision stability of the model in extreme environments from the source.
[0016] (2) The confidence weighted reinforcement learning unit models the decision confidence interval using a Beta-Dirichlet mixed distribution, and introduces a confidence gradient rescaling mechanism to dynamically control the learning rate and update frequency, so that the scheduling decision maintains high flexibility and robustness in uncertain environments.
[0017] (3) A multi-scale sensitive hash detector is constructed to generate sparse and complementary local hash features at different time scales through a multi-channel adaptive perception network, achieving high-precision capture of complex multi-time and space traffic anomalies.
[0018] (4) An asynchronous residual correction method is proposed, combined with a dynamic sliding window reevaluation mechanism, so that resource allocation can quickly adapt to real-time changes and maintain continuity, greatly improving resource utilization efficiency and stability in traffic surge or abnormal degradation scenarios. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 The overall system schematic diagram of the machine learning-based micro-service architecture intelligent load balancing scheduling system of the present application is shown in the figure below: DETAILED DESCRIPTION
[0020] Embodiment, please refer to Figure 1 The machine learning-based micro-service architecture intelligent load balancing scheduling system includes an abnormal traffic detection module, an abnormal fault pattern recognition module, a generalization enhanced scheduling decision module, a self-adaptive resource reallocation module, an elastic control module, a robustness training module, and a system linkage coordination module. The abnormal traffic detection module extracts features by hierarchical sparse feature extraction and dynamically models abnormal sensitivity, and forms a feature migration channel with the abnormal fault pattern recognition module to achieve cross-scenario abnormal joint modeling. The generalization enhanced scheduling decision module dynamically adjusts the decision confidence interval based on the abnormal recognition result using the belief propagation mechanism to enhance the decision robustness under extreme abnormalities. The self-adaptive resource reallocation module uses an asynchronous residual correction method in conjunction with the generalization scheduling to optimize the continuity of resource allocation based on the scheduling decision output and resource load feedback. The elastic control module combines dynamic prediction error analysis and real-time sliding window reevaluation mechanism to assist the scheduling module in timing consistency control. The robustness training module further improves the generalization adaptability in abnormal environments through dual constraint training of reverse adversarial generation and timing consistency regularization. The system linkage coordination module determines the decision priority order of each module in extreme environments based on multi-module confidence consistency verification and dynamic priority switching strategy to ensure the overall robustness and generalization performance of the system.
[0021] Specifically, the abnormal fault pattern recognition module receives the feature encoding output by the abnormal traffic detection module, uses a transfer learning structure (such as Adversarial Discriminative Domain Adaptation, ADDA) to adapt to abnormal distribution in new environments, and uses a Softmax + confidence output mechanism to give abnormal pattern labels and corresponding confidence scores. The output abnormal result is passed to the generalization enhanced scheduling decision module for use.
[0022] Specifically, after the self-adaptive resource reallocation module outputs the scheduling decision, it monitors the actual resource load and calculates the allocation residual (scheduling suggestion - actual feedback difference). It uses an asynchronous residual correction method: the residual term is weighted and added to the next round of allocation decision as a correction amount. This module also adjusts the correction step size adaptively based on a rolling average window to prevent overfitting to local abnormalities.
[0023] Specifically, the elastic control module calculates the decision residual using a sliding window for a sequence of scheduling decisions over a continuous period of T seconds. If the continuous residual exceeds a set threshold, it automatically triggers sliding window reevaluation and error adjustment. The size of the sliding window is dynamically adjusted based on the short-term load fluctuation amplitude estimate.
[0024] Specifically, the system linkage coordination module outputs confidence each decision cycle; based on multi-module confidence consistency detection (such as maximum-minimum confidence difference), if the confidence is different, the system linkage coordination module adopts dynamic priority rule to switch control main module; priority switching is based on current environmental fluctuation rate, abnormal frequency, and adaptive resource occupation rate weighted comprehensive calculation.
[0025] Specifically, the system is deployed based on micro-service architecture, and each module is implemented in the form of independent container or service. The abnormal traffic detection module adopts hierarchical convolution sparse network (LSCN), and each layer outputs dynamic abnormal sensitive feature, which is input into the abnormal pattern recognition module. The core of the scheduling module adopts confidence weighted strategy (see claim 3) combined with residual feedback update, and the system linkage module controls the switching of all sub-modules through unified confidence buffer area. In the training stage, the real traffic environment is superimposed with reverse adversarial disturbance, and time sequence consistency joint optimization is performed.
[0026] Among them, the abnormal traffic detection module includes a hierarchical feature coding unit, a multi-scale sensitive hash detector, and a heterogeneous artifact elimination unit. The hierarchical feature coding unit adopts a local convolution-sparse projection joint modeling method, which performs orthogonal sparse coding on the density change, change speed, and change momentum of traffic data respectively, to ensure the minimum mutual information cross degree between the three types of change patterns, thereby improving the sensitivity and robustness of abnormal detection.
[0027] Specifically, each traffic data is first extracted by a local convolution layer to extract basic features, and then encoded by three groups of sparse projection matrices respectively to ensure that the features of traffic density, speed, and momentum change do not interfere with each other, and finally the non-diagonal elements in the mutual information matrix in the encoded space are less than 0.05, improving the abnormal sensitivity of the module.
[0028] The generalization enhanced scheduling decision module includes a confidence weighted reinforcement learning unit and a structured disturbance optimizer. The confidence weighted reinforcement learning unit models the confidence of the policy output space based on the Beta-Dirichlet mixed distribution, and uses a dynamic risk adjustment coefficient to adaptively converge control the confidence estimate. The structured disturbance optimizer jointly optimizes high-order tensor disturbance injection and sparse regularization constraints to induce the policy to form a strategy form that balances local smoothness and global stability in a high-uncertainty environment.
[0029] Specifically, the confidence distribution of the policy output is modeled by Beta-Dirichlet joint distribution, and the expected value is ; the risk adjustment coefficient The local environment fluctuation amplitude is dynamically updated, so that the convergence process has higher fault tolerance to abnormal samples; the structured disturbance adopts a third-order tensor disturbance T injected in the strategy space, and the sparsity constraint The control disturbance amplitude induces the strategy to remain smooth convergence under uncertain environment.
[0030] The multi-scale sensitive hash detector generates local traffic change hash vectors at different time scales through parallel multi-channel adaptive perception networks. The hash radius of each channel is dynamically adjusted according to the short-term volatility rate, and the hash vectors are trained by a sparse complementary constraint optimizer between channels, so that the hash vectors are complementary and have low redundancy between different scales, thereby effectively improving the detection accuracy of multi-time and space scale abnormal traffic.
[0031] Specifically, each channel extracts hash vectors for three different time windows of 5s, 30s and 5min, and the hash radius is adaptively adjusted according to the traffic variance in the recent period. At the same time, the output hash vectors of different channels are constrained by cross complementary regularization (CCLR) to maintain complementarity and reduce redundancy.
[0032] The confidence weighted reinforcement learning unit adopts a confidence gradient rescaling mechanism during policy training. By confidence weighted scaling and local sensitive regularization constraint on the policy gradient, the learning rate and target network update frequency are dynamically adjusted to reduce the negative disturbance of abnormal samples on the training dynamics and enhance the anti-noise performance of the policy to confidence fluctuations.
[0033] Specifically, at each training step, the policy gradient According to the current confidence Rescale And introduce a local fluctuation penalty term Control the sensitivity of policy changes and improve the anti-interference ability of abnormal samples during training.
[0034] The structured disturbance optimizer periodically introduces an L1 regularization gradient disturbance injection mechanism during policy update, and adjusts the policy gradient trajectory through local Hessian matrix positive definiteness constraint after disturbance injection to suppress the gradient explosion or degradation phenomenon of the policy function under extreme abnormal conditions, and improve the consistency and stability of the policy output under abnormal disturbance.
[0035] Specifically, an L1 regularization gradient disturbance is introduced every 1000 steps of policy update, and the disturbance amplitude is adaptively adjusted through residual fluctuation. After disturbance, the Hessian matrix positive definiteness constraint is detected to ensure that the policy gradient update trajectory is still stable downward, preventing gradient explosion.
[0036] The robust training module comprises a reverse adversarial disturbance generator and a time consistency regularizer, the reverse adversarial disturbance generator generates abnormal samples by performing reverse modeling on abnormal trajectories, guides the generation of abnormal samples by using maximum KL divergence change, and ensures that the disturbance samples and normal samples maintain a distribution distance less than a set threshold in the first-order statistics and second-order covariance matrix space through a feature distribution alignment mechanism, so as to maximize the coverage of the training samples to the extreme environment.
[0037] Specifically, the reverse adversarial disturbance is generated by maximum KL divergence trajectory reverse generation, and after the generation of the disturbance sample, the mean and covariance of the disturbance and normal samples are calculated respectively to ensure that the first-order and second-order distribution differences are less than 0.1. The disturbance sample is used to expand the coverage of the training data.
[0038] The reverse adversarial disturbance generator introduces a disturbance sample screening mechanism based on importance sampling during the generation of the disturbance sample, screens the samples after disturbance according to the influence degree of the curvature of the strategy change, and preferentially retains the samples causing high curvature change as the training set to accelerate the improvement of the generalization adaptability of the strategy to abnormal patterns.
[0039] Specifically, after generating the disturbance sample each time, the high-impact samples in the top 20% are selected based on the influence value of the sample on the curvature of the strategy change and added to the training set to quickly improve the generalization ability of the strategy to abnormal environments.
[0040] The time consistency regularizer combines the skip resampling and sliding window residual control to constrain the residual fluctuation amplitude of the strategy output sequence in each training period, and introduces the reverse normalization trend control in the time dimension to suppress the overfitting phenomenon of the strategy to local time abnormalities and improve the overall smoothness and consistency of the decision output in the continuous time period.
[0041] Specifically, the output sequence is resampled by skip with a step size of 3, the residual fluctuation in the sliding window (window size 10) is calculated, and the residual fluctuation standard deviation is controlled to be less than 0.05 to avoid overfitting of the strategy in the local time scale and improve the overall time consistency. The above shows and describes the basic principles, main features and advantages of the present application; those skilled in the art should understand that the present application is not limited to the above examples, the above examples and descriptions in the specification are only preferred examples of the present application and are not intended to limit the present application, various changes and improvements can be made to the present application without departing from the spirit and scope of the present application, and these changes and improvements all fall within the scope of the claimed present application; the scope of protection of the present application is defined by the appended claims and their equivalents.
Claims
1. A machine learning-based intelligent load balancing scheduling system for microservice architecture, characterized by: The machine learning-based microservice architecture intelligent load balancing scheduling system includes an abnormal traffic detection module, an abnormal fault pattern recognition module, a generalized enhanced scheduling decision module, an adaptive resource reallocation module, an elasticity control module, a robustness training module and a system linkage coordination module; The abnormal traffic detection module forms a feature migration channel with the abnormal fault pattern recognition module through the hierarchical sparse feature extraction and dynamic abnormal sensitivity modeling, thereby realizing cross-scenario abnormal joint modeling; The generalized enhanced scheduling decision module dynamically adjusts the decision confidence interval based on the anomaly identification results using the confidence propagation mechanism; the adaptive resource reallocation module adopts an asynchronous residual correction method and is linked to the generalized scheduling based on the scheduling decision output and resource load feedback; the elastic control module combines dynamic prediction error analysis with a real-time sliding window reassessment mechanism to assist the scheduling module in timing consistency control; the robustness training module uses dual constraint training of inverse adversarial disturbance generation and timing consistency regularization; the system linkage coordination module coordinates the decision priorities of each module in extreme environments based on multi-module confidence consistency verification and dynamic priority switching strategy.
2. The machine learning-based microservice architecture intelligent load balancing scheduling system according to claim 1 is characterized in that: The abnormal traffic detection module includes a hierarchical feature coding unit, a multi-scale sensitive hash detector and a heterogeneous artifact elimination unit. The hierarchical feature coding unit adopts a local convolution-sparse projection joint modeling method to perform orthogonal sparse coding on the density change, change speed and change momentum of traffic data respectively to ensure the minimum mutual information cross-degree between the three types of change patterns.
3. The machine learning-based microservice architecture intelligent load balancing scheduling system according to claim 1 is characterized in that: The generalized enhanced scheduling decision module includes a confidence-weighted reinforcement learning unit and a structured perturbation optimizer. The confidence-weighted reinforcement learning unit models the confidence of the policy output space based on the Beta-Dirichlet mixed distribution, and uses a dynamic risk adjustment coefficient to adaptively control the convergence of the confidence estimate. The structured perturbation optimizer jointly optimizes high-order tensor perturbation injection and sparse regularization constraints to induce the policy to form a policy form that takes into account both local smoothness and global stability in a high-uncertainty environment.
4. The machine learning-based microservice architecture intelligent load balancing scheduling system according to claim 2 is characterized in that: The multi-scale sensitive hash detector generates local traffic change hash vectors at different time scales through a parallel multi-channel adaptive perception network. The hash radius of each channel is dynamically adjusted according to the short-term volatility, and the channels are trained through a sparse complementarity constrained optimizer, so that the hash vectors at different scales are complementary and have low redundancy.
5. The machine learning-based microservice architecture intelligent load balancing scheduling system according to claim 3 is characterized in that: The confidence-weighted reinforcement learning unit adopts a confidence gradient recalibration mechanism during the policy training process, and dynamically adjusts the learning rate and target network update frequency by performing confidence-weighted scaling and local sensitive regularization constraints on the policy gradient.
6. The machine learning-based microservice architecture intelligent load balancing scheduling system according to claim 3 is characterized in that: The structured perturbation optimizer periodically introduces a gradient perturbation injection mechanism with L1 regularization constraints in the policy update phase, and adjusts the policy gradient trajectory through the local Hessian matrix positive definiteness constraint after perturbation injection to suppress the gradient explosion degradation phenomenon of the policy function in extreme abnormal situations.
7. The machine learning-based microservice architecture intelligent load balancing scheduling system according to claim 1 is characterized in that: The robustness training module includes an inverse adversarial perturbation generator and a temporal consistency regularizer. The inverse adversarial perturbation generator performs inverse modeling on abnormal trajectories, uses the maximum KL divergence change to guide the generation of abnormal samples, and uses a feature distribution alignment mechanism to ensure that the distribution distance between perturbed samples and normal samples in the first-order statistic and second-order covariance matrix space remains less than a set threshold, so as to maximize the coverage of training samples in extreme environments.
8. The machine learning-based microservice architecture intelligent load balancing scheduling system according to claim 7 is characterized in that: The inverse adversarial perturbation generator introduces a perturbation sample screening mechanism based on importance sampling during the perturbation sample generation process, and screens the perturbed samples according to their impact on the curvature of the policy change, and preferentially retains samples that cause high curvature changes as the training set.
9. The machine learning-based microservice architecture intelligent load balancing scheduling system according to claim 7, characterized in that: The temporal consistency regularizer combines skip resampling with sliding window residual control to constrain the residual fluctuation amplitude of the strategy output sequence in each training cycle and introduces reverse normalization trend control in the time dimension.