Method and system for index anomaly detection of micro-service architecture

Through the indicator abnormality detection method of the microservice architecture, the power grid data is collected and processed in real time, and the machine learning algorithm and status classification model are built, which solves the problem of the power grid monitoring system lacking effective early warning and strategy adjustment after abnormal detection, and realizes the real-time power grid system Monitoring and exception handling improve operational efficiency and reliability.

CN119494064APending Publication Date: 2025-02-21GUIZHOU POWER GRID CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411490317.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

The existing power grid monitoring system lacks effective early warning and policy adjustment mechanisms after abnormal detection, which makes it difficult to respond and recover quickly in abnormal states.

Method used

The index abnormality detection method of the microservice architecture is adopted, and the power grid system data is collected in real time, multi-modal data processing and feature extraction is carried out, machine learning algorithms are built and trained, normal and abnormal state classification models are established, and hierarchical early warning and strategy adjustment are carried out.

Benefits of technology

Real-time monitoring and abnormal detection of the operating status of the power grid system are realized. Through hierarchical early warning and policy adjustment, abnormal situations are responded in a timely manner, the operating status of the power grid system is optimized, and the operating efficiency and reliability of the power grid system are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119494064A_ABST
    Figure CN119494064A_ABST
Patent Text Reader

Abstract

The invention discloses an index anomaly detection method and system for a micro-service architecture, and relates to the technical field of smart power grids, and the method comprises the steps: collecting power grid system data in real time, carrying out the multi-modal data processing of the collected data, carrying out the feature extraction of the processed data through a deep learning model, and carrying out the feature extraction of the processed data; constructing and training a machine learning algorithm by using the extracted features, establishing a normal and abnormal state classification model, inputting newly collected data into the normal and abnormal state classification model for state judgment, when an abnormal state is detected, performing graded early warning and adjusting a strategy, and predicting the abnormal state by using a micro-service architecture index anomaly prediction algorithm. And predicting whether the system is abnormal or not, and performing strategy adjustment and parameter adjustment according to a prediction result. The method solves the problem that an existing power grid monitoring system lacks an effective early warning and strategy adjustment mechanism after anomaly detection, and is difficult to respond and recover quickly in an abnormal state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart grid technology, and in particular to a method and system for detecting anomalies of indicators in a microservice architecture. Background Art

[0002] With the continuous expansion of the scale and increase of complexity of power systems, the demand for real-time monitoring and anomaly detection of power grid systems is becoming increasingly urgent. Traditional power grid monitoring methods often rely on manual operation and experience judgment, which are inefficient and difficult to adapt to the complex and changing power grid environment; therefore, power grid monitoring systems based on automation and intelligence have become a research hotspot.

[0003] The existing related technologies have achieved remarkable results in the field of power grid monitoring, but there are still some shortcomings. First, most of the existing power grid monitoring systems use a single data processing and analysis method, which cannot fully utilize the multimodal data of the power grid system. Secondly, the existing power grid monitoring systems mainly rely on traditional machine learning algorithms for anomaly detection. These algorithms often show low accuracy and real-time performance when faced with large-scale and high-dimensional data. In addition, the existing power grid monitoring systems lack effective early warning and strategy adjustment mechanisms after anomaly detection, which makes it difficult to respond and recover quickly under abnormal conditions. Summary of the invention

[0004] In view of the above-mentioned existing problems, the present invention provides a method and system for indicator anomaly detection in a microservice architecture, which is used to solve the problem that the existing power grid monitoring system lacks an effective early warning and strategy adjustment mechanism after anomaly detection, resulting in difficulty in rapid response and recovery under abnormal conditions.

[0005] In order to solve the above technical problems, a method for detecting anomaly indicators in microservice architecture is proposed, including:

