Monitoring alarm method and device based on micro-service architecture, electronic equipment and medium

By adopting a monitoring method based on microservice architecture in the power grid system, multi-dimensional monitoring data is obtained and pre-processed and alerted, the problem of grid operation and maintenance personnel discovering and solving system abnormalities is solved, and the stable operation and operation and maintenance efficiency of the power grid system is improved.

CN120196515AInactive Publication Date: 2025-06-24NANJING HUADUN ELECTRIC POWER INFORMATION SAFETY EVALUATION CO LTD

Patent Information

Application Number
CN202510685707.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-06-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing microservice monitoring architecture has a single function, lacks comprehensiveness, and is not flexible enough to set alarm policies, which makes it difficult for power grid operation and maintenance personnel to discover and solve the abnormal problems of power grid system in a timely and accurate manner.

Method used

Based on the microservice architecture, the monitoring data of the power grid system is obtained from at least two dimensions, including system resources, logs, application interfaces, middleware and power grid service data, preprocessing and generating power grid indicator data, and monitoring and alarming is carried out according to preset alarm conditions.

Benefits of technology

By comprehensively monitoring the power grid system, problems can be discovered more accurately and quickly, the operation and maintenance efficiency of microservices can be improved, and the stable operation of the power grid system can be ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120196515A_ABST
    Figure CN120196515A_ABST
Patent Text Reader

Abstract

The invention discloses a monitoring alarm method and device based on a micro-service architecture, electronic equipment and a storage medium. The method comprises the following steps: acquiring power grid monitoring data of a power grid system from at least two dimensions based on a micro-service architecture; wherein the power grid monitoring data comprises system resource monitoring data, log monitoring data, application interface monitoring data, middleware monitoring data and power grid service monitoring data; preprocessing the power grid monitoring data to generate power grid index data required by monitoring alarm; and according to a preset alarm condition and the power grid index data, when the power grid index data meets the corresponding preset alarm condition, performing monitoring alarm on the power grid index data. By adopting the technical scheme of the embodiment of the invention, the power grid system is comprehensively monitored through the micro-service architecture, problems can be found and solved more accurately and quickly, and the operation and maintenance efficiency of micro-service is improved, so that stable operation of the power grid system is provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power safety, and in particular, to a monitoring and alarming method, device, electronic device and storage medium based on a microservice architecture. Background Art

[0002] With the continuous development of Internet technology, the microservice architecture has become the mainstream choice for enterprise application system design. The microservice architecture splits a large-scale system into multiple small and loosely coupled services, and each service is responsible for implementing a part of the functions in the application. This architectural style has high scalability, flexibility and maintainability, but at the same time brings certain complexity.

[0003] With the rapid development of power business, the normal and stable operation of the power grid system is the key to the normal operation of power grid business. Most of the existing microservice monitoring architectures have single functions, lack comprehensiveness, and the alarm strategy settings are not flexible enough, resulting in it being difficult for power grid operation and maintenance personnel to discover and solve problems in a timely and accurate manner. For example, the common ELK monitoring solution can collect, process and store logs uniformly for subsequent query and analysis; however, this solution can only monitor logs, and many problems will not be exposed in the logs. Another commonly used Sky Walking provides a complete distributed tracing function, which can help developers comprehensively understand the call relationships and performance bottlenecks of distributed systems, etc. However, its core is to monitor the applications in the system, and the monitoring function for middleware is relatively lacking.

[0004] Therefore, how to ensure the stable operation of the power grid system is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the Invention

[0005] The present invention provides a monitoring and alarming method, device, electronic device and storage medium based on a microservice architecture to solve the problem that it is difficult for power grid operation and maintenance personnel to discover and solve power grid system anomalies in a timely and accurate manner.

[0006] According to one aspect of the present invention, there is provided a monitoring and alarming method based on a microservice architecture, the method comprising:

[0007] Obtaining power grid monitoring data of a power grid system from at least two dimensions based on a microservice architecture; wherein, the power grid monitoring data includes system resource monitoring data, log monitoring data, application interface monitoring data, middleware monitoring data and power grid business monitoring data;

[0008] Preprocessing the power grid monitoring data to generate power grid index data required for monitoring and alarming;

[0009] Monitor and alarm the grid index data according to the preset alarm conditions and the grid index data when the grid index data meets the corresponding preset alarm conditions.

[0010] According to another aspect of the present invention, there is provided a monitoring and alarming device based on a microservices architecture, the device comprising:

