An industrial data microservice exception monitoring method, medium and system
By constructing a service dependency graph and a call path matrix, and combining them with a deep learning model, key microservice nodes are identified and resource allocation is adjusted. This solves the problem of chain-like anomaly propagation in industrial data microservice systems, improving system stability and operational efficiency.
Patent Information
- Application Number
- CN202510346463.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2045-03-24
AI Technical Summary
Existing technologies struggle to effectively identify and predict chain-like anomaly propagation phenomena in industrial data microservice systems, and cannot differentiate monitoring based on the importance and scope of impact of services, resulting in insufficient system stability and reliability.
By collecting microservice runtime data, a service dependency graph and call path matrix are constructed, a contribution matrix and a comprehensive contribution value are calculated, and anomaly detection is performed using a deep learning model to identify key microservice nodes. Based on the anomaly warning information, resource allocation strategies are adjusted.
It enables adaptive anomaly detection for microservice systems, improving system reliability and stability, timely detection of anomalies and prediction of propagation paths, optimization of resource allocation, and improvement of operational efficiency.
Smart Images

Figure CN119862092B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of industrial data microservice exception, and particularly relates to an industrial data microservice exception monitoring method, medium and system. BACKGROUND
[0002] With the rapid development of industrial internet, the scale and complexity of industrial data are exponentially increasing. In order to effectively process and manage massive industrial data, microservice architecture is widely used in industrial data processing systems. The microservice architecture splits monolithic applications into multiple independently running services, each responsible for a specific business function, with advantages such as independent deployment, loose coupling, and easy scalability. However, with the increasing number of microservices, the dependency relationship between services becomes increasingly complex, and the stability of the system faces serious challenges.
[0003] In the prior art, industrial data microservice exception detection mainly adopts the following methods: one is a monitoring method based on fixed threshold, which detects exceptions by setting threshold values of processor occupancy, memory usage, response time and other indicators. This method is simple to implement, but it is difficult to adapt to the dynamic changes of load in industrial scenarios, and is prone to false positives and false negatives. Two is an anomaly detection method based on statistical analysis, which establishes a normal behavior model by calculating the statistical characteristics of historical data to detect anomalies that deviate from the normal pattern. This method can adapt to changes in system load to some extent, but it is difficult to effectively identify the propagating anomalies between services. Three is an anomaly detection method based on machine learning, which trains a model to learn the normal behavior pattern of services to achieve anomaly detection. However, existing machine learning methods often treat each service independently, ignoring the dependency relationship and influence degree between services.
[0004] In practical applications, industrial data microservice systems have obvious hierarchical and dependent characteristics. The exception of upstream services may propagate and affect downstream services, causing system performance degradation or even service interruption. For example, in the steel production process, the exception of data acquisition services may cause a series of downstream services such as data preprocessing services, feature extraction services, model calculation services, etc. to have performance degradation or reduced service quality. The existing technology is difficult to effectively identify and predict this chain-like anomaly propagation phenomenon, and cannot perform differentiated monitoring according to the importance and influence range of services.
[0005] Therefore, there is an urgent need for an industrial data microservice exception detection method that can fully consider the dependency relationship between microservices to achieve differentiated monitoring, in order to improve the reliability and stability of the system. SUMMARY
[0006] Therefore, the present application provides an industrial data microservice exception monitoring method, medium and system, which can solve the problem that the prior art cannot perform differentiated monitoring according to the dependency relationship between microservices.
[0007] The first aspect of the application provides an industrial data microservice anomaly monitoring method, comprising the following steps: collecting microservice running data of an industrial data microservice cluster, determining a first monitoring sampling period based on the microservice running data; collecting microservice state data, constructing a service dependency graph and generating a microservice call path matrix; calculating a microservice contribution degree matrix based on the microservice call path matrix; inputting the microservice call path matrix and the microservice contribution degree matrix into a contribution value calculation equation set to obtain a microservice comprehensive contribution value, the contribution value calculation equation set respectively evaluates the core degree, downstream influence degree, resource occupation situation and running 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 a key microservice node based on the microservice comprehensive contribution value and adjusting to a second monitoring sampling period; training an anomaly detection model and generating an anomaly warning information; 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 application can be further improved as follows:
[0009] The microservice running data includes microservice processor occupancy data, microservice memory occupancy data, microservice network bandwidth occupancy data and microservice disk read-write rate data; the first monitoring sampling period is determined by a dynamic time window algorithm.
[0010] Further, the microservice state data includes microservice processor occupancy data, microservice memory occupancy data, microservice network bandwidth occupancy data, microservice disk read-write rate data, microservice call success rate data, microservice response time data, microservice concurrency number data, microservice timeout number data, microservice restart number data, microservice error rate data, microservice response fluctuation rate data and microservice throughput change rate data.
[0011] Further, the service dependency graph is used to calculate microservice node out-degree values, microservice node in-degree values, microservice node path numbers and microservice node connection numbers to generate the microservice call path matrix.
[0012] Further, the contribution value calculation equation set 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.
[0013] Further, the input of the microservice node importance equation includes the microservice node out-degree value, the microservice node in-degree value, the microservice node path quantity, and the microservice node connection quantity; and the input of the microservice influence equation includes the microservice call success rate data, the microservice response time data, the microservice concurrency number data, and the microservice timeout number data.
[0014] Further, the input of the microservice resource equation includes the microservice processor occupancy rate data, the microservice memory occupancy rate data, the microservice network bandwidth occupancy rate data, and the microservice disk read-write rate data; and the input of the microservice health equation includes the microservice restart number data, the microservice error rate data, the microservice response fluctuation rate data, and the microservice throughput change rate data.
[0015] Further, the second monitoring sampling period is less than the first monitoring sampling period; a time sequence feature training set of the microservice state data is established, the microservice node importance index, the microservice influence index, the microservice resource index, and the microservice health index are taken as feature weights, and a deep learning algorithm is used for training to obtain the anomaly detection model.
[0016] The second aspect of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores program instructions, and the program instructions are used for executing the above-mentioned industrial data microservice anomaly monitoring method when running in a computer.
[0017] The third aspect of the present application provides an industrial data microservice anomaly monitoring system, 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 the program instructions stored in the computer readable storage medium.
[0018] Compared with the prior art, the industrial data microservice anomaly monitoring method, medium, and system provided by the present application have the beneficial effects that the node importance, service influence, resource occupation, and health condition and other multi-dimensional indexes are comprehensively considered, and the limitation that only a single index is focused on or the dependence relationship between services is ignored in the prior art is overcome.
[0019] On the basis of identifying the key service nodes, the dynamic time window algorithm and the differentiated sampling strategy are adopted to adopt different monitoring frequencies for the service nodes with different importance degrees. The adaptive monitoring mechanism not only ensures the monitoring accuracy of the key nodes, but also avoids excessive monitoring of the non-key nodes, and effectively balances the monitoring effect and system overhead.
[0020] The improved long short-term memory network structure designed by the application realizes deep fusion of time sequence features and service features by introducing a plurality of feature fusion layers. The first feature fusion layer focuses on extracting time sequence patterns of microservice state data, the second feature fusion layer combines node importance information with time sequence features, and the third feature fusion layer further integrates information such as service influence, resource occupation and health status. This hierarchical feature fusion mechanism significantly improves the accuracy and explainability of anomaly detection.
[0021] In terms of anomaly early warning, the application can not only discover the abnormal state of a single service in time, but also predict the possible propagation path and influence range of the anomaly by calculating the anomaly propagation matrix. This predictive anomaly detection mechanism provides sufficient response time for operation and maintenance personnel, which helps to prevent anomaly propagation and system performance degradation.
[0022] The application also establishes a resource allocation mechanism based on multi-dimensional indicators, dynamically adjusts resource allocation strategies according to the importance, influence, resource demand and health status of service nodes. This intelligent resource scheduling scheme ensures the stable operation of key services and improves the utilization efficiency of system resources.
[0023] By organically combining service dependency analysis, dynamic monitoring strategy, deep learning model and resource scheduling mechanism, the application solves the problem that the prior art cannot realize differentiated monitoring according to the dependency relationship between microservices, realizes adaptive anomaly detection and preventive maintenance of industrial data microservice system, and provides an effective solution for improving system reliability and operation and maintenance efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0024] Figure 1 The flowchart of the method provided by the application.
[0025] Figure 2 The CPU usage rate dynamic monitoring data graph of the material detection service in Example 2.
[0026] Figure 3 The call relationship graph between the core microservices of the enterprise in Example 2.
[0027] Figure 4 The anomaly propagation coefficient graph between the service nodes in Example 2.
[0028] Figure 5 The final resource allocation weight graph of node importance, influence and resource occupation calculation in Example 2.
[0029] Figure 6 The response time and throughput comparison graph of the key service before and after performance optimization in Example 2. DETAILED DESCRIPTION
[0030] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application.
[0031] As Figure 1 shown is a flow chart of an industrial data microservice abnormality monitoring method provided by the present application, the method comprises the following steps:
[0032] S01, collecting microservice running data of an industrial data microservice cluster, the microservice running data comprising microservice processor occupancy data, microservice memory occupancy data, microservice network bandwidth occupancy data, and microservice disk read-write speed data;
[0033] S02, determining a first monitoring sampling period based on the microservice running data by using a dynamic time window algorithm;
[0034] S03, collecting microservice state data of the industrial data microservice cluster based on the first monitoring sampling period, the microservice state data comprising microservice processor occupancy data, microservice memory occupancy data, microservice network bandwidth occupancy data, microservice disk read-write speed data, microservice call success rate data, microservice response time data, microservice concurrency number data, microservice timeout number data, microservice restart number data, microservice error rate data, microservice response fluctuation rate data, and microservice throughput change rate data;
[0035] S04, constructing a service dependency graph of the industrial data microservice cluster, calculating microservice node out-degree values, microservice node in-degree values, microservice node path numbers, and microservice node connection numbers based on the service dependency graph, and generating a microservice call path matrix;
[0036] S05, calculating a microservice contribution degree matrix of the industrial data microservice cluster based on the microservice call path matrix;
[0037] S06, inputting the microservice call path matrix and the microservice contribution degree matrix into a contribution value calculation equation set to calculate a microservice comprehensive contribution value, and identifying a key microservice node based on the microservice comprehensive contribution value;
[0038] S07, dynamically adjusting a second monitoring sampling period for the key microservice node based on the microservice node importance index, the microservice influence index, the microservice resource index, and the microservice health index, the second monitoring sampling period being smaller than the first monitoring sampling period;
[0039] S08, establish a time sequence feature training set of the microservice state data, use the microservice node importance index, the microservice influence index, the microservice resource index and the microservice health index as feature weights, and train an anomaly detection model by using a deep learning algorithm;
[0040] S09, using the anomaly detection model to perform real-time analysis on the microservice state data of the key microservice node, calculating an anomaly propagation matrix, and generating an anomaly warning information based on the anomaly propagation matrix;
[0041] S10, according to the anomaly warning information, the microservice node importance index, the microservice influence index, the microservice resource index and the microservice health index, calculating a resource allocation matrix and outputting to an operation and maintenance personnel for adjusting the resource allocation of the industrial data microservice cluster.
[0042] The contribution value calculation equation set includes a microservice node importance equation, a microservice influence equation, a microservice resource equation and a microservice health equation.
[0043] The microservice node importance equation is used to calculate the core degree of the microservice node in the service dependency graph in the industrial data microservice cluster, and the input includes the microservice node out-degree value, the microservice node in-degree value, the microservice node path number and the microservice node connection number, and the output is the microservice node importance index.
[0044] The microservice influence equation is used to evaluate the influence degree of the microservice node on the downstream service in the industrial data microservice cluster, and the input includes the microservice call success rate data, the microservice response time data, the microservice concurrency number data and the microservice timeout number data, and the output is the microservice influence index.
[0045] The microservice resource equation is used to calculate the resource occupation of the microservice node in the industrial data microservice cluster, and the input includes the microservice processor occupation rate data, the microservice memory occupation rate data, the microservice network bandwidth occupation rate data and the microservice disk read-write rate data, and the output is the microservice resource index.
[0046] The microservice health equation is used to evaluate the running stability of the microservice node in the industrial data microservice cluster, and the input includes the microservice restart number data, the microservice error rate data, the microservice response fluctuation rate data and the microservice throughput change rate data, and the output is the microservice health index.
[0047] The abnormality detection model is based on an improved long short-term memory network structure, a plurality of feature fusion layers are added between the input layer and the hidden layer of the long short-term memory network, and finally 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 is formed; wherein the input layer receives the microservice state data, the first feature fusion layer extracts the time sequence feature of the microservice state data, the second feature fusion layer fuses the microservice node importance index and the time sequence feature, the third feature fusion layer fuses the microservice influence index, the microservice resource index, the microservice health index, and the time sequence feature, the hidden layer calculates an abnormal state probability based on the fused features, and the output layer outputs the abnormal early warning information.
[0048] The specific implementation of the above steps is described in detail as follows:
[0049] The specific implementation of step S01 is to collect the running data of the industrial data microservice cluster. First, the system regularly collects the running state 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-write rate of the microservice. By continuously collecting these index data, the overall running condition of the microservice cluster can be comprehensively reflected.
[0050] The specific implementation of step S02 is to determine the microservice monitoring sampling period using a dynamic time window algorithm. This algorithm adaptively adjusts the time interval of monitoring sampling according to the previously collected microservice running data. For example, when the running state of the microservice is relatively stable, the sampling period can be appropriately lengthened; and once the microservice state appears dramatic fluctuations, the sampling period will be appropriately shortened to timely capture potential abnormal conditions. By dynamically adjusting the sampling period, the monitoring accuracy can be guaranteed while reducing the data collection overhead.
[0051] The specific implementation of step S03 is to collect the microservice state data of the industrial data microservice cluster based on the aforementioned sampling period. These data not only include the aforementioned resource occupancy indicators, but also include the microservice call success rate, response time, concurrency, timeout times, restart times, error rate, response fluctuation rate, and throughput change rate. These indicators can comprehensively reflect the running condition of the microservice, providing valuable data support for subsequent abnormality analysis.
[0052] The specific implementation of step S04 is to construct a service dependency graph of the industrial data microservice cluster. First, the system analyzes the calling relationship between microservices and establishes a microservice calling path matrix. Each element of the matrix represents the calling weight between two microservice nodes, and the weight value is determined by direct calling relationship and indirect calling relationship. On this basis, the out-degree, in-degree, path number and connection number of each microservice node are also calculated, which are used to describe the status and importance of the microservice node in the whole service dependency graph.
[0053] The specific implementation of step S05 is to calculate the microservice contribution degree matrix of the industrial data microservice cluster based on the microservice calling path matrix. Each element of the matrix represents the contribution degree of one microservice node to another node, and the contribution degree is calculated considering the calling frequency between nodes. The contribution degree matrix can reflect the degree of mutual influence between microservices, providing a basis for subsequent anomaly analysis.
[0054] The specific implementation of step S06 is to calculate the comprehensive contribution value of each microservice node by taking the microservice calling path matrix and the microservice contribution degree matrix as input and using the contribution value calculation equation set. The contribution value calculation equation set includes four parts:
[0055] 1. Microservice node importance equation: This equation is used to evaluate the core degree of the microservice node in the service dependency graph, considering multiple indicators such as out-degree, in-degree, path number and connection number.
[0056] 2. Microservice influence equation: This equation is used to evaluate the influence degree of the microservice node on downstream services, considering factors such as calling success rate, response time, concurrency and timeout number.
[0057] 3. Microservice resource equation: This equation is used to calculate the resource occupation of the microservice node, including CPU usage, memory usage, network bandwidth occupation rate and disk read-write rate.
[0058] 4. Microservice health equation: This equation is used to evaluate the running stability of the microservice node, considering indicators such as restart number, error rate, response fluctuation rate and throughput change rate.
[0059] By calculating the comprehensive contribution value of each microservice node, the system can identify the key microservice nodes in the cluster, providing important basis for subsequent anomaly monitoring and resource allocation.
[0060] The specific implementation of step S07 is to dynamically adjust the monitoring sampling period of the aforementioned key microservice nodes. The period will be less 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, and once an anomaly occurs, it may have a serious impact on the entire system. Therefore, more frequent monitoring of these key nodes is needed to timely discover and respond to potential abnormal situations.
[0061] The specific implementation of step S08 is to establish a time series feature training set of microservice state data and train an anomaly detection model using an improved long short-term memory network structure. First, the system extracts time series features from the microservice state data collected in the aforementioned steps. Then, these time series features and indicators such as node importance, influence, resource occupation, and health status are used as feature weights and input into the improved long short-term memory network for training. The network structure adds multiple feature fusion layers to the original long short-term memory network to fully combine feature information of different dimensions and finally output probability prediction results of abnormal states. In this way, the system can establish an anomaly detection model that is highly adaptive to the industrial data microservice environment.
[0062] The specific implementation of step S09 is to use the aforementioned trained anomaly detection model to analyze real-time data of key microservice nodes and calculate an anomaly propagation matrix. The anomaly propagation matrix describes the degree of influence of an abnormal microservice node on other nodes. 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.
[0063] The specific implementation of step S10 is to calculate a resource allocation matrix based on anomaly warning information, microservice node importance, influence, resource occupation, and health status indicators. This matrix describes how to allocate resources to minimize the impact of anomalies on the system. In the calculation, multiple factors such as anomaly propagation probability, node importance, node influence, and node resource status are considered to obtain the resource allocation weight for each microservice node. Finally, the system outputs this resource allocation matrix to the operation and maintenance personnel to provide decision support for adjusting the resources of the industrial data microservice cluster.
[0064] The equations or calculation processes involved in the present application are described in detail below.
[0065] 1. The construction process of the microservice call path matrix is specifically represented as follows:
[0066] ;
[0067] wherein, is the call path weight of node to node ; is the direct connection relationship of node to node , 1 if there is a connection, otherwise 0; is the direct connection relationship of node to node ; is the path weight coefficient; is the path attenuation coefficient; is the total number of microservice nodes.
[0068] 2. The calculation process of the microservice contribution matrix is specifically represented as follows:
[0069] ;
[0070] wherein, is the contribution of node to node ; is the call frequency of node to node ; is the call frequency of node to node ; is the contribution amplification coefficient; is the contribution reference value.
[0071] 3. The microservice node importance equation is specifically represented as follows:
[0072] ;
[0073] wherein, is the node importance index; 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; is the total number of microservice nodes.
[0074] 4. The microservice influence equation is specifically represented as follows:
[0075] ;
[0076] wherein, is the influence index; is the success rate of invocation; is the maximum success rate reference value; is the average response time; is the maximum response time threshold value; is the concurrency; is the maximum concurrency threshold value; is the timeout number; is the total number of invocations; is the weight coefficient; is the error term.
[0077] 5. The microservice resource equation is specifically expressed as follows:
[0078] ;
[0079] In the formula, is the resource index; is the CPU usage rate; is the CPU threshold value; is the memory usage rate; is the memory threshold value; is the network bandwidth usage rate; is the bandwidth threshold value; is the disk read-write rate; is the disk read-write threshold value; is the weight coefficient; is the error term.
[0080] 6. The microservice health equation is specifically expressed as follows:
[0081] ;
[0082] In the formula, is the health index; is the number of restarts; is the reference number of restarts; is the error rate; is the maximum error rate threshold value; is the response fluctuation rate; is the maximum fluctuation rate threshold value; is the throughput change rate; is the reference change rate; is the weight coefficient; is the error term.
[0083] 7. The calculation process of the anomaly propagation matrix is specifically expressed as follows:
[0084] ;
[0085] In the formula, is the anomaly from the node propagation to the node ; call path weight; node contribution; node health index; node influence index; propagation attenuation coefficient.
[0086] 8. The resource allocation matrix calculation process is specifically represented as follows:
[0087] ;
[0088] wherein, is the resource allocation weight from node to node ; is the abnormal propagation probability; is the importance index of node ; is the influence index of node ; is the resource index of node ; is the allocation adjustment coefficient.
[0089] Parameter acquisition method description: path weight coefficient is obtained through historical call data statistics, ranging from [0.1, 1.0]; path attenuation coefficient is determined through experiments, ranging from [0.01, 0.1]; contribution amplification coefficient is determined through performance tests, ranging from [1.0, 2.0]; contribution baseline value is determined through historical data analysis, ranging from [0.1, 0.3]; weight coefficient is obtained through machine learning training, ranging from [0, 1] and summing to 1; weight coefficient is obtained through performance tests, ranging from [0, 1] and summing to 1; weight coefficient is obtained through resource monitoring data analysis, ranging from [0, 1] and summing to 1; weight coefficient is obtained through health check data analysis, ranging from [0, 1] and summing to 1; all error terms range from [-0.1, 0.1]; propagation attenuation coefficient is obtained through abnormal propagation experiments, ranging from [0.01, 0.1]; allocation adjustment coefficient is obtained through resource tuning experiments, ranging from [0.1, 0.3].
[0090] Equation construction principle: The microservice call path matrix adopts the path calculation method in graph theory, considering direct and indirect call relationships; the microservice contribution degree matrix is based on the normalized calculation of call frequency, introducing an amplification coefficient to enhance the weight of key nodes; the node importance equation adopts multi-dimensional normalized weighted calculation to balance the influence of each index; the influence equation considers the exponential decay characteristics of success rate and the square penalty mechanism of response time; the resource equation adopts nonlinear penalty for CPU and memory usage, reflecting the sensitivity degree when resources are tight; the health equation converts each index to the [0, 1] interval through exponential function and linear transformation; the abnormal propagation matrix combines path weight, node state, and propagation decay characteristics; the resource allocation matrix is based on normalized comprehensive weight calculation to ensure the rationality of resource allocation.
[0091] The derivation process of each equation is explained in detail below.
[0092] 1. Microservice call path matrix derivation process:
[0093] First, construct the basic adjacency matrix representing direct call relationships:
[0094] ;
[0095] Then calculate the k-step call path: ;
[0096] Consider the influence of path length and introduce a decay factor: ;
[0097] Finally, integrate the influence of all paths: ;
[0098] where is obtained by the following steps: statistics the average response time of historical call links ; calculate the standard deviation of response time ; determine the weight according to the formula .
[0099] 2. Microservice contribution degree matrix derivation process:
[0100] First, count the call frequency: ;
[0101] where is the number of calls in the statistical period, is the length of the statistical period.
[0102] Calculate the call success rate: ;
[0103] where is the number of successful calls.
[0104] Combining frequency and success rate: ;
[0105] Final normalization to get contribution: .
[0106] 3. Derivation of microservice node importance equation:
[0107] First calculate the basic indicators of the node:
[0108] Out-degree centrality: ;
[0109] In-degree centrality: ;
[0110] Path centrality: ;
[0111] Connection centrality: ;
[0112] Finally form the importance equation:
[0113] .
[0114] 4. Derivation of microservice influence equation:
[0115] First consider the nonlinear impact of success rate: ;
[0116] Response time adopts square penalty: ;
[0117] Linear impact of concurrent performance: ;
[0118] Linear impact of timeout situation: ;
[0119] Integrate all indicators to get the influence equation:
[0120] .
[0121] 5. Derivation of microservice resource equation:
[0122] Consider the cubic penalty of CPU usage: ;
[0123] Square penalty of memory usage: ;
[0124] Linear impact of network bandwidth: ;
[0125] Linear impact of disk IO: ;
[0126] Finally, the resource equation is formed:
[0127] .
[0128] 6. Microservice health equation derivation process:
[0129] Exponential decay of restart times: ;
[0130] Linear compensation of error rate: ;
[0131] Linear compensation of volatility: ;
[0132] Linear compensation of throughput changes: ;
[0133] Synthesize the health equation:
[0134] .
[0135] The second aspect of the application provides a computer readable storage medium, wherein the computer readable storage medium stores program instructions, and the program instructions are used to execute the industrial data microservice exception monitoring method when running in the computer.
[0136] The third aspect of the application provides an industrial data microservice exception monitoring system, which comprises the computer readable storage medium, and 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 the program instructions stored in the computer readable storage medium.
[0137] Specifically, the principle of the application is to comprehensively monitor the running state of the microservice cluster, accurately identify the exception, and take targeted resource allocation and self-healing measures based on the exception analysis result, so as to finally realize intelligent management of the entire cluster. The specific technical principle is as follows:
[0138] Firstly, the system regularly collects the running data of each microservice node in the microservice cluster, including resource indexes such as CPU usage, memory occupation, network bandwidth, and disk I / O, and performance indexes such as call success rate, response time, concurrency, and error rate. In order to balance the monitoring accuracy and data collection cost, the system adopts a dynamic time window algorithm to dynamically adjust the monitoring sampling period according to the change trend of the microservice state.
[0139] Based on the rich monitoring data collected, the system first constructs a service dependency graph of the microservice cluster. By analyzing the call relationships between each microservice node, it calculates the out-degree, in-degree, path number, and connection number of each node to describe its position in the entire service dependency graph. At the same time, the system also evaluates the contribution of each microservice node to other nodes, reflecting its influence in the entire system.
[0140] With the description of service dependency and node contribution, the system then calculates the importance, resource occupation, and health status of each microservice node. The importance reflects the core degree of the node in the entire system; the resource occupation describes the performance load of the node itself; and the health status evaluates the running stability of the node. These indicators provide important basis for subsequent anomaly analysis and resource allocation.
[0141] Based on the above node feature indicators, the system uses deep learning algorithm to train an anomaly detection model. This model not only learns the time series features of microservice state data, but also integrates multi-dimensional information such as node importance, influence, resource occupation, and health status, so as to more accurately identify various types of abnormal patterns, including resource depletion, performance decline, and fault propagation.
[0142] On the basis of anomaly detection, the system further calculates the propagation matrix of anomalies in the microservice cluster. This matrix describes the influence of a node on other nodes when an anomaly occurs. Combined with the importance and influence indicators of the nodes, it can predict the chain reaction of anomalies and provide decision support for resource allocation.
[0143] A specific embodiment 1 of the present application is provided below, and the specific implementation of each step in embodiment 1 is described in detail as follows: the specific implementation of step S01 is to collect the running data of the industrial data microservice cluster by using a multi-scale data collection method. First, a distributed data collection agent is deployed on each node of the microservice cluster, and the collection agent acquires processor occupancy rate data in real time through a performance counter interface. Specifically, the processor performance counter is read by using a hardware interrupt method, and the processor usage rate value is recorded once every 100 milliseconds. When the processor occupancy rate exceeds 85%, data reporting is triggered. Second, the collection agent monitors the memory occupancy situation through a memory management interface, and the memory page usage situation is counted by using a page table scanning method. The memory usage rate value is recorded once every 500 milliseconds, and when the memory occupancy rate exceeds 80%, data reporting is triggered. Third, the collection agent monitors the bandwidth occupancy situation through a network interface, and the bandwidth usage situation is counted by using a network data packet capture method. The bandwidth usage rate value is recorded once every 200 milliseconds, and when the bandwidth occupancy rate exceeds 75%, data reporting is triggered. Finally, the collection agent monitors the read-write rate through a disk interface, and the read-write operation times are counted by using a disk performance counter. The disk read-write rate value is recorded once every 1000 milliseconds, and when the read-write rate exceeds 70% of the maximum throughput of the disk, data reporting is triggered. All the collected data is transmitted to the data aggregation center through a secure channel, and the data aggregation center performs cleaning, deduplication and formatting processing on the collected data to form a standard microservice running data set. The purpose of this step is to establish a basic monitoring system for the industrial data microservice cluster, and to provide data support for subsequent anomaly detection.
[0144] The specific implementation of step S02 is to determine the first monitoring sampling period based on the microservice running data by using an adaptive dynamic time window algorithm. First, time series analysis is performed on the collected microservice running data to calculate the change trend of the processor occupancy rate, the memory occupancy rate, the network bandwidth occupancy rate and the disk read-write rate. The fluctuation degree of each index is calculated by using an exponential weighted moving average method, and the fluctuation degree calculation formula is wherein is the current fluctuation value, is the current index value, is a smoothing coefficient, and the value range is 0.1 to 0.3. Then, based on the fluctuation degree of each index, the system stability index is calculated by using a fuzzy comprehensive evaluation method, and the stability index calculation formula is wherein is the weight of each index, is the fluctuation degree of each index. Next, the time window size is dynamically adjusted according to the system stability index, and the time window adjustment formula is wherein is the adjusted time window size, is the reference time window size, and the value is 60 seconds, is a coefficient, and the value range is 0.5 to 2.0, is a system stability index. Finally, the first monitoring sampling period is determined based on the adjusted time window size, and the sampling period calculation formula is wherein is the first monitoring sampling period, is the time window size, is the number of sampling points, and the value range is generally 20 to 50. The purpose of this step is to realize the dynamic optimization of the monitoring sampling period, while ensuring the monitoring accuracy and reducing the system overhead.
[0145] The specific implementation of step S03 is to collect microservice state data based on the first monitoring sampling period. First, a distributed state collector is deployed, and the collector obtains the running state information of the microservice through an application programming interface. For processor occupancy rate data, a multi-core load balancing algorithm is used to calculate the usage of each core, and the calculation formula is wherein is the overall processor usage, is the weight of each core, is the usage of each core. For memory occupancy rate data, a memory pool monitoring method is used to calculate the usage of heap memory and stack memory, and the calculation formula is wherein is the memory usage, is the heap memory usage, is the stack memory usage, is the total memory capacity. For network bandwidth occupancy rate data, a traffic calculation algorithm is used to calculate the usage of uplink and downlink bandwidth, and the calculation formula is wherein is the bandwidth usage, is the uplink traffic, is the downlink traffic, is the total bandwidth capacity. For disk read / write rate data, a disk performance monitoring method is used to calculate the read / write operation rate, and the calculation formula is wherein is the disk usage, is the read rate, is the write rate, is the maximum read / write rate. For microservice call success rate data, a request tracking method is used to calculate the proportion of successful requests, and the calculation formula is wherein is the call success rate, is the number of successful requests, is the total number of requests. For microservice response time data, a timestamp recording method is used to calculate the request processing time, and the calculation formula is wherein is the average response time, is the request end time, is the request start time. For the microservice concurrency number data, the active connection number is counted by using the connection pool monitoring method, and the calculation formula is , wherein is the concurrency number, is the active connection number of each connection pool. For the microservice timeout number data, the timeout request number is counted by using the timeout detection algorithm, and the calculation formula is , wherein is the timeout number, is the request processing time, is the timeout threshold, is the indicator function. For the microservice restart number data, the service restart number is counted by using the process monitoring method, and the calculation formula is , wherein is the restart number, is the restart number in the time period. For the microservice error rate data, the error request proportion is counted by using the error log analysis method, and the calculation formula is , wherein is the error rate, is the error request number. For the microservice response fluctuation rate data, the fluctuation degree of the response time is counted by using the variance analysis method, and the calculation formula is , wherein is the response fluctuation rate, is the request response time. For the microservice throughput change rate data, the change of the request processing capacity is counted by using the throughput monitoring method, and the calculation formula is , wherein is the throughput change rate, is the current throughput, is the last period throughput. The purpose of this step is to comprehensively collect the running state data of the microservice, and provide a data basis for subsequent anomaly detection and analysis.
[0146] The specific implementation of step S04 is to construct a service dependency relationship graph of the industrial data microservice cluster. First, the initial dependency relationship is constructed by using the data of the service registry, and the calling relationship between the microservices is obtained by analyzing the service registration information. Then, the dynamic dependency relationship is supplemented by using the link tracking technology, and the service calling relationship graph is perfected by analyzing the request link information. Next, the topological characteristics of the microservice nodes are calculated by using the graph theory algorithm, including the out-degree value, the in-degree value, the path number and the connection number. The out-degree value calculation adopts the outward edge statistics method, and the calculation formula is , wherein is the node out-degree, is the direct connection relationship between nodes. The in-degree value is calculated using the in-edges statistics method, and the calculation formula is wherein is the node in-degree. The path quantity is calculated using the depth-first search algorithm, and the calculation formula is wherein is the node path quantity. The connection quantity is calculated using the breadth-first search algorithm, and the calculation formula is wherein is the node connection quantity. Finally, based on the calculated topological features, the microservice call path matrix is constructed, and the matrix element calculation formula is wherein is the call path weight between nodes, is the path weight coefficient, is the path attenuation coefficient. The purpose of this step is to construct the structural model of the microservice cluster, providing a basis for subsequent contribution analysis.
[0147] The specific implementation of step S05 is to calculate the microservice contribution matrix based on the microservice call path matrix. First, the call frequency between microservice nodes is calculated using the call frequency statistics method, and the call frequency data is obtained by analyzing the request log. Then, the relative contribution between nodes is calculated using the normalization processing method, and the calculation formula is wherein is the node contribution degree, is the call frequency, is the contribution amplification coefficient, is the contribution reference value. Next, the contribution calculation result is optimized using the matrix iteration method, and the iteration formula is wherein is the contribution value of the iteration, is the iteration weight, and the value range is 0.1 to 0.3. Finally, the final contribution matrix is determined using the convergence determination method, and the determination condition is wherein is the Frobenius norm of the matrix, is the convergence threshold, and the value is 0.001. The purpose of this step is to quantify the influence relationship between microservice nodes, providing a basis for subsequent anomaly detection.
[0148] The specific implementation of step S06 is to input the microservice call path matrix and the microservice contribution matrix into the contribution value calculation equation set to calculate the comprehensive contribution value of the microservice node. First, the node importance is calculated using the multi-index weighting method, and the calculation formula is wherein is the node importance index, to are weight coefficients, is an error term. Then, the node influence is calculated by using the nonlinear combination method, and the calculation formula is wherein is the influence index, to is the weight coefficient, is an error term. Next, the node resource index is calculated by using the resource utilization evaluation method, and the calculation formula is wherein is the resource index, to is the weight coefficient, is an error term. Then, the node health index is calculated by using the health state evaluation method, and the calculation formula is wherein is the health index, to is the weight coefficient, is an error term. Finally, the comprehensive contribution value of the node is calculated by using the comprehensive score method, and the calculation formula is wherein is the comprehensive contribution value, to is the comprehensive weight coefficient, and the value range is 0 to 1 and the sum is 1. Based on the calculated comprehensive contribution value, the threshold screening method is used to identify the key microservice node, and the judgment condition is wherein is the contribution value threshold, which is determined by historical data analysis, and the general value is 0.7 to 0.8. The purpose of this step is to identify the key nodes in the microservice cluster, providing targets for subsequent key monitoring.
[0149] The specific implementation of step S07 is to dynamically adjust the monitoring sampling period for the key microservice node. First, the ideal sampling period of the key node is calculated by using the adaptive sampling algorithm, and the calculation formula is wherein is the second monitoring sampling period, is the first monitoring sampling period, , , , is the adjustment coefficient, and the 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 bearing capacity, and the constraint condition is wherein is the minimum allowed sampling period, which is determined according to the system performance, and the general value is 1 second. Next, the sampling jitter control method is used to avoid frequent changes in the sampling period, and the control formula is wherein is the smoothed sampling period, is the last sampling period, is a smoothing coefficient, and its value ranges from 0.6 to 0.8. Finally, a distributed clock synchronization method is used to ensure the consistency of the sampling time sequence of multiple nodes, and the synchronization error is controlled within the millisecond level. The purpose of this step is to achieve fine-grained monitoring of key nodes and improve the timeliness of anomaly detection.
[0150] The specific implementation of step S08 is to establish a training set of time sequence characteristics of microservice state data, and train an anomaly detection model using a deep learning algorithm. First, a time series decomposition method is used to extract the trend, period and random components of the microservice state data, and the decomposition formula is wherein is the original time sequence data, is the trend component, is the periodic component, is the random component. Then, a feature engineering method is used to construct training features, including statistical features, frequency domain features and time domain features. Statistical features include mean, variance, skewness, kurtosis, etc., and the calculation formula is . Frequency domain features use Fourier transform to extract frequency spectrum features, and the calculation formula is . Time domain features use an autoregressive model to extract time sequence correlation, and the calculation formula is wherein is the autoregressive order. Next, a feature fusion method is used to take the microservice node importance index, influence index, resource index and health index as feature weights, and the fusion formula is wherein is the feature weight vector, is the feature vector, is the element-wise multiplication. Finally, an improved long short-term memory network structure is used to train the anomaly detection model, which 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 an attention mechanism to extract time sequence features, and the attention weight calculation formula is wherein is the hidden state, and are weight matrices. The second feature fusion layer uses a residual connection structure to fuse the node importance index, and the fusion formula is wherein is the fusion weight matrix. The third feature fusion layer uses a gating mechanism to fuse other indexes, and the gating formula is wherein is a sigmoid function, is a gating weight matrix, is the bias vector. The hidden layer adopts a bidirectional long short-term memory network structure to capture the time-dependent relationship, and the state update formula is the standard long short-term memory network update formula. The output layer adopts a fully connected layer and a softmax function to output the abnormal probability, and the calculation formula is wherein is the output weight matrix, is the final hidden state. The model training adopts a cross-entropy loss function and an Adam optimizer, the learning rate is set to 0.001, the batch size is 64, and the training round is 100. The purpose of this step is to establish an abnormal detection model suitable for the industrial data micro-service environment.
[0151] The specific implementation of step S09 is to use the abnormal detection model to analyze the state data of the key micro-service nodes in real time. First, the data preprocessing method is used to standardize the real-time state data, and the processing formula is wherein 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 the training. Next, the trained model is used to calculate the abnormal probability, and the abnormal detection is triggered when the abnormal probability exceeds the threshold. Finally, the abnormal propagation analysis method is used to calculate the abnormal propagation matrix, and the calculation formula is wherein is the abnormal propagation probability, is the propagation attenuation coefficient. Based on the abnormal propagation matrix, the abnormal warning information is generated, and the warning information includes the abnormal node identification, the abnormal type, the influence range and the severity. The purpose of this step is to realize the real-time detection and warning of micro-service abnormalities.
[0152] The specific implementation 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, and the evaluation indexes include processor demand, memory demand, bandwidth demand and disk demand. Then, the resource priority calculation method is used to determine the resource allocation order, and the calculation formula is wherein is the resource allocation weight, is the allocation adjustment coefficient. Next, the resource scheduling algorithm is used to generate the resource allocation scheme, and the scheduling algorithm considers the system resource capacity constraint and the service quality requirement. Finally, the resource allocation scheme is output to the operation and maintenance personnel, and the scheme content includes the resource allocation scheme, the expected effect evaluation and the operation guidance instruction. The purpose of this step is to realize the intelligent deployment of micro-service cluster resources, and improve the availability and stability of the system.
[0153] In order to effectively deal with these microservice exception problems, the enterprise decides to adopt the industrial data microservice exception monitoring method proposed by the present application. This method can comprehensively monitor the running state of the microservice cluster, quickly find and locate the exception, and also provide an automatic fault repair scheme. The following is the specific implementation process of this method in the microservice system of the enterprise.
[0154] However, as the business scale continues to expand, the microservice system also becomes more and more complex. Occasionally, some microservice nodes will fail or performance will decline, which will affect the entire production process. For example, in the product quality inspection link, if the CPU resource of the key material detection service is exhausted, causing the response time to increase sharply, it may cause product retention and cause the production line to stop. Or, in the raw material procurement link, if the memory leak of the supply chain management service occurs, causing frequent restarts, it will cause order processing delays and affect the timely supply of raw materials. Once such problems occur, they will cause great losses to steel production activities.
[0155] In order to effectively deal with these microservice exception problems, the enterprise decides to adopt the industrial data microservice exception monitoring method proposed by the present application. This method can comprehensively monitor the running state of the microservice cluster, quickly find and locate the exception, and also provide an automatic fault repair scheme. The following is the specific implementation process of this method in the microservice system of the enterprise.
[0156] I. Data collection and exception monitoring
[0157] First, the system will periodically collect the running state of the industrial data microservice cluster of the enterprise. 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 the monitoring accuracy and data collection overhead, the system uses a dynamic time window algorithm to dynamically adjust the monitoring sampling period according to the trend of the microservice state.
[0158] For example, in the material detection service of the production manufacturing link, the system will collect its CPU usage, memory usage, response time, etc. every 30 seconds. When it is monitored that some indicators fluctuate sharply, such as CPU usage exceeding 90% for 5 minutes in a row, the system will automatically shorten the sampling period to 15 seconds to more accurately capture the development of the abnormal situation. In the relatively stable service such as the supply chain management service, the system will appropriately relax the sampling period to 1 minute to reduce unnecessary data collection overhead. As shown in Figure 2
[0159] After collecting these rich microservice runtime data, the system will then construct a service dependency graph of the enterprise microservice system. By analyzing the calling relationship between each microservice node, the out-degree, in-degree, path number, and connection number of each node are calculated. For example, the out-degree of the material detection service is 8, indicating that it is called by 8 other services; the in-degree of the supply chain management service is 12, indicating that it depends on 12 upstream services. These indicators reflect the status and importance of each microservice node in the entire system.
[0160] At the same time, the system will also evaluate the contribution of each microservice node to other nodes. By analyzing the calling frequency between nodes, the contribution of node to node can be calculated:
[0161] ;
[0162] where is the calling frequency from node to node , is the total number of microservice nodes, is the contribution amplification coefficient, is the contribution baseline value. This indicator reflects the influence of each microservice node in the entire system.
[0163] With the description of service dependency and node contribution, the system will then comprehensively calculate the importance, resource occupation, and health status of each microservice node. Among them, the node importance reflects its core degree in the service dependency graph, which can be calculated by the following formula:
[0164] ;
[0165] where is the node out-degree, is the node in-degree, is the node path number, is the node connection number, is the weight coefficient, is the error term. As shown in Figure 3 , the calling relationship between the core microservices of the enterprise is displayed.
[0166] The node resource occupation then considers the CPU usage, memory occupation, network bandwidth utilization, and disk I / O indicators:
[0167] ;
[0168] where, CPU usage, memory usage, network bandwidth utilization, disk I / O rate, are the upper threshold values of the corresponding resources, are the weight coefficients, are the error terms.
[0169] Node health covers indicators such as the number of restarts, error rate, response fluctuation rate, and throughput change:
[0170] ;
[0171] where, is the number of restarts, is the error rate, is the response fluctuation rate, is the throughput change rate, are the reference values of the corresponding indicators, are the weight coefficients, are the error terms.
[0172] Based on the above node characteristic indicators, the system uses a deep learning algorithm to train an anomaly detection model. This model not only learns the time series characteristics of microservice state data, but also integrates multi-dimensional information such as node importance, influence, resource occupation, and health status, so as to more accurately identify various types of abnormal patterns, including resource depletion, performance decline, and fault propagation.
[0173] For example, in a material detection service, the system monitors that the CPU usage continues to rise, the response time increases significantly, and the node importance and influence are high. These characteristics comprehensively reflect the possibility of resource depletion anomalies in this service. At the same time, the memory occupation of the supply chain management service is rising, and the number of restarts is frequent, which may be a health anomaly caused by memory leakage. Based on these feature data, the anomaly detection model can accurately identify these two types of anomalies.
[0174] II. Anomaly analysis and resource allocation
[0175] After identifying the abnormal problem, the system will further calculate the propagation matrix of the anomaly in the microservice cluster. This matrix describes the influence degree of a node when an anomaly occurs on it to other nodes. The specific calculation formula is as follows:
[0176] ;
[0177] where, is the node to node Call path weight, For nodes For nodes Contribution For nodes Health indicators For nodes Influence metrics This is the propagation attenuation coefficient.
[0178] For example, when a resource depletion anomaly occurs in the materials testing service, due to its high importance and influence, the anomaly propagation matrix shows that it will severely impact downstream product quality inspection services, product outbound services, and may even cause the entire production line to shut down. While a memory leak anomaly in the supply chain management service may have a smaller impact on its own, it can still create a chain reaction within the system through the call chain because it is relied upon by multiple upstream services.
[0179] With this anomaly propagation matrix, the system can calculate the critical microservices that require priority resource allocation based on the importance, influence, and resource consumption of each node. Specific resource allocation weights... It can be obtained through the following formula: ;
[0180] in, For nodes Importance index For nodes Influence metrics For nodes Resource usage indicators An allocation adjustment coefficient is introduced. This formula reflects the following principles: nodes with higher anomaly propagation probability should receive more resource support; the greater the importance and influence of a node, the more resources it should receive; the node's own resource utilization is also one of the bases for resource allocation; an allocation adjustment coefficient is introduced. To balance the weights of different factors.
[0181] like Figure 4 As shown, the anomaly propagation coefficients between service nodes are illustrated. Figure 5 As shown, the final resource allocation weights are calculated based on node importance, influence, and resource consumption.
[0182] For example, for the resource exhaustion exception of the material detection service, since the service has high importance and influence, and its own resource occupation is also large, the system will give it a higher resource allocation weight. Although the supply chain management service has low resource occupation, the system will also appropriately increase its resource allocation weight due to its key position in the entire system, to prevent the exception from further spreading.
[0183] Through this resource allocation method based on exception propagation and node characteristics, the system can maximize the mitigation of the impact of the exception on the entire production process. At the same time, the system will automatically trigger a series of exception repair measures. For example, for the CPU resource exhaustion of the material detection service, the system will automatically perform horizontal expansion to increase the number of computing nodes; for the memory leak of the supply chain management service, the system will automatically restart the service instance and notify the R&D team to analyze the code problem.
[0184] 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 fault patterns 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 solved, the system will provide a detailed root cause analysis report and repair scheme for reference by the operation and maintenance personnel.
[0185] In summary, through the above series of measures of exception monitoring, analysis and resource allocation, the industrial data micro-service system of the enterprise realizes comprehensive intelligent management. The system can timely discover and locate various exceptions, take targeted resource allocation and self-healing measures according to node characteristics and exception propagation, and maximizes the stable operation of the entire production process.
[0186] III. Performance Optimization and Continuous Improvement
[0187] In addition to exception monitoring and fault repair, the method of the present invention also includes a series of performance optimization and continuous improvement measures, further improving the reliability of the enterprise micro-service system.
[0188] First, the system will regularly perform end-to-end performance testing and optimization for 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, monitor resource indicators such as CPU, memory, network, and disk throughout the entire process, as well as performance indicators such as response time and throughput of key services. Once a performance bottleneck is found, such as an increase in the response time of the supply chain management service, the system will automatically analyze the 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.
[0189] In addition, the system also regularly conducts a comprehensive assessment of the reliability of the entire microservice cluster. Specifically, the system calculates availability indicators, stability indicators, responsiveness indicators, resource utilization indicators, scalability indicators, and compares them with preset target values. At the same time, the system also simulates some extreme scenarios, such as large-scale concurrent access, multi-node failure, etc., to evaluate the performance of the cluster in these situations. Based on the reliability evaluation results, the system outputs a detailed report pointing out the problems in the reliability of the cluster for the reference of the operation and maintenance personnel.
[0190] At the same time, the system also establishes a comprehensive operation and maintenance knowledge base and automation scripts to improve the efficiency of daily inspection, fault diagnosis, capacity planning, etc. For various operation and maintenance problems encountered in the past, the system will record their symptom characteristics, root cause analysis and solutions, etc., forming standardized operation and maintenance cases. In the future, once a new problem occurs, the system can quickly find similar historical cases and automatically call the corresponding repair scripts. In addition, the system also writes a large number of automated inspection and capacity planning scripts, greatly reducing the cost of manual intervention.
[0191] As shown in Figure 6 , the response time and throughput of the key services before and after performance optimization are shown. In general, through the above comprehensive performance optimization, reliability management and automated operation and maintenance methods, the industrial data microservice system of the enterprise has continuously improved its stability and availability. The system can quickly find and repair abnormal problems, while continuously optimizing the performance of business critical links to ensure smooth operation of the entire production activity. This not only greatly improves production efficiency, but also greatly reduces economic losses due to system failures.
[0192] It should be noted that the variables involved in the present application are explained in detail as shown in the following table 1.
[0193] Table 1 Variable explanation table
[0194]
[0195] The above is merely a specific implementation of the present application, but the scope of protection of the present application is not limited thereto. Any skilled person in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the scope of protection of the present application.
Claims
1. An industrial data microservice anomaly monitoring method, characterized in that, The method comprises the following steps: collecting microservice running data of an industrial data microservice cluster, determining a first monitoring sampling period based on the microservice running data; Collecting microservice state data, constructing a service dependency graph and generating a microservice call path matrix; Based on the microservice call path matrix, a microservice contribution degree matrix is calculated; From the microservice call path matrix, the microservice node out-degree value, the microservice node in-degree value, the microservice node path quantity, and the microservice node connection quantity are obtained; From the microservice state data, the microservice call success rate data, the microservice response time data, the microservice concurrency number data, the microservice timeout number data, the microservice processor occupancy rate data, the microservice memory occupancy rate data, the microservice network bandwidth occupancy rate data, the microservice disk read-write rate data, the microservice restart number data, the microservice error rate data, the microservice response fluctuation rate data, and the microservice throughput change rate data are obtained; The microservice node out-degree value, the microservice node in-degree value, the microservice node path quantity, the microservice node connection quantity, the microservice call success rate data, the microservice response time data, the microservice concurrency number data, the microservice timeout number data, the microservice processor occupancy rate data, the microservice memory occupancy rate data, the microservice network bandwidth occupancy rate data, the microservice disk read-write rate data, the microservice restart number data, the microservice error rate data, the microservice response fluctuation rate data, the microservice throughput change rate data, and the microservice contribution degree matrix input contribution value calculation equation group are input to obtain a microservice comprehensive contribution value, and the contribution value calculation equation group evaluates the core degree, the downstream influence degree, the resource occupation situation, and the running stability of the microservice node through calculating the microservice node importance index, the microservice influence index, the microservice resource index, and the microservice health index; Based on the microservice comprehensive contribution value, a key microservice node is identified and adjusted to a second monitoring sampling period; An abnormality detection model is trained, and abnormality early warning information is generated; Based on the abnormality early warning information, a resource allocation strategy is adjusted; Each element in the contribution degree matrix represents the contribution degree of one microservice node to another node, and the contribution degree is calculated considering the call frequency between nodes, and the contribution degree reflects the mutual influence degree between microservices; The contribution value calculation equation group comprises 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; The microservice comprehensive contribution value is calculated comprehensively from the microservice node importance index, the microservice influence index, the microservice resource index, and the microservice health index; The input of the microservice node importance equation comprises the microservice node out-degree value, the microservice node in-degree value, the microservice node path quantity, and the microservice node connection quantity; The input of the microservice influence equation includes microservice call success rate data, microservice response time data, microservice concurrency number data, and microservice timeout number data; The input of the microservice resource equation includes microservice processor occupancy rate data, microservice memory occupancy rate data, microservice network bandwidth occupancy rate data, and microservice disk read-write speed data; The input of the microservice health equation includes microservice restart number data, microservice error rate data, microservice response fluctuation rate data, and microservice throughput change rate data.
2. The industrial data microservice anomaly monitoring method of claim 1, wherein, The second monitoring sampling period is less than the first monitoring sampling period; a time sequence feature training set of the microservice state 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.
3. A computer-readable storage medium, characterized in that, The computer readable storage medium stores program instructions, and the program instructions are used for executing the industrial data microservice anomaly monitoring method in any one of claims 1-2 when running in the computer.
4. An industrial data microservice anomaly monitoring system, comprising: 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 a microprocessor for executing the program instructions stored in the computer readable storage medium is arranged in the system.
Citation Information
Patent Citations
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