[0006] Collect the first power grid system data in real time, process the first power grid data to obtain the second data, and extract features from the second data to obtain the third feature data; use the third feature data to build and train the algorithm, and establish a fourth state classification model, and use the fourth state analysis model to analyze the abnormal state, and perform graded warnings and adjust strategies; use the fifth indicator abnormality prediction algorithm to predict whether the system will have abnormalities, and make strategy adjustments and parameter adjustments based on the prediction results.

[0007] As a preferred solution of the method for detecting indicator anomalies in the microservice architecture described in the present invention, the first power grid system data includes power grid operation data, environmental data, equipment status data, user usage data, geographic information system data, socio-economic data and communication data.

[0008] As a preferred solution of the method for detecting anomalies of indicators in the microservice architecture described in the present invention, the feature extraction of the second data to obtain the third feature data includes preprocessing and data fusion of the first power grid data collected in real time to obtain the second data, and extracting features from the second data using a deep learning model to obtain the third feature data.

[0009] The data processing of the first power grid data to obtain the second data includes cleaning, normalization and standardization; the data fusion includes feature-level fusion and decision-level fusion; the deep learning model includes activating a neural network and performing convolution operations and pooling operations;

[0010] The normalization formula is:

[0011]

[0012] Among them, X is the original eigenvalue, X min is the minimum value of the feature, X max is the maximum value of the feature, X norm is the normalized eigenvalue;

[0013] The standardized formula is:

[0014]

[0015] Among them, X std is the standardized eigenvalue, X is the original eigenvalue, μ is the mean of the feature, and σ is the standard deviation of the feature;

[0016] The deep learning model includes activating a neural network and performing convolution operations and pooling operations;

[0017] The activation neural network formula is expressed as:

[0018]

[0019] Among them, x is the input data, f(x) is the activation function, and e is the base of the natural logarithm;

[0020] The convolution operation formula is expressed as:

[0021]

[0022] Where W is the convolution kernel, x is the input data, * is the convolution operation, m is the number of rows of the feature map of the input data, n is the number of columns of the feature map of the input data, and b and c represent the position index;

[0023] The pooling operation formula is expressed as:

[0024] P(a)=max(a)

[0025] Among them, a is the data within the pooling window, and P(a) is the data after pooling.

[0026] As a preferred solution of the method for detecting abnormal indicators of the microservice architecture described in the present invention, wherein: the step of constructing and training the algorithm using the third feature data includes extracting the third feature data, constructing a feature function of a machine learning algorithm, and training the machine learning algorithm.

[0027] As a preferred solution of the method for detecting abnormal indicators of the microservice architecture described in the present invention, wherein: the fourth state classification model includes constructing and training a machine learning algorithm using the third feature data, establishing a fourth state classification model, inputting the newly collected first power grid system data into the output value of the normal and abnormal state classification model for state judgment, and giving an early warning when an abnormal state is detected.

[0028] As a preferred solution of the method for detecting abnormal indicators of the microservice architecture described in the present invention, wherein: the hierarchical early warning includes setting thresholds according to the output value of the fourth state classification model and historical state data, and dividing the abnormal state into five levels; the set thresholds are 0.7, 0.5, 0.2, and 0.1.

[0029] Among them, the five levels of abnormal state include: when G(y)>0.7, it means the data is in a normal state, maintaining the existing monitoring and operation processes, and regularly performing system health checks; when 0.5 < G(y) ≤ 0.7, it means the data has fluctuations and is in a slightly abnormal state, and monitoring should be strengthened, data and events should be recorded, the cause of the abnormality should be analyzed, and consideration should be given to whether it is necessary to adjust the early warning threshold; when 0.2 < G(y) ≤ 0.5, it means the data has abnormal characteristics and is in a moderately abnormal state, and the monitoring level should be increased, the data collection and analysis frequency should be increased, the cause of the abnormality should be checked, and evaluation and processing should be carried out; when 0.1 < G(y) ≤ 0.2, it means the data has a high degree of abnormality and the system has problems, and the emergency plan should be immediately activated, investigations and analyses should be carried out, the system functions should be suspended, and repair measures should be taken; when G(y) ≤ 0.1, it means the data is severely abnormal and the system has a fault, and immediate emergency measures should be taken to conduct a comprehensive problem investigation and repair.

