Power grid real-time data reasoning analysis system and method based on Rete algorithm optimization
By adopting a real-time data inference and analysis system based on Rete algorithm optimization in the power grid system, the inefficiency and complexity of traditional power grid systems in real-time data processing and rule execution are solved, and the second-level rule matching and event triggering are achieved, rapid fault location and dynamic optimization are improved, and the intelligent operation and maintenance capabilities of the power grid are improved.
Patent Information
- Application Number
- CN202411747920.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-05-02
AI Technical Summary
Traditional power grid systems have problems such as inefficiency in real-time data acquisition and processing, complex rules execution and inability to respond flexibly to dynamic changes, resulting in delayed troubleshooting or missing the best optimization opportunity.
The real-time data inference and analysis system of the power grid is optimized based on the Rete algorithm. Multi-source heterogeneous real-time data is obtained through the data acquisition module, the streaming data processing module performs fragmented parallel processing, the rule engine module builds a dynamic rule network for lazy rule loading and multi-dimensional windowed rule processing, the inference and analysis module performs second-level rule matching and event triggering, and dynamically optimizes the grid operation parameters.
It realizes the second-level rule matching and event triggering of GB-level power grid data, quickly locates faults, provides processing suggestions, significantly reduces fault response time, dynamically optimizes grid operating parameters, and improves the intelligent operation and maintenance capabilities of the power grid.
Smart Images

