Intelligent dynamic load balancing method and system based on multi-dimensional monitoring data

The method and system leverage multi-dimensional monitoring data to construct a hybrid neural network model with transfer learning and reinforcement learning for dynamic load balancing, addressing inefficiencies in energy management systems by enhancing prediction accuracy and adaptability, thus optimizing resource utilization and response speed.

CN120321184APending Publication Date: 2025-07-15GUODIAN NANJING AUTOMATION
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510390011.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-07-15

AI Technical Summary

Technical Problem

The existing energy monitoring system lacks real-time monitoring and feedback mechanisms, lacks intelligent decision-making support capabilities, and weak dynamic load adjustment capabilities, and cannot effectively respond to diversified equipment access and sudden traffic changes, resulting in system performance degradation or service interruption.

Method used

By building a hybrid multi-layer neural network architecture, combining migration algorithms and reinforcement learning algorithms, multi-dimensional time-series data are used to predict traffic and load balancing, dynamically adjust the load allocation of the front machine, and realize intelligent dynamic load balancing.

Benefits of technology

It improves the accuracy of traffic prediction and model adaptability, optimizes system performance and load balancing efficiency, improves system flexibility and response speed, and ensures efficient operation of the system in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120321184A_ABST
    Figure CN120321184A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent dynamic load balancing method and system based on multi-dimensional monitoring data, and relates to the technical field of load balancing, and the method comprises the steps: building a flow prediction model based on multi-dimensional time sequence data collected in each channel of a front-end processor, converting the flow prediction model into a channel flow model through a migration algorithm, and generating a flow prediction model library; and obtaining selected channel historical data of the current time node, inputting the selected channel historical data to the corresponding channel flow model to obtain a channel flow prediction result, and dynamically adjusting load balance of the front-end processor by using a reinforcement learning algorithm. According to the method, for operation health management of an integrated monitoring system deployed on a front-end processor channel cluster, firstly, indexes including flow, use load, delay, error rate and the like are collected and processed in real time through a multi-dimensional monitoring data system, and an accurate decision basis is provided for load distribution; and multiple different types of recurrent neural network algorithms are combined with an attention mechanism to model, so that the performance and generalization ability of the model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of load balancing, and in particular to an intelligent dynamic load balancing method and system based on multi-dimensional monitoring data. Background Art

[0002] In an energy comprehensive monitoring system, it is necessary to connect multiple types of devices, including in-station substation devices, energy storage station devices, public auxiliary devices (fire protection, security, power environment, lighting, etc.), water-using devices (water pumps, etc.), gas devices (air compressors, oxygen generators, etc.), etc. With the continuous increase in the number of access channels and the diversification of the types of access devices, the system faces increasingly complex challenges. Load balancing technology is particularly important in this context. Its core concept is to rationally allocate and manage system resources to make full use of existing acquisition resources, so as to achieve load balancing among various channels and devices.

[0003] Traditional load balancing methods are basically based on manually predetermined rules and strategies. In the comprehensive monitoring system, with the continuous increase in the number of access channels and the diversification of the types of access devices, there is an urgent need to introduce load balancing technology, which can dynamically allocate traffic among multiple access points to keep the load of each device and channel at a relatively balanced level, avoiding performance degradation or service interruption caused by overload of some devices. The dynamic load distribution mechanism can not only improve the overall resource utilization rate of the system, but also effectively expand the upper limit of the acquisition capacity. By monitoring the real-time data traffic of each channel, load balancing technology can automatically identify peak traffic periods and make timely adjustments to ensure the efficiency and stability of the data acquisition process. In addition, with the help of intelligent load balancing algorithms, the system can analyze historical data and real-time traffic to predict future traffic changes, so as to make resource allocation in advance and further improve the flexibility and response speed of the system.

[0004] Specifically, the current technical means have the following key technical problems:

[0005] (1) Lack of real-time monitoring and feedback mechanism: In the process of data acquisition and processing in the existing system, there is often a lack of an effective real-time monitoring and feedback mechanism, resulting in the system being unable to identify and respond to traffic fluctuations in a timely manner. This lack of real-time monitoring state makes the system prone to overload during peak periods, leading to data loss or delay, thus affecting the accuracy and real-time nature of energy management.

[0006] (2) Insufficient intelligent decision-making support ability: In a complex energy monitoring environment, the existing system usually lacks the intelligent decision-making support ability and is unable to perform efficient load allocation and adjustment based on real-time data. This makes the system often rely on manual intervention for adjustment when facing changing energy demands, reducing the flexibility and response speed of the system.

[0007] (3) Weak dynamic load adjustment ability: Currently, the energy monitoring system has a weak dynamic load adjustment ability when facing instantaneous traffic changes and cannot effectively cope with the challenges brought by the access of diverse devices. This weakness may lead to problems such as performance degradation or response delay when the system encounters sudden traffic.

[0008] For example, Chinese Patent CN113938488B discloses a load balancing method based on dynamic and static weighted round-robin. This method includes collecting the performance parameters of each node in the server cluster to generate node performance weights. Secondly, calculate the interval threshold according to the server operation status. When the load balancing server receives a load request, if it determines that the cluster load exceeds the interval threshold, perform static weighted round-robin on the server load according to the node performance weights; otherwise, dynamically adjust the node performance weights of the server and perform dynamic weighted round-robin on the server load according to the adjusted node performance weights. However, this method uses a simulated annealing algorithm, a dynamic adjustment strategy, to find a suitable load level so that the system can remain efficient and stable under different load conditions. This algorithm is relatively old and is usually used to solve optimization problems, but its efficiency and effect largely depend on parameter settings (such as temperature, cooling rate, etc.). If these parameter settings are inappropriate, it may lead to slow convergence or getting stuck in a local optimal solution, affecting the accuracy of the interval threshold.