[0011] A grid monitoring data acquisition module, configured to acquire grid monitoring data of a power grid system from at least two dimensions based on a microservices architecture; wherein, the grid monitoring data includes system resource monitoring data, log monitoring data, application interface monitoring data, middleware monitoring data, and grid service monitoring data;

[0012] A grid index data generation module, configured to preprocess the grid monitoring data to generate grid index data required for monitoring and alarming;

[0013] A monitoring and alarming module, configured to monitor and alarm the grid index data according to the preset alarm conditions and the grid index data when the grid index data meets the corresponding preset alarm conditions.

[0014] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:

[0015] At least one processor; and

[0016] A memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the monitoring and alarming method based on a microservices architecture according to any embodiment of the present invention.

[0018] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the monitoring and alarming method based on a microservices architecture according to any embodiment of the present invention when executed.

[0019] According to another aspect of the present invention, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the monitoring and alarming method based on a microservices architecture as described in any embodiment of the present invention.

[0020] The technical solution of the embodiment of the present invention obtains power grid monitoring data of a power grid system from at least two dimensions based on a microservices architecture; wherein, the power grid monitoring data includes system resource monitoring data, log monitoring data, application interface monitoring data, middleware monitoring data, and power grid service monitoring data; preprocesses the power grid monitoring data to generate power grid index data required for monitoring and alarming; and monitors and alarms the power grid index data when the power grid index data meets the corresponding preset alarm conditions according to the preset alarm conditions and the power grid index data. It solves the problem that it is difficult for power grid operation and maintenance personnel in the prior art to discover and solve power grid system anomalies in a timely and accurate manner, and achieves the effect of comprehensively monitoring the power grid system through the microservices architecture, discovering problems more accurately and quickly, solving problems, improving the operation and maintenance efficiency of microservices, and thus providing the stable operation of the power grid system.

[0021] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0023] Figure 1 is a flowchart of a monitoring and alarming method based on a microservices architecture according to Embodiment 1 of the present invention;

[0024] Figure 2 is a flowchart of a monitoring and alarming method based on a microservices architecture according to Embodiment 2 of the present invention;

[0025] Figure 3 is a schematic structural diagram of a monitoring and alarming system based on a microservices architecture according to Embodiment 2 of the present invention;

[0026] Figure 4 is a schematic structural diagram of a monitoring and alarming device based on a microservices architecture according to Embodiment 3 of the present invention;

[0027] Figure 5 is a schematic structural diagram of an electronic device implementing Embodiment 4 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0028] To enable those skilled in the art to better understand the solution of the present invention, the following will clearly and completely describe the technical solution in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0029] Among them, the acquisition, storage, use, processing, etc. of data in the technical solution of this application all comply with the relevant regulations of laws and regulations. It should be noted that the terms "first", "second", "target", "original", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data used can be interchanged under appropriate circumstances, so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including", "etc." and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0030] Embodiment 1

[0031] Figure 1 For Embodiment 1 of the present invention, a flowchart of a monitoring and alarming method based on a microservice architecture is provided. This embodiment is applicable to the situation of monitoring and alarming grid data in a power grid system based on a microservice architecture. This method can be executed by a monitoring and alarming device based on a microservice architecture. The monitoring and alarming device based on a microservice architecture can be implemented in the form of hardware and / or software, and the monitoring and alarming device based on a microservice architecture can be configured in any electronic device with network communication functions. As Figure 1 shown, the method includes:

[0032] S110. Obtain grid monitoring data of the power grid system from at least two dimensions based on the microservice architecture.

[0033] Among them, the microservice architecture may refer to an architecture pattern or a style. By dividing a single application into a group of small services, each service runs in its own independent process, and the services coordinate and cooperate with each other to provide the final value for users. In the embodiments of the present invention, the microservice architecture may refer to splitting the service system into several subsystems, and each subsystem is responsible for processing grid monitoring data in one dimension in the power grid system; that is, a corresponding microservice architecture is configured for the grid monitoring data in each dimension.

[0034] The power grid monitoring data may refer to the data in the power grid system to be monitored. In the embodiments of the present invention, the power grid monitoring data includes, but is not limited to, system resource monitoring data, log monitoring data, application interface monitoring data, middleware monitoring data, and power grid service monitoring data.

[0035] Among them, the system resource monitoring data may refer to the data for monitoring the host system resources. The system resource monitoring data includes, but is not limited to, the central processor usage rate, memory usage rate, disk I / O statistics data, and network bandwidth.