[0030] As a preferred solution of the method for detecting abnormal indicators of the microservice architecture described in the present invention, wherein: the fifth abnormal indicator prediction algorithm includes constructing a microservice architecture abnormal indicator prediction algorithm according to the extracted features, predicting the system state, and making policy adjustments and parameter adjustments according to the prediction results.

[0031] The formula for the microservice architecture abnormal indicator prediction algorithm is:

[0032]

[0033] Among them, S(Y) is the anomaly prediction score of the microservice architecture metrics, Y is the metrics vector of the microservice architecture, R is the prediction time window, L is the number of metrics, O is the number of complex information filtering functions, τ H is the decay rate of the H-th metric, δ H (Y H , r) is the feature function of the H-th metric at time r, ε(Y, r) is the normalization function, is the K-th complex information filtering function, and e is the base of the natural logarithm.

[0034] When S(Y) ≥ 1, it indicates that the system is in the normal operation mode, maintaining the current microservice architecture and policies, and performing periodic monitoring; when 0 < S(Y) < 1, it indicates that the system is in the abnormal mode, increasing the monitoring frequency, starting the detailed analysis process and implementing partial degradation policies, and performing parameter adjustment until S(Y) reaches the normal level.

[0035] Another object of the present invention is to provide a system for detecting anomalies in the metrics of a microservice architecture, which can effectively give early warnings and adjust strategies after anomaly detection in the power grid monitoring system; the system of the present invention collects power grid system data in real time, performs multi-modal data processing, extracts features using a deep learning model, constructs and trains a machine learning algorithm using the extracted features, establishes a normal and abnormal state classification model, judges the state of newly collected data, and gives hierarchical early warnings and adjusts strategies when anomalies are detected, solving the problem that the existing power grid monitoring system lacks an effective early warning and strategy adjustment mechanism after anomaly detection, resulting in difficulty in quickly responding and recovering in abnormal states.

[0036] As a preferred solution of the system for detecting anomalies in the metrics of the microservice architecture according to the present invention, it is characterized in that it includes a data collection and preprocessing module, a feature extraction module, a machine learning algorithm construction and training module, a hierarchical early warning module, and a metrics anomaly prediction module;

[0037] The data collection and preprocessing module is used to collect power grid system data in real time and perform preprocessing;

[0038] The feature extraction module is used to input the power grid system data into a deep learning model and extract data features therefrom;

[0039] The machine learning algorithm construction and training module is used to construct a machine learning algorithm feature function using the extracted data features and train the machine learning algorithm using the data;

[0040] The hierarchical warning module is used to construct a normal and abnormal state classification model based on the machine learning algorithm feature function, and to judge the state of the newly collected data, set the threshold value according to the output value of the normal and abnormal state classification model and the historical state data, and classify the abnormal state into five levels for hierarchical warning;

[0041] The indicator anomaly prediction module is used to construct a microservice architecture indicator anomaly prediction algorithm based on the extracted features, predict the system status, and make strategy adjustments and parameter adjustments based on the prediction results.

[0042] A computer device includes a memory and a processor, wherein the memory stores a computer program, and is characterized in that when the processor executes the computer program, the steps of the method described in the method for detecting anomalies of indicators in a microservice architecture are implemented.

[0043] A computer-readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the steps of the method described in the method for detecting anomalies of indicators in a microservice architecture are implemented.