[0009] Another example is that Chinese Patent CN116627766A discloses a dynamic load balancing method and system for optical communication devices. This method includes: obtaining multi-dimensional time-series data of each optical communication device; for each historical time step, extracting the multi-dimensional data of each optical communication device corresponding to the historical time step from the multi-dimensional time-series data, and constructing a corresponding historical graph structure according to the extracted multi-dimensional data, and updating the node features of each graph node in the historical graph structure through a graph neural network; for each optical communication device, determining a time-series fusion feature based on the node features of the corresponding graph nodes of each updated historical graph structure, and inputting the time-series fusion feature into a traffic prediction model; performing a dynamic load balancing operation based on each predicted traffic load data. Although this method realizes dynamic load balancing and traffic prediction in the optical communication network by introducing a graph neural network, improving resource utilization and system stability, there are also some potential drawbacks. Especially in the case where network traffic and load may change rapidly. Although this method uses a graph neural network to predict traffic based on historical time-series data and perform dynamic load balancing operations, this method relies on historical data for traffic prediction and may have a certain lag. Without a real-time feedback mechanism, the network may not be able to immediately respond to sudden traffic fluctuations or device state changes. For example, when a node in the network suddenly becomes overloaded or fails, without a timely feedback and adjustment mechanism, the resource allocation and load balancing of the network may not be able to adapt quickly, resulting in performance degradation or service interruption. Summary of the Invention

[0010] Based on this, in view of the above technical problems, it is necessary to provide an intelligent dynamic load balancing method and system based on multi-dimensional monitoring data.

[0011] In a first aspect, the present invention provides an intelligent dynamic load balancing method based on multi-dimensional monitoring data, the method comprising:

[0012] S1. Based on the multi-dimensional time-series data collected inside each channel of the front-end machine, construct a traffic prediction model, and use a migration algorithm to convert it into a channel traffic model, generating a traffic prediction model library;

[0013] S2. Obtain the historical data of the selected channel at the current time node, input it into the corresponding channel traffic model to obtain the channel traffic prediction result, and use a reinforcement learning algorithm to dynamically adjust the load balancing of the front-end machine.

[0014] Further, based on the multi-dimensional time-series data collected inside each channel of the front-end machine, constructing a traffic prediction model, and using a migration algorithm to convert it into a channel traffic model, generating a traffic prediction model library includes:

[0015] S11. Obtain the multi-dimensional data corresponding to the front-end machine control system, integrate the multi-dimensional data in each channel into the multi-dimensional time-series data of the channel group, store it in the time-series database and perform data preprocessing;

[0016] S12. Construct a hybrid multi-layer neural network architecture, set the input parameters and output parameters, and obtain the traffic prediction model corresponding to each channel through model training;

[0017] S13. Use a migration algorithm to apply the traffic prediction model to a new channel, construct a channel prediction model applicable to the current channel, and obtain the channel prediction models of all front-end machine channels, and integrate them to obtain the corresponding traffic prediction model library of the front-end machine channel cluster.

[0018] Further, constructing a hybrid multi-layer neural network architecture, setting the input parameters and output parameters, and obtaining the traffic prediction model corresponding to each channel through model training includes:

[0019] S121. Divide the preprocessed multi-dimensional time-series data in the time-series database into a training set, a validation set, and a test set according to a ratio;

[0020] S122. Construct a hybrid multi-layer neural network architecture composed of a feature mapping layer, a dependence learning network layer, a multi-head attention mechanism layer, a gated recurrent unit layer, and a fully connected layer, and set the search space of hyperparameters to find the optimal hyperparameter combination of the hybrid multi-layer neural network architecture;

[0021] S123. Select the multi-dimensional time series data corresponding to any group of channel flows as the model input parameters, establish a flow prediction model for the corresponding channel, and use the training set to train the model.

[0022] Further, applying the flow prediction model to a new channel by using a transfer algorithm to construct a channel prediction model suitable for the current channel includes:

[0023] S131. Use the flow prediction model to obtain the flow value corresponding to the front-end machine channel, extract the weight and bias according to the flow value, and use the transfer algorithm to transfer the weight and bias to the target domain feature network corresponding to each front-end machine channel as the initial weight and bias;

[0024] S132. Use the deep feature network to extract the parameter features of the application data corresponding to each front-end machine channel, calculate the maximum mean difference between the feature output value and the parameter features, and obtain the transfer error;

[0025] S133. Take minimizing the transfer error as the optimization goal, combine the gradient descent iteration method to generate the bias gradient, update the weight and bias of the front-end machine channel flow prediction model, and obtain the channel prediction model corresponding to each front-end machine channel.

[0026] Further, the calculation formula of the transfer error is:

[0027]

[0028] In the formula, represents the maximum mean difference; G i represents the features obtained by the front-end machine channel N i and G i = [g1, g2,... g k ; represents the features obtained based on the original parameters, and φ represents the feature mapping function; k represents the number of features corresponding to the original front-end machine channel N i ; z represents the number of features corresponding to the front-end machine channel N to be transferred j ; represents the feature at the l-th position in the feature vector corresponding to the i-th channel; represents the feature at the l-th position in the feature vector corresponding to the j-th channel; G represents the space in the reproducing kernel Hilbert space; |||| G represents the norm in the space.

[0029] Further, dynamically adjusting the load balancing of the front-end machine by using a reinforcement learning algorithm includes:

[0030] S21. Set a state vector, an action space, and a reward function based on the load status and load adjustment operations of each channel of the front-end machine, and build a reinforcement learning environment;

[0031] S22. Set a target Q-value formula and a target loss function, construct a deep Q-learning network model and train it to estimate the Q-value corresponding to each action in each state;

[0032] S23. Select an action according to the current state of the front-end machine and the predicted result of the channel traffic, adjust the load distribution of the channel according to the action, and continuously update the Q-value to achieve dynamic load distribution of each channel.

[0033] Furthermore, the expression of the reward function is:

[0034] R t = w1·LB t + w2·RE t + w3·CO t ;

[0035] In the formula, R t represents the reward at the current time step; w1, w2, and w3 represent factor adjustment weights; LB t represents the resource utilization rate; RE t represents the degree of load balancing; CO t represents the penalty for overload.

[0036] Furthermore, the target Q-value formula is:

[0037] y t = R t + γ·max a′ Q(S t+1 , a′);

[0038] In the formula, y t represents the target Q-value; t represents the time step; R t represents the reward at the current time step; S t+1 represents the state at the next time step; γ represents the discount factor; max a′ Q(S t+1 , a′) represents the maximum Q-value in the next state S t+1 ; a′ represents all possible actions.

[0039] Furthermore, the target loss function is:

[0040] L = (y t - Q(S t , A t )) 2 ;

[0041] In the formula, L represents the target loss; yt represents the target Q-value; Q(S t , A t ) is the Q-value of taking an action in state S t , and A t represents an action at the current time step.

[0042] In a second aspect, the present invention further provides an intelligent dynamic load balancing system based on multi-dimensional monitoring data, and the system includes:

[0043] A prediction model library generation module, configured to construct a traffic prediction model based on multi-dimensional time series data collected inside each channel of the front-end machine, and convert it into a channel traffic model by using a migration algorithm to generate a traffic prediction model library;

[0044] A load balancing adjustment module, configured to obtain the historical data of the selected channel at the current time node, input it into the corresponding channel traffic model to obtain the channel traffic prediction result, and dynamically adjust the load balancing of the front-end machine by using a reinforcement learning algorithm.

[0045] The beneficial effects of the present invention are as follows: For the operation health management of the comprehensive monitoring system deployed on the front-end machine channel cluster, the present invention first provides accurate decision-making basis for load distribution by collecting and processing multi-dimensional monitoring data in real time, including indicators such as traffic, usage load, latency, and error rate; secondly, the MA-HLSTM model is innovatively proposed, which is modeled by combining multiple different types of recurrent neural network algorithms with an attention mechanism, and combines multi-layer LSTM, Attention, and GRU models, thereby improving the performance and generalization ability of the model; and a prediction model library suitable for different channels is quickly constructed through transfer learning technology, significantly improving the accuracy of traffic prediction and the adaptability of the model; in addition, by dynamically adjusting the load distribution strategy, adaptive optimization is realized, and the system performance and load balancing efficiency are continuously improved. Description of the Drawings

[0046] The drawings described herein are used to provide a further understanding of the present invention, and constitute a part of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention, and do not constitute an improper limitation of the present invention. In the drawings:

[0047] Figure 1 is a flowchart of an intelligent dynamic load balancing method based on multi-dimensional monitoring data according to an embodiment of the present invention;

[0048] Figure 2 is a schematic diagram of a hybrid multi-layer neural network architecture in an intelligent dynamic load balancing method based on multi-dimensional monitoring data according to an embodiment of the present invention;

[0049] Figure 3It is a system principle block diagram of an intelligent dynamic load balancing system based on multi-dimensional monitoring data according to an embodiment of the present invention.

[0050] Reference numerals in the accompanying drawings: 1. Prediction model library generation module; 2. Load balancing adjustment module. Specific implementation manners

[0051] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0052] Please refer to Figure 1 , and there is provided an intelligent dynamic load balancing method based on multi-dimensional monitoring data, and the method includes:

[0053] S1. Based on the multi-dimensional time series data collected inside each channel of the front-end machine, construct a traffic prediction model, and use a migration algorithm to convert it into a channel traffic model to generate a traffic prediction model library.

[0054] In the description of the present invention, based on the multi-dimensional time series data collected inside each channel of the front-end machine, constructing a traffic prediction model, and using a migration algorithm to convert it into a channel traffic model to generate a traffic prediction model library includes:

[0055] S11. Obtain the multi-dimensional data corresponding to the front-end machine control system, integrate the multi-dimensional data in each channel into the multi-dimensional time series data of the channel group, store it in the time series database and perform data preprocessing.

[0056] Specifically, the multi-dimensional time series data includes the front-end machine channel traffic F fw and the usage load L fw of the front-end machine; the delay D fw of the front-end machine; the error rate E fw of the front-end machine, etc. During the collection process, it is necessary to deploy a time series library data collection module in each channel N i of the front-end machine, store the above time series data in the time series library. At the same time, there may be data loss in the original data collected in the time series library, and it is necessary to process the outliers and missing values of the system's health data and perform normalization processing to obtain the normalized health data. Therefore, the normalized multi-dimensional time series data of the i-th channel N i is:

[0057]

[0058] The channel group (collected multi-dimensional time series data) is:

[0059] N = [X1, X2…X i …X m ;

[0060] where \(i\) represents the number of channels, \(i = 1, 2, 3, \cdots, n\); represents the \(i\)-th channel \(N\) i multidimensional time series data at the \(t\)-th acquisition moment, \(t = 1, 2, 3, \cdots, T\); \(m\) represents the number of front-end machine channels; \(T\) represents the total number of samplings.

[0061] S12. Construct a hybrid multi-layer neural network architecture, set input parameters and output parameters, and obtain the flow prediction model corresponding to each channel through model training.

[0062] In the description of the present invention, constructing a hybrid multi-layer neural network architecture, setting input parameters and output parameters, and obtaining the flow prediction model corresponding to each channel through model training includes:

[0063] S121. Divide the preprocessed multi-dimensional time series data in the time series database into a training set, a validation set, and a test set according to a ratio.

[0064] S122. Construct a hybrid multi-layer neural network architecture composed of a feature mapping layer, a dependence learning network layer, a multi-head attention mechanism layer, a gated recurrent unit layer, and a fully connected layer, set the search space of hyperparameters, and find the optimal hyperparameter combination of the hybrid multi-layer neural network architecture.

[0065] In the invention, determine the learning framework of the flow prediction model based on a preset selection requirement, and define the control system state evaluation model architecture according to the learning framework, that is, the hybrid multi-layer neural network architecture. The hybrid multi-layer neural network architecture (evaluation model architecture) includes a feature mapping layer (convolutional neural network CNN layer), a dependence learning network layer (LSTM layer), a multi-head attention mechanism layer (Multi-Attention layer), a gated recurrent unit layer (gated recurrent neural network GRU layer), and a fully connected layer; apply an optimization algorithm to find the hyperparameters to be optimized in the control system state evaluation model architecture (hybrid multi-layer neural network architecture), and define the search space of hyperparameters; apply an optimization algorithm in the hyperparameter search space for hyperparameter optimization, and combine the optimization results with performance indicators to select the optimal combination of hyperparameters to determine the architecture of the control system state evaluation model; select any set of application data corresponding to a channel as the model input parameter based on the flow prediction model architecture, and obtain the flow prediction model of the corresponding channel.

[0066] Specifically, as Figure 2 shown, the layer structure, logical relationship, and input and output results of the hybrid multi-layer neural network architecture can be summarized as the following aspects.

[0067] The output result of the feature mapping layer is input to the dependency network layer to obtain sequence data. The output result of the feature mapping layer is input to the dependency network layer; and the forward and reverse candidate unit states are updated, and the output result of the dependency network layer is obtained based on the candidate unit states to obtain sequence data. Among them, the calculation formula of the sequence data is:

[0068]

[0069] In the formula, H t represents the output result of the dependency network layer; o t represents the output gate at time t; C t represents the candidate unit state at time t.

[0070] The state output result is input to the fully connected layer to perform a mapping operation to obtain the state prediction result, and the architecture of the control system state evaluation model is determined based on the state prediction result to obtain the control system state evaluation model. The flow output result is input to the fully connected layer, and the flow output result is mapped by using the weight matrix and the bias vector to obtain the flow prediction result; the effect of the control system flow evaluation model is evaluated based on the average value of the squared difference between the flow prediction result and the preset flow result. If the evaluation effect meets the preset requirements, the current architecture is used as the architecture of the flow prediction model; if the evaluation effect does not meet the preset requirements, the optimal combination of hyperparameters is reselected to adjust the architecture of the control system flow evaluation model, and the architecture after the evaluation effect meets the preset requirements is used as the flow prediction model.

[0071] It should be noted that the control system flow prediction model (MA-HLSTM model) uses different types of recurrent neural network algorithms, including multi-layer LSTM and GRU models; among them, the MA-HLSTM model includes a convolutional neural network (CNN) layer, an LSTM layer, a multi-head attention mechanism (Attention), a gated recurrent neural network (GRU) layer, and a fully connected layer.

[0072] Among them, the hyperparameters include the learning rate, batch size, and input sequence length;

[0073] The learning rate lr ∈ LR(lr1, lr2... lr k ) indicates that there are k learning rate values in the learning rate set;

[0074] The batch size bs ∈ BS(bs1, bs2... bs k );

[0075] The input sequence length lo ∈ LO(lo1, lo2... lo k ).

[0076] When using the Bayesian method to find the optimal combination of hyperparameters LR opt , BSopt , LO opt , are as follows:

[0077]

[0078] In the formula, LR, BS, and LO respectively represent the hyperparameter search spaces of the learning rate lr, batch size bs, and input sequence length lo. The f() function represents the hyperparameter evaluation function. LR opt represents the optimal value of the learning rate lr, BS opt represents the optimal value of the batch size bs, and LO opt represents the optimal value of the input sequence length lo.

[0079] In the hyperparameter search spaces LR, BS, and LO, the Bayesian optimization algorithm is used to search the hyperparameter space, and the input data sequence is input into the convolutional neural network (CNN) layer.

[0080] Then the convolutional network layer further extracts the local features of the data through the convolutional layer and the pooling layer. The output data of the convolutional neural network (CNN) layer is represented in chronological order as follows:

[0081]

[0082] Input X t into the LSTM network layer. Among them, the LSTM network layer considers the input data sequence X t and the past hidden traffic value H t-1 to update the forward candidate cell state at time t When updating the input gate, forget gate, and output gate at time t, it depends on the hidden state H at the previous time t-1 .

[0083] And the formula for obtaining the hidden state is as follows:

[0084]

[0085] In the formula, H t represents the hidden state at time t, o t represents the output gate at time t, and C t represents the candidate cell state at time t.

[0086] The specific internal implementation formula is as follows:

[0087]

[0088] In the formula, f t represents the forward forget gate at time t, W f represents the weight of the forward forget gate at time t, and H t-1Denote the forward hidden node at time t-1, X t Denote the input at time t, b f Denote the forget gate bias at time t, i t Denote the forward input gate at time t, W t Denote the input gate weight at time t, b t Denote the input gate bias at time t, o t Denote the forward output gate at time t, W o Denote the output gate weight at time t, W c Denote the cell state weight at time t, b c Denote the cell state bias at time t, Denote the candidate cell state at time t which is the external input data. X t The result of non-linear transformation using tanh, where W and b represent the parameter matrix and vector respectively, tanh represents the activation function with the output range from 1 to -1, and σ represents the activation function.

[0089] The LSTM network layer updates the next cell state C t , through the candidate cell state, and outputs H using the results of the internal gates and the candidate cell state t , the results are as follows:

[0090]

[0091] In the formula, o t Denote the output gate at time t, C t Denote the candidate cell state at time t, H t Denote the hidden state at time t, C t-1 Denote the candidate cell state at time t-1.

[0092] Subsequently, the output of the LSTM network layer is input into the cross multi-head attention mechanism layer, where the number of heads head is h, and the attention is calculated h times. This is achieved by projecting the query Q r , the key K r , and the value V r together with h times, and the query matrix Q r (r = 1, 2,..., h) corresponding to each head is obtained through linear transformation r , the key matrix K r , the value matrix V r The initial representations of the three vectors are as shown in the formula:

[0093]

[0094] Among them, are all learnable projection matrices that map the feature dimension of the input tensor to the dimension space of d.

[0095] And the calculation formula of the attention mechanism weight matrix is as follows:

[0096]

[0097] M t = Concat(head1, head2... head r )W

[0098] Wherein, is a learnable projection matrix, and Concat represents the feature concatenation operation, aiming to map head r back to the original feature dimension d2, and a linear transformation is adopted to implement the output M of the multi-head attention mechanism t .

[0099] The gated recurrent neural network (GRU) includes a reset gate, an update gate, and a candidate activation unit. The result output M of the previous layer t is input into the GRU layer. The GRU has two gates, namely the reset gate and the update gate. r t represents the reset gate, which controls the amount of information to be forgotten in the past after performing dot multiplication with M t-1 , and z t represents the output of the update gate, and the final output at the current position is h t . The formula is as follows:

[0100] r t = σ(W r M t + U r h t-1 + b r );

[0101] z t = σ(W z M t + U z h t-1 + b z );

[0102]

[0103] In the formula, the reset gate r t is composed of the linear transformation sum of the current position input M t and the output h of the hidden layer at the previous position t-1 , followed by the σ activation function; W r represents the input weight of the reset gate; U r represents the output weight of the hidden layer of the reset gate; b r represents the bias of the reset gate; the update gate z t is composed of the current position input Ht and the output h of the hidden layer at the previous position t-1 is composed of the sum after linear transformation and then passed through the σ activation function; W z represents the input weight of the update gate; U z represents the output weight of the hidden layer of the update gate; b z represents the bias of the update gate; represents the output of the candidate activation unit; W h represents the input weight of the candidate unit; U h represents the output weight of the hidden layer of the candidate unit; b h represents the bias of the candidate unit.

[0104] After training through the above multi-layer neural network, finally, it is mapped to the output through a fully connected layer, and the hidden state G of the last network layer t is input into a fully connected layer, which includes the fully connected layer weight matrix W and the fully connected layer bias vector b; it is mapped to the output sequence Y t , then the calculation formula of the output sequence is:

[0105]

[0106] Specifically, the mean squared error (MSE) of the evaluation function can be used as the performance index of the model under the corresponding hyperparameter configuration. The algorithm will adjust the search space of the hyperparameters according to these outputs to find the optimal hyperparameter configuration that makes the performance index optimal, the optimal hyperparameter LR opt , BS opt , LO opt .

[0107] The specific formula is as follows:

[0108]

[0109] represents Y obtained according to the above prediction model t and the true The average of the squared differences between the true values, The smaller it is, the better the model prediction effect.

[0110] S123. Select the multi-dimensional time series data corresponding to any group of channel flows as the model input parameters, establish the flow prediction model for the corresponding channel, and use the training set to train the model.

[0111] S13. Apply the flow prediction model to the new channel using the migration algorithm, construct the channel prediction model suitable for the current channel, and obtain the channel prediction models of all front-end machine channels, and integrate them to obtain the flow prediction model library corresponding to the front-end machine channel cluster.

[0112] In the description of the present invention, applying the traffic prediction model to a new channel by using a migration algorithm to construct a channel prediction model applicable to the current channel includes:

[0113] S131. Obtain the traffic value corresponding to the front-end machine channel by using the traffic prediction model, extract the weight and bias according to the traffic value, and use the migration algorithm to migrate the weight and bias to the target domain feature network corresponding to each front-end machine channel as the initial weight and bias.

[0114] S132. Extract the parameter features of the application data corresponding to each front-end machine channel by using the deep feature network, calculate the maximum mean difference between the feature output value and the parameter features to obtain the migration error.

[0115] In the description of the present invention, the calculation formula of the migration error is:

[0116]

[0117] In the formula, represents the maximum mean difference; G i represents the features obtained by the front-end machine channel N i and G i = [g1, g2,... g k ; represents the features obtained based on the original parameters, and φ represents the feature mapping function; k represents the number of features corresponding to the original front-end machine channel N i ; z represents the number of features corresponding to the front-end machine channel N j to be migrated; represents the feature at the l-th position in the feature vector corresponding to the i-th channel; represents the feature at the l-th position in the feature vector corresponding to the j-th channel; G represents the space in the reproducing kernel Hilbert space; |||| G represents the norm in the space.

[0118] S133. Take minimizing the migration error as the optimization objective, combine the gradient descent iteration method to generate the bias gradient, update the weight and bias of the front-end machine channel traffic prediction model, and obtain the channel prediction model corresponding to each front-end machine channel.

[0119] It should be noted that after obtaining the MA-HLSTM system health prediction model for a certain front-end machine channel N i , the transfer learning technology is used to quickly construct a prediction model applicable to the current front-end machine channel on the new channel N j . Specifically, the transfer learning can be realized through the following steps:

[0120] Step 1: Deploy the same time series library data acquisition module on the new channel and store the multi-dimensional time series data in the time series library.

[0121] Step 2: Input the system health data X i for the front-end machine channel N i into the prediction model applicable to the front-end machine channel N i to obtain the corresponding feature output G i ;

[0122]

[0123] where W represents the weight matrix and b represents the bias vector of the fully connected layer.

[0124] Step 3: Extract the trained weights W and biases b from the depth feature extraction network obtained for the front-end machine channel N i and directly transfer them to the target domain feature network in the front-end machine channel N j as the initial weights W and biases b of the target domain feature extraction network.

[0125] Step 4: After weight transfer, the multi-dimensional time series data X j of the front-end machine channel N j can be used to extract features

[0126]

[0127] by the new depth feature extraction network, and then calculate the migration error (L i ) between the feature G i obtained for the channel N and the feature obtained based on the original parameters. Specifically, it can be calculated by the MMD (Maximum Mean Discrepancy) formula as follows: mmd where

[0128]

[0129] represents the maximum mean discrepancy; k represents the number of features corresponding to the original front-end machine channel N ; z represents the number of features corresponding to the front-end machine channel N i to be migrated. j

[0130] It calculates the feature G i obtained according to the MA-HLSTM network for the original front-end machine channel N i = [g1, g2,... g k and the feature j obtained for the front-end machine channel N The norm of the mean value of the φ function. Where k and z are the original channels N of the front-end machine respectively i and the front-end machine channels N to be migrated j The corresponding characteristic numbers.

[0131] Reducing this error can maintain the similarity in distribution between the features of the target domain under the new network and the features of the source domain. In actual operation, Minimizing is used as the optimization goal, and the iterative method of gradient descent is used to generate the weight and bias gradients, so as to update the weights and biases, and thus update the front-end machine channel N j Prediction model.

[0132] Build a prediction model suitable for the current front-end machine channel on the new front-end machine channel N j to build a prediction model group M = [m1, m2,... m i ,... m n of the front-end machine channel cluster N = [N1, N2,... N i ,... N n .

[0133] S2. Obtain the selected channel historical data at the current time node, input it into the corresponding channel traffic model to obtain the channel traffic prediction result, and use the reinforcement learning algorithm to dynamically adjust the load balance of the front-end machine.

[0134] Specifically, after the client sends a request, the server obtains the selected channel historical data at the current time node from the time series database and inputs it into the traffic prediction model to obtain the traffic prediction result P n of the channel. According to the channel traffic predicted by the model, the reinforcement learning algorithm of DQN (Deep Q-Network) is used to dynamically adjust the load distribution strategy of each channel to achieve the load balance of the front-end machine.

[0135] In the description of the present invention, using the reinforcement learning algorithm to dynamically adjust the load balance of the front-end machine includes:

[0136] S21. Based on the load status and load adjustment operations of each channel of the front-end machine, set the state vector, action space and reward function, and build a reinforcement learning environment.

[0137] Specifically, the implementation of DQN is to approximate the Q function through a deep neural network, representing the expected total return obtained by performing action A in state S. The goal of the Q function is to evaluate the value of each action, so as to select the optimal action. The approximation of this Q function is implemented by a deep neural network:

[0138] The DQN reinforcement learning mainly includes: state (S), action (A) and reward R, as follows:

[0139] I. State: The overall state includes the following four aspects:

[0140] (1) The utilization load L of the current front-end machine fw ;

[0141] (2) The error rate E of the current front-end machine fw ;

[0142] (3) The latency D of the current front-end machine fw ;

[0143] (4) Channel traffic prediction.

[0144] S t ={P 1t ,P 2t ,...P nt ,L fwt ,E fwt ,D fwt};

[0145] In the formula, P 1t ,P 2t ,...P nt represent the predicted traffic data of the channel group N = [N1, N2,...N i ,…N n at time t. L fwt ,E fwt ,D fwt respectively represent the utilization load of the front-end machine, the error rate of the front-end machine, and the latency of the front-end machine at time t.

[0146] II. Action: It includes all load adjustment operations. The set of actions such as adjusting the weights of channels can be expressed as: A t ={a1,a2,...,a i ,...,a n};

[0147] Among them: a r represents the adjustment of the weight of channel i.

[0148] III. Reward: The reward is the feedback for measuring whether the action is effective. Let the reward function R t be the following weighted sum:

[0149] R t = w1·LB t + w2·RE t + w3·CO t ;

[0150] In the formula, w1, w2, and w3 represent the factor adjustment weights.

[0151] (1) Resource utilization rate: Whether the system resources (CPU) are used efficiently. Reasonable use of resources will bring higher rewards. It can be expressed as the weighted average of the resource utilization rates of the front-end machines (1, 2,... i,... v):

[0152]

[0153] (2) Degree of load balancing: Measures the evenness of load distribution and can be represented by the standard deviation. When the load of the channels is relatively balanced, the system can obtain rewards. If the load of a certain channel is significantly higher than that of other channels, a penalty is given:

[0154]

[0155] In the formula, C i is the CPU usage rate of the front-end machine i, and maxC i is the maximum CPU usage rate at which the server i can operate normally.

[0156] (3) Penalty for overload CO t : In the channel N = [N1, N2,... N i ,... N n , if the load (number of connections) of channel i exceeds a certain threshold, a negative reward is given.

[0157]

[0158] In the formula, CO i represents the number of connections of channel i, Λ i is the connection number threshold for the corresponding channel, and -ε is the penalty factor, usually a positive value, which controls the intensity of the penalty.

[0159] S22. Set the target Q-value formula and the target loss function, construct a deep Q-learning network model and train it to estimate the Q-value corresponding to each action in each state.

[0160] S23. According to the current state of the front-end machine and the predicted result of the channel traffic, select an action, adjust the load distribution of the channels according to the action, and continuously update the Q-value to achieve the dynamic load distribution of each channel.

[0161] Specifically, at each time t, the agent selects an action A t , obtains a reward R t , enters a new state R t+1 and Q-value update, as shown in the following formula:

[0162] Q(S t , A t ) ← Q(S t , At ) + α(R t + γ·max a′ Q(S t+1 , a′) - Q(S t , A t ));

[0163] In the formula, Q(S t , A t ) is the Q-value of taking an action in state S t . α is the learning rate, which determines the step size of each update. R t+1 is the immediate reward obtained after transferring from state S t to S t+1 . γ is the discount factor, indicating the importance of future rewards, where γ ∈ [0, 1]. max a′ Q(S t+1 , a′) is the maximum Q-value in the next state S t+1 , representing the optimal action selected by the agent in the next state.

[0164] At each time step t, based on the current behavior policy, perform action A t , and observe the next state S t+1 and reward R t . Store the quadruple (state, action, reward, next state) in the experience replay pool. Randomly sample a small batch of samples from the experience replay pool. Update the behavior Q-value according to the target Q-value y t . The formula for the target Q-value y t is:

[0165] y t = R t + γ·max a′ Q(S t+1 , a′);

[0166] Minimize the target loss L to update the current network Q(S t , A t ):

[0167] L = (y t - Q(S t , A t )) 2 ;

[0168] The DQN training is completed and an effective strategy is learned to achieve negative feedback regulation for dynamic load distribution. At each moment, based on the current state and traffic prediction, DQN will select an action and adjust the load distribution of the channels accordingly. The system will be optimized by continuously updating the Q function. As the traffic changes, the system can use DQN to dynamically adjust the load distribution of each channel according to the new traffic prediction results and the current load situation.

[0169] Please refer to Figure 3 , and an intelligent dynamic load balancing system based on multi-dimensional monitoring data is also provided. The system includes:

[0170] A prediction model library generation module 1, which is used to construct a traffic prediction model based on the multi-dimensional time series data collected inside each channel of the front-end machine, and use a migration algorithm to convert it into a channel traffic model, and generate a traffic prediction model library.

[0171] A load balancing adjustment module 2, which is used to obtain the historical data of the selected channels at the current time node, input it into the corresponding channel traffic model to obtain the channel traffic prediction results, and use a reinforcement learning algorithm to dynamically adjust the load balancing of the front-end machine.

[0172] In summary, with the above technical solutions of the present invention, the core of the present invention realizes the precise management and optimization of the traffic load of the energy system through intelligent monitoring, dynamic load adjustment, and an adaptive decision support system. First, the monitoring system collects the relevant data of the front-end machine channel traffic and stores it in the time series database. After data preprocessing, first, through the traffic prediction model based on the MA-HLSTM model, combined with historical data and real-time traffic data, the future traffic change trend is accurately predicted. This prediction mechanism not only utilizes the advantages of the multi-layer deep learning network layer, but also introduces the multi-head attention mechanism, enabling the model to automatically identify and focus on key traffic change patterns, improving the accuracy and generalization ability of traffic prediction. Based on the traffic prediction, the system further implements a dynamic load distribution algorithm. This algorithm can intelligently adjust the load of each channel according to the real-time prediction results, ensuring that the system can flexibly respond during peak traffic periods. As time goes by, the system continuously learns from different traffic scenarios and load changes, and can make fine adjustments according to specific business requirements and peak period traffic, maximizing the processing efficiency of the system. In summary, the intelligent load adjustment mechanism of the present invention not only optimizes the system resource configuration, but also improves the response speed and stability of the system. Through the comprehensive operation of intelligent traffic prediction and dynamic load distribution, the system can maintain efficient operation in a complex and changeable environment, reduce operating costs, improve resource utilization rate, and ultimately ensure the flexibility and sustainable development of the system under various load changes.

[0173] It should be understood that although the steps in the flowchart of the accompanying drawings are shown sequentially in the direction of the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless there is a clear indication in this document, there is no strict order restriction for the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same moment, but can be executed at different moments, and their execution order is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.

Claims

1. An intelligent dynamic load balancing method based on multi-dimensional monitoring data, characterized in that, The method includes: Based on the multi-dimensional time-series data collected inside each channel of the front-end machine, construct a traffic prediction model, and use a migration algorithm to convert it into a channel traffic model to generate a traffic prediction model library; Obtain the historical data of the selected channel at the current time node, input it into the corresponding channel traffic model to obtain the channel traffic prediction result, and use the reinforcement learning algorithm to dynamically adjust the load balancing of the front-end machine.

2. The intelligent dynamic load balancing method based on multi-dimensional monitoring data according to claim 1, wherein The constructing a traffic prediction model based on the multi-dimensional time-series data collected inside each channel of the front-end machine, and using a migration algorithm to convert it into a channel traffic model to generate a traffic prediction model library includes: Obtain the multi-dimensional data corresponding to the front-end machine control system, integrate the multi-dimensional data in each channel into the multi-dimensional time-series data of the channel group, store it in the time-series database and perform data preprocessing; Construct a hybrid multi-layer neural network architecture, set the input parameters and output parameters, and obtain the traffic prediction model corresponding to each channel through model training; Use the migration algorithm to apply the traffic prediction model to the new channel, construct a channel prediction model applicable to the current channel, and obtain the channel prediction models of all front-end machine channels, and integrate them to obtain the corresponding traffic prediction model library of the front-end machine channel cluster.

3. An intelligent dynamic load balancing method based on multi-dimensional monitoring data according to claim 2, characterized in that The constructing a hybrid multi-layer neural network architecture, setting the input parameters and output parameters, and obtaining the traffic prediction model corresponding to each channel through model training includes: Divide the preprocessed multi-dimensional time-series data in the time-series database into a training set, a validation set and a test set according to a ratio; Construct a hybrid multi-layer neural network architecture composed of a feature mapping layer, a dependency learning network layer, a multi-head attention mechanism layer, a gated recurrent unit layer and a fully connected layer, and set the search space of hyperparameters to find the optimal hyperparameter combination of the hybrid multi-layer neural network architecture; Select any group of multi-dimensional time-series data corresponding to the channel traffic as the model input parameters, establish a traffic prediction model for the corresponding channel, and use the training set to train the model.

4. An intelligent dynamic load balancing method based on multi-dimensional monitoring data according to claim 2, characterized in that The using the migration algorithm to apply the traffic prediction model to the new channel and constructing a channel prediction model applicable to the current channel includes: Use the traffic prediction model to obtain the traffic value corresponding to the front-end machine channel, extract the weights and biases according to the traffic value, and use the migration algorithm to migrate the weights and biases to the target domain feature network corresponding to each front-end machine channel as the initial weights and biases; Use the deep feature network to extract the parameter features of the application data corresponding to each front-end machine channel, calculate the maximum mean difference between the feature output value and the parameter features, and obtain the migration error; Take minimizing the migration error as the optimization goal, combine the gradient descent iteration method to generate the bias gradient, update the weights and biases of the front-end machine channel traffic prediction model, and obtain the channel prediction model corresponding to each front-end machine channel.

5. The intelligent dynamic load balancing method based on multi-dimensional monitoring data according to claim 4, characterized in that, The calculation formula of the migration error is: In the formula, represents the maximum mean difference; G i represents the feature obtained by the front-end machine channel N i and G i = [g1, g2, … g k ; represents the feature obtained based on the original parameters, and φ represents the feature mapping function; k represents the number of features corresponding to the original channel N of the front-end machine i z represents the number of features corresponding to the front-end machine channel N to be migrated j ; represents the feature at the l-th position in the feature vector corresponding to the i-th channel; represents the feature at the l-th position in the feature vector corresponding to the j-th channel; G represents the space in the reproducing kernel Hilbert space; |||| G represents the norm in the space.

6. The intelligent dynamic load balancing method based on multi-dimensional monitoring data according to claim 1, wherein, The using the reinforcement learning algorithm to dynamically adjust the load balancing of the front-end machine includes: Based on the load status and load adjustment operations of each channel of the front-end machine, set the state vector, action space and reward function to build a reinforcement learning environment; Set the target Q-value formula and target loss function, construct a deep Q-learning network model and train it to estimate the Q-value corresponding to each action in each state; Select an action according to the current state of the front-end machine and the channel traffic prediction result, adjust the load distribution of the channel according to the action, and continuously update the Q value to achieve dynamic load distribution of each channel.

7. An intelligent dynamic load balancing method based on multi-dimensional monitoring data according to claim 6, characterized in that The expression of the reward function is: R t = w1·LB t + w2·RE t + w3·CO t ; where R t represents the reward at the current time step; w1, w2, w3 represent the factor adjustment weights; LB t represents the resource utilization rate; RE t represents the degree of load balancing; CO t represents the penalty for overload.

8. An intelligent dynamic load balancing method based on multi-dimensional monitoring data according to claim 6, characterized in that The formula for the target Q value is: y t = R t + γ·max a′ Q(S t+1 , a′); Where y t represents the target Q value; t represents the time step; R t represents the reward at the current time step; S t+1 represents the state at the next time step; γ represents the discount factor; max a′ Q(S t+1 , a′) represents the maximum Q value at the next state S t+1 ; a′ represents all possible actions.

9. The intelligent dynamic load balancing method based on multi-dimensional monitoring data according to claim 8, characterized in that The target loss function is: L = (y t - Q(S t , A t )) 2 ; where L represents the target loss; y t represents the target Q-value; Q(S t , A t ) is the Q-value of taking an action in state S t ; A t represents an action at the current time step.

10. An intelligent dynamic load balancing system based on multi-dimensional monitoring data, which is used to implement the intelligent dynamic load balancing method based on multi-dimensional monitoring data described in any one of claims 1-9, characterized in that, The system includes: A prediction model library generation module, which is used to construct a traffic prediction model based on the multi-dimensional time series data collected inside each channel of the front-end machine, convert it into a channel traffic model by using a migration algorithm, and generate a traffic prediction model library; A load balancing adjustment module, which is used to obtain the historical data of the selected channel at the current time node, input it into the corresponding channel traffic model to obtain the channel traffic prediction result, and dynamically adjust the load balancing of the front-end machine by using the reinforcement learning algorithm.

Citation Information

Patent Citations

  • A load balancing method based on dynamic and static weighted round-robin

    CN113938488B

  • Application server health examination method and device

    CN116627766A