Power grid message analysis method and device, computer equipment and storage medium
By adopting a streaming computing architecture and dynamic scheduling strategy in power grid message parsing and building an operator chain to process power grid messages in parallel, the problem of insufficient real-time data processing in traditional methods is solved, and efficient power grid message parsing is achieved.
Patent Information
- Application Number
- CN202510684576.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-09-30
AI Technical Summary
Traditional message parsing methods are difficult to meet the real-time data processing requirements of modern power grids.
Based on the streaming computing architecture, an operator chain is built to parse power grid messages. The scheduling strategy is determined according to system resources and processing requirements, resource allocation is dynamically adjusted, and the operator chain is used to parse power grid messages in parallel.
It reduces operation time, optimizes resource utilization, solves the problem of high latency in task-level parallel processing in large-scale power grid message parsing, and meets the real-time data processing requirements of modern power grids.
Smart Images

Figure CN120729968A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of power grid technology, and in particular to a method, apparatus, computer equipment, and storage medium for parsing power grid messages. Background Art
[0002] With the rapid development of smart grid construction, the scope of grid data collection has been continuously expanded, the data types have become increasingly rich, and the frequency of data updates has been significantly improved.
[0003] However, traditional message parsing methods are unable to meet the real-time data processing requirements of modern power grids. Summary of the Invention
[0004] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for parsing power grid messages that can meet the real-time data processing requirements of modern power grids in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for parsing a power grid message, comprising:
[0006] Based on a stream computing architecture, an operator chain for parsing the power grid message to be processed is constructed according to basic information of the power grid message to be processed; the basic information includes the communication protocol, parsing requirements and type corresponding to the power grid message to be processed; the stream computing architecture is determined based on the system requirements of the processing system; the processing system includes a processing system of a computer device or a processing system of a distributed cluster;
[0007] Determining a scheduling strategy for the power grid message to be processed based on system resources and processing requirements of the power grid message to be processed;
[0008] According to the scheduling strategy, the power grid message to be processed is allocated to the corresponding operator chain for parsing and processing, and a parsing result of the power grid message to be processed is obtained.
[0009] In one embodiment, the stream computing architecture is based on the basic information of the power grid message to be processed, and an operator chain for parsing the power grid message to be processed is constructed, including:
[0010] Constructing at least one parsing operator for the power grid message to be processed according to the communication protocol and the type;
[0011] Based on the streaming computing architecture and the parsing requirements of the power grid message to be processed, each of the parsing operators is constructed into the operator chain.
[0012] In one embodiment, constructing at least one parsing operator for the to-be-processed power grid message according to the communication protocol and the type includes:
[0013] Determining a logical structure of a parsing algorithm for parsing the to-be-processed power grid message according to the communication protocol and the type; the logical structure includes parsing logic for the message header and parsing logic for the data field;
[0014] Determining a data structure of the parsing algorithm according to the communication protocol and the logical structure;
[0015] The logical structure, the data structure and the preset exception handling mechanism are encapsulated to construct at least one of the parsing operators.
[0016] In one embodiment, determining a scheduling strategy for the power grid message to be processed based on system resources and processing requirements of the power grid message to be processed includes:
[0017] Determining the maximum processing capacity of the processing system based on the system resources; the maximum processing capacity includes the maximum number and complexity of messages that can be processed simultaneously when the processing system is in a fully loaded state;
[0018] The scheduling strategy is determined based on the maximum processing capacity and the processing demand; the scheduling strategy includes any one of a priority-based task scheduling strategy, a time slice-based round-robin scheduling strategy, and a load balancing-based scheduling strategy.
[0019] In one embodiment, the method further comprises:
[0020] Monitor the usage of the system resources and the processing efficiency of the to-be-processed power grid messages in real time to obtain monitoring results;
[0021] The scheduling strategy is dynamically adjusted according to the monitoring result.
[0022] In one embodiment, the method further comprises:
[0023] Monitor the operator chain according to preset monitoring indicators of the operator chain to determine the performance status of the operator chain; the preset monitoring indicators include at least one of processing speed, throughput, and resource utilization;
[0024] The operator chain is optimized according to the performance status.
[0025] In a second aspect, the present application further provides a power grid message parsing device, comprising:
[0026] A construction module is configured to construct an operator chain for parsing the power grid message to be processed based on a stream computing architecture and according to basic information of the power grid message to be processed; the basic information includes a communication protocol, parsing requirements, and type corresponding to the power grid message to be processed; the stream computing architecture is determined based on the system requirements of the processing system; the processing system includes a processing system of a computer device or a processing system of a distributed cluster;
[0027] A determination module, configured to determine a scheduling strategy for the power grid message to be processed based on system resources and processing requirements of the power grid message to be processed;
[0028] The parsing module is used to assign the pending power grid message to the corresponding operator chain for parsing according to the scheduling strategy to obtain the parsing result of the pending power grid message.
[0029] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0030] Based on a stream computing architecture, an operator chain for parsing the power grid message to be processed is constructed according to basic information of the power grid message to be processed; the basic information includes the communication protocol, parsing requirements and type corresponding to the power grid message to be processed; the stream computing architecture is determined based on the system requirements of the processing system; the processing system includes a processing system of a computer device or a processing system of a distributed cluster;
[0031] Determining a scheduling strategy for the power grid message to be processed based on system resources and processing requirements of the power grid message to be processed;
[0032] According to the scheduling strategy, the power grid message to be processed is allocated to the corresponding operator chain for parsing and processing, and a parsing result of the power grid message to be processed is obtained.
[0033] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0034] Based on a stream computing architecture, an operator chain for parsing the power grid message to be processed is constructed according to basic information of the power grid message to be processed; the basic information includes the communication protocol, parsing requirements and type corresponding to the power grid message to be processed; the stream computing architecture is determined based on the system requirements of the processing system; the processing system includes a processing system of a computer device or a processing system of a distributed cluster;
[0035] Determining a scheduling strategy for the power grid message to be processed based on system resources and processing requirements of the power grid message to be processed;
[0036] According to the scheduling strategy, the power grid message to be processed is allocated to the corresponding operator chain for parsing and processing, and a parsing result of the power grid message to be processed is obtained.
[0037] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the following steps:
[0038] Based on a stream computing architecture, an operator chain for parsing the power grid message to be processed is constructed according to basic information of the power grid message to be processed; the basic information includes the communication protocol, parsing requirements and type corresponding to the power grid message to be processed; the stream computing architecture is determined based on the system requirements of the processing system; the processing system includes a processing system of a computer device or a processing system of a distributed cluster;
[0039] Determining a scheduling strategy for the power grid message to be processed based on system resources and processing requirements of the power grid message to be processed;
[0040] According to the scheduling strategy, the power grid message to be processed is allocated to the corresponding operator chain for parsing and processing, and a parsing result of the power grid message to be processed is obtained.
[0041] The above-mentioned power grid message parsing method, device, computer equipment and storage medium are based on the streaming computing architecture. According to the basic information of the power grid message to be processed, an operator chain for parsing the power grid message to be processed is constructed. The power grid message to be processed can be parsed in parallel using multiple operators in the operator chain, thereby reducing operation time. In addition, the streaming computing architecture is determined based on the system requirements of the processing system, so that the method can be applied to both individual computer equipment and distributed clusters. Furthermore, according to the system resources and the processing requirements of the power grid message to be processed, the scheduling strategy of the power grid message to be processed is determined, and the power grid message to be processed is assigned to the corresponding operator chain for parsing and processing according to the determined scheduling strategy. Resource allocation can be dynamically adjusted, resource utilization is optimized, and the problem of high latency in task-level parallel processing in the scenario of large-scale power grid message parsing and processing is solved, meeting the real-time data processing requirements of modern power grids. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 1 is a flow chart of a method for parsing power grid messages in one embodiment;
[0044] Figure 2 Schematic diagram of a flow chart of a method for parsing power grid messages in another embodiment;
[0045] Figure 3 Schematic diagram of a flow chart of a method for parsing power grid messages in another embodiment;
[0046] Figure 4 Schematic diagram of a flow chart of a method for parsing power grid messages in another embodiment;
[0047] Figure 5 Schematic diagram of a flow chart of a method for parsing power grid messages in another embodiment;
[0048] Figure 6 is a structural block diagram of a power grid message parsing device in one embodiment;
[0049] Figure 7 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0051] In one embodiment, Figure 1 As shown, a method for parsing power grid messages is provided. This embodiment uses the method applied to a computer device as an example for illustration. It is understandable that the method can also be applied to a server, or to a system including a computer device and a server, and implemented through interaction between the computer device and the server. In this embodiment, the method includes the following steps:
[0052] S201, based on the streaming computing architecture, construct an operator chain for parsing the power grid message to be processed according to the basic information of the power grid message to be processed; the basic information includes the communication protocol, parsing requirements and type corresponding to the power grid message to be processed; the streaming computing architecture is determined based on the system requirements of the processing system; the processing system includes the processing system of a computer device or the processing system of a distributed cluster.
[0053] The power grid message parsing method provided in this embodiment can be applied to a single computer device or to a distributed cluster composed of multiple computer devices. That is, the processing system of the power grid message parsing method provided in the embodiment of the present application can be a processing system of a computer device or a processing system of a distributed cluster. Accordingly, the stream computing architecture to be used can be determined according to the system requirements of the applied processing system. For example, the determined stream computing architecture can be any one of Apache Flink, Apache Storm, and Spark Streaming. When the processing system is a processing system of a computer device, a thread pool can be configured in the stream computing architecture to execute each operator in the operator chain in parallel, and then the message data is assigned to different threads for processing according to a certain strategy (such as polling, hashing, etc.) to achieve parallel parsing; when the processing system is a processing system of a distributed cluster, the stream computing architecture can be deployed on the distributed cluster, and the power grid message is partitioned according to certain rules (such as message type, source address, etc.). Each partition is processed by one or more nodes, and a communication mechanism between nodes is configured to ensure that data can be correctly transmitted and processed between different nodes.
[0054] Optionally, in this embodiment, multiple parsing operators for parsing the power grid message to be processed can be constructed based on the basic information of the power grid message to be processed, and then the multiple parsing operators constructed can be constructed into an operator chain based on the streaming computing architecture.
[0055] It's important to note that power grid messages adhere to specific communication protocols and standards, such as IEC 60870-5-104 and DNP3. Determining the communication protocol for the power grid message to be processed is fundamental to building power grid message parsing operators. Operators capable of parsing different types of power grid data messages are constructed based on protocol parsing algorithms. These operators ensure accurate conversion of message content into a system-recognizable data format, enabling the system to easily handle data input in various formats and improving its adaptability and flexibility.
[0056] In this embodiment, after receiving the original message data from the power grid or other systems through the network interface, the original message data can be preprocessed to obtain the power grid message to be processed, wherein the preprocessing may include basic operations such as checking the integrity of the message, identifying the message type, and extracting the message header information. Checking the message integrity is used to check whether the message is complete, including fields such as checksum and length, to prevent incomplete or damaged messages from entering the parsing process, thereby improving the accuracy and reliability of data processing. Identifying the message type may include identifying the message type based on the message header information or a specific identifier, providing a basis for the subsequent selection of a suitable parsing operator, and ensuring that the message can be correctly parsed. Extracting the message header information includes extracting key header information from the message, such as timestamp, source address, etc., to provide necessary metadata for subsequent data processing and storage.
[0057] S202: Determine a scheduling strategy for the power grid messages to be processed based on system resources and processing requirements of the power grid messages to be processed.
[0058] System resources may include hardware resources (such as CPU, memory, network bandwidth, etc.) and software resources (such as thread pools, process pools, etc.). Optionally, in this embodiment, the maximum number and complexity of messages that the system can simultaneously process can be determined based on the availability and limitations of system resources. Then, a scheduling strategy for the pending power grid messages can be determined based on the processing requirements of the pending power grid messages. Optionally, the aforementioned scheduling strategy can include any one of a priority-based task scheduling strategy, a time-slice-based round-robin scheduling strategy, and a load-balancing-based scheduling strategy. For example, when the system's maximum processing capacity is low and the pending power grid messages require priority processing, the scheduling strategy for the pending power grid messages can be determined to be a priority-based task scheduling strategy. When the system's maximum processing capacity is moderate and the pending power grid messages do not require priority processing, the scheduling strategy for the pending power grid messages can be determined to be a load-balancing-based scheduling strategy. This embodiment will not further detail these strategies.
[0059] S203: Allocate the power grid message to be processed to the corresponding operator chain for parsing according to the scheduling strategy to obtain the parsing result of the power grid message to be processed.
[0060] Optionally, in this embodiment, the task scheduler may distribute the power grid message to be processed to the corresponding operator chain according to the scheduling strategy for processing at different task nodes to obtain the parsing result of the power grid message to be processed.
[0061] Furthermore, the parsed message data can be merged and output to the database for storage, providing a more complete and valuable data set for data analysis and application, and facilitating subsequent query and analysis.
[0062] In addition, as an optional implementation, the steps of power grid message reception, preprocessing, and power grid message parsing can be connected in series to form a task chain, realizing the complete process management from power grid message reception to parsing, thereby improving the overall performance and stability of the system. The specific implementation is as follows:
[0063] 1. Define task nodes:
[0064] 1.1 Message Receiving: Responsible for receiving original message data from the network interface and storing it in the buffer for subsequent processing.
[0065] 1.2 Preprocessing: Read the message data from the buffer and perform preprocessing operations such as integrity check, type identification and header information extraction.
[0066] 1.3 Message parsing: Receive preprocessed message data, parse it according to the predefined operator chain sequence, and finally output the parsed data structure or object.
[0067] 2. Connect task nodes:
[0068] According to the logical order of message processing, the above task nodes are connected in the order of "message reception → preprocessing → message parsing" to form a coherent task chain, and ensure that the output of each node is the input of the next node, so as to realize seamless transmission of data in the task chain.
[0069] 3. Configure task chain parameters:
[0070] Based on system requirements and power grid message types, configure the parameters of each node in the task chain, such as buffer size and selection of parsing operators, and set the start and stop conditions of the task chain to ensure that the system can start or stop the message processing process as needed.
[0071] 4. Analyze system resources:
[0072] Evaluate the availability and limitations of the system's hardware resources (such as CPU, memory, and network bandwidth) and software resources (such as thread pools and process pools) to determine the maximum number and complexity of messages the system can process simultaneously.
[0073] 5. Design task scheduling strategy and implement task scheduler:
[0074] Design appropriate task scheduling strategies based on system resources and message processing requirements, such as priority-based task scheduling, time-slice-based round-robin scheduling, load-balancing-based scheduling, and other strategies, and use the task scheduler to assign message data to different task nodes for processing according to the scheduling strategy.
[0075] 6. Monitoring and Adjustment:
[0076] Monitor the usage of system resources and the processing efficiency of task chains in real time, and dynamically adjust task scheduling strategies and task chain parameters based on monitoring results to optimize system performance.
[0077] In the above-mentioned power grid message parsing method, based on the streaming computing architecture, an operator chain for parsing the power grid message to be processed is constructed according to the basic information of the power grid message to be processed. The multiple operators in the operator chain can be used to parse the power grid message to be processed in parallel, reducing operation time. In addition, the streaming computing architecture is determined based on the system requirements of the processing system, so that this method can be applied to both individual computer devices and distributed clusters; further, according to the system resources and the processing requirements of the power grid message to be processed, the scheduling strategy of the power grid message to be processed is determined, and the power grid message to be processed is assigned to the corresponding operator chain for parsing and processing according to the determined scheduling strategy. Resource allocation can be dynamically adjusted, resource utilization is optimized, and the problem of high latency in task-level parallel processing in the scenario of large-scale power grid message parsing and processing is solved, meeting the real-time data processing requirements of modern power grids.
[0078] This embodiment will explain the specific process of building an operator chain for parsing the power grid message to be processed. Figure 2 As shown, the above S201 includes:
[0079] S301: Construct at least one parsing operator for a power grid message to be processed according to a communication protocol and type.
[0080] Optionally, in this embodiment, the logical structure of the parsing algorithm for parsing the power grid message to be processed can be determined based on the communication protocol and type of the power grid message to be processed, including the parsing logic for the message header and the parsing logic for the data field, etc., and the data structures required for the parsing algorithm, such as byte arrays and bit fields, can be determined. An exception handling mechanism can also be designed in the algorithm to address situations such as message format errors and missing data. The parsing algorithm is encapsulated as an operator, which is considered an independent parsing unit. The input and output of the operator are defined, with the input being the original message data and the output being the parsed data structure or object.
[0081] S302: Based on the streaming computing architecture and the parsing requirements of the power grid message to be processed, each parsing operator is constructed into an operator chain.
[0082] Optionally, in this embodiment, based on the aforementioned streaming computing architecture and the parsing requirements of the power grid messages to be processed, multiple parsing operators can be connected in a certain order to form an operator chain. This operator chain implements a pipeline for message parsing, improving data processing efficiency and throughput. Furthermore, within the streaming computing architecture, multithreading or distributed computing technologies can be used to implement parallel processing of the operator chain, significantly improving data processing throughput while reducing I / O operations and lowering system overhead.
[0083] For example, the specific implementation process of building an operator chain can be as follows:
[0084] 1. Define the operator chain structure
[0085] 1.1 Identify and analyze the stages: Identify the various analysis stages of the power grid message to be processed, such as header information analysis, data field analysis, checksum verification, etc. Each stage corresponds to one or more analysis operators.
[0086] 1.2 Operator sorting: Sort the various parsing operators according to the logical order of the power grid message to be processed, ensuring that the output of the previous operator is the input of the next operator, forming a coherent parsing process.
[0087] 1.3 Operator interface definition: Define unified input and output interfaces for each operator to facilitate seamless connection and data transfer between operators.
[0088] 2. Configure the stream processing environment: Configure the stream processing environment in the selected stream computing framework, including setting parameters such as task manager, resource allocation, and parallelism.
[0089] 3. Implementing parallel processing of operator chains
[0090] 3.1 Multi-threaded processing: Configure a thread pool in the streaming computing framework to execute each operator in the operator chain in parallel, and then assign the message data to different threads for processing according to a certain strategy (such as polling, hashing, etc.) to achieve parallel parsing.
[0091] Or, distributed computing:
[0092] Deploy the streaming computing framework on a distributed cluster and partition the message data according to certain rules (such as message type, source address, etc.). Each partition is processed by one or more nodes. Configure the communication mechanism between nodes to ensure that data can be correctly transmitted and processed between different nodes.
[0093] 4. Optimize operator chain performance
[0094] 4.1 Operator Optimization: Optimize the performance of each operator, such as reducing memory usage, optimizing algorithm logic, and improving computing efficiency.
[0095] 4.2 Parallelism adjustment: Dynamically adjust the parallelism based on system load and message processing requirements to balance system resources and processing efficiency.
[0096] 4.3 Fault tolerance: Add fault tolerance mechanisms to the operator chain, such as retry strategies and error logging, to improve the stability and reliability of the system.
[0097] In this embodiment, based on the communication protocol and type of the power grid message to be processed, at least one parsing operator for the power grid message to be processed can be accurately constructed, so that based on the streaming computing architecture and the parsing requirements of the power grid message to be processed, each parsing operator is constructed into an operator chain for the message to be processed, thereby ensuring the accuracy of the constructed operator chain; in addition, based on the communication protocol and type of the power grid message to be processed, at least one parsing operator for the power grid message to be processed is constructed, so that the system can cope with power grid messages of different formats, thereby improving the adaptability and flexibility of the system.
[0098] In this embodiment, the detailed process of constructing a parsing operator for at least one power grid message to be processed is explained. Figure 3 As shown, the above S301 includes:
[0099] S401, determining the logical structure of a parsing algorithm for parsing a power grid message to be processed according to the communication protocol and type; the logical structure includes parsing logic for the message header and parsing logic for the data field.
[0100] First, in this embodiment, the format, structure, field definition, arrangement order and length of each field of the power grid message to be processed can be clarified according to the communication protocol of the power grid message to be processed, including detailed definitions of the message header (such as the start character, length field, checksum, etc.) and the data field (such as specific data fields, flag bits, etc.), providing an accurate basis for subsequent algorithm design, ensuring that the parsing algorithm can accurately match the message protocol, and improving the accuracy and reliability of the parsing.
[0101] Optionally, in this embodiment, the message header parsing logic may include identifying the origin of the power grid message to be processed, verifying the message's integrity (e.g., through a checksum), and extracting key message information (e.g., length, type, etc.). The data field parsing logic may include parsing specific data fields according to the message header's instructions. Through logical structure design, the complex message parsing process is broken down into clear steps, making it easier to understand and implement. Furthermore, the clarity of the logical structure facilitates subsequent testing and maintenance.
[0102] S402, determining the data structure of the parsing algorithm according to the communication protocol and the logical structure.
[0103] Optionally, in this embodiment, data structures required for the parsing algorithm can be defined based on the communication protocol of the power grid message to be processed and the logical structure of the parsing algorithm. These structures include byte arrays (for storing and processing raw message data), bit fields (for processing flags or bit masks, etc.), and structures or classes (for encapsulating parsed data). By defining appropriate data structures, message data can be efficiently stored and processed, improving algorithm execution efficiency and data management convenience.
[0104] S403: Encapsulate the logical structure, data structure, and preset exception handling mechanism to construct at least one parsing operator.
[0105] Among them, the preset exception handling mechanism can address situations such as message format errors and missing data. This includes checking whether the message format complies with protocol requirements (such as length and checksum) during the parsing process, and handling missing or invalid data fields during data domain parsing. When an anomaly is detected, the algorithm should be able to return an error prompt or exception information and take appropriate recovery measures (such as skipping the erroneous message and recording the error log). The design of the exception handling mechanism can improve the robustness and fault tolerance of the algorithm, ensuring that the algorithm can run stably in abnormal situations such as message format errors or missing data, and providing useful error information to facilitate problem identification and resolution.
[0106] Furthermore, the constructed parsing operator can be tested and verified, which may include:
[0107] 1. Unit Testing: Perform unit testing on operators to test whether they can correctly parse various legal messages. Test the operator's behavior under abnormal conditions to ensure that it can correctly handle problems such as message format errors and missing data. Abnormal conditions include message format errors, missing data, and data overflow. The following are some aspects of testing the operator's behavior under abnormal conditions:
[0108] a. Message format errors: Tests whether the operator can correctly identify and process messages that do not conform to the protocol format. For example, messages with incorrect length, mismatched checksums, missing fields, or incorrect order. In such cases, the operator should return an error or exception message instead of attempting to parse the message or causing a system crash.
[0109] b. Missing Data: Tests the behavior of the operator when it receives a message with some data missing. For example, some fields are empty or not filled with valid data.
[0110] The operator should be able to handle this situation by filling in default values, returning error prompts, or performing necessary data validation to ensure data integrity and accuracy.
[0111] c. Data overflow: Tests the behavior of operators when receiving data outside of their expected range. For example, a numeric field's value may exceed its defined range (e.g., integer overflow). In this case, the operator should be able to detect and handle data overflow by truncating the data, returning an error, or performing necessary data conversion to ensure data correctness.
[0112] d. Exception handling mechanism: Test whether the operator has a comprehensive exception handling mechanism that can correctly log errors, return exception information, or take other necessary recovery measures in abnormal situations. Verify whether the operator can maintain system stability and reliability during exception handling and avoid affecting the normal operation of other components or services.
[0113] e. Boundary condition testing: Test the behavior of operators under boundary conditions, such as maximum message length, minimum message length, maximum field value, etc.
[0114] Through boundary condition testing, the stability and reliability of the operator when dealing with extreme situations can be ensured.
[0115] f. Recovery capability test: Tests the operator's recovery capability under abnormal conditions, that is, whether it can resume normal operation after an abnormality occurs. This includes testing the operator's state recovery, data recovery, and interaction recovery with other components after abnormality handling.
[0116] 2. Integration testing: Integrate the operator into the entire message parsing system and perform integration testing. Test the interaction between the operator and other components to ensure the stability and reliability of the entire system.
[0117] On this basis, the performance of the operator can also be evaluated, including parsing speed, resource consumption, and other aspects. Based on the evaluation results, it can be determined whether the operator needs to be optimized to improve parsing speed and efficiency. For example, the operator data structure can be optimized to reduce memory usage and CPU consumption.
[0118] In summary, the process of building an operator based on the protocol parsing algorithm can build an efficient, accurate, and reliable message parsing operator through multiple steps, including clarifying the message type and communication protocol, designing and implementing the parsing algorithm, building the operator, performing testing and verification, and optimizing and evaluating performance.
[0119] In this embodiment, based on the communication protocol and type of the power grid message to be processed, the logical structure of the parsing algorithm for parsing the power grid message to be processed can be accurately determined, so that based on the communication protocol of the power grid message to be processed and the logical structure of the parsing algorithm, the data structure of the parsing algorithm can be accurately determined. In this way, after the logical structure, data structure and preset exception handling mechanism of the parsing algorithm are encapsulated, the accuracy of at least one constructed parsing operator is ensured.
[0120] In some scenarios, it may also be necessary to dynamically adjust the determined scheduling strategy based on the real-time usage of the system and the processing efficiency of the messages to be processed. Figure 4 As shown, the above method also includes:
[0121] S501 , monitoring the usage of system resources and the processing efficiency of pending power grid messages in real time, and obtaining monitoring results.
[0122] S502: Dynamically adjust the scheduling strategy based on the monitoring results.
[0123] Optionally, in this embodiment, during the parsing of the power grid message to be processed, the usage of system resources can be monitored in real time through the system's operation log, and the processing efficiency of the power grid message to be processed can be monitored based on the parsing log of the power grid message to be processed, to obtain monitoring results including the usage of system resources and the processing efficiency of the message to be processed. Then, based on the monitoring results, the scheduling strategy is dynamically adjusted. For example, if the original scheduling strategy is a scheduling strategy based on load balancing, if it is determined that the processing efficiency of the power grid message to be processed is low, but the system resources are relatively sufficient, the scheduling strategy of the power grid message to be processed can be dynamically adjusted to a priority-based task scheduling strategy. It should be noted that the above adjustment method is only an example, and the original scheduling strategy can also be adjusted to any other scheduling strategy mentioned above, which will not be listed one by one in this embodiment.
[0124] In this embodiment, by real-time monitoring of the usage of system resources and the processing efficiency of the pending power grid messages, the scheduling strategy of the pending power grid messages can be dynamically adjusted according to the monitoring results, ensuring that the pending power grid messages can be processed in a timely manner, thereby ensuring the processing efficiency of the pending power grid messages.
[0125] In some scenarios, the performance status of the operator chain during operation can also be monitored, and the operator chain can be optimized based on the performance status of the operator chain. Figure 5 As shown, the above method also includes:
[0126] S601: Monitor the operator chain according to preset monitoring indicators of the operator chain to determine the performance status of the operator chain; the preset monitoring indicators include at least one of processing speed, throughput, and resource utilization.
[0127] The preset monitoring indicators of the operator chain include at least one of processing speed, throughput, and resource utilization. Optionally, in this embodiment, monitoring data corresponding to the preset monitoring indicators can be obtained from the operator chain's logs, and the performance status of the operator chain can be determined based on the obtained monitoring data.
[0128] S602: Optimize the operator chain according to the performance status.
[0129] Optionally, the optimization processing of the operator chain may include at least one of operator optimization, parallelism adjustment and fault-tolerant processing. Operator optimization can perform performance optimization for each operator, such as reducing memory usage, optimizing algorithm logic, improving computing efficiency, etc.; parallelism adjustment can dynamically adjust the parallelism according to the system load and the processing requirements of the power grid messages to be processed to balance system resources and processing efficiency; fault-tolerant processing can add fault-tolerant mechanisms to the operator chain, such as retry strategies, error logging, etc., to improve the stability and reliability of the system.
[0130] Optionally, in this embodiment, the debugging tools provided by the streaming computing architecture, such as breakpoint debugging and data tracing, can be used to debug and optimize the operator chain.
[0131] In this embodiment, the operator chain is monitored according to the preset monitoring indicators of the operator chain, and the performance status of the operator chain can be determined, so that the operator chain can be optimized according to the performance status of the operator chain, thereby maximizing the efficiency of system resource utilization and system throughput; in addition, the operator chain is optimized in real time according to the performance status of the operator chain, which significantly improves the stability and maintainability of complex computing systems, and is particularly suitable for scenarios with high real-time requirements for power grid messages.
[0132] To facilitate understanding by those skilled in the art, the following describes in detail the method for parsing power grid messages provided by the present disclosure. The method may include:
[0133] S1, determining the logical structure of a parsing algorithm for parsing the power grid message to be processed according to the communication protocol and type of the power grid message to be processed; the logical structure includes parsing logic for the message header and parsing logic for the data field.
[0134] S2, determining the data structure of the parsing algorithm based on the above communication protocol and logical structure.
[0135] S3: Encapsulate the logical structure, data structure, and preset exception handling mechanism of the parsing algorithm to construct at least one parsing operator.
[0136] S4, based on the streaming computing architecture and the parsing requirements of the power grid messages to be processed, each parsing operator is constructed into an operator chain.
[0137] S5. Determine the maximum processing capacity of the processing system based on system resources. The maximum processing capacity includes the maximum number and complexity of messages that can be processed simultaneously when the processing system is in a fully loaded state.
[0138] S6, determining a scheduling strategy based on the maximum processing capacity and processing requirements; the scheduling strategy includes any one of a priority-based task scheduling strategy, a time slice-based round-robin scheduling strategy, and a load balancing-based scheduling strategy.
[0139] S7, monitor the usage of system resources and the processing efficiency of the pending power grid messages in real time, obtain monitoring results; and dynamically adjust the scheduling strategy based on the monitoring results.
[0140] S8. Monitor the operator chain according to the preset monitoring indicators of the operator chain to determine the performance status of the operator chain; the preset monitoring indicators include at least one of processing speed, throughput, and resource utilization; optimize the operator chain according to the performance status.
[0141] It should be noted that for the description of the above steps, reference can be made to the relevant description in the above embodiment, and the effects are similar, so this embodiment will not be repeated here.
[0142] It should be understood that, although the steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts of the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0143] Based on the same inventive concept, embodiments of the present application further provide a power grid message parsing device for implementing the power grid message parsing method described above. The solution provided by this device is similar to the solution described in the method described above. Therefore, the specific limitations of one or more power grid message parsing device embodiments provided below can be found in the limitations of the power grid message parsing method described above and will not be further elaborated here.
[0144] In an exemplary embodiment, Figure 6 As shown, a power grid message parsing device is provided, including: a construction module, a determination module and a parsing module, wherein:
[0145] A construction module is used to build an operator chain for parsing the power grid message to be processed based on the streaming computing architecture and the basic information of the power grid message to be processed; the basic information includes the communication protocol, parsing requirements and type corresponding to the power grid message to be processed; the streaming computing architecture is determined based on the system requirements of the processing system; the processing system includes the processing system of a computer device or the processing system of a distributed cluster.
[0146] The determination module is used to determine the scheduling strategy of the power grid message to be processed according to system resources and the processing requirements of the power grid message to be processed.
[0147] The parsing module is used to assign the pending power grid message to the corresponding operator chain for parsing and processing according to the scheduling strategy, and obtain the parsing result of the pending power grid message.
[0148] The power grid message parsing device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be repeated here.
[0149] Based on the above embodiment, optionally, the above building block includes: a first building unit and a second building unit, wherein:
[0150] The first construction unit is configured to construct at least one parsing operator for a to-be-processed power grid message according to a communication protocol and type.
[0151] The second construction unit is used to construct each parsing operator into an operator chain based on the streaming computing architecture and the parsing requirements of the power grid message to be processed.
[0152] The power grid message parsing device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be repeated here.
[0153] Based on the above embodiment, optionally, the above-mentioned first construction unit is used to determine the logical structure of the parsing algorithm for parsing the power grid message to be processed according to the communication protocol and type; the logical structure includes the parsing logic of the message header and the parsing logic of the data field; the data structure of the parsing algorithm is determined according to the communication protocol and the logical structure; the logical structure, the data structure and the preset exception handling mechanism are encapsulated and processed to construct at least one parsing operator.
[0154] The power grid message parsing device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be repeated here.
[0155] Based on the above embodiment, optionally, the above determination module includes: a first determination unit and a second determination unit, wherein:
[0156] The first determining unit is configured to determine the maximum processing capacity of the processing system according to system resources; the maximum processing capacity includes the maximum number and complexity of messages that can be processed simultaneously when the processing system is in a fully loaded state.
[0157] The second determining unit is used to determine a scheduling strategy based on the maximum processing capacity and the processing demand; the scheduling strategy includes any one of a priority-based task scheduling strategy, a time slice-based round-robin scheduling strategy, and a load balancing-based scheduling strategy.
[0158] The power grid message parsing device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be repeated here.
[0159] Based on the above embodiment, optionally, the above device further includes: a first monitoring module and an adjustment module, wherein:
[0160] The first monitoring module is used to monitor the usage of system resources and the processing efficiency of the power grid messages to be processed in real time to obtain monitoring results.
[0161] The adjustment module is used to dynamically adjust the scheduling strategy based on the monitoring results.
[0162] The power grid message parsing device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be repeated here.
[0163] Based on the above embodiment, optionally, the above device includes: a second monitoring module and an optimization module, wherein:
[0164] The second monitoring module is used to monitor the operator chain according to the preset monitoring indicators of the operator chain and determine the performance status of the operator chain; the preset monitoring indicators include at least one of processing speed, throughput, and resource utilization.
[0165] The optimization module is used to optimize the operator chain according to the performance status.
[0166] The power grid message parsing device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be repeated here.
[0167] Each module in the aforementioned power grid message parsing device may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0168] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store power grid messages to be processed and the parsing results of the power grid messages to be processed. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for parsing power grid messages is implemented.
[0169] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0170] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0171] Based on the streaming computing architecture, an operator chain for parsing the power grid message to be processed is constructed according to the basic information of the power grid message to be processed; the basic information includes the communication protocol, parsing requirements and type corresponding to the power grid message to be processed; the streaming computing architecture is determined based on the system requirements of the processing system; the processing system includes the processing system of a computer device or the processing system of a distributed cluster;
[0172] Determine the scheduling strategy for the power grid messages to be processed based on system resources and the processing requirements of the power grid messages to be processed;
[0173] According to the scheduling strategy, the power grid message to be processed is assigned to the corresponding operator chain for parsing and processing, and the parsing result of the power grid message to be processed is obtained.
[0174] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0175] Construct at least one parsing operator for the power grid message to be processed according to the communication protocol and type;
[0176] Based on the streaming computing architecture and the parsing requirements of the power grid messages to be processed, each parsing operator is constructed into an operator chain.
[0177] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0178] Determine the logical structure of the parsing algorithm for the power grid message to be processed based on the communication protocol and type; the logical structure includes the parsing logic of the message header and the parsing logic of the data field;
[0179] Determine the data structure of the parsing algorithm based on the communication protocol and logical structure;
[0180] The logical structure, data structure and preset exception handling mechanism are encapsulated to construct at least one parsing operator.
[0181] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0182] Determine the maximum processing capacity of the processing system based on system resources; the maximum processing capacity includes the maximum number and complexity of messages that can be processed simultaneously when the processing system is at full capacity;
[0183] Based on the maximum processing capacity and processing requirements, a scheduling strategy is determined; the scheduling strategy includes any one of a priority-based task scheduling strategy, a time slice-based round-robin scheduling strategy, and a load balancing-based scheduling strategy.
[0184] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0185] Monitor the usage of system resources and the processing efficiency of pending power grid messages in real time and obtain monitoring results;
[0186] Dynamically adjust the scheduling strategy based on the monitoring results.
[0187] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0188] Monitor the operator chain according to the preset monitoring indicators of the operator chain to determine the performance status of the operator chain; the preset monitoring indicators include at least one of processing speed, throughput, and resource utilization;
[0189] Optimize the operator chain according to performance status.
[0190] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0191] Based on the streaming computing architecture, an operator chain for parsing the power grid message to be processed is constructed according to the basic information of the power grid message to be processed; the basic information includes the communication protocol, parsing requirements and type corresponding to the power grid message to be processed; the streaming computing architecture is determined based on the system requirements of the processing system; the processing system includes the processing system of a computer device or the processing system of a distributed cluster;
[0192] Determine the scheduling strategy for the power grid messages to be processed based on system resources and the processing requirements of the power grid messages to be processed;
[0193] According to the scheduling strategy, the power grid message to be processed is assigned to the corresponding operator chain for parsing and processing, and the parsing result of the power grid message to be processed is obtained.
[0194] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0195] Construct at least one parsing operator for the power grid message to be processed according to the communication protocol and type;
[0196] Based on the streaming computing architecture and the parsing requirements of the power grid messages to be processed, each parsing operator is constructed into an operator chain.
[0197] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0198] Determine the logical structure of the parsing algorithm for the power grid message to be processed based on the communication protocol and type; the logical structure includes the parsing logic of the message header and the parsing logic of the data field;
[0199] Determine the data structure of the parsing algorithm based on the communication protocol and logical structure;
[0200] The logical structure, data structure and preset exception handling mechanism are encapsulated to construct at least one parsing operator.
[0201] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0202] Determine the maximum processing capacity of the processing system based on system resources; the maximum processing capacity includes the maximum number and complexity of messages that can be processed simultaneously when the processing system is at full capacity;
[0203] Based on the maximum processing capacity and processing requirements, a scheduling strategy is determined; the scheduling strategy includes any one of a priority-based task scheduling strategy, a time slice-based round-robin scheduling strategy, and a load balancing-based scheduling strategy.
[0204] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0205] Monitor the usage of system resources and the processing efficiency of pending power grid messages in real time and obtain monitoring results;
[0206] Dynamically adjust the scheduling strategy based on the monitoring results.
[0207] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0208] Monitor the operator chain according to the preset monitoring indicators of the operator chain to determine the performance status of the operator chain; the preset monitoring indicators include at least one of processing speed, throughput, and resource utilization;
[0209] Optimize the operator chain according to performance status.
[0210] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0211] Based on the streaming computing architecture, an operator chain for parsing the power grid message to be processed is constructed according to the basic information of the power grid message to be processed; the basic information includes the communication protocol, parsing requirements and type corresponding to the power grid message to be processed; the streaming computing architecture is determined based on the system requirements of the processing system; the processing system includes the processing system of a computer device or the processing system of a distributed cluster;
[0212] Determine the scheduling strategy for the power grid messages to be processed based on system resources and the processing requirements of the power grid messages to be processed;
[0213] According to the scheduling strategy, the power grid message to be processed is assigned to the corresponding operator chain for parsing and processing, and the parsing result of the power grid message to be processed is obtained.
[0214] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0215] Construct at least one parsing operator for the power grid message to be processed according to the communication protocol and type;
[0216] Based on the streaming computing architecture and the parsing requirements of the power grid messages to be processed, each parsing operator is constructed into an operator chain.
[0217] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0218] Determine the logical structure of the parsing algorithm for the power grid message to be processed based on the communication protocol and type; the logical structure includes the parsing logic of the message header and the parsing logic of the data field;
[0219] Determine the data structure of the parsing algorithm based on the communication protocol and logical structure;
[0220] The logical structure, data structure and preset exception handling mechanism are encapsulated to construct at least one parsing operator.
[0221] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0222] Determine the maximum processing capacity of the processing system based on system resources; the maximum processing capacity includes the maximum number and complexity of messages that can be processed simultaneously when the processing system is at full capacity;
[0223] Based on the maximum processing capacity and processing requirements, a scheduling strategy is determined; the scheduling strategy includes any one of a priority-based task scheduling strategy, a time slice-based round-robin scheduling strategy, and a load balancing-based scheduling strategy.
[0224] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0225] Monitor the usage of system resources and the processing efficiency of pending power grid messages in real time and obtain monitoring results;
[0226] Dynamically adjust the scheduling strategy based on the monitoring results.
[0227] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0228] Monitor the operator chain according to the preset monitoring indicators of the operator chain to determine the performance status of the operator chain; the preset monitoring indicators include at least one of processing speed, throughput, and resource utilization;
[0229] Optimize the operator chain according to performance status.
[0230] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.
[0231] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0232] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A method for parsing power grid messages, characterized in that: The method comprises: Based on a stream computing architecture, an operator chain for parsing the power grid message to be processed is constructed according to basic information of the power grid message to be processed; the basic information includes the communication protocol, parsing requirements and type corresponding to the power grid message to be processed; the stream computing architecture is determined based on the system requirements of the processing system; the processing system includes a processing system of a computer device or a processing system of a distributed cluster; Determining a scheduling strategy for the power grid message to be processed based on system resources and processing requirements of the power grid message to be processed; According to the scheduling strategy, the power grid message to be processed is allocated to the corresponding operator chain for parsing and processing, and a parsing result of the power grid message to be processed is obtained.
2. The method according to claim 1, characterized in that The stream computing architecture is based on the basic information of the power grid message to be processed, and an operator chain for parsing the power grid message to be processed is constructed, including: Constructing at least one parsing operator for the power grid message to be processed according to the communication protocol and the type; Based on the streaming computing architecture and the parsing requirements of the power grid message to be processed, each of the parsing operators is constructed into the operator chain.
3. The method according to claim 2, characterized in that The constructing, according to the communication protocol and the type, at least one parsing operator for the to-be-processed power grid message includes: Determining a logical structure of a parsing algorithm for parsing the to-be-processed power grid message according to the communication protocol and the type; the logical structure includes parsing logic for the message header and parsing logic for the data field; Determining a data structure of the parsing algorithm according to the communication protocol and the logical structure; The logical structure, the data structure and the preset exception handling mechanism are encapsulated to construct at least one of the parsing operators.
4. The method according to any one of claims 1 to 3, characterized in that The determining, based on system resources and processing requirements of the power grid message to be processed, a scheduling strategy for the power grid message to be processed includes: Determining the maximum processing capacity of the processing system based on the system resources; the maximum processing capacity includes the maximum number and complexity of messages that can be processed simultaneously when the processing system is in a fully loaded state; The scheduling strategy is determined based on the maximum processing capacity and the processing demand; the scheduling strategy includes any one of a priority-based task scheduling strategy, a time slice-based round-robin scheduling strategy, and a load balancing-based scheduling strategy.
5. The method according to claim 1, wherein The method further comprises: Monitor the usage of the system resources and the processing efficiency of the to-be-processed power grid messages in real time to obtain monitoring results; The scheduling strategy is dynamically adjusted according to the monitoring result.
6. The method according to claim 1, characterized in that The method further comprises: Monitor the operator chain according to preset monitoring indicators of the operator chain to determine the performance status of the operator chain; the preset monitoring indicators include at least one of processing speed, throughput, and resource utilization; The operator chain is optimized according to the performance status.
7. A power grid message parsing device, characterized in that: The device comprises: A construction module is configured to construct an operator chain for parsing the power grid message to be processed based on a stream computing architecture and according to basic information of the power grid message to be processed; the basic information includes a communication protocol, parsing requirements, and type corresponding to the power grid message to be processed; the stream computing architecture is determined based on the system requirements of the processing system; the processing system includes a processing system of a computer device or a processing system of a distributed cluster; A determination module, configured to determine a scheduling strategy for the power grid message to be processed based on system resources and processing requirements of the power grid message to be processed; The parsing module is used to assign the pending power grid message to the corresponding operator chain for parsing according to the scheduling strategy to obtain the parsing result of the pending power grid message.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. 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 according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.