[0044] The beneficial effects of the present invention are as follows: the present invention collects power grid system data in real time, performs multimodal data processing, uses deep learning models to extract features, builds and trains machine learning algorithms, and establishes normal and abnormal state classification models to achieve real-time monitoring of the operating status of the power grid system and abnormality detection; through hierarchical early warning and adjustment strategies, abnormal situations are responded to in a timely manner to optimize the operating status of the power grid system; at the same time, the microservice architecture indicator abnormality prediction algorithm is used to predict whether the system will have abnormalities, and early warnings and countermeasures are taken to reduce the impact of abnormal situations on the power grid system. The present invention improves the operating efficiency and reliability of the power grid system, meets the business needs of the power grid system, and improves user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work, among which:

[0046] Figure 1 An overall flow chart of a method for detecting anomalies in indicators of a microservice architecture provided by an embodiment of the present invention.

[0047] Figure 2 A system solution flow chart for indicator anomaly detection in a microservice architecture provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0049] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0050] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it an embodiment that is mutually exclusive with other embodiments, either individually or selectively.

[0051] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.

[0052] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0053] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0054] Example 1, reference Figure 1 , which is the first embodiment of the present invention, and provides a method for detecting anomalies of indicators in a microservice architecture, including:

[0055] S1: Collect power grid system data in real time, perform multimodal data processing on the collected data, and extract features from the processed data using a deep learning model;

[0056] The power grid system data includes power grid operation data, environmental data, equipment status data, user usage data, geographic information system data, socio-economic data and communication data;

[0057] It should be noted that the power grid operation data includes voltage, current, power, frequency and phase angle; the environmental data includes temperature, humidity, wind speed and sunshine; the equipment status data includes equipment temperature, equipment vibration and equipment sound; the user usage data includes power load and power quality; the geographic information system data includes geographic location coordinates and terrain; the communication data includes communication delay and data packet loss rate.

[0058] Furthermore, the feature extraction includes preprocessing and data fusion of the real-time collected power grid data, and extracting features from the processed data using a deep learning model;

[0059] The preprocessing includes cleaning, normalization and standardization; the data fusion includes feature-level fusion and decision-level fusion;

[0060] The normalization formula is:

[0061]

[0062] Among them, X is the original eigenvalue, X min is the minimum value of the feature, X max is the maximum value of the feature, X norm is the normalized eigenvalue;

[0063] The standardized formula is:

[0064]

[0065] Among them, X std is the standardized eigenvalue, X is the original eigenvalue, μ is the mean of the feature, and σ is the standard deviation of the feature;

[0066] The deep learning model includes activating a neural network and performing convolution operations and pooling operations;

[0067] The activation neural network formula is expressed as:

[0068]

[0069] Among them, x is the input data, f(x) is the activation function, and e is the base of the natural logarithm;

[0070] The convolution operation formula is expressed as:

[0071]

[0072] Where W is the convolution kernel, x is the input data, * is the convolution operation, m is the number of rows of the feature map of the input data, n is the number of columns of the feature map of the input data, and b and c represent the position index;

[0073] The pooling operation formula is expressed as:

[0074] P(a)=max(a)

[0075] Among them, a is the data in the pooling window, and P(a) is the data after pooling.

[0076] S2: Use the extracted features to build and train a machine learning algorithm, and establish a normal and abnormal state classification model. Input the newly collected data into the normal and abnormal state classification model for state judgment. When an abnormal state is detected, a graded warning is issued and the strategy is adjusted;

[0077] The constructing and training the machine learning algorithm includes constructing a machine learning algorithm feature function using features extracted by the deep learning model, and training the machine learning algorithm;

[0078] It should be noted that the formula for constructing the characteristic function of the machine learning algorithm is:

[0079]

[0080] Among them, F(x) is the characteristic function of the machine learning algorithm, is the normalization function, f i (x) is the i-th eigenvalue, α i is the standard deviation of the ith feature, s is the total number of features, is an exponential function, λ i is the weight coefficient, g i (x) is the feature filtering function, is a complex information filtering function, h j (x) is the j-th information filtering function, l and o are the upper and lower limits of integration, p is the adjustment parameter, x is the input data, and e is the base of the natural logarithm.