[0036] The log monitoring data may refer to the log data recorded by the log framework during the operation of the service, and the collected log monitoring data is centrally stored through log collection tools such as ELK. Among them, the log data usually contains error messages, and the error messages include, but are not limited to, null pointer exception information, flow limiting exception information, and response timeout exception information. The log framework includes, but is not limited to, Log4j2 and Slf4j. ELK is the abbreviation of three open-source software, namely Elasticsearch, Logstash, and Kibana; Elasticsearch is an open-source distributed search engine that provides search analysis and data storage functions; Logstash is an open-source log analysis and collection tool; Kibana is an open-source interface for searching, analyzing, and visualizing stored log data.

[0037] The application interface monitoring data may refer to the performance metric data mainly concerned with the application interface. The application interface monitoring data includes, but is not limited to, the application interface call volume, response time, error rate, and success rate.

[0038] The middleware monitoring data may refer to the data for monitoring the middleware. The middleware includes, but is not limited to, cache, message queue, and database; correspondingly, the middleware monitoring data includes, but is not limited to, cache monitoring data, message queue monitoring data, and database monitoring data.

[0039] The power grid service monitoring data may refer to the data obtained by monitoring the power grid services, which refers to the data related to the operation, management, and maintenance of the power grid. The power grid service monitoring data includes, but is not limited to, power grid operation data, power grid production data, and power grid enterprise management data.

[0040] The embodiments of the present invention adopt a microservices architecture to obtain power grid monitoring data from multiple dimensions to comprehensively monitor the power grid system.

[0041] S120. Preprocess the power grid monitoring data to generate power grid index data required for monitoring and alarming.

[0042] Among them, the preprocessing may refer to processing power grid monitoring data to improve data quality for subsequent analysis of the power grid monitoring data; the preprocessing includes but is not limited to data cleaning and data aggregation processing.

[0043] The data cleaning may refer to processing missing values, outliers, and duplicate data in the data, that is, deleting or filling in missing data, deleting, replacing, or retaining abnormal data, and deleting or merging duplicate information for duplicate data.

[0044] The data aggregation processing may refer to the process of integrating scattered and heterogeneous data; for example, for application interface monitoring data, it is necessary to continuously obtain the response time of the application interface. A single interface response timeout does not necessarily indicate whether the interface is abnormal. Therefore, it is necessary to obtain the application interface response time data for a continuous period of time, that is, aggregate the application interface response time data obtained multiple times to monitor and alarm the application interface monitoring data. Through data aggregation processing, trends in the power grid monitoring data are extracted to monitor and alarm the power grid monitoring data.

[0045] The power grid index data may refer to the power grid data required for monitoring obtained after preprocessing.

[0046] S130. According to the preset alarm conditions and the power grid index data, monitor and alarm the power grid index data when the power grid index data meets the corresponding preset alarm conditions.

[0047] Among them, the preset alarm conditions may refer to the alarm conditions set separately for the power grid index data in at least two dimensions, so as to monitor and alarm the power grid index data in the corresponding dimension when the power grid index data meets the preset alarm conditions, to indicate that there are abnormalities in the corresponding power grid index data.

[0048] The monitoring and alarming may refer to the process of monitoring, alarming, and notifying abnormal power grid index data to accurately and quickly discover problems, solve problems, and improve the security of the power grid system.

[0049] An embodiment of the present invention provides a monitoring and alarming method based on a microservice architecture. Grid monitoring data of a power grid system is obtained from at least two dimensions based on the microservice architecture. Among them, the grid monitoring data includes system resource monitoring data, log monitoring data, application interface monitoring data, middleware monitoring data, and power grid service monitoring data. The grid monitoring data is preprocessed to generate grid index data required for monitoring and alarming. According to preset alarm conditions and the grid index data, when the grid index data meets the corresponding preset alarm conditions, monitoring and alarming are performed on the grid index data. By adopting the technical solution of the embodiment of the present invention, the power grid system is comprehensively monitored through the microservice architecture, problems can be discovered and solved more accurately and quickly, and the operation and maintenance efficiency of microservices is improved, thereby providing stable operation of the power grid system.

[0050] Embodiment 2

[0051] Figure 2 FIG. is a flowchart of a monitoring and alarming method based on a microservice architecture provided by Embodiment 2 of the present invention. The embodiment of the present invention further optimizes the foregoing embodiment on the basis of the above embodiment. The embodiment of the present invention can be combined with each optional solution in the above one or more embodiments. As Figure 2 shown, the method includes:

[0052] S210. Obtain grid monitoring data of a power grid system from at least two dimensions based on a microservice architecture.