Figure CN119917253A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart grid technology, and in particular to a power grid real-time data reasoning and analysis system and method based on Rete algorithm optimization. Background Art
[0002] Traditional power grid system data collection and processing methods, especially in terms of real-time and efficiency, can no longer meet the requirements of modern power grids.
[0003] In terms of rule engines, although some rule-based reasoning methods have been applied to power grid fault diagnosis and operation optimization, many systems have problems such as low rule execution efficiency, difficulty in rule updating, and complex processing logic. Especially when the power grid faces dynamic changes and emergencies, existing systems are often unable to respond flexibly to these changes, resulting in delays in fault processing or missing the best optimization opportunity.
[0004] At the same time, existing technologies lack efficient rule windowing and data sharding technologies when processing long- and short-cycle and multi-dimensional data, which limits their application in complex power grid scenarios. Summary of the invention
[0005] The purpose of the present invention is to provide a power grid real-time data reasoning and analysis system and method based on Rete algorithm optimization to solve the problems raised in the above background technology.
[0006] To achieve the above object, the present invention provides the following technical solution: a real-time data reasoning and analysis system for a power grid based on Rete algorithm optimization, comprising:
[0007] Data acquisition module for:
[0008] Through the IoT platform and edge computing devices, multi-source heterogeneous real-time data streams from the power grid are obtained, and data preprocessing is performed on the collected real-time data streams;
[0009] Streaming data processing module, used for:
[0010] Shard and process real-time data in parallel, and convert data computing tasks into subtasks that can be executed in parallel through DAG-based task sharding;
[0011] Rules engine module for:
[0012] Based on the Rete algorithm optimization, a dynamic rule network is constructed. The dynamic rule network includes rule grouping, topology optimization and memory compression, performs lazy rule loading, dynamically loads required rules according to real-time computing tasks, and processes long and short time windows of real-time streaming data through multi-dimensional windowing rules;
[0013] Reasoning parsing module, used for:
[0014] Perform second-level rule matching and event triggering on GB-level power grid data within a unit time, locate power grid faults and generate processing suggestions, evaluate the power grid operation status in real time, and dynamically optimize and adjust the power grid operation parameters;
[0015] Graphical rule building blocks for:
[0016] Provide a visual rule editor, which includes a rule set designer, a decision tree designer, and a rule flow designer. Based on the visual rule editor, rule configuration and debugging can be completed by dragging and dropping, and a rule base and an operator base can be built;
[0017] Optimized monitoring module for:
[0018] The optimization monitoring module is used to monitor the system operation status, which includes rule matching efficiency, data processing throughput and system resource utilization, and automatically optimize rule execution and resource allocation strategies according to load prediction and feedback mechanisms;
[0019] System management module for:
[0020] Provide unified management of the rule base, operator base and system, and provide multi-user permission management.
[0021] Furthermore, the data acquisition module includes:
[0022] Data access unit, used for:
[0023] Access to real-time data streams from IoT platforms and edge computing devices, including the operating status of power equipment, environmental sensor data, and dynamic information generated by business systems;
[0024] Data pre-processing unit, used for:
[0025] Clean and standardize the incoming real-time data stream;
[0026] The data cache distribution unit is used to:
[0027] The real-time data stream is temporarily stored in the memory, and the preprocessed real-time data stream is distributed to different task queues of the streaming data processing module according to the task priority.
[0028] Furthermore, the streaming data processing module includes:
[0029] Task slicing unit, used for:
[0030] Slice the real-time data stream based on data characteristics, including time dimension, spatial region, and data type, generate a DAG-structured task topology, and decompose the overall computing task into independently executable subtasks, where the task topology represents computing tasks with points and the dependencies between tasks with edges;
[0031] Parallel computing units for:
[0032] Receive the DAG structure generated by the task slicing unit, execute subtasks in parallel based on multi-threading according to task dependencies, monitor the load of computing nodes in real time, and allocate tasks to the nodes with the best performance through dynamic load balancing strategies;
[0033] Result merging unit, used to:
[0034] Collect the subtask outputs of the parallel computing unit and merge the calculation results in sequence according to the DAG topology and calculation logic.
[0035] Furthermore, the rule engine module includes:
[0036] Rule network building blocks for:
[0037] Based on the Rete algorithm, the rule network is dynamically constructed. Based on the relevance of the rules in the rule base, the rules are grouped according to the conditional characteristics. The rule nodes with shared conditions are merged into a single node through the rule topology optimization algorithm. The rule network structure is dynamically adjusted according to the rule priority.
[0038] Rule loading execution unit, used to:
[0039] In the process of building the rule network, the rule nodes are pre-labeled to mark the usage frequency and priority of the rule nodes. When the task is executed, the rule nodes are loaded on demand through the lazy loading algorithm, and the optimal matching order is calculated through dynamic programming.
[0040] Windowed rule processing unit, used to:
[0041] Dynamically divide real-time streaming data into fixed-length time windows and sliding time windows, perform aggregation operations on data within the window, and match it with predefined rule conditions. Use multi-threading to assign rule calculation tasks for different time windows. At the same time, perform window segmentation processing and result merging for ultra-long time window rules.
[0042] Furthermore, the reasoning and parsing module includes:
[0043] Event trigger unit, used to:
[0044] Perform secondary verification on the matching results of the rule engine and the business rule library, filter unnecessary event triggers, define event priority levels, dynamically adjust the trigger sequence according to event type and severity, and send the trigger events to relevant business modules through message queues and event buses;
[0045] Real-time evaluation unit for:
[0046] Aggregate and calculate the real-time data provided by the rule engine to generate key indicators of the current status, including voltage fluctuation and frequency deviation. Compare the key indicators with historical operation data and predefined benchmark values to identify abnormal conditions that deviate from the normal range, generate an operation status assessment report, and mark the equipment and areas that need to be monitored;
[0047] Dynamic optimization unit for:
[0048] Generate optimization suggestions based on the evaluation results, which include adjusting the equipment operating status, redistributing the load, and optimizing the scheduling strategy. Adjust the optimization goals in real time, which include energy saving, stable operation, and minimizing the risk of failure. Control the operating parameters of related equipment through rule triggering, monitor the optimized operating effect, compare it with the original state, and dynamically adjust the optimization plan.
[0049] Furthermore, the graphical rule construction module includes:
[0050] Rule editing unit, used for:
[0051] The rule elements are displayed through visual components. The rule elements include condition nodes, logic operator nodes and action nodes. The rule logic can be created by dragging the rule element nodes, and conflicts and circular dependencies in the rule logic can be detected in real time, and warnings will be issued when conflicts and circular dependencies occur.
[0052] The rule operator library management unit is used to:
[0053] The operator library is managed by dynamic loading, and only the operators required for the current rule design are loaded. A standardized interface and attribute configuration template are defined for each operator, and an operator search and classification path is provided.
[0054] Rule simulation verification unit, used for:
[0055] Build a virtual rule execution environment, simulate the process of matching real data flow with rules, and compare the rule simulation output with the expected result.
[0056] Furthermore, the optimization monitoring module includes:
[0057] Performance monitoring unit for:
[0058] Insert lightweight performance monitoring components at key nodes of each module to collect key indicator data such as task execution time, memory usage, and processing queue length, where the key nodes include data collection, streaming processing, and rule engines;
[0059] Through data aggregation and visualization, dynamic trends of key indicator data can be displayed, and performance threshold alarms can be set;
[0060] Load prediction unit, used to:
[0061] Based on real-time monitoring data and historical operating data, the time series forecasting model is used to analyze historical load trends, predict future short-term and long-term load changes, generate dynamic forecast results of the current load, compare the forecast results with the current resource utilization, identify situations where resources may be insufficient or excessive, and prompt the system to perform pre-adjustment.
[0062] Furthermore, the optimization monitoring module further includes:
[0063] Automatic tuning unit for:
[0064] Based on the load prediction results and the current running status, the rule matching priority and execution path are dynamically adjusted, and the task slicing parameters in the streaming data processing module are adaptively optimized. The task slicing parameters include the slicing size and the task queue length.
[0065] Furthermore, the system management module includes:
[0066] The rule base management unit is used to:
[0067] Define a unique identifier for each rule, store the rule content, conditions, priority and applicable scenario data, record the rule update history, establish a role-based permission system, and limit access and operation permissions to the rules through user identity authentication and role assignment;
[0068] User rights management unit, used to:
[0069] Define the mapping relationship between user roles and operation permissions, establish an operation log recording system, and record each system operation of the user on the system in real time. The system operation includes time, operation content and scope of impact.
[0070] Furthermore, the real-time data reasoning and analysis method of the power grid based on the Rete algorithm optimization is applied to the above-mentioned real-time data reasoning and analysis system of the power grid based on the Rete algorithm optimization, and includes the following steps:
[0071] Real-time data collection: access to multi-source heterogeneous real-time data streams from the power grid through the IoT platform and edge computing devices, and pre-process the real-time data streams;
[0072] Data is processed in parallel by sharding, and a task topology is generated based on data characteristics, dependencies between tasks are defined, subtasks are executed in a distributed manner, and the load of computing nodes is monitored in real time. After subtasks are completed, the results are merged according to the DAG topology structure.
[0073] Optimize rule network construction, use the Rete algorithm to optimize the rule engine, group rules and optimize topology according to the relevance of rules in the rule base, merge shared condition nodes, dynamically load required rules according to real-time computing needs, and divide fixed-length time windows or sliding time windows;
[0074] Rule matching reasoning and analysis: Based on the optimized rule network, it performs rule matching in seconds, extracts key information and generates event trigger signals. It combines the business rule library to perform secondary verification and event filtering, and locates power grid faults based on the rule matching results.
[0075] Dynamic optimization of status assessment conducts real-time assessment of the grid operation status, generates optimization suggestions based on the assessment results, and adjusts the grid equipment operation parameters through rule triggering.
[0076] Compared with the prior art, the present invention has the following beneficial effects:
[0077] 1. Through modular design, the present invention integrates functions such as multi-source heterogeneous data acquisition, streaming data processing, rule engine reasoning and dynamic optimization, and realizes efficient processing of real-time data of the power grid. The data acquisition module can efficiently access data streams from the Internet of Things platform and edge computing devices, and ensure data quality through data cleaning and standardization. The streaming data processing module uses DAG-based task sharding and parallel computing technology to significantly improve the throughput and real-time performance of data processing. The rule engine module uses a dynamic rule network optimized by the Rete algorithm to reduce rule matching redundancy and improve matching efficiency, thereby supporting the rapid processing and reasoning of massive data in the power grid.
[0078] 2. The reasoning and parsing module of the present invention combines the rule engine and event triggering technology to realize real-time evaluation of the operating status of the power grid and rapid fault location. Through efficient rule matching and reasoning analysis, the system can quickly identify abnormal conditions in the power grid and provide processing suggestions, thereby significantly reducing the fault response time. The dynamic optimization unit automatically adjusts the operating parameters of the power grid equipment according to the real-time evaluation results, achieving the goals of energy saving, stable operation and minimization of fault risks, and improving the intelligent operation and maintenance capabilities of the power grid.
[0079] 3. The optimization monitoring module of the present invention ensures that the system can still operate stably and efficiently under high load and complex tasks by real-time monitoring of system performance, load prediction and automatic tuning, and tracks key indicators in real time. Through data aggregation and visualization, it helps to timely discover and solve system bottlenecks. Based on historical data and real-time data, it can predict future load changes and adjust resources in advance to avoid resource waste or overload. According to the prediction results, the task allocation and rule matching priority are adjusted, realizing adaptive optimization of system resources and ensuring the efficient operation of the power grid under different workloads. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 It is a schematic diagram of the modules of the real-time data reasoning and parsing system of the present invention;
[0081] Figure 2 It is a flowchart of the real-time data reasoning and parsing method of the present invention. DETAILED DESCRIPTION
[0082] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0083] See also Figure 1 , the present invention provides the following technical solutions:
[0084] The real-time data reasoning and analysis system of the power grid based on Rete algorithm optimization includes:
[0085] Data acquisition module for:
[0086] Through the IoT platform and edge computing devices, multi-source heterogeneous real-time data streams from the power grid are obtained, and data preprocessing is performed on the collected real-time data streams;
[0087] Streaming data processing module, used for:
[0088] Shard and process real-time data in parallel, and convert data computing tasks into subtasks that can be executed in parallel through DAG-based task sharding;
[0089] Rules engine module for:
[0090] Based on the Rete algorithm optimization, a dynamic rule network is constructed. The dynamic rule network includes rule grouping, topology optimization and memory compression, performs lazy rule loading, dynamically loads required rules according to real-time computing tasks, and processes long and short time windows of real-time streaming data through multi-dimensional windowing rules;
[0091] Reasoning parsing module, used for:
[0092] Perform second-level rule matching and event triggering on GB-level power grid data within a unit time, locate power grid faults and generate processing suggestions, evaluate the power grid operation status in real time, and dynamically optimize and adjust the power grid operation parameters;
[0093] Graphical rule building blocks for:
[0094] Provide a visual rule editor, which includes a rule set designer, a decision tree designer, and a rule flow designer. Based on the visual rule editor, rule configuration and debugging can be completed by dragging and dropping, and a rule base and an operator base can be built;
[0095] Optimized monitoring module for:
[0096] The optimization monitoring module is used to monitor the system operation status, which includes rule matching efficiency, data processing throughput and system resource utilization, and automatically optimize rule execution and resource allocation strategies according to load prediction and feedback mechanisms;
[0097] System management module for:
[0098] Provide unified management of the rule base, operator base and system, and provide multi-user permission management.
[0099] In the above embodiment, through modular design, the efficiency and accuracy of power grid data processing and reasoning are significantly improved. The system integrates multi-source heterogeneous data collection, streaming processing, rule engine reasoning, dynamic optimization and visual rule design functions, effectively responding to the complexity and diversified needs of massive real-time data in the power grid.
[0100] In the above embodiment, the data acquisition module efficiently accesses multi-source heterogeneous data streams, the streaming data processing module realizes high-throughput real-time data processing based on DAG task sharding and parallel computing, the rule engine module optimizes the dynamic rule network through the Rete algorithm, reduces rule matching redundancy, and supports multi-dimensional window rule calculation, the reasoning and parsing module combines rule matching and event triggering to quickly locate power grid faults, provide operation status evaluation and dynamic optimization suggestions, the graphical rule construction module reduces the complexity of rule design and enhances rule adaptability through intuitive rule editing and verification tools, and the optimization monitoring module ensures system stability and resource utilization efficiency through real-time performance monitoring, load prediction and automatic tuning.
[0101] Data acquisition module, including:
[0102] Data access unit, used for:
[0103] Access to real-time data streams from IoT platforms and edge computing devices, including the operating status of power equipment, environmental sensor data, and dynamic information generated by business systems;
[0104] Data pre-processing unit, used for:
[0105] Clean and standardize the incoming real-time data stream;
[0106] The data cache distribution unit is used to:
[0107] The real-time data stream is temporarily stored in the memory, and the preprocessed real-time data stream is distributed to different task queues of the streaming data processing module according to the task priority.
[0108] In the above embodiment, multi-source heterogeneous data collection is used to realize access to multiple real-time data streams from the Internet of Things platform and edge computing devices, including the operating status of power equipment and environmental sensor data, to provide a complete data basis for subsequent processing. Through the cleaning and standardization operations of the data preprocessing unit, noise data and outliers are eliminated to ensure data consistency and standardization. The data cache distribution unit distributes the data stream to the task queue according to the task priority, thereby improving the data scheduling efficiency of the streaming processing module.
[0109] Streaming data processing module, including:
[0110] Task slicing unit, used for:
[0111] Slice the real-time data stream based on data characteristics, including time dimension, spatial region, and data type, generate a DAG-structured task topology, and decompose the overall computing task into independently executable subtasks, where the task topology represents computing tasks with points and the dependencies between tasks with edges;
[0112] Parallel computing units for:
[0113] Receive the DAG structure generated by the task slicing unit, execute subtasks in parallel based on multi-threading according to task dependencies, monitor the load of computing nodes in real time, and allocate tasks to the nodes with the best performance through dynamic load balancing strategies;
[0114] Result merging unit, used to:
[0115] Collect the subtask outputs of the parallel computing unit and merge the calculation results in sequence according to the DAG topology and calculation logic.
[0116] In the above embodiment, complex computing tasks are decomposed into independently executable subtasks through DAG-based task slicing technology, supporting high-concurrency real-time processing, monitoring the load of computing nodes through dynamic load balancing strategies, and adjusting task allocation in real time to make full use of computing resources and avoid overload or idle resources. The slicing results of parallel computing outputs are merged according to DAG dependencies to ensure the integrity and correctness of the results and provide high-quality data input for rule matching.
[0117] Rule engine module, including:
[0118] Rule network building blocks for:
[0119] Based on the Rete algorithm, the rule network is dynamically constructed. Based on the relevance of the rules in the rule base, the rules are grouped according to the conditional characteristics. The rule nodes with shared conditions are merged into a single node through the rule topology optimization algorithm. The rule network structure is dynamically adjusted according to the rule priority.
[0120] Rule loading execution unit, used to:
[0121] In the process of building the rule network, the rule nodes are pre-labeled to mark the usage frequency and priority of the rule nodes. When the task is executed, the rule nodes are loaded on demand through the lazy loading algorithm, and the optimal matching order is calculated through dynamic programming.
[0122] Windowed rule processing unit, used to:
[0123] Dynamically divide real-time streaming data into fixed-length time windows and sliding time windows, perform aggregation operations on data within the window, and match it with predefined rule conditions. Use multi-threading to assign rule calculation tasks for different time windows. At the same time, perform window segmentation processing and result merging for ultra-long time window rules.
[0124] In the above embodiment, the dynamic rule network optimized by the Rete algorithm is used to realize rule grouping and node merging, reduce redundant calculations, improve rule execution efficiency, dynamically load rules on demand, avoid unnecessary rules occupying resources, realize efficient use of memory, and meet the needs of complex business scenarios of the power grid through flexible processing of long and short time window rules.
[0125] Reasoning parsing module, including:
[0126] Event trigger unit, used to:
[0127] Perform secondary verification on the matching results of the rule engine and the business rule library, filter unnecessary event triggers, define event priority levels, dynamically adjust the trigger sequence according to event type and severity, and send the trigger events to relevant business modules through message queues and event buses;
[0128] Real-time evaluation unit for:
[0129] Aggregate and calculate the real-time data provided by the rule engine to generate key indicators of the current status, including voltage fluctuation and frequency deviation. Compare the key indicators with historical operation data and predefined benchmark values to identify abnormal conditions that deviate from the normal range, generate an operation status assessment report, and mark the equipment and areas that need to be monitored;
[0130] Dynamic optimization unit for:
[0131] Generate optimization suggestions based on the evaluation results, which include adjusting the equipment operating status, redistributing the load, and optimizing the scheduling strategy. Adjust the optimization goals in real time, which include energy saving, stable operation, and minimizing the risk of failure. Control the operating parameters of related equipment through rule triggering, monitor the optimized operating effect, compare it with the original state, and dynamically adjust the optimization plan.
[0132] In the above embodiment, event filtering and priority adjustment are performed in combination with the business rule library, real-time event response is achieved through message queues and event buses, fault handling efficiency is improved, key indicators are generated by matching data through aggregation rules, abnormal conditions are quickly identified, and key monitoring areas are marked to assist in precise operation and maintenance. Optimization suggestions are generated based on the evaluation results and operating parameters are adjusted in real time to support energy saving and minimize fault risks, thereby improving the economy and reliability of power grid operation.
[0133] Graphical rule building blocks, including:
[0134] Rule editing unit, used for:
[0135] The rule elements are displayed through visual components. The rule elements include condition nodes, logic operator nodes and action nodes. The rule logic can be created by dragging the rule element nodes, and conflicts and circular dependencies in the rule logic can be detected in real time, and warnings will be issued when conflicts and circular dependencies occur.
[0136] The rule operator library management unit is used to:
[0137] The operator library is managed by dynamic loading, and only the operators required for the current rule design are loaded. A standardized interface and attribute configuration template are defined for each operator, and an operator search and classification path is provided.
[0138] Rule simulation verification unit, used for:
[0139] Build a virtual rule execution environment, simulate the process of matching real data flow with rules, and compare the rule simulation output with the expected result.
[0140] In the above embodiment, by providing an intuitive drag-and-drop rule creation method, rule logic conflicts and circular dependencies are detected in real time, the complexity of rule design is reduced, and the requirements of multi-scenario rule design are met through dynamic loading and customized operators. The efficiency of rule reuse is improved, a virtual execution environment is built, the rule matching process is simulated, and the output is compared with the expected results to ensure the logical correctness of the rules.
[0141] Optimize monitoring modules, including:
[0142] Performance monitoring unit for:
[0143] Insert lightweight performance monitoring components at key nodes of each module to collect key indicator data such as task execution time, memory usage, and processing queue length, where the key nodes include data collection, streaming processing, and rule engines;
[0144] Through data aggregation and visualization, dynamic trends of key indicator data can be displayed, and performance threshold alarms can be set;
[0145] Load prediction unit, used to:
[0146] Based on real-time monitoring data and historical operation data, the time series forecasting model is used to analyze historical load trends, predict future short-term and long-term load changes, generate dynamic forecast results of the current load, compare the forecast results with the current resource utilization, identify situations where resources may be insufficient or excessive, and prompt the system to perform pre-adjustment;
[0147] Automatic tuning unit for:
[0148] Based on the load prediction results and the current running status, the rule matching priority and execution path are dynamically adjusted, and the task slicing parameters in the streaming data processing module are adaptively optimized. The task slicing parameters include the slicing size and the task queue length.
[0149] In the above embodiment, dynamic performance feedback is provided through key indicator monitoring and visualization, and performance threshold alarms are supported to ensure system stability, predict future load changes based on time series, identify resource shortages or surpluses in advance, improve system regulation capabilities, dynamically adjust rule matching priorities and task slicing parameters, achieve resource adaptive optimization, and improve overall system efficiency.
[0150] System management module, including:
[0151] The rule base management unit is used to:
[0152] Define a unique identifier for each rule, store the rule content, conditions, priority and applicable scenario data, record the rule update history, establish a role-based permission system, and limit access and operation permissions to the rules through user identity authentication and role assignment;
[0153] User rights management unit, used to:
[0154] Define the mapping relationship between user roles and operation permissions, establish an operation log recording system, and record each system operation of the user on the system in real time. The system operation includes time, operation content and scope of impact.
[0155] In the above embodiment, the security of the rule base and the standardization of its use are ensured through unique identification, version control and permission allocation, rule backtracking and update management are supported, and transparency and traceability of operations are achieved through role mapping and operation log recording, thereby improving the security and reliability of system management.
[0156] See also Figure 2 The real-time data reasoning and parsing method of the power grid based on Rete algorithm optimization is applied to the above-mentioned real-time data reasoning and parsing system of the power grid based on Rete algorithm optimization, and includes the following steps:
[0157] Real-time data collection: access to multi-source heterogeneous real-time data streams from the power grid through the IoT platform and edge computing devices, and pre-process the real-time data streams;
[0158] Data is processed in parallel by sharding, and a task topology is generated based on data characteristics, dependencies between tasks are defined, subtasks are executed in a distributed manner, and the load of computing nodes is monitored in real time. After subtasks are completed, the results are merged according to the DAG topology structure.
[0159] Optimize rule network construction, use the Rete algorithm to optimize the rule engine, group rules and optimize topology according to the relevance of rules in the rule base, merge shared condition nodes, dynamically load required rules according to real-time computing needs, and divide fixed-length time windows or sliding time windows;
[0160] Rule matching reasoning and analysis: Based on the optimized rule network, it performs rule matching in seconds, extracts key information and generates event trigger signals. It combines the business rule library to perform secondary verification and event filtering, and locates power grid faults based on the rule matching results.
[0161] Dynamic optimization of status assessment conducts real-time assessment of the grid operation status, generates optimization suggestions based on the assessment results, and adjusts the grid equipment operation parameters through rule triggering.
[0162] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A real-time data reasoning and analysis system for power grid based on Rete algorithm optimization, characterized by: include: Data acquisition module for: Through the IoT platform and edge computing devices, multi-source heterogeneous real-time data streams from the power grid are obtained, and data preprocessing is performed on the collected real-time data streams; Streaming data processing module, used for: Shard and process real-time data in parallel, and convert data computing tasks into subtasks that can be executed in parallel through DAG-based task sharding; Rules engine module for: Based on the Rete algorithm optimization, a dynamic rule network is constructed. The dynamic rule network includes rule grouping, topology optimization and memory compression, performs lazy rule loading, dynamically loads required rules according to real-time computing tasks, and processes long and short time windows of real-time streaming data through multi-dimensional windowing rules; Reasoning parsing module, used to: Perform second-level rule matching and event triggering on GB-level power grid data within a unit time, locate power grid faults and generate processing suggestions, evaluate the power grid operation status in real time, and dynamically optimize and adjust the power grid operation parameters; Graphical rule building blocks for: Provide a visual rule editor, which includes a rule set designer, a decision tree designer, and a rule flow designer. Based on the visual rule editor, rule configuration and debugging can be completed by dragging and dropping, and a rule base and an operator base can be built; Optimized monitoring module for: The optimization monitoring module is used to monitor the system operation status, which includes rule matching efficiency, data processing throughput and system resource utilization, and automatically optimize rule execution and resource allocation strategies according to load prediction and feedback mechanisms; System management module for: Provide unified management of the rule base, operator base and system, and provide multi-user permission management.
2. The power grid real-time data reasoning and analysis system based on Rete algorithm optimization as claimed in claim 1, characterized in that: The data acquisition module comprises: Data access unit, used for: Access to real-time data streams from IoT platforms and edge computing devices, including the operating status of power equipment, environmental sensor data, and dynamic information generated by business systems; Data pre-processing unit, used for: Clean and standardize the incoming real-time data stream; The data cache distribution unit is used to: The real-time data stream is temporarily stored in the memory, and the preprocessed real-time data stream is distributed to different task queues of the streaming data processing module according to the task priority.
3. The power grid real-time data reasoning and analysis system based on Rete algorithm optimization as claimed in claim 2, characterized in that: The streaming data processing module comprises: Task slicing unit, used for: Slice the real-time data stream based on data characteristics, including time dimension, spatial region, and data type, generate a DAG-structured task topology, and decompose the overall computing task into independently executable subtasks, where the task topology represents computing tasks with points and the dependencies between tasks with edges; Parallel computing units for: Receive the DAG structure generated by the task slicing unit, execute subtasks in parallel based on multi-threading according to task dependencies, monitor the load of computing nodes in real time, and allocate tasks to the nodes with the best performance through dynamic load balancing strategies; Result merging unit, used to: Collect the subtask outputs of the parallel computing unit and merge the calculation results in sequence according to the DAG topology and calculation logic.
4. The power grid real-time data reasoning and analysis system based on Rete algorithm optimization as claimed in claim 3, characterized in that: The rule engine module comprises: Rule network building blocks for: Based on the Rete algorithm, the rule network is dynamically constructed. Based on the relevance of the rules in the rule base, the rules are grouped according to the conditional characteristics. The rule nodes with shared conditions are merged into a single node through the rule topology optimization algorithm. The rule network structure is dynamically adjusted according to the rule priority. Rule loading execution unit, used to: In the process of building the rule network, the rule nodes are pre-labeled to mark the usage frequency and priority of the rule nodes. When the task is executed, the rule nodes are loaded on demand through the lazy loading algorithm, and the optimal matching order is calculated through dynamic programming. Windowed rule processing unit, used to: Dynamically divide real-time streaming data into fixed-length time windows and sliding time windows, perform aggregation operations on data within the window, and match it with predefined rule conditions. Use multi-threading to assign rule calculation tasks for different time windows. At the same time, perform window segmentation processing and result merging for ultra-long time window rules.
5. The power grid real-time data reasoning and analysis system based on Rete algorithm optimization as claimed in claim 4, characterized in that: The reasoning and parsing module comprises: Event trigger unit, used to: Perform secondary verification on the matching results of the rule engine and the business rule library, filter unnecessary event triggers, define event priority levels, dynamically adjust the trigger sequence according to event type and severity, and send the trigger events to relevant business modules through message queues and event buses; Real-time evaluation unit for: Aggregate and calculate the real-time data provided by the rule engine to generate key indicators of the current status, including voltage fluctuation and frequency deviation. Compare the key indicators with historical operation data and predefined benchmark values to identify abnormal conditions that deviate from the normal range, generate an operation status assessment report, and mark the equipment and areas that need to be monitored; Dynamic optimization unit for: Generate optimization suggestions based on the evaluation results, which include adjusting the equipment operating status, redistributing the load, and optimizing the scheduling strategy. Adjust the optimization goals in real time, which include energy saving, stable operation, and minimizing the risk of failure. Control the operating parameters of related equipment through rule triggering, monitor the optimized operating effect, compare it with the original state, and dynamically adjust the optimization plan.
6. The power grid real-time data reasoning and analysis system based on Rete algorithm optimization as claimed in claim 5, characterized in that: The graphical rule construction module includes: Rule editing unit, used for: The rule elements are displayed through visual components. The rule elements include condition nodes, logic operator nodes and action nodes. The rule logic can be created by dragging the rule element nodes, and conflicts and circular dependencies in the rule logic can be detected in real time, and warnings will be issued when conflicts and circular dependencies occur. The rule operator library management unit is used to: The operator library is managed by dynamic loading, and only the operators required for the current rule design are loaded. A standardized interface and attribute configuration template are defined for each operator, and an operator search and classification path is provided. Rule simulation verification unit, used to: Build a virtual rule execution environment, simulate the process of matching real data flow with rules, and compare the rule simulation output with the expected result.
7. The power grid real-time data reasoning and analysis system based on Rete algorithm optimization as claimed in claim 6, characterized in that: The optimization monitoring module comprises: Performance monitoring unit for: Insert lightweight performance monitoring components at key nodes of each module to collect key indicator data such as task execution time, memory usage, and processing queue length, where the key nodes include data collection, streaming processing, and rule engines; The dynamic change trend of key indicator data can be displayed through data aggregation visualization, and performance threshold alarms can be set; Load prediction unit, used to: Based on real-time monitoring data and historical operating data, the time series forecasting model is used to analyze historical load trends, predict future short-term and long-term load changes, generate dynamic forecast results of the current load, compare the forecast results with the current resource utilization, identify situations where resources may be insufficient or excessive, and prompt the system to perform pre-adjustment.
8. The power grid real-time data reasoning and analysis system based on Rete algorithm optimization as claimed in claim 7, characterized in that: The optimization monitoring module further includes: Automatic tuning unit for: Based on the load prediction results and the current running status, the rule matching priority and execution path are dynamically adjusted, and the task slicing parameters in the streaming data processing module are adaptively optimized. The task slicing parameters include the slicing size and the task queue length.
9. The power grid real-time data reasoning and analysis system based on Rete algorithm optimization as claimed in claim 8, characterized in that: The system management module comprises: The rule base management unit is used to: Define a unique identifier for each rule, store the rule content, conditions, priority and applicable scenario data, record the rule update history, establish a role-based permission system, and limit access and operation permissions to the rules through user identity authentication and role assignment; User rights management unit, used to: Define the mapping relationship between user roles and operation permissions, establish an operation log recording system, and record each system operation of the user on the system in real time. The system operation includes time, operation content and scope of impact.
10. A method for reasoning and analyzing real-time data of a power grid based on Rete algorithm optimization, applied to a system for reasoning and analyzing real-time data of a power grid based on Rete algorithm optimization as claimed in claim 9, characterized in that: The following steps are involved: Real-time data collection: access to multi-source heterogeneous real-time data streams from the power grid through the IoT platform and edge computing devices, and pre-process the real-time data streams; Data is processed in parallel by sharding, and a task topology is generated based on data characteristics, dependencies between tasks are defined, subtasks are executed in a distributed manner, and the load of computing nodes is monitored in real time. After subtasks are completed, the results are merged according to the DAG topology structure. Optimize rule network construction, use the Rete algorithm to optimize the rule engine, group rules and optimize topology according to the relevance of rules in the rule base, merge shared condition nodes, dynamically load required rules according to real-time computing needs, and divide fixed-length time windows or sliding time windows; Rule matching reasoning and analysis: Based on the optimized rule network, it performs rule matching in seconds, extracts key information and generates event trigger signals. It combines the business rule library to perform secondary verification and event filtering, and locates power grid faults based on the rule matching results. Dynamic optimization of status assessment conducts real-time assessment of the grid operation status, generates optimization suggestions based on the assessment results, and adjusts the grid equipment operation parameters through rule triggering.
Citation Information
Cited By
Medical data source real-time processing and quality control method based on distributed computing
CN120448756A
Streaming data processing scheduling instruction real-time monitoring system
CN120614323A
Intelligent edge calculation method and system supporting multi-protocol perception and rule-driven processing
CN120751036A
An edge intelligent computing method and system supporting multi-protocol awareness and rule-driven processing
CN120751036B
Electric power communication analysis system and method based on big data
CN121077752A