[0081] Furthermore, the normal and abnormal state classification model includes constructing and training a machine learning algorithm using the extracted features, and establishing a normal and abnormal state classification model, inputting newly collected data into the output value of the normal and abnormal state classification model for state judgment, and issuing an early warning when an abnormal state is detected;

[0082] The formula for the normal and abnormal state classification model is as follows:

[0083]

[0084] Among them, G(y) is the output value of the normal and abnormal state classification model, y is the feature vector of the input data, v(σ I ) is the information filtering function of the I-th feature vector, σ I is the parameter of the I-th feature vector, N is the number of feature vectors, e is the base of the natural logarithm, k is the learning rate of the model, φ I is the normalization value of the I-th feature vector, θ is the threshold of the model, T(β J ) is the complex function of the J-th feature vector, β J is the parameter of the J-th feature vector, M is the number of feature vectors, A J is the positive sample probability of the J-th feature vector, C J is the negative sample probability of the J-th feature vector; the value range of G(y) is (0, +∞).

[0085] Furthermore, the hierarchical early warning system includes setting thresholds according to the output value of the normal and abnormal state classification model and historical state data, and classifying abnormal states into five levels; the set thresholds are 0.7, 0.5, 0.2, and 0.1;

[0086] Among them, the five levels of abnormal states include that when G(y) > 0.7, it indicates that the data is in a normal state, maintaining the existing monitoring and operation processes, and conducting regular system health checks; when 0.5 < G(y) ≤ 0.7, it indicates that the data has fluctuations and is in a slightly abnormal state, and monitoring should be strengthened, data and events should be recorded, the reasons for abnormalities should be analyzed, and whether to adjust the early warning threshold should be considered; when 0.2 < G(y) ≤ 0.5, it indicates that the data has abnormal features and is in a medium abnormal state, and the monitoring level should be improved, the data collection and analysis frequency should be increased, the reasons for abnormalities should be checked, and evaluation and processing should be carried out; when 0.1 < G(y) ≤ 0.2, it indicates that the data has a high degree of abnormality and the system has problems, and the emergency plan should be immediately activated, investigations and analyses should be conducted, the system functions should be suspended, and repair measures should be taken; when G(y) ≤ 0.1, it indicates that the data is severely abnormal and the system has faults, and immediate emergency measures should be taken to conduct a comprehensive problem investigation and repair.

[0087] S3: Use the microservice architecture metric anomaly prediction algorithm to predict whether the system has anomalies, and make policy adjustments and parameter adjustments according to the prediction results.

[0088] The microservice architecture metric anomaly prediction algorithm includes constructing a microservice architecture metric anomaly prediction algorithm based on the extracted features, predicting the system state, and making policy adjustments and parameter adjustments according to the prediction results;

[0089] The abnormal prediction algorithm formula for the microservice architecture metrics is as follows:

[0090]

[0091] Among them, S(Y) is the abnormal prediction score of the microservice architecture metrics, Y is the metrics vector of the microservice architecture, R is the prediction time window, L is the number of metrics, O is the number of complex information filtering functions, τ H is the decay rate of the H-th metric, δ H (Y H , r) is the feature function of the H-th metric at time r, ε(Y, r) is the normalization function, is the K-th complex information filtering function, and e is the base of the natural logarithm;

[0092] When S(Y) ≥ 1, it indicates that the system is in the normal operation mode. Maintain the current microservice architecture and policies and perform periodic monitoring. When 0 < S(Y) < 1, it indicates that the system is in the abnormal mode. Increase the monitoring frequency, start the detailed analysis process and implement partial degradation policies, and perform parameter adjustment until S(Y) reaches the normal level.

[0093] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.

[0094] Embodiment 2, the second embodiment of the present invention, which is different from the previous embodiment in that:

[0095] If the above function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the essence of the technical solution of the present invention, or the part that contributes to the prior art, or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0096] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0097] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0098] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0099] Example 3, reference Figure 2 , which is the third embodiment of the present invention, and which provides a system for detecting anomalies of indicators in a microservice architecture, including a data collection and preprocessing module 100, a feature extraction module 200, a machine learning algorithm construction and training module 300, a hierarchical warning module 400, and an indicator anomaly prediction module 500;

[0100] The data acquisition and preprocessing module 100 is used to acquire power grid system data in real time and perform preprocessing;

[0101] The feature extraction module 200 is used to input the power grid system data into the deep learning model to extract data features therefrom;

[0102] The machine learning algorithm construction and training module 300 is used to construct a machine learning algorithm feature function based on the extracted data features, and use the data to train the machine learning algorithm;

[0103] The graded warning module 400 is used to construct a normal and abnormal state classification model based on the machine learning algorithm feature function, and to judge the state of the newly collected data, set the threshold value according to the output value of the normal and abnormal state classification model and the historical state data, and classify the abnormal state into five levels for graded warning;

[0104] The indicator anomaly prediction module 500 is used to construct a microservice architecture indicator anomaly prediction algorithm based on the extracted features, predict the system status, and make strategy adjustments and parameter adjustments based on the prediction results.

[0105] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for detecting anomaly of indicators in a microservice architecture, characterized in that: include, Collecting first power grid system data in real time, performing data processing on the first power grid data to obtain second data, and performing feature extraction on the second data to obtain third feature data; The third characteristic data is used to construct and train the algorithm, and a fourth state classification model is established. When the fourth state analysis model is used to analyze an abnormal state, a graded warning is issued and the strategy is adjusted; The fifth indicator anomaly prediction algorithm is used to predict whether the system has anomalies, and strategy and parameter adjustments are made based on the prediction results.

2. The method for detecting anomalies of indicators in a microservice architecture according to claim 1, characterized in that: The first power grid system data includes power grid operation data, environmental data, equipment status data, user usage data, geographic information system data, socio-economic data and communication data.

3. The method for detecting anomalies of indicators in a microservice architecture according to claim 2, characterized in that: The extracting features from the second data to obtain the third feature data comprises: Preprocessing and data fusion of the first power grid data collected in real time to obtain second data, and extracting features from the second data using a deep learning model to obtain third feature data; The data processing of the first power grid data to obtain the second data includes cleaning, normalization and standardization; the data fusion includes feature-level fusion and decision-level fusion; the deep learning model includes activating a neural network and performing convolution operations and pooling operations; The normalization formula is: Among them, X is the original eigenvalue, X min is the minimum value of the feature, X max is the maximum value of the feature, X norm is the normalized eigenvalue; The standardized formula is: Among them, X std is the standardized eigenvalue, X is the original eigenvalue, μ is the mean of the feature, and σ is the standard deviation of the feature; The deep learning model includes activating a neural network and performing convolution operations and pooling operations; The activation neural network formula is expressed as: Among them, x is the input data, f(x) is the activation function, and e is the base of the natural logarithm; The convolution operation formula is expressed as: Where W is the convolution kernel, x is the input data, * is the convolution operation, m is the number of rows of the feature map of the input data, n is the number of columns of the feature map of the input data, and b and c represent the position index; The pooling operation formula is expressed as: P(a)=max(a) Among them, a is the data in the pooling window, and P(a) is the data after pooling.

4. The method for detecting anomalies of indicators in a microservice architecture according to claim 3, characterized in that: The use of the third feature data to construct and train the algorithm includes extracting the third feature data, constructing a feature function of the machine learning algorithm, and training the machine learning algorithm.

5. The method for detecting anomalies of indicators in a microservice architecture according to claim 4, characterized in that: The fourth state classification model includes using the third feature data to construct and train a machine learning algorithm, and establishing a fourth state classification model, inputting the newly collected first power grid system data into the output value of the normal and abnormal state classification model to perform state judgment, and issuing an early warning when an abnormal state is detected.

6. The method for detecting anomalies of indicators in a microservice architecture according to claim 5, characterized in that: The graded warning includes setting thresholds according to the output value of the fourth state classification model and historical state data, and classifying the abnormal state into five levels; the set thresholds are 0.7, 0.5, 0.2 and 0.1; Among them, the five levels of abnormal status include: when G(y) > 0.7, it indicates that the data is in a normal state, maintaining the existing monitoring and operation processes, and conducting regular system health checks; when 0.5 < G(y) ≤ 0.7, it indicates that the data has fluctuations and is in a slightly abnormal state. Monitoring should be strengthened, data and events should be recorded, the reasons for the anomalies should be analyzed, and consideration should be given to whether it is necessary to adjust the warning threshold; when 0.2 < G(y) ≤ 0.5, it indicates that the data has abnormal characteristics and is in a moderately abnormal state. The monitoring level should be increased, the frequency of data collection and analysis should be increased, the reasons for the anomalies should be checked, and evaluation and processing should be carried out; when 0.1 < G(y) ≤ 0.2, it indicates that the degree of data abnormality is high and the system has problems. Immediately activate the emergency plan, conduct investigations and analyses, suspend the system functions, and take repair measures; when G(y) ≤ 0.1, it indicates that the data is severely abnormal and the system has faults. Immediately take emergency measures, conduct a comprehensive problem investigation and repair.

7. The method for detecting anomalies of indicators in a microservice architecture according to claim 6, characterized in that: The fifth indicator anomaly prediction algorithm includes constructing a microservice architecture indicator anomaly prediction algorithm based on the extracted features, predicting the system status, and making policy adjustments and parameter adjustments according to the prediction results; The formula for the microservice architecture indicator anomaly prediction algorithm is: Among them, S(Y) is the abnormal prediction score of the microservice architecture indicator, Y is the indicator vector of the microservice architecture, R is the prediction time window, L is the number of indicators, O is the number of complex information filtering functions, τ H is the decay rate of the Hth indicator, δ H (Y H ,r) is the characteristic function of the Hth indicator at time r, ε(Y,r) is the normalization function, is the Kth complex information filtering function, e is the base of the natural logarithm; When S(Y) ≥ 1, it indicates that the system is in a normal operating mode, maintaining the current microservice architecture and policy, and conducting periodic monitoring; when 0 < S(Y) < 1, it indicates that the system is in an abnormal mode. Increase the monitoring frequency, start the detailed analysis process and implement partial degradation strategies, and make parameter adjustments until S(Y) reaches the normal level.

8. A system using a method for detecting anomalies of indicators in a microservice architecture as claimed in any one of claims 1 to 7, characterized in that: It includes a data collection and preprocessing module, a feature extraction module, a machine learning algorithm construction and training module, a hierarchical warning module, and an indicator anomaly prediction module; The data collection and preprocessing module is used to collect power grid system data in real time and perform preprocessing; The feature extraction module is used to input the power grid system data into a deep learning model and extract data features therefrom; The machine learning algorithm construction and training module is used to construct a machine learning algorithm feature function based on the extracted data features and train the machine learning algorithm using the data; The hierarchical warning module is used to construct a normal and abnormal state classification model based on the machine learning algorithm feature function, judge the status of newly collected data, set thresholds according to the output values of the normal and abnormal state classification model and historical state data, and divide the abnormal state into five levels for hierarchical warning; The indicator anomaly prediction module is used to construct a microservice architecture indicator anomaly prediction algorithm based on the extracted features, predict the system status, and make policy adjustments and parameter adjustments according to the prediction results.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, it implements the steps of the method for detecting indicator anomalies of a microservice architecture according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the method for detecting indicator anomalies of a microservice architecture according to any one of claims 1 to 7.

Citation Information

Cited By

  • System operation abnormity monitoring and analyzing method based on intelligent algorithm

    CN119848516A