[0053] Among them, referring to Figure 3 , the monitoring and alarming system based on the microservice architecture includes a data acquisition layer, a data processing layer, a data storage layer, a data display layer, and an alarming unit. The grid monitoring data collected by the data acquisition layer is divided into five categories, namely system resources, logs, application interfaces, middleware, and service data, and there is a corresponding data collector for each type to collect data.

[0054] As an optional but non-limiting implementation manner, obtaining grid monitoring data of a power grid system from at least two dimensions based on a microservice architecture includes, but is not limited to, steps A1-A2:

[0055] Step A1: Determine grid monitoring objects of a power grid system from at least two dimensions, and configure corresponding microservice data collectors for the grid monitoring objects in at least two dimensions. Among them, the grid monitoring objects include system resources, logs, application interfaces, middleware, and service data, and each grid monitoring object is configured with a corresponding microservice data collector. The microservice data collector refers to a data acquisition device based on the microservice architecture.

[0056] Step A2: Use the microservice data collector to obtain grid monitoring data of the power grid system.

[0057] Among them, according to actual requirements, microservice data collectors are deployed in the microservice system, and microservice data collectors are configured for each power grid monitoring object. Grid monitoring data of the power grid monitoring object is obtained from at least two dimensions through the microservice data collector. The microservice data collector includes, but is not limited to, data collection tools such as Prometheus and StatsD. Optionally, the collection of the grid monitoring data is also implemented through custom collection code.

[0058] In order to more accurately and quickly discover problems, solve problems, and improve the operation and maintenance efficiency of microservices, the present invention monitors system resources, logs, application interfaces, middleware, and power grid business data in the power grid system, and can comprehensively understand the operating status of the microservice system.

[0059] S220. Preprocess the grid monitoring data to generate grid index data required for monitoring and alarming.

[0060] Among them, in the data processing layer, the grid monitoring data is preprocessed to generate grid index data required for monitoring and alarming.

[0061] S230. Determine whether the grid index data meets the corresponding preset alarm conditions according to the grid index data and the corresponding preset alarm conditions.

[0062] Among them, in the alarm unit, the received grid index data is processed, and alarm notifications are sent for the grid index data with anomalies according to the preset alarm conditions.

[0063] As an optional but non-limiting implementation manner, the preset alarm conditions are different alarm conditions constructed according to the requirements of grid monitoring data in different dimensions, specifically including, but not limited to, steps B1 - B5:

[0064] Step B1: Construct a preset system resource alarm condition according to the requirements of system resource monitoring data; the preset system resource alarm condition includes a central processing unit usage rate threshold, a memory usage rate threshold, a disk I / O statistics threshold, and a network bandwidth threshold.

[0065] Step B2: Construct a preset log alarm condition according to the requirements of log monitoring data; the preset log alarm condition includes any one of null pointer exceptions, flow limiting exceptions, and response timeout exceptions in the log.

[0066] Step B3: Construct a preset application interface alarm condition according to the requirements of application interface monitoring data; the preset application interface alarm condition includes an application interface call volume threshold, a response time threshold, an error rate threshold, and a success rate threshold.

[0067] Step B4: Construct preset middleware alarm conditions according to the requirements of middleware monitoring data; the preset middleware alarm conditions include cache query response time threshold, message queue backlog threshold, and database slow query quantity threshold.

[0068] Step B5: Construct preset power grid service alarm conditions according to the requirements of power grid service monitoring data; the preset power grid service alarm conditions include power grid operation data threshold, power grid production data threshold, and power grid enterprise management data threshold.

[0069] Among them, the preset alarm conditions are constructed according to actual requirements. For example, according to the requirements of system resource monitoring data, construct alarm conditions for central processing unit usage rate threshold, memory usage rate threshold, disk I / O statistics threshold, and network bandwidth threshold. According to the requirements of log monitoring data, construct preset log alarm conditions when any one of the exceptions such as null pointer exception, flow limit exception, and response timeout exception appears in the log. According to the requirements of application interface monitoring data, construct preset application interface alarm conditions including but not limited to application interface call volume threshold, response time threshold, error rate threshold, and success rate threshold. According to the requirements of middleware monitoring data, construct preset middleware alarm conditions including but not limited to cache query response time threshold, message queue backlog threshold, and database slow query quantity threshold. According to the requirements of power grid service monitoring data, construct preset power grid service alarm conditions including but not limited to power grid operation data threshold, power grid production data threshold, and power grid enterprise management data threshold.

[0070] In the embodiment of the present invention, corresponding preset alarm conditions are constructed according to the actual requirements of power grid index data for monitoring and alarming; when an exception occurs, an alarm is sent in time to discover problems in advance and avoid abnormalities in the power grid system, affecting stable operation.

[0071] S240: If the power grid index data meets the corresponding preset alarm conditions, monitor and alarm the power grid index data.

[0072] Among them, after determining the preset alarm conditions corresponding to the power grid index data and determining that the power grid index data meets the corresponding preset alarm conditions, it indicates that the power grid index data has an abnormality, and then monitor and alarm the power grid index data.

[0073] As an optional but non-limiting implementation manner, the "if the power grid index data meets the corresponding preset alarm conditions, monitor and alarm the power grid index data" includes but not limited to steps C1 - C2:

[0074] Step C1: If the power grid index data meets the corresponding preset alarm conditions, it indicates that the power grid monitoring object corresponding to the power grid index data has an abnormality.

[0075] Step C2: Classify the anomalies that occur to the grid monitoring objects, and issue different levels of monitoring alarms to the grid monitoring objects corresponding to the grid index data according to the anomaly levels.

[0076] Among them, when it is determined that the grid index data meets the corresponding preset alarm conditions, it indicates that an anomaly has occurred to the grid monitoring object corresponding to the grid index data; classify the anomalies that occur to the grid monitoring objects, and issue different levels of monitoring alarms to the grid monitoring objects corresponding to the grid index data according to the anomaly levels.

[0077] For example, for system resource monitoring data, when it is determined that the host central processor utilization rate meets the central processor rate threshold, the memory utilization rate meets the memory utilization rate threshold, or the disk I / O usage meets the disk I / O statistics threshold, or the network bandwidth meets the network bandwidth threshold, alarm the obtained system resource monitoring data; and perform hierarchical alarms according to the anomaly levels of the central processor utilization rate, memory utilization rate, disk I / O statistics data, and network bandwidth.

[0078] For log monitoring data, when it is determined that a null pointer exception, a flow limit exception, or a response timeout exception occurs in the log monitoring data, alarm the log monitoring data; since the null pointer exception, the flow limit exception, and the response timeout exception are defined as zero-tolerance exceptions when setting the preset log alarm conditions, therefore, when any one of the null pointer exception, the flow limit exception, and the response timeout exception occurs in the log, relevant alarms are made.

[0079] For application interface monitoring data, when it is determined that the application interface call volume meets the application interface call volume threshold, the response time meets the response time threshold, the error rate meets the error rate threshold, and the application interface call success rate meets the success rate lower limit value, alarm the obtained application interface data. For example, if the response time of Application Interface A has increased by 50% year-on-year and exceeds the response time threshold, then this interface may deteriorate. Monitor and alarm Application Interface A, and analyze and discover problems in a timely manner, which can ensure the more stable operation of the grid system.

[0080] For middleware monitoring data, relevant metrics of middleware such as caches, message queues, and databases are mainly monitored to prevent anomalies in the middleware from affecting system stability. For example, regarding caches, if the cache creation time is too long or slow queries occur, it indicates that there are anomalies in the cache. Regarding message queues, if there is a backlog of messages, monitor the message backlog and issue a timely alert when the backlog volume reaches the message queue backlog threshold, so that operation and maintenance personnel can respond quickly and avoid problems. Regarding databases, if the number of slow queries within a specified time period reaches the database slow query threshold, it indicates that there are slow query statements in the database, and an alert needs to be issued for the database to avoid the problem of slow queries bringing down the entire database.

[0081] For power grid business monitoring data, power grid operation data, power grid production data, and power grid enterprise management data are mainly monitored; by defining the core metrics of the business, the monitoring and analysis of power grid business are realized through business monitoring tools. For power grid operation data, it is necessary to combine historical power grid operation data for analysis to determine the normal operation of the power grid system. For power grid generated data, if the generated volume drops sharply, it can be determined that there are problems with the power grid production line. For power grid enterprise management data, for example, if the login volume of the power grid enterprise management subsystem drops by 50% suddenly, then there is probably a problem with the power grid enterprise management subsystem. If relevant alerts can be configured for this business data, problems can be discovered in time to make corresponding responses in the shortest time and avoid the expansion of the impact of the problems.

[0082] Optionally, when the power grid metric data meets the preset alert conditions, the alert unit will trigger an alert and send the alert information to relevant personnel through multiple notification channels, such as email, text message, enterprise software, etc. At the same time, it is also possible to combine automation tools, such as Webhook, to connect the alert information to a third-party system for automated processing.

[0083] Corresponding preset alert conditions are set for power grid metric data in different dimensions to comprehensively monitor the power grid system to ensure the stable operation of the power grid system; by classifying the anomalies by level, problems with a higher anomaly level can be processed in time to reduce the impact and avoid the expansion of the problems.

[0084] S250. If the power grid metric data does not meet the corresponding preset alert conditions, it indicates that the power grid monitoring object corresponding to the power grid metric data is operating normally.

[0085] Among them, if the power grid metric data does not meet the preset alert conditions, it indicates that the power grid monitoring object corresponding to the power grid metric data is operating normally, and it is only necessary to continuously monitor the power grid metric data.

[0086] As an optional but non-limiting implementation, after generating the grid index data required for monitoring and alarming, the method further includes:

[0087] According to the dimension to which the grid index data belongs, storing the grid index data into corresponding databases respectively;

[0088] Or, visualizing the grid index data in the form of a chart through a visualization tool; wherein, when displaying the grid index data through the visualization tool, obtaining the abnormal information of the grid index data, and when the grid index data is abnormal, performing different forms of abnormal level display according to the abnormal level of the grid monitoring data.

[0089] Wherein, in the data storage layer, after generating the grid index data required for monitoring and alarming, storing the grid index data. Optionally, according to the dimension to which the grid index data belongs, storing the grid index data into corresponding databases respectively. The databases include but are not limited to time series databases and log databases.

[0090] In the data display layer, visualizing the grid index data in the form of a chart; optionally, when visualizing the grid index data, not only displaying the generated grid index data after preprocessing, but also visualizing the grid index data of abnormal alarms, and displaying the abnormal information in a visual form, which can better improve the alarm awareness and facilitate technical processing by operation and maintenance personnel.

[0091] In an optional solution of the embodiment of the present invention, the monitoring and alarming system based on the microservice architecture adopts a modular design, supports adding new monitoring types and expanding data sources, and has good scalability.

[0092] The embodiment of the present invention provides a monitoring and alarming method based on the microservice architecture, which monitors system resources, logs, application interfaces, middleware, and grid service data, and can comprehensively understand the operating state of the grid system through the microservice architecture. It also provides preset alarm conditions set in the configuration file according to actual business requirements, supports flexible alarm strategy setting and multiple alarm notification channels, and meets the requirements of different business scenarios. So as to more accurately and quickly discover problems, solve problems, improve the operation and maintenance efficiency of microservices, and ensure the stable operation of the grid system.

[0093] Embodiment III

[0094] Figure 4 This is a schematic structural diagram of a monitoring and alarming device based on the microservice architecture provided by Embodiment III of the present invention. As Figure 4 shown, the device includes:

[0095] The power grid monitoring data acquisition module 410 is used to acquire power grid monitoring data of the power grid system from at least two dimensions based on the microservice architecture; wherein, the power grid monitoring data includes system resource monitoring data, log monitoring data, application interface monitoring data, middleware monitoring data, and power grid service monitoring data;

[0096] The power grid index data generation module 420 is used to preprocess the power grid monitoring data to generate power grid index data required for monitoring and alarming;

[0097] The monitoring and alarming module 430 is used to monitor and alarm the power grid index data when the power grid index data meets the corresponding preset alarm conditions according to the preset alarm conditions and the power grid index data.

[0098] Optionally, the power grid monitoring data acquisition module is specifically used for:

[0099] Determine the power grid monitoring objects of the power grid system from at least two dimensions, and configure corresponding microservice data collectors for the power grid monitoring objects of at least two dimensions; wherein, the power grid monitoring objects include system resources, logs, application interfaces, middleware, and service data, and each power grid monitoring object is configured with a corresponding microservice data collector; the microservice data collector refers to a data acquisition device based on the microservice architecture;

[0100] Use the microservice data collector to acquire the power grid monitoring data of the power grid system.

[0101] Optionally, the system resource monitoring data includes the central processor usage rate, memory usage rate, disk I / O statistics data, and network bandwidth; the application interface monitoring data includes the application interface call volume, response time, error rate, and success rate; the middleware monitoring data includes cache monitoring data, message queue monitoring data, and database monitoring data; the power grid service monitoring data includes power grid operation data, power grid production data, and power grid enterprise management data.

[0102] Optionally, the monitoring and alarming module is specifically used for:

[0103] Determine whether the power grid index data meets the corresponding preset alarm conditions according to the power grid index data and the corresponding preset alarm conditions;

[0104] If the power grid index data meets the corresponding preset alarm conditions, monitor and alarm the power grid index data;

[0105] If the power grid index data does not meet the corresponding preset alarm conditions, it indicates that the power grid monitoring object corresponding to the power grid index data is operating normally.

[0106] Optionally, the preset alarm conditions are different alarm conditions constructed according to the requirements of power grid monitoring data in different dimensions, specifically including:

[0107] Construct preset system resource alarm conditions according to the requirements of system resource monitoring data; the preset system resource alarm conditions include central processor usage threshold, memory usage threshold, disk I / O statistics threshold, and network bandwidth threshold;

[0108] Construct preset log alarm conditions according to the requirements of log monitoring data; the preset log alarm conditions include any one of null pointer exception, flow limit exception, and response timeout exception in the log;

[0109] Construct preset application interface alarm conditions according to the requirements of application interface monitoring data; the preset application interface alarm conditions include application interface call volume threshold, response time threshold, error rate threshold, and success rate lower limit value;

[0110] Construct preset middleware alarm conditions according to the requirements of middleware monitoring data; the preset middleware alarm conditions include cache query response time threshold, message queue backlog threshold, and database slow query quantity threshold;

[0111] Construct preset power grid business alarm conditions according to the requirements of power grid business monitoring data; the preset power grid business alarm conditions include power grid operation data threshold, power grid production data threshold, and power grid enterprise management data threshold.

[0112] Optionally, the monitoring and alarm module is further specifically used for:

[0113] If the power grid index data meets the corresponding preset alarm conditions, it indicates that the power grid monitoring object corresponding to the power grid index data has an abnormality;

[0114] Classify the abnormality of the power grid monitoring object that appears, and issue different levels of monitoring alarms to the power grid monitoring object corresponding to the power grid index data according to the abnormality level.

[0115] Optionally, after generating the power grid index data required for monitoring and alarming, the device further includes a data storage and visualization display module, specifically used for:

[0116] Store the power grid index data into the corresponding database respectively according to the dimension to which the power grid index data belongs;

[0117] Alternatively, the grid index data is visually displayed in the form of a chart through a visualization tool; wherein, when the grid index data is displayed through the visualization tool, the abnormal information of the grid index data is obtained, and when the grid index data is abnormal, different forms of abnormal level displays are performed according to the abnormal level of the grid monitoring data.

[0118] The monitoring and alarming device based on the microservice architecture provided in the embodiments of the present invention can execute the monitoring and alarming method based on the microservice architecture provided in any of the above embodiments of the present invention, and has the corresponding functions and beneficial effects of executing the monitoring and alarming method based on the microservice architecture. For the detailed process, refer to the related operations of the monitoring and alarming method based on the microservice architecture in the foregoing embodiments.

[0119] Embodiment 4

[0120] Figure 5 FIG. shows a schematic structural diagram of an electronic device 10 that can be used to implement the embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0121] As Figure 5 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. The memory stores a computer program executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.

[0122] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0123] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the monitoring and alerting method based on the microservice architecture.

[0124] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program codes for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication unit 19, or installed from the storage unit 18, or installed from the ROM 12. When the computer program is executed by the processor 11, the above functions defined in the method of the embodiment of the present invention are executed.

[0125] In some embodiments, the monitoring and alerting method based on the microservice architecture can be implemented as a computer program, which is tangibly included in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the monitoring and alerting method based on the microservice architecture described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the monitoring and alerting method based on the microservice architecture by any other suitable means (e.g., by means of firmware).

[0126] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), system on a chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.

[0127] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs can be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.

[0128] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0129] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).

[0130] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.

[0131] A computing system can include a client and a server. The client and the server are generally far from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0132] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is imposed herein.

[0133] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims

1. A monitoring and alarming method based on a microservice architecture, characterized in that, Including: Obtaining power grid monitoring data of a power grid system from at least two dimensions based on a microservices architecture; wherein, the power grid monitoring data includes system resource monitoring data, log monitoring data, application interface monitoring data, middleware monitoring data, and power grid service monitoring data; Preprocessing the power grid monitoring data to generate power grid index data required for monitoring and alarming; According to preset alarm conditions and power grid index data, monitoring and alarming the power grid index data when the power grid index data meets the corresponding preset alarm conditions.

2. The method according to claim 1, characterized in that, The obtaining of the power grid monitoring data of the power grid system from at least two dimensions based on a microservices architecture includes: Determining power grid monitoring objects of the power grid system from at least two dimensions, and configuring corresponding microservices data collectors for the power grid monitoring objects of at least two dimensions; wherein, the power grid monitoring objects include system resources, logs, application interfaces, middleware, and service data, and one corresponding microservices data collector is configured for each power grid monitoring object; the microservices data collector refers to a data collection device based on a microservices architecture; Using the microservices data collector to obtain the power grid monitoring data of the power grid system.

3. The method according to claim 1, characterized in that, The system resource monitoring data includes central processing unit usage rate, memory usage rate, disk I / O statistics data, and network bandwidth; the application interface monitoring data includes application interface call volume, response time, error rate, and success rate; the middleware monitoring data includes cache monitoring data, message queue monitoring data, and database monitoring data; the power grid service monitoring data includes power grid operation data, power grid production data, and power grid enterprise management data.

4. The method according to claim 1, wherein The monitoring and alarming of the power grid index data when the power grid index data meets the corresponding preset alarm conditions according to preset alarm conditions and power grid index data includes: Determining whether the power grid index data meets the corresponding preset alarm conditions according to the power grid index data and the corresponding preset alarm conditions; If the power grid index data meets the corresponding preset alarm conditions, monitoring and alarming the power grid index data; If the power grid index data does not meet the corresponding preset alarm conditions, it indicates that the power grid monitoring object corresponding to the power grid index data is operating normally.

5. The method according to claim 4, wherein The preset alarm conditions are different alarm conditions constructed according to the requirements of power grid monitoring data in different dimensions, specifically including: Constructing a preset system resource alarm condition according to the requirements of system resource monitoring data; the preset system resource alarm condition includes a central processing unit usage rate threshold, a memory usage rate threshold, a disk I / O statistics threshold, and a network bandwidth threshold; Constructing a preset log alarm condition according to the requirements of log monitoring data; the preset log alarm condition includes any one of null pointer exception, flow limiting exception, and response timeout exception in the log; Constructing a preset application interface alarm condition according to the requirements of application interface monitoring data; the preset application interface alarm condition includes an application interface call volume threshold, a response time threshold, an error rate threshold, and a success rate lower limit value; According to the requirements of middleware monitoring data, preset middleware alarm conditions are constructed; the preset middleware alarm conditions include cache response time threshold, message queue backlog threshold, and database slow query quantity threshold; According to the requirements of power grid business monitoring data, preset power grid business alarm conditions are constructed; the preset power grid business alarm conditions include power grid operation data threshold, power grid production data threshold, and power grid enterprise management data threshold.

6. The method according to claim 4, wherein If the power grid index data meets the corresponding preset alarm conditions, then monitoring and alarming are performed on the power grid index data, including: If the power grid index data meets the corresponding preset alarm conditions, it indicates that the power grid monitoring object corresponding to the power grid index data has an abnormality; The abnormality of the power grid monitoring object that appears is classified by abnormality level, and different levels of monitoring alarms are sent to the power grid monitoring object corresponding to the power grid index data according to the abnormality level.

7. The method according to claim 1, characterized in that, After generating the power grid index data required for monitoring and alarming, the method further includes: According to the dimension to which the power grid index data belongs, the power grid index data is respectively stored in the corresponding database; Or, the power grid index data is visually displayed in the form of a chart through a visualization tool; wherein, when displaying the power grid index data through the visualization tool, the abnormality information of the power grid index data is obtained, and when the power grid index data has an abnormality, different forms of abnormality level display are performed according to the abnormality level of the power grid monitoring data.

8. A monitoring and alarming device based on a microservice architecture, characterized in that, The device includes: A power grid monitoring data acquisition module, configured to acquire power grid monitoring data of a power grid system from at least two dimensions based on a microservices architecture; wherein, the power grid monitoring data includes system resource monitoring data, log monitoring data, application interface monitoring data, middleware monitoring data, and power grid business monitoring data; A power grid index data generation module, configured to preprocess the power grid monitoring data to generate power grid index data required for monitoring and alarming; A monitoring and alarming module, configured to perform monitoring and alarming on the power grid index data when the power grid index data meets the corresponding preset alarm conditions according to the preset alarm conditions and the power grid index data.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the microservices architecture-based monitoring and alarming method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the processor to implement the microservices architecture-based monitoring and alarming method according to any one of claims 1-7 when executed.

Citation Information

Patent Citations

  • Distribution network automation master station mobile application service management method and system based on micro-service architecture

    CN110851278A

  • Monitoring alarm method and device in micro-service scene

    CN113448812A

  • Power distribution network application state monitoring system and method convenient to expand

    CN113740636A

  • Method and system for multi-node monitoring services

    US10657019B1

Cited By

  • Enterprise management-oriented enterprise operation supervision method based on micro-service architecture

    CN121810060A