Industrial data micro-service abnormity monitoring method, medium and system
By building a microservice dependency graph and a calculation contribution matrix, combining deep learning algorithms to train anomaly detection model, identifying key nodes and adjusting resource allocation, the problem of difficulty in differentiating monitoring of microservice abnormalities in the existing technology is solved, and the reliability and stability of the system are improved.
Patent Information
- Application Number
- CN202510346463.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2045-03-24
AI Technical Summary
The prior art is difficult to achieve differentiated monitoring based on the dependencies between industrial data microservices, which makes it difficult to identify and predict chain abnormal propagation, and it is impossible to conduct differentiated monitoring based on the importance and scope of the service.
By collecting microservice operation data, building a service dependency diagram, calculating the microservice call path matrix and contribution matrix, combining the importance, influence, resource occupation and health status of nodes, calculating the comprehensive contribution value of microservices, identifying key microservice nodes, and using deep learning algorithms to train anomaly detection model, generate exception warning information, and adjusting resource allocation strategies.
Differentiated monitoring is implemented based on the dependencies between microservices, identifying key nodes, improving the reliability and stability of the system, and being able to timely detect the abnormal state of a single service and predict the abnormal propagation path and impact range, dynamically adjust resource allocation, and improve system resource utilization efficiency.
Smart Images

Figure CN119862092A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of industrial data microservice anomaly, and specifically, relates to an industrial data microservice anomaly monitoring method, medium and system. Background Art
[0002] With the rapid development of the industrial Internet, the scale and complexity of industrial data are growing exponentially. In order to effectively process and manage massive amounts of industrial data, microservice architecture is widely used in industrial data processing systems. Microservice architecture splits a single application into multiple independently running services, each responsible for a specific business function, with advantages such as independent deployment, loose coupling, and easy scalability. However, as the number of microservices increases, the dependencies between services become increasingly complex, and the stability of the system faces severe challenges.
[0003] In the prior art, the following methods are mainly used for anomaly detection of industrial data microservices: First, a monitoring method based on fixed thresholds is used to perform anomaly detection by setting thresholds for indicators such as processor occupancy, memory usage, and response time. This method is simple to implement, but it is difficult to adapt to the dynamic changes in load in industrial scenarios and is prone to false positives and false negatives. Second, an anomaly detection method based on statistical analysis is used to establish a normal behavior model by calculating the statistical characteristics of historical data to detect anomalies that deviate from the normal mode. This type of method can adapt to changes in system load to a certain extent, but it is difficult to effectively identify propagated anomalies between services. Third, an anomaly detection method based on machine learning is used to learn the normal behavior patterns of services through training models to achieve anomaly detection. However, existing machine learning methods often treat each service independently, ignoring the dependencies and impact between services.
[0004] In practical applications, industrial data microservice systems have obvious hierarchical and dependency characteristics. Exceptions in upstream services may propagate and affect downstream services, causing system performance degradation or even service interruption. For example, in the steel production process, exceptions in data collection services may cause performance degradation or service quality degradation in a series of downstream services such as data preprocessing services, feature extraction services, and model calculation services. Existing technologies are difficult to effectively identify and predict this chain of exception propagation, and are unable to perform differentiated monitoring based on the importance and scope of impact of services.
[0005] Therefore, there is an urgent need for an industrial data microservice anomaly detection method that can fully consider the dependencies between microservices and realize differentiated monitoring to improve the reliability and stability of the system. Summary of the invention
[0006] In view of this, the present invention provides an industrial data microservice anomaly monitoring method, medium and system, which can solve the problem that the prior art is difficult to achieve differentiated monitoring based on the dependency relationship between microservices.
[0007] A first aspect of the present invention provides an industrial data microservice anomaly monitoring method, comprising the following steps: collecting microservice operation data of an industrial data microservice cluster, and determining a first monitoring sampling period based on the microservice operation data; collecting microservice status data, constructing a service dependency graph and generating a microservice call path matrix; calculating a microservice contribution matrix based on the microservice call path matrix; inputting the microservice call path matrix and the microservice contribution matrix into a contribution value calculation equation group to obtain a microservice comprehensive contribution value, wherein the contribution value calculation equation group evaluates the core degree, downstream influence degree, resource occupancy, and operation stability of the microservice node by calculating a microservice node importance index, a microservice influence index, a microservice resource index, and a microservice health index; identifying key microservice nodes based on the microservice comprehensive contribution value and adjusting to a second monitoring sampling period; training an anomaly detection model and generating anomaly warning information; and adjusting a resource allocation strategy based on the anomaly warning information.
[0008] On the basis of the above technical solution, the industrial data microservice anomaly monitoring method of the present invention can also be improved as follows: Among them, the microservice operation data includes microservice processor occupancy data, microservice memory occupancy data, microservice network bandwidth occupancy data, and microservice disk read and write rate data; the first monitoring sampling period is determined by a dynamic time window algorithm.
[0009] Furthermore, the microservice status data includes microservice processor occupancy data, microservice memory occupancy data, microservice network bandwidth occupancy data, microservice disk read and write rate data, microservice call success rate data, microservice response time data, microservice concurrency data, microservice timeout data, microservice restart data, microservice error rate data, microservice response fluctuation data, and microservice throughput change rate data.
[0010] Furthermore, based on the service dependency graph, the microservice node out-degree value, the microservice node in-degree value, the number of microservice node paths, and the number of microservice node connections are calculated to generate the microservice call path matrix.
[0011] Furthermore, the contribution value calculation equation group includes a microservice node importance equation, a microservice influence equation, a microservice resource equation, and a microservice health equation; the microservice node importance equation outputs a microservice node importance index, the microservice influence equation outputs a microservice influence index, the microservice resource equation outputs a microservice resource index, and the microservice health equation outputs a microservice health index.
[0012] Furthermore, the input of the microservice node importance equation includes the microservice node out-degree value, the microservice node in-degree value, the number of microservice node paths, and the number of microservice node connections; the input of the microservice influence equation includes the microservice call success rate data, the microservice response time data, the microservice concurrency data, and the microservice timeout data.
[0013] Furthermore, the input of the microservice resource equation includes the microservice processor occupancy data, the microservice memory occupancy data, the microservice network bandwidth occupancy data, and the microservice disk read and write rate data; the input of the microservice health equation includes the microservice restart number data, the microservice error rate data, the microservice response volatility data, and the microservice throughput change rate data.
[0014] Furthermore, the second monitoring sampling period is smaller than the first monitoring sampling period; a time series feature training set of the microservice status data is established, the microservice node importance index, the microservice influence index, the microservice resource index, and the microservice health index are used as feature weights, and a deep learning algorithm is used for training to obtain the anomaly detection model.
[0015] A second aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores program instructions, and when the program instructions are run in a computer, they are used to execute the above-mentioned industrial data microservice anomaly monitoring method.
[0016] The third aspect of the present invention provides an industrial data microservice anomaly monitoring system, which includes the above-mentioned computer-readable storage medium, the system is any one of a computer, a server, and a single-chip microcomputer, the computer-readable storage medium is arranged in the system, and the system is provided with a microprocessor for executing program instructions stored in the computer-readable storage medium.
[0017] Compared with the prior art, the beneficial effects of the industrial data microservice anomaly monitoring method, medium and system provided by the present invention are: comprehensive consideration of multi-dimensional indicators such as node importance, service influence, resource occupancy and health status, overcoming the limitations of the prior art of only focusing on a single indicator or ignoring the dependencies between services.
[0018] Based on the identification of key service nodes, the present invention adopts a dynamic time window algorithm and a differentiated sampling strategy to use different monitoring frequencies for service nodes of different importance. This adaptive monitoring mechanism not only ensures the monitoring accuracy of key nodes, but also avoids excessive monitoring of non-key nodes, effectively balancing the monitoring effect and system overhead.
[0019] The improved long short-term memory network structure designed by the present invention realizes the deep fusion of time series features and service features by introducing multiple layers of feature fusion. The first feature fusion layer focuses on extracting the time series pattern of microservice status data, the second feature fusion layer combines node importance information with time series features, and the third feature fusion layer further integrates information such as service influence, resource occupancy, and health status. This hierarchical feature fusion mechanism significantly improves the accuracy and interpretability of anomaly detection.
[0020] In terms of anomaly warning, the present invention can not only detect the abnormal state of a single service in a timely manner by calculating the anomaly propagation matrix, but also predict the possible propagation path and impact range of the anomaly. This predictive anomaly detection mechanism provides sufficient response time for operation and maintenance personnel, helping to prevent the spread of anomalies and system performance degradation.
[0021] The present invention also establishes a resource allocation mechanism based on multi-dimensional indicators, dynamically adjusting the resource allocation strategy according to the importance, influence, resource demand and health status of the service node. This intelligent resource scheduling solution ensures the stable operation of key services and improves the utilization efficiency of system resources.
[0022] By organically combining service dependency analysis, dynamic monitoring strategies, deep learning models and resource scheduling mechanisms, the problem that existing technologies are difficult to achieve differentiated monitoring based on the dependencies between microservices is solved, and adaptive anomaly detection and preventive maintenance of industrial data microservice systems are realized, providing an effective solution for improving system reliability and operation and maintenance efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 A flow chart of the method provided by the present invention.
[0024] Figure 2 This is a dynamic monitoring data chart of the CPU usage of the material testing service in Example 2.
[0025] Figure 3 This is a call relationship diagram between the core microservices of the enterprise in Example 2.
[0026] Figure 4 This is a graph of abnormal propagation coefficients between service nodes in Example 2.
[0027] Figure 5 This is the final resource allocation weight graph calculated based on the node importance, influence, and resource occupancy in Example 2.
[0028] Figure 6 This is a comparison chart of the response time and throughput of key services in Example 2 before and after performance optimization. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0030] like Figure 1 FIG. 1 is a flow chart of an industrial data microservice anomaly monitoring method provided by the present invention, and the method comprises the following steps: S01. Collect microservice operation data of the industrial data microservice cluster, where the microservice operation data includes microservice processor occupancy data, microservice memory occupancy data, microservice network bandwidth occupancy data, and microservice disk read and write rate data; S02. Based on the microservice operation data, a dynamic time window algorithm is used to determine a first monitoring sampling period; S03. Based on the first monitoring sampling period, collect microservice status data for the industrial data microservice cluster, wherein the microservice status data includes microservice processor occupancy data, microservice memory occupancy data, microservice network bandwidth occupancy data, microservice disk read and write rate data, microservice call success rate data, microservice response time data, microservice concurrency data, microservice timeout data, microservice restart data, microservice error rate data, microservice response volatility data, and microservice throughput change rate data; S04, constructing a service dependency graph of the industrial data microservice cluster, calculating the microservice node out-degree value, microservice node in-degree value, microservice node path number, and microservice node connection number based on the service dependency graph, and generating a microservice call path matrix; S05. Calculate the microservice contribution matrix of the industrial data microservice cluster based on the microservice call path matrix; S06, inputting the microservice call path matrix and the microservice contribution matrix into a contribution value calculation equation group, calculating a microservice comprehensive contribution value, and identifying key microservice nodes based on the microservice comprehensive contribution value; S07. For the key microservice node, dynamically adjust to a second monitoring sampling period based on the microservice node importance index, the microservice influence index, the microservice resource index, and the microservice health index, wherein the second monitoring sampling period is less than the first monitoring sampling period; S08. Establish a time series feature training set for the microservice status data, use the microservice node importance index, the microservice influence index, the microservice resource index, and the microservice health index as feature weights, and use a deep learning algorithm to train an anomaly detection model; S09, using the anomaly detection model to perform real-time analysis on the microservice status data of the key microservice node, calculate an anomaly propagation matrix, and generate anomaly warning information based on the anomaly propagation matrix; S10. Calculate a resource allocation matrix based on the abnormal warning information, the microservice node importance index, the microservice influence index, the microservice resource index, and the microservice health index, and output it to the operation and maintenance personnel for adjusting the resource allocation of the industrial data microservice cluster.
[0031] The contribution value calculation equation group includes a microservice node importance equation, a microservice influence equation, a microservice resource equation, and a microservice health equation; The microservice node importance equation is used to calculate the core degree of the microservice node in the industrial data microservice cluster in the service dependency graph. The input includes the out-degree value of the microservice node, the in-degree value of the microservice node, the number of microservice node paths, and the number of microservice node connections. The output is the microservice node importance index.
[0032] The microservice influence equation is used to evaluate the influence of the microservice nodes in the industrial data microservice cluster on the downstream services. The input includes the microservice call success rate data, the microservice response time data, the microservice concurrency data, and the microservice timeout data. The output is the microservice influence indicator.
[0033] The microservice resource equation is used to calculate the resource occupancy of the microservice nodes in the industrial data microservice cluster. The input includes the microservice processor occupancy data, the microservice memory occupancy data, the microservice network bandwidth occupancy data, and the microservice disk read and write rate data. The output is the microservice resource indicator.
[0034] The microservice health equation is used to evaluate the operating stability of the microservice nodes in the industrial data microservice cluster. The input includes the microservice restart times data, the microservice error rate data, the microservice response volatility data, and the microservice throughput change rate data. The output is the microservice health indicator.
[0035] The anomaly detection model is based on an improved long short-term memory network structure, and multiple feature fusion layers are added between the input layer and the hidden layer of the long short-term memory network, finally forming a network structure of an input layer, a first feature fusion layer, a second feature fusion layer, a third feature fusion layer, a hidden layer, and an output layer; wherein the input layer receives the microservice status data, the first feature fusion layer extracts the time series features of the microservice status data, the second feature fusion layer fuses the microservice node importance index with the time series features, the third feature fusion layer fuses the microservice influence index, the microservice resource index, the microservice health index, and the time series features, the hidden layer calculates the probability of the abnormal state based on the fused features, and the output layer outputs the abnormal warning information.
[0036] The specific implementation methods of the above steps are described in detail below: The specific implementation method of step S01 is to collect the operating data of the industrial data microservice cluster. First, the system will regularly collect the operating status data of each microservice in the microservice cluster. These data include the processor occupancy rate, memory occupancy rate, network bandwidth occupancy rate and disk read and write rate of the microservice. By continuously collecting these indicator data, the overall operating status of the microservice cluster can be fully reflected.
[0037] The specific implementation method of step S02 is to use a dynamic time window algorithm to determine the microservice monitoring sampling period. The algorithm will adaptively adjust the monitoring sampling time interval based on the previously collected microservice operation data. For example, when the operation status of the microservice is relatively stable, the sampling period can be appropriately extended; and once the microservice status is found to fluctuate violently, the sampling period will be appropriately shortened to capture potential abnormal situations in a timely manner. By dynamically adjusting the sampling period, the monitoring accuracy can be guaranteed while reducing the overhead of data collection.
[0038] The specific implementation method of step S03 is to collect the microservice status data of the industrial data microservice cluster based on the aforementioned sampling period. These data include not only the aforementioned resource occupancy indicators, but also the call success rate, response time, concurrency, timeout times, restart times, error rate, response volatility, and throughput change rate of the microservice. These indicators can fully reflect the operation of the microservice and provide valuable data support for subsequent abnormal analysis.
[0039] The specific implementation method of step S04 is to construct a service dependency graph of the industrial data microservice cluster. First, the system analyzes the call relationship between microservices and establishes a microservice call path matrix. Each element of the matrix represents the call weight between two microservice nodes, and the weight value is determined by the direct call relationship and the indirect call relationship. On this basis, the out-degree, in-degree, number of paths, and number of connections of each microservice node are calculated to characterize the position and importance of the microservice node in the entire service dependency graph.
[0040] The specific implementation method of step S05 is to calculate the microservice contribution matrix of the industrial data microservice cluster based on the microservice call path matrix. Each element of the matrix represents the contribution of one microservice node to another node, and the calculation of the contribution takes into account the call frequency between nodes. The contribution matrix can reflect the degree of mutual influence between microservices and provide a basis for subsequent abnormal analysis.
[0041] The specific implementation method of step S06 is to use the microservice call path matrix and the microservice contribution matrix as input, and calculate the comprehensive contribution value of each microservice node through the contribution value calculation equation group. The contribution value calculation equation group includes four parts: 1. Microservice node importance equation: This equation is used to evaluate the core degree of microservice nodes in the service dependency graph, taking into account multiple indicators such as the node's out-degree, in-degree, number of paths, and number of connections.
[0042] 2. Microservice influence equation: This equation is used to evaluate the impact of microservice nodes on downstream services, taking into account factors such as call success rate, response time, concurrency, and timeout times.
[0043] 3. Microservice resource equation: This equation is used to calculate the resource usage of microservice nodes, including CPU usage, memory usage, network bandwidth usage, and disk read and write rates.
[0044] 4. Microservice health equation: This equation is used to evaluate the operational stability of microservice nodes, taking into account indicators such as the number of restarts, error rate, response fluctuation rate, and throughput change rate.
[0045] By calculating the comprehensive contribution value of each microservice node, the system can identify the key microservice nodes in the cluster, providing an important basis for subsequent abnormal monitoring and resource allocation.
[0046] The specific implementation method of step S07 is to dynamically adjust the monitoring sampling period of the aforementioned key microservice nodes. This period will be shorter than the first monitoring sampling period determined in the aforementioned step S02. The reason for more intensive monitoring of key nodes is that these nodes play an important role in the entire microservice cluster. Once an abnormality occurs, it may have a serious impact on the entire system. Therefore, it is necessary to monitor these key nodes more frequently in order to detect and respond to potential abnormalities in a timely manner.
[0047] The specific implementation method of step S08 is to establish a time series feature training set of microservice status data and use an improved long short-term memory network structure to train anomaly detection model. First, the system extracts time series features based on the microservice status data collected in the previous steps. Then, these time series features and indicators such as microservice node importance, influence, resource occupancy, and health status are used as feature weights and input into the improved long short-term memory network for training. On the basis of the original long short-term memory network, this network structure adds multiple feature fusion layers to fully combine feature information of different dimensions and finally output the probability prediction result of abnormal state. In this way, the system can establish an anomaly detection model that is highly adapted to the industrial data microservice environment.
[0048] The specific implementation method of step S09 is to use the above-mentioned trained anomaly detection model to analyze the real-time data of key microservice nodes and calculate the anomaly propagation matrix. The anomaly propagation matrix describes the degree of influence of an anomaly on other nodes when an anomaly occurs in a microservice node. The calculation of this matrix takes into account multiple factors such as call path weight, node contribution, node health status, and node influence. Based on this anomaly propagation matrix, the system can generate comprehensive anomaly warning information to provide a basis for subsequent resource allocation.
[0049] The specific implementation method of step S10 is to calculate the resource allocation matrix based on indicators such as abnormal warning information, microservice node importance, influence, resource occupancy, and health status. This matrix describes how to allocate resources to minimize the impact of abnormalities on the system when an abnormality occurs. When calculating, multiple factors such as the probability of abnormal propagation, node importance, node influence, and the node's own resource status are considered to derive the resource allocation weight that each microservice node should obtain. Finally, the system will output this resource allocation matrix to the operation and maintenance personnel to provide decision support for adjusting the resources of the industrial data microservice cluster.
[0050] The equations or calculation processes involved in the present invention are described in detail below.
[0051] 1. The construction process of the microservice call path matrix is specifically expressed as follows: ; In the formula, For Node To Node The call path weight of For Node To Node If there is a direct connection, it is 1, otherwise it is 0; For Node To Node Direct connection relationship; is the path weight coefficient; is the path attenuation coefficient; is the total number of microservice nodes.
[0052] 2. The calculation process of the microservice contribution matrix is specifically expressed as follows: ; In the formula, For Node For Node Contribution of For Node To Node The calling frequency; For Node To Node The calling frequency; is the contribution magnification factor; The contribution benchmark value.
[0053] 3. The microservice node importance equation is specifically expressed as follows: ; In the formula, is the node importance index; is the node out-degree; is the node indegree; is the number of node paths; is the number of node connections; is the weight coefficient; is the error term; is the total number of microservice nodes.
[0054] 4. The microservice influence equation is specifically expressed as follows: ; In the formula, is an impact indicator; is the call success rate; is the maximum success rate benchmark value; is the average response time; is the maximum response time threshold; is the number of concurrent connections; is the maximum concurrent number threshold; is the number of timeouts; is the total number of calls; is the weight coefficient; is the error term.
[0055] 5. The microservice resource equation is specifically expressed as follows: ; In the formula, is a resource indicator; is the CPU usage; is the CPU threshold; is the memory usage; is the memory threshold; is the network bandwidth usage; is the bandwidth threshold; is the disk read and write rate; It is the disk read and write threshold; is the weight coefficient; is the error term.
[0056] 6. The microservice health equation is specifically expressed as follows: ; In the formula, For health indicators; is the number of restarts; is the baseline restart count; is the error rate; is the maximum error rate threshold; To respond to volatility; is the maximum volatility threshold; is the throughput change rate; is the baseline change rate; is the weight coefficient; is the error term.
[0057] 7. The calculation process of the anomaly propagation matrix is specifically expressed as follows: ; In the formula, For abnormal slave nodes Propagate to nodes The probability of is the call path weight; Node contribution; For Node health indicators; For Node Influence indicators; is the propagation attenuation coefficient.
[0058] 8. The calculation process of the resource allocation matrix is specifically expressed as follows: ; In the formula, For slave nodes To Node The resource allocation weight of is the probability of abnormal propagation; For Node Importance index of For Node Influence indicators; For Node resource indicators; is the allocation adjustment factor.
[0059] Parameter acquisition method description: path weight coefficient Obtained through historical call data statistics, the range is [0.1,1.0]; path attenuation coefficient Determined by experiments, the range is [0.01, 0.1]; contribution magnification factor Determined by performance testing, range is [1.0,2.0]; contribution benchmark value Determined through historical data analysis, the range is [0.1,0.3]; weight coefficient Obtained through machine learning training, the range is [0,1] and the sum is 1; weight coefficient Obtained through performance testing, the range is [0,1] and the sum is 1; weight coefficient Obtained through resource monitoring data analysis, the range is [0,1] and the sum is 1; weight coefficient Obtained through health check data analysis, the range is [0,1] and the sum is 1; all error terms The range of is [-0.1,0.1]; the propagation attenuation coefficient Obtained through anomaly propagation experiments, the range is [0.01, 0.1]; allocation adjustment coefficient Obtained through resource tuning experiments, the range is [0.1, 0.3].
[0060] Explanation of the equation construction principle: The microservice call path matrix adopts the path calculation method in graph theory, taking into account direct and indirect call relationships; the microservice contribution matrix is based on the normalized calculation of the call frequency, and introduces the amplification factor to enhance the weight of key nodes; the node importance equation adopts multi-dimensional normalized weighted calculation to balance the influence of various indicators; the influence equation comprehensively considers the exponential decay characteristics of the success rate and the square penalty mechanism of the response time; the resource equation adopts nonlinear penalties for CPU and memory usage to reflect the sensitivity when resources are tight; the health equation converts various indicators into the [0,1] interval through exponential functions and linear transformations; the abnormal propagation matrix combines path weights, node states and propagation attenuation characteristics; the resource allocation matrix is based on normalized comprehensive weight calculation to ensure the rationality of resource allocation.
[0061] The derivation process of each equation is explained in detail below.
[0062] 1. Microservice call path matrix derivation process: First, build the basic adjacency matrix Indicates a direct call relationship: ; Then calculate the k-step call path: ; Considering the influence of path length, the attenuation factor is introduced: ; Finally, the impact of all paths is combined: ; in Obtained through the following steps: Statistics of the average response time of historical call links ; Calculate the standard deviation of response time ;According to the formula Determine the weights.
[0063] 2. Microservice contribution matrix derivation process: First, count the call frequency: ; In the formula, is the number of calls within the statistical period, is the length of the statistical period.
[0064] Calculate the call success rate: ; In the formula, The number of successful calls.
[0065] Combination frequency and success rate: ; The final normalization process gives the contribution: .
[0066] 3. Derivation process of microservice node importance equation: First calculate the basic indicators of the node: Outdegree centrality: ; Indegree centrality: ; Path Centrality: ; Connectivity Centrality: ; Finally, the importance equation is formed: .
[0067] 4. Derivation process of microservice influence equation: First consider the nonlinear effect of success rate: ; The response time is penalized by square: ; Concurrency performance linear impact: ; Linear impact of timeout: ; Combining various indicators, we get the influence equation: .
[0068] 5. Microservice resource equation derivation process: Consider the cubic penalty for CPU usage: ; The square penalty for memory usage is: ; Network bandwidth linear impact: ; Disk IO linear impact: ; The final resource equation is: .
[0069] 6. Microservice health equation derivation process: Exponential decay of the number of restarts: ; Linear compensation of error rate: ; Linear compensation of volatility: ; Linear compensation of throughput variations: ; Comprehensive health equation: .
[0070] A second aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores program instructions, and when the program instructions are run in a computer, they are used to execute the above-mentioned industrial data microservice anomaly monitoring method.
[0071] The third aspect of the present invention provides an industrial data microservice anomaly monitoring system, which includes the above-mentioned computer-readable storage medium, the system is any one of a computer, a server, and a single-chip microcomputer, the computer-readable storage medium is arranged in the system, and the system is provided with a microprocessor for executing program instructions stored in the computer-readable storage medium.
[0072] Specifically, the principle of the present invention is to comprehensively monitor the operating status of the microservice cluster, accurately identify anomalies, and take targeted resource allocation and self-healing measures based on the anomaly analysis results, and finally realize intelligent management of the entire cluster. The specific technical principles are as follows:
[0073] First, the system will regularly collect the operation data of each microservice node in the microservice cluster, including resource indicators such as CPU usage, memory usage, network bandwidth, disk I / O, and performance indicators such as call success rate, response time, concurrency, and error rate. In order to balance monitoring accuracy and data collection overhead, the system adopts a dynamic time window algorithm to dynamically adjust the monitoring sampling period according to the changing trend of the microservice status.
[0074] Based on the rich monitoring data collected, the system first constructs a service dependency graph of the microservice cluster. By analyzing the call relationship between each microservice node, the out-degree, in-degree, number of paths, and number of connections of the node are calculated to describe its position in the entire service dependency graph. At the same time, the system will also evaluate the contribution of each microservice node to other nodes, reflecting its influence in the entire system.
[0075] With the description of service dependencies and node contributions, the system will then comprehensively calculate indicators such as the importance, resource usage, and health status of each microservice node. Among them, the importance reflects the core degree of the node in the entire system; the resource usage indicator describes the performance load of the node itself; and the health status evaluates the operation stability of the node. These indicators provide an important basis for subsequent abnormal analysis and resource allocation.
[0076] Based on the above node characteristic indicators, the system uses a deep learning algorithm to train an anomaly detection model. This model can not only learn the temporal characteristics of microservice status data, but also integrate multi-dimensional information such as node importance, influence, resource occupancy and health status, so as to more accurately identify various abnormal patterns, including resource exhaustion, performance degradation, fault propagation, etc.
[0077] Based on anomaly detection, the system further calculates the propagation matrix of anomalies in the microservice cluster. This matrix describes the degree of impact of anomalies on other nodes when an anomaly occurs in a node. Combining the importance and influence indicators of nodes, the chain reaction of anomalies can be predicted to provide decision support for resource allocation.
[0078] A specific embodiment 1 of the present invention is provided below. The specific implementation of each step in this embodiment 1 is described in detail as follows: The specific implementation of step S01 is to collect the operating data of the industrial data microservice cluster using a multi-scale data collection method. First, a distributed data collection agent is deployed on each node of the microservice cluster. The collection agent obtains the processor occupancy data in real time through the performance counter interface. Specifically, the processor performance counter is read by hardware interrupt mode, and the processor usage value is recorded every 100 milliseconds. When the processor occupancy exceeds 85%, data reporting is triggered. Secondly, the collection agent monitors the memory occupancy through the memory management interface, and the memory page usage is counted by page table scanning mode. The memory usage value is recorded every 500 milliseconds, and the data reporting is triggered when the memory occupancy exceeds 80%. Thirdly, the collection agent monitors the bandwidth occupancy through the network interface, and the bandwidth usage is counted by network data packet capture mode. The bandwidth usage value is recorded every 200 milliseconds, and the data reporting is triggered when the bandwidth occupancy exceeds 75%. Finally, the collection agent monitors the read and write rates through the disk interface, uses the disk performance counter to count the number of read and write operations, records the disk read and write rate values every 1000 milliseconds, and triggers data reporting when the read and write rate exceeds 70% of the maximum disk throughput. All collected data is transmitted to the data aggregation center through a secure channel. The data aggregation center cleans, de-duplicates, and formats the collected data to form a standard microservice operation data set. The purpose of this step is to establish a basic monitoring system for industrial data microservice clusters to provide data support for subsequent anomaly detection.
[0079] The specific implementation method of step S02 is to determine the first monitoring sampling period based on the microservice operation data using an adaptive dynamic time window algorithm. First, the collected microservice operation data is analyzed in time series to calculate the change trend of processor occupancy, memory occupancy, network bandwidth occupancy and disk read and write rate. The exponentially weighted moving average method is used to calculate the fluctuation degree of each indicator. The fluctuation degree calculation formula is: ,in is the current fluctuation value, is the current indicator value, is the smoothing coefficient, and its value range is 0.1 to 0.3. Then, based on the fluctuation degree of each indicator, the fuzzy comprehensive evaluation method is used to calculate the system stability index. The stability index calculation formula is: ,in is the weight of each indicator, is the fluctuation degree of each indicator. Then, the time window size is dynamically adjusted according to the system stability index. The time window adjustment formula is: ,in is the adjusted time window size, is the benchmark time window size, which is set to 60 seconds. is the adjustment coefficient, ranging from 0.5 to 2.0. is the system stability index. Finally, the first monitoring sampling period is determined based on the adjusted time window size. The sampling period calculation formula is: ,in is the first monitoring sampling period, is the time window size, is the number of sampling points, which is generally 20 to 50. The purpose of this step is to achieve dynamic optimization of the monitoring sampling period, while ensuring monitoring accuracy and reducing system overhead.
[0080] The specific implementation method of step S03 is to collect microservice status data from the industrial data microservice cluster based on the first monitoring sampling period. First, a distributed status collector is deployed, and the collector obtains the running status information of the microservice through the application program interface. For the processor occupancy data, a multi-core load balancing algorithm is used to count the usage of each core, and the calculation formula is: ,in is the overall processor utilization, is the weight of each core, is the usage rate of each core. For memory usage data, the memory pool monitoring method is used to count the usage of heap memory and stack memory. The calculation formula is: ,in is the memory usage, is the heap memory usage, is the stack memory usage, is the total memory capacity. For network bandwidth occupancy data, the traffic statistics algorithm is used to calculate the uplink and downlink bandwidth usage. The calculation formula is: ,in is the bandwidth usage, is the upstream traffic, For downstream traffic, is the total bandwidth capacity. For disk read and write rate data, the disk performance monitoring method is used to count the read and write operation rates. The calculation formula is: ,in is the disk usage, is the reading rate, is the write rate, is the maximum read and write rate. For the microservice call success rate data, the request tracking method is used to count the successful request ratio, and the calculation formula is: ,in is the call success rate, is the number of successful requests, is the total number of requests. For microservice response time data, the timestamp recording method is used to count the request processing time. The calculation formula is: ,in is the average response time, The request end time. is the start time of the request. For the concurrent data of microservices, the connection pool monitoring method is used to count the number of active connections. The calculation formula is: ,in is the number of concurrent connections, is the number of active connections in each connection pool. For the microservice timeout data, the timeout detection algorithm is used to count the number of timeout requests. The calculation formula is: ,in is the number of timeouts, is the request processing time, is the timeout threshold, is the indicator function. For the microservice restart times data, the process monitoring method is used to count the service restart times, and the calculation formula is ,in is the number of restarts, is the number of restarts within the time period. For microservice error rate data, the error log analysis method is used to calculate the error request ratio, and the calculation formula is: ,in is the error rate, is the number of error requests. For the microservice response volatility data, the variance analysis method is used to calculate the fluctuation degree of the response time. The calculation formula is: ,in In response to volatility, is the request response time. For the microservice throughput change rate data, the throughput monitoring method is used to count the changes in request processing capacity. The calculation formula is: ,in is the throughput change rate, is the current throughput, The purpose of this step is to comprehensively collect the running status data of microservices and provide a data basis for subsequent anomaly detection and analysis.
[0081] The specific implementation method of step S04 is to construct a service dependency graph of the industrial data microservice cluster. First, the data of the service registration center is used to construct the initial dependency, and the call relationship between microservices is obtained by analyzing the service registration information. Then, the link tracking technology is used to supplement the dynamic dependency, and the service call relationship graph is improved by analyzing the request link information. Next, the graph theory algorithm is used to calculate the topological characteristics of the microservice node, including the out-degree value, in-degree value, number of paths, and number of connections. The out-degree value is calculated using the outward edge statistics method, and the calculation formula is ,in is the node out-degree, is the direct connection relationship between nodes. The in-degree numerical calculation adopts the inward edge statistics method, and the calculation formula is ,in is the node in-degree. The number of paths is calculated using the depth-first search algorithm, and the calculation formula is ,in is the number of node paths. The number of connections is calculated using the breadth-first search algorithm, and the calculation formula is ,in is the number of node connections. Finally, the microservice call path matrix is constructed based on the calculated topological features. The matrix element calculation formula is: ,in is the call path weight between nodes, is the path weight coefficient, is the path attenuation coefficient. The purpose of this step is to build a structural model of the microservice cluster to provide a basis for subsequent contribution analysis.
[0082] The specific implementation method of step S05 is to calculate the microservice contribution matrix based on the microservice call path matrix. First, the call frequency statistics method is used to calculate the call frequency between microservice nodes, and the call frequency data is obtained by analyzing the request log. Then, the normalization processing method is used to calculate the relative contribution between nodes. The calculation formula is: ,in For the node contribution, is the calling frequency, is the contribution magnification coefficient, is the contribution benchmark value. Next, the matrix iteration method is used to optimize the contribution calculation result. The iteration formula is: ,in For the The contribution value of the iteration, is the iteration weight, and its value range is 0.1 to 0.3. Finally, the convergence judgment method is used to determine the final contribution matrix, and the judgment condition is ,in is the Frobenius norm of the matrix, is the convergence threshold, and its value is 0.001. The purpose of this step is to quantify the influence relationship between microservice nodes and provide a basis for subsequent anomaly detection.
[0083] The specific implementation method of step S06 is to input the microservice call path matrix and the microservice contribution matrix into the contribution value calculation equation group to calculate the comprehensive contribution value of the microservice node. First, the node importance is calculated using the multi-index weighted method, and the calculation formula is: ,in is the node importance index, arrive is the weight coefficient, is the error term. Then, the nonlinear combination method is used to calculate the node influence, and the calculation formula is: , in is the impact indicator, arrive is the weight coefficient, is the error term. Next, the resource utilization evaluation method is used to calculate the node resource index. The calculation formula is: , in is a resource indicator, arrive is the weight coefficient, is the error term. Then, the health status assessment method is used to calculate the node health index, and the calculation formula is: , in As a health indicator, arrive is the weight coefficient, is the error term. Finally, the comprehensive scoring method is used to calculate the comprehensive contribution value of the node. The calculation formula is: ,in is the comprehensive contribution value, arrive is the comprehensive weight coefficient, which ranges from 0 to 1 and sums to 1. Based on the calculated comprehensive contribution value, the threshold screening method is used to identify key microservice nodes. The judgment condition is ,in is the contribution value threshold, which is determined through historical data analysis and is generally between 0.7 and 0.8. The purpose of this step is to identify key nodes in the microservice cluster and provide targets for subsequent key monitoring.
[0084] The specific implementation method of step S07 is to dynamically adjust the monitoring sampling period for key microservice nodes. First, an adaptive sampling algorithm is used to calculate the ideal sampling period of key nodes. The calculation formula is: ,in is the second monitoring sampling period, is the first monitoring sampling period, , , , is the adjustment coefficient, and its value range is 0.1 to 0.3. Then, the minimum sampling period constraint method is used to ensure that the sampling frequency does not exceed the system tolerance. The constraint condition is ,in is the minimum allowable sampling period, which is determined according to system performance and is generally set to 1 second. Next, the sampling jitter control method is used to avoid frequent changes in the sampling period. The control formula is: ,in is the sampling period after smoothing, is the last sampling period, is the smoothing coefficient, and its value range is 0.6 to 0.8. Finally, the distributed clock synchronization method is used to ensure the timing consistency of multi-node sampling, and the synchronization error is controlled at the millisecond level. The purpose of this step is to achieve refined monitoring of key nodes and improve the timeliness of anomaly detection.
[0085] The specific implementation method of step S08 is to establish a time series feature training set of microservice status data and use a deep learning algorithm to train anomaly detection models. First, the time series decomposition method is used to extract the trend, cycle and random components of the microservice status data. The decomposition formula is: ,in is the original time series data, is the trend component, is the periodic component, is a random component. Then, feature engineering methods are used to construct training features, including statistical features, frequency domain features, and time domain features. Statistical features include mean, variance, skewness, kurtosis, etc. The calculation formula is The frequency domain features are extracted by Fourier transform, and the calculation formula is: The time domain features use an autoregressive model to extract time series correlation, and the calculation formula is: ,in is the autoregressive order. Next, the feature fusion method is used to take the microservice node importance index, influence index, resource index and health index as feature weights. The fusion formula is: ,in is the feature weight vector, is the feature vector, is element-by-element multiplication. Finally, the improved long short-term memory network structure is used to train the anomaly detection model. The network includes an input layer, three feature fusion layers, a hidden layer, and an output layer. The input layer receives the fused feature vector. The first feature fusion layer uses the attention mechanism to extract the temporal features. The attention weight calculation formula is: ,in is the hidden state, and is the weight matrix. The second feature fusion layer uses a residual connection structure to fuse node importance indicators. The fusion formula is: ,in is the fusion weight matrix. The third feature fusion layer uses a gating mechanism to fuse other indicators. The gating formula is ,in is the sigmoid function, is the gating weight matrix, is the bias vector. The hidden layer uses a bidirectional long short-term memory network structure to capture temporal dependencies, and the state update formula is the standard long short-term memory network update formula. The output layer uses a fully connected layer and a softmax function to output the abnormal probability, and the calculation formula is ,in is the output weight matrix, is the final hidden state. The model training uses the cross entropy loss function and Adam optimizer, the learning rate is set to 0.001, the batch size is 64, and the number of training rounds is 100. The purpose of this step is to establish an anomaly detection model suitable for the industrial data microservice environment.
[0086] The specific implementation of step S09 is to use the anomaly detection model to perform real-time analysis on the status data of key microservice nodes. First, the real-time status data is standardized using a data preprocessing method. The processing formula is: ,in is the standardized data, is the mean, is the standard deviation. Then, the sliding window method is used to construct the real-time feature vector, and the window size is consistent with that during training. Next, the trained model is used to calculate the anomaly probability, and anomaly detection is triggered when the anomaly probability exceeds the threshold. Finally, the anomaly propagation analysis method is used to calculate the anomaly propagation matrix, and the calculation formula is ,in is the probability of abnormal propagation, is the propagation attenuation coefficient. Based on the abnormal propagation matrix, abnormal warning information is generated. The warning information includes abnormal node identification, abnormal type, impact range and severity. The purpose of this step is to achieve real-time detection and warning of microservice anomalies.
[0087] The specific implementation method of step S10 is to calculate the resource allocation matrix based on the abnormal warning information. First, the resource demand evaluation method is used to analyze the resource demand of the abnormal node. The evaluation indicators include processor demand, memory demand, bandwidth demand and disk demand. Then, the resource priority calculation method is used to determine the resource allocation order. The calculation formula is: ,in Assign weights to resources, is the allocation adjustment coefficient. Next, a resource scheduling algorithm is used to generate a resource allocation plan. The scheduling algorithm takes into account the system resource capacity constraints and service quality requirements. Finally, the resource allocation plan is output to the operation and maintenance personnel. The plan content includes the resource allocation plan, expected effect evaluation, and operation instructions. The purpose of this step is to achieve intelligent allocation of microservice cluster resources and improve the availability and stability of the system.
[0088] In order to effectively deal with these microservice anomaly problems, the enterprise decided to adopt the industrial data microservice anomaly monitoring method proposed in this invention. This method can comprehensively monitor the operating status of the microservice cluster, quickly discover and locate anomalies, and provide an automated fault repair solution. The following is the specific implementation process of this method in the enterprise's microservice system.
[0089] However, as the business scale continues to expand, microservice systems are becoming more and more complex. Occasionally, some microservice nodes will fail or performance will degrade, which will affect the entire production process. For example, in the product quality inspection link, if the key material testing service runs out of CPU resources, resulting in a sharp increase in response time, it may cause product retention and production line shutdown. Or, in the raw material procurement link, if the supply chain management service has a memory leak and causes frequent restarts, it will cause order processing delays and affect the timely supply of raw materials. Once such problems occur, they will cause huge losses to steel production activities.
[0090] In order to effectively deal with these microservice anomaly problems, the enterprise decided to adopt the industrial data microservice anomaly monitoring method proposed in this invention. This method can comprehensively monitor the operating status of the microservice cluster, quickly discover and locate anomalies, and provide automated fault repair suggestions. The following is the specific implementation process of this method in the enterprise's microservice system.
[0091] 1. Data Collection and Abnormality Monitoring First, the system will regularly collect the operating status of the enterprise's industrial data microservice cluster. Specifically, it will collect resource indicators such as CPU usage, memory usage, network bandwidth utilization, disk I / O, and performance indicators such as call success rate, response time, concurrency, and error rate of each microservice node. In order to balance monitoring accuracy and data collection overhead, the system uses a dynamic time window algorithm to dynamically adjust the monitoring sampling period according to the changing trend of the microservice status.
[0092] For example, in the material testing service in the manufacturing process, the system will collect indicators such as CPU usage, memory usage, and response time every 30 seconds. When certain indicators are monitored to fluctuate violently, such as CPU usage exceeding 90% for 5 consecutive minutes, the system will automatically shorten the sampling period to 15 seconds in order to more accurately capture the development of abnormal situations. For relatively stable services such as supply chain management services, the system will appropriately relax the sampling period to 1 minute to reduce unnecessary data collection overhead. Figure 2 As shown in the figure, the CPU usage dynamic monitoring data of the material testing service is displayed.
[0093] After collecting these rich microservice operation data, the system will then build a service dependency graph for the enterprise microservice system. By analyzing the call relationship between each microservice node, the out-degree, in-degree, number of paths, and number of connections of each node are calculated. For example, the out-degree of the material testing service is 8, which means it is called by 8 other services; the in-degree of the supply chain management service is 12, which means it depends on 12 upstream services. These indicators reflect the status and importance of each microservice node in the entire system.
[0094] At the same time, the system will also evaluate the contribution of each microservice node to other nodes. By analyzing the call frequency between nodes, the node For Node Contribution : ; in, For Node To Node The calling frequency, is the total number of microservice nodes, is the contribution magnification factor, It is the contribution benchmark value. This indicator reflects the influence of each microservice node in the entire system.
[0095] With the description of service dependencies and node contributions, the system will then comprehensively calculate indicators such as the importance, resource usage, and health status of each microservice node. It reflects its core degree in the service dependency graph and can be calculated by the following formula: ; in, is the node out-degree, is the node in-degree, is the number of node paths, is the number of node connections, is the weight coefficient, is the error term. Figure 3 As shown, the calling relationship between the core microservices of the enterprise is demonstrated.
[0096] Node resource usage The CPU usage, memory usage, network bandwidth utilization, and disk I / O are comprehensively considered: ; in, is the CPU usage, is the memory usage, is the network bandwidth utilization, is the disk I / O rate, are the upper thresholds of the corresponding resources, is the weight coefficient, is the error term.
[0097] Node health status It covers indicators such as the number of restarts, error rate, response fluctuation rate, and throughput change: ; in, is the number of restarts, is the error rate, In response to volatility, is the throughput change rate, are the reference values of the corresponding indicators, is the weight coefficient, is the error term.
[0098] Based on the above node characteristic indicators, the system uses a deep learning algorithm to train an anomaly detection model. This model can not only learn the temporal characteristics of microservice status data, but also integrate multi-dimensional information such as node importance, influence, resource occupancy and health status, so as to more accurately identify various abnormal patterns, including resource exhaustion, performance degradation, fault propagation, etc.
[0099] For example, in the material inspection service, the system detected that the CPU usage rate continued to increase, while the response time increased significantly, and the node importance and influence were high. These characteristics collectively reflect that the service may have resource exhaustion anomalies. At the same time, the memory usage of the supply chain management service continued to increase, and the number of restarts was frequent, which may be an abnormal health status caused by memory leaks. Based on these feature data, the anomaly detection model can accurately identify these two types of anomalies.
[0100] 2. Abnormal Analysis and Resource Allocation After identifying the abnormal problem, the system will further calculate the propagation matrix of the abnormality in the microservice cluster. This matrix describes the impact of an abnormality on other nodes when a node has an abnormality. The specific calculation formula is as follows: ; in, For Node To Node The call path weight, For Node For Node The contribution of For Node health indicators, For Node The impact indicators, is the propagation attenuation coefficient.
[0101] For example, when the material inspection service has a resource exhaustion anomaly, due to its high importance and influence, the anomaly propagation matrix shows that it will seriously affect the downstream product quality inspection service, product delivery service, etc., and may even cause the entire production line to stop. The memory leak anomaly of the supply chain management service, although its own impact is relatively small, will also cause a certain chain reaction in the system through the call chain because it is dependent on multiple upstream services.
[0102] With this anomaly propagation matrix, the system can calculate the key microservices that need to prioritize resource allocation based on the importance, influence, and resource usage of the nodes. It can be obtained by the following formula: ; in, For Node The importance index, For Node The impact indicators, For Node Resource usage indicators, is the allocation adjustment coefficient. This formula reflects the following principles: nodes with higher abnormal propagation probability should receive more resource support; the greater the importance and influence of a node, the more resources it should receive; the resource occupancy of the node itself is also one of the bases for resource allocation; the introduction of the allocation adjustment coefficient To balance the weights of different factors.
[0103] like Figure 4 As shown, the anomaly propagation coefficient between each service node is shown, such as Figure 5 As shown, the final resource allocation weights calculated based on node importance, influence, and resource occupancy are shown.
[0104] For example, for the resource exhaustion anomaly of the material testing service, the system will give it a higher resource allocation weight because the service is very important and influential, and its own resource usage is also large. Although the supply chain management service itself does not occupy a large amount of resources, due to its key position in the entire system, the system will also appropriately increase its resource allocation weight to prevent the anomaly from spreading further.
[0105] Through this resource allocation method based on exception propagation and node characteristics, the system can minimize the impact of exceptions on the entire production process. At the same time, the system will automatically trigger a series of exception repair measures. For example, if the CPU resources of the material inspection service are exhausted, the system will automatically perform horizontal expansion and increase the number of computing nodes; for memory leaks in the supply chain management service, the system will automatically restart the service instance and notify the R&D team to analyze the code problem.
[0106] This automated exception repair mechanism greatly improves the efficiency of problem diagnosis and repair. The system will first query the historical exception case knowledge base to find similar failure modes and solutions. If a matching case is found, the system will immediately trigger the corresponding self-healing script for repair. For complex exceptions that cannot be automatically resolved, the system will provide a detailed root cause analysis report and repair plan for reference by operation and maintenance personnel.
[0107] In general, through the above-mentioned series of measures of abnormal monitoring, analysis and resource allocation, the enterprise's industrial data microservice system has achieved comprehensive intelligent management. The system can timely detect and locate various abnormalities, and take targeted resource allocation and self-healing measures according to node characteristics and abnormal propagation, thus ensuring the stable operation of the entire production process to the greatest extent.
[0108] 3. Performance Optimization and Continuous Improvement In addition to anomaly monitoring and fault repair, the method of the present invention also includes a series of performance optimization and continuous improvement measures, which further improves the reliability of the enterprise microservice system.
[0109] First, the system will regularly conduct end-to-end performance testing and optimization of key business scenarios. For example, for the entire process from raw material procurement to product warehousing, the system will build a complete test scenario, simulate actual high-concurrency access, and monitor the CPU, memory, network, disk and other resource indicators of each node throughout the process, as well as the response time, throughput and other performance indicators of key services. Once a performance bottleneck is found in a certain link, such as a significant increase in the response time of the supply chain management service, the system will automatically analyze its root cause and provide optimization solutions, such as increasing the resource allocation of the service or adjusting the deployment topology. Through this end-to-end performance optimization, the stable operation of key business scenarios is ensured.
[0110] In addition, the system will regularly conduct a comprehensive assessment of the reliability of the entire microservice cluster. Specifically, the system will calculate availability indicators, stability indicators, responsiveness indicators, resource utilization indicators, scalability indicators, etc., and compare and analyze them with the preset target values. At the same time, the system will also simulate some extreme scenarios, such as large-scale concurrent access, multi-node failures, etc., to evaluate the performance of the cluster in these situations. Based on the reliability assessment results, the system will output a detailed report pointing out the problems in the reliability of the cluster for reference by operation and maintenance personnel.
[0111] At the same time, the system has also established a comprehensive operation and maintenance knowledge base and automated scripts to improve the efficiency of daily inspections, fault diagnosis, capacity planning, etc. For various types of operation and maintenance problems encountered in the past, the system will record their symptoms, root cause analysis, and solutions in detail to form standardized operation and maintenance cases. Once new problems arise in the future, the system can quickly find similar historical cases and automatically call the corresponding repair scripts. In addition, the system will also write a large number of automated inspection and capacity planning scripts to greatly reduce the cost of manual intervention.
[0112] like Figure 6 The figure shows the response time and throughput comparison of key services before and after performance optimization. In general, through the above comprehensive performance optimization, reliability management and automated operation and maintenance methods, the company's industrial data microservice system has continuously improved its stability and availability. The system can quickly discover and fix abnormal problems, while continuously optimizing the performance of key business links to ensure the smooth progress of the entire production activity. This not only greatly improves production efficiency, but also greatly reduces the economic losses caused by system failures.
[0113] It should be noted that the variables involved in the present invention are explained in detail as shown in Table 1 below.
[0114] Table 1 Variable explanation table
[0115] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for monitoring abnormalities of industrial data microservices, characterized in that: The method comprises the following steps: collecting microservice operation data of an industrial data microservice cluster, and determining a first monitoring sampling period based on the microservice operation data; Collect microservice status data, build service dependency graph and generate microservice call path matrix; Calculate a microservice contribution matrix based on the microservice call path matrix; The microservice call path matrix and the microservice contribution matrix are input into the contribution value calculation equation group to obtain the comprehensive contribution value of the microservice. The contribution value calculation equation group evaluates the core degree, downstream influence degree, resource occupancy and operation stability of the microservice node by calculating the microservice node importance index, microservice influence index, microservice resource index and microservice health index respectively. Identify key microservice nodes based on the microservice comprehensive contribution value and adjust to a second monitoring sampling period; Train anomaly detection models and generate anomaly warning information; The resource allocation strategy is adjusted based on the abnormal warning information.
2. The method for monitoring abnormality of industrial data microservices according to claim 1, characterized in that: The microservice operation data includes microservice processor occupancy data, microservice memory occupancy data, microservice network bandwidth occupancy data, and microservice disk read and write rate data; the first monitoring sampling period is determined by a dynamic time window algorithm.
3. The method for monitoring abnormality of industrial data microservices according to claim 2, characterized in that: The microservice status data includes microservice processor occupancy data, microservice memory occupancy data, microservice network bandwidth occupancy data, microservice disk read and write rate data, microservice call success rate data, microservice response time data, microservice concurrency data, microservice timeout data, microservice restart data, microservice error rate data, microservice response fluctuation rate data, and microservice throughput change rate data.
4. The method for monitoring abnormality of industrial data microservices according to claim 3, characterized in that: Based on the service dependency graph, the microservice node out-degree value, the microservice node in-degree value, the number of microservice node paths, and the number of microservice node connections are calculated to generate the microservice call path matrix.
5. The method for monitoring abnormality of industrial data microservices according to claim 4, characterized in that: The contribution value calculation equation group includes a microservice node importance equation, a microservice influence equation, a microservice resource equation, and a microservice health equation; The microservice node importance equation outputs a microservice node importance index, the microservice influence equation outputs a microservice influence index, the microservice resource equation outputs a microservice resource index, and the microservice health equation outputs a microservice health index.
6. The method for monitoring abnormality of industrial data microservices according to claim 5, characterized in that: The input of the microservice node importance equation includes the out-degree value of the microservice node, the in-degree value of the microservice node, the number of paths of the microservice node, and the number of connections of the microservice node; The input of the microservice influence equation includes the microservice call success rate data, the microservice response time data, the microservice concurrency data, and the microservice timeout data.
7. The method for monitoring abnormality of industrial data microservices according to claim 6, characterized in that: The input of the microservice resource equation includes the microservice processor occupancy data, the microservice memory occupancy data, the microservice network bandwidth occupancy data, and the microservice disk read and write rate data; the input of the microservice health equation includes the microservice restart times data, the microservice error rate data, the microservice response volatility data, and the microservice throughput change rate data.
8. The method for monitoring abnormality of industrial data microservices according to claim 7, characterized in that: The second monitoring sampling period is smaller than the first monitoring sampling period; a time series feature training set of the microservice status data is established, the microservice node importance index, the microservice influence index, the microservice resource index, and the microservice health index are used as feature weights, and a deep learning algorithm is used for training to obtain the anomaly detection model.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program instructions, and when the program instructions are executed in a computer, they are used to execute the industrial data microservice anomaly monitoring method according to any one of claims 1 to 8.
10. An industrial data microservice anomaly monitoring system, characterized in that: The system comprises the computer-readable storage medium as claimed in claim 9, wherein the system is any one of a computer, a server, and a single-chip microcomputer, the computer-readable storage medium is arranged in the system, and the system is provided with a microprocessor for executing program instructions stored in the computer-readable storage medium.
Citation Information
Patent Citations
Micro-service fault root cause positioning method and device based on causal inference
CN113391943A
Micro-service fault positioning method and device based on self-encoder and service dependency graph
CN115348159A
Distributed system fault positioning diagnosis method and system based on log analysis
CN119668990A
Microservice transient fault locating method based on multimodal abnormality detection
WO2024221833A1
Cited By
Intelligent door lock stress distribution monitoring and life prediction method based on fiber bragg grating
CN120721260A
Data application security protection method and device adaptive to novel power system
CN120750573A
A data application security protection method and device adapted to new power systems
CN120750573B
Enterprise-level cloud computing resource dynamic allocation and management system and implementation method thereof
CN120935183A