Graphical power grid business rule engine construction system and method
By building a graphical power grid business rules engine system, using neural network models and distributed computing frameworks, combining fault emergency and security mechanisms, the problem of low matching and analysis efficiency of massive streaming data and business rules is solved, and efficient data processing and rule matching is achieved.
Patent Information
- Application Number
- CN202411749504.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-04-29
AI Technical Summary
In the prior art, the matching and analysis efficiency of massive streaming data with business rules is low, making it difficult to effectively improve the speed and efficiency of analysis and judgment, and the processing of massive real-time data in the power grid is difficult to process.
By building a graphical power grid business rules engine system, using neural network models to analyze events, combining distributed computing framework deployment and execution rules, introducing fault emergency and security mechanisms to achieve efficient data processing and rule matching.
It improves the efficiency and accuracy of rule establishment, realizes the utilization of distributed computing resources, ensures the stable operation of the system in the face of failures, and ensures data security.
Smart Images

Figure CN119903083A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grid business systems, and in particular to a graphical power grid business rule engine construction system and method. Background Art
[0002] The rule engine system is a software tool for processing and executing rule sets. The Rete algorithm is an efficient algorithm for rule matching. It stores and manages matching results by constructing a non-cyclic directed graph (Rete network), thereby avoiding repeated matching of rules and improving matching speed. However, as the size of the rule base increases, the complexity of the Rete network also increases accordingly, resulting in a decrease in matching efficiency and system performance; with the construction of new power systems, the scale of the power grid continues to expand, the number of intelligent monitoring terminals continues to increase, the monitoring range continues to expand, and the monitoring depth continues to increase. The collection of numerous measurement and sensor devices will generate massive multi-source heterogeneous real-time measurement data, showing the main characteristics of big data with large volume, multiple types, fast changes and low value density.
[0003] However, in the existing technology, the matching and analysis efficiency of massive streaming data and business rules is currently low, and conventional technical means are difficult to effectively improve the speed and efficiency of research and judgment execution; secondly, the massive real-time data of the power grid has the characteristics of large data volume, high timeliness, disordered data, and difficulty in filtering interference data. It is necessary to combine complex and changeable business rules to quickly parse and process data, which is difficult to achieve.
[0004] Therefore, it does not meet the existing needs, and we propose a graphical power grid business rule engine construction system and method. Summary of the invention
[0005] The purpose of the present invention is to provide a graphical power grid business rule engine construction system and method, through the front-end user interface, the system displays the rule editing, debugging and management tools of the power grid business in a graphical manner; uses a neural network model to analyze the events triggered in the later stage, and outputs the corresponding power grid business rules; adopts a distributed computing framework to deploy and execute rules, and when processing large-scale data, decomposes the problem into multiple sub-problems, and assigns these sub-problems to different computing nodes for processing, so as to realize distributed computing resources; introduces relevant fault emergency mechanism to solve the fault phenomenon occurring in the system in time; and introduces relevant security mechanism to limit the data access objects in the system to prevent unauthorized access, thereby solving the problems raised in the above-mentioned background technology.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] A graphical power grid business rule engine construction system, comprising:
[0008] A front-end interface construction unit is used to construct a front-end user interface for handling power grid services, and to graphically display the rule editing, debugging and management tools for power grid services;
[0009] A rule model building unit is used to build a neural network model, and use historical rule engine data and corresponding related events for training and testing, so that the neural network model can learn and extract rules from historical rule engine data and corresponding related events, complete the intelligent generation and update of power grid business rules, and put the optimized neural network model into the power grid business system for use;
[0010] Distributed operation and maintenance unit, which is used to deploy and execute rules using a distributed computing framework. When processing large-scale data, it decomposes the problem into multiple sub-problems and assigns these sub-problems to different computing nodes for processing, thus realizing distributed computing resources.
[0011] The rule mechanism construction unit is used to introduce fault-tolerant mechanism and backup mechanism to build a fault emergency mechanism in the rule engine system, introduce the circuit breaker mode to perform threshold monitoring of the failure rate to avoid the spread of failures; and encrypt the data access rights in the rule engine system. The rule engine system verifies the identity of the user and grants corresponding permissions to prevent unauthorized access.
[0012] Furthermore, it also includes:
[0013] The back-end logic processing unit is responsible for receiving requests from the front-end user interface, parsing, processing and executing rules according to the request content, and returning the results to the front-end interface construction unit;
[0014] The rule data collection unit is used to collect historical rule engine data and corresponding related events in power grid business, and associate and save the historical rule engine data and corresponding related events based on the ReTe network structure to form a ReTe relational database.
[0015] Furthermore, the front-end interface construction unit includes:
[0016] The rule editing module is used to create edit links for visual power grid business rules, allowing users to add, modify, and delete power grid business rules in a visual way;
[0017] The rule management module is used to optimize the management of the links based on the power grid business rule editing links, so that users can view, filter, sort, export and back up the power grid business rules;
[0018] The rule testing module is used to test the grid business rule editing link, allowing users to simulate the grid business rules online and monitor the rule execution status and results in real time;
[0019] The rule analysis module is used to analyze the power grid business rules submitted by users to check whether the syntax is correct, the semantics is reasonable, and whether they comply with the rule base.
[0020] Furthermore, the rule model building unit includes:
[0021] The sample processing module is used to select some historical rule engine data and corresponding related events, and clean and normalize the data and related event content to make the format of the data and related events conform to the neural network model learning; and divide the processed data and related events into training sets and test sets;
[0022] The sample training module is used to import the training set and the test set into the neural network model for training and testing. The neural network model parses the content of the associated events in the training set to obtain the feature content and outputs the corresponding business rules for the feature content. The training results are then verified with the test set to determine whether the business rules output by the neural network model are accurate.
[0023] The model optimization module is used to continuously collect different types of power grid business rules and corresponding related events, and regularly optimize and update the neural network model based on the latest events and power grid business rules.
[0024] Furthermore, the distributed operation and maintenance unit includes:
[0025] The framework creation module is used to deploy and execute rules using a distributed computing framework. When processing large-scale data, the problem is decomposed into multiple sub-problems, and these sub-problems are assigned to different computing nodes for processing. The load balancing algorithm is used to distribute computing tasks, and parallel computing technology is introduced simultaneously to ensure computing efficiency.
[0026] Operation and maintenance monitoring module, used to continuously monitor distributed systems, detect and report abnormal conditions in a timely manner;
[0027] Resource tuning module, which is used to uniformly manage and schedule resources in distributed systems to ensure rational use and efficient operation of resources;
[0028] The fault diagnosis module is used to conduct in-depth analysis of faults in distributed systems, find out the causes of the faults, and propose effective solutions;
[0029] Security protection module, which is used to protect the distributed system from malicious attacks and destruction through real-time monitoring and access control;
[0030] The performance optimization module is used to continuously track the work efficiency of the distributed system, identify performance bottlenecks and optimize and improve them. Specifically, in a distributed environment, task scheduling may be affected by factors such as network latency and hardware resource fluctuations. In order to ensure the utilization of computing resources, we need to monitor these factors in real time and dynamically adjust tasks. For example, we can use strategies such as adaptive adjustment of scheduling cycles and task priorities to cope with real-time changes in the environment.
[0031] The environment management module is used to uniformly manage and maintain the environment on which the distributed system depends;
[0032] The upgrade management module is used to manage the versions and patches of distributed systems to ensure the security, reliability and optimal performance of the system.
[0033] Furthermore, the rule mechanism construction unit includes:
[0034] The first mechanism module is used to introduce backup mechanism and fault-tolerant mechanism to build the rule engine system. By deploying backup components on key components in the rule engine system, once the main component fails, the backup component can quickly take over the work to ensure the continuity of the system; by regularly sending heartbeat signals to monitor the health status of the components, if an abnormality is detected in the component, the system will respond in time and take corresponding measures;
[0035] The second mechanism module is used to introduce the circuit breaker mode. By monitoring the call requests of the system, if it is detected that the failure rate exceeds the threshold, the access to the faulty component is interrupted to prevent the spread of the failure.
[0036] The encryption mechanism module is used to encrypt data access rights in the rule engine system. When a user logs in to the rule engine system, he / she provides a valid username and password for verification. The system will compare the user's username and password. If they match, the user will be granted the corresponding permissions.
[0037] Furthermore, the backend logic processing unit includes:
[0038] The rule parsing module is used to parse the power grid business rule file sent by the front-end user interface into a Python object, and perform semantic analysis and processing on the parsed rule object according to the rule template and rule library of the power grid business rule engine, generate a rule execution plan, and perform rule matching and optimization;
[0039] The rule execution module is used to execute the rule execution plan of the power grid business rule engine and monitor the rule execution status and results in real time; it then returns the rule execution results to the front-end user interface and provides feedback and suggestions.
[0040] Furthermore, the rule data collection unit includes:
[0041] The data collection module is used to collect various business rule data from the enterprise's existing business systems, including: rule name, description, trigger conditions, processing logic, and execution results;
[0042] The data sorting module is used to classify, archive, and remove duplicates of the collected business rule data; and based on the rule data, comprehensively evaluate the enterprise's power grid business rules; and extract characteristic information from the power grid business rule data, and improve and innovate the existing power grid business rules based on the characteristic information, and put forward new power grid business rule suggestions;
[0043] The database creation module is used to create a ReTe relational database and import historical rule engine data and corresponding related events into the ReTe relational database, use the ReTe algorithm to logically associate the historical rule engine data with the corresponding related events, and use the ReTe algorithm to prioritize the historical rule engine data according to the importance of related events.
[0044] A method for constructing a graphical power grid business rule engine comprises the following steps:
[0045] Step 1: By building a front-end user interface for handling power grid business, the system can display the rule editing, debugging and management tools of power grid business in a graphical way;
[0046] Step 2: The collected historical rule engine data and corresponding related events are logically associated and stored through the ReTe network structure to form a ReTe relational database;
[0047] Step 3: Use the historical rule engine data and corresponding related events in the ReTe relational database to train the neural network model, use the optimized neural network model to analyze the events triggered later, and output the corresponding power grid business rules;
[0048] Step 4: Use a distributed computing framework to deploy and execute rules. When processing large-scale data, decompose the problem into multiple sub-problems and assign these sub-problems to different computing nodes for processing, thus realizing distributed computing resources.
[0049] Step 5: Introduce relevant fault emergency mechanisms to promptly resolve system faults; and introduce relevant security mechanisms to limit data access objects within the system to prevent unauthorized access.
[0050] Furthermore, in step 2, forming a ReTe relational database specifically includes the following steps:
[0051] Define rules and facts: define the rules and corresponding related events in power grid business;
[0052] Build Rete network: Use the Rete algorithm to build the network structure of the rule engine. The Rete algorithm performs pattern matching by forming a Rete network.
[0053] Execution rules: After the matching is completed, the matching rules are executed according to the priority of the power grid business rules; if all conditions are met, the corresponding operation is performed;
[0054] Cache intermediate results: The Rete algorithm caches intermediate results and optimizes performance based on the intermediate results. It obtains corresponding information in the process of adding related events and reuses it in subsequent deletion operations, reducing unnecessary calculations.
[0055] Compared with the prior art, the present invention has the following beneficial effects:
[0056] The present invention, by constructing a front-end user interface for handling power grid business, enables the system to display the rule editing, debugging and management tools of power grid business in a graphical manner, thereby supporting the business drag-and-drop rapid construction of rule decision flow, so that business personnel can quickly and accurately build rules; using the ReTe network structure to logically associate and store the collected historical rule engine data and corresponding related events to form a ReTe relational database; and through the training of the neural network model, using the optimized neural network model to analyze the events triggered later, and output the corresponding power grid business rules; thereby reducing the manual labor burden of grassroots personnel and improving the efficiency and accuracy of rule establishment; using a distributed computing framework to deploy and execute rules, when processing large-scale data, decomposing the problem into multiple sub-problems, and assigning these sub-problems to different computing nodes for processing, realizing distributed computing resources, thereby accelerating the computing process; introducing relevant fault emergency mechanisms, and promptly solving the fault phenomena occurring in the system; ensuring that the system can maintain stable operation in the face of component failures, thereby reducing the probability of system crashes; and introducing relevant security mechanisms to limit data access objects in the system to prevent unauthorized access, ensuring that only authorized users can access the rule engine, and ensuring the security of data in transmission and storage. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 A system composition diagram is constructed for the graphical power grid business rule engine of the present invention. DETAILED DESCRIPTION
[0058] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings 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.
[0059] In order to solve the current technical problems, the matching and analysis efficiency of massive streaming data and business rules is low, and conventional technical means are difficult to effectively improve the speed and efficiency of research and judgment execution; secondly, the massive real-time data of the power grid has the characteristics of large data volume, high timeliness, disordered data, and difficulty in filtering interference data. It is necessary to combine complex and changeable business rules to quickly parse and process data, which is difficult to achieve technical problems. Please refer to Figure 1 , this embodiment provides the following technical solutions:
[0060] A graphical power grid business rule engine construction system, comprising:
[0061] The front-end interface construction unit is used to build a front-end user interface for handling power grid business, and to display the rule editing, debugging and management tools of power grid business in a graphical way; specifically, by designing an intuitive and rich graphical user interface, it supports users to drag, connect and configure rule elements. The front-end interface construction unit includes:
[0062] The rule editing module is used to create edit links for visualized power grid business rules, allowing users to add, modify, and delete power grid business rules in a visual way. Specifically, in order to facilitate users to deploy and execute rules in a distributed environment, a visual distributed computing interface is developed to allow users to intuitively see the distribution status, progress, and resource usage of computing tasks, thereby ensuring that users can easily manage and monitor tasks in a distributed environment.
[0063] The rule management module is used to optimize the management of the links based on the editing links of the power grid business rules, so that users can view, filter, sort, export and back up the power grid business rules; specifically, in order to improve the user experience, corresponding technologies can be used, such as paging, zooming, etc. When the number of rules is too large, you can consider using scroll bars or paging buttons for paging; provide a powerful filtering and screening function, so that users can easily find the required rules according to different conditions; for example, filter according to the name, time range, triggering event, etc. of the rule; and allow users to sort the rules according to their needs, such as sorting according to the creation time of the rule, the update time of the rule, the importance of the rule, etc.; allow users to export the rules to common formats, such as Excel, CSV, etc., for users to further process; finally, a one-click backup function can also be provided, so that users can back up all the rules, just in case. In summary, the implementation of the above functions can not only improve the user experience, but also help users manage and operate the rules more conveniently.
[0064] The rule testing module is used to test the grid business rule editing link, so that users can simulate the grid business rules online and monitor the rule execution status and results in real time. Specifically, by simulating the actual grid business scenario, the grid business rule editing link is tested online. It is convenient for users to find and solve problems in time and improve the effectiveness and stability of grid business rules. At the same time, the execution status and results of the rules are monitored in real time, which can quickly respond to user needs and provide users with convenient and efficient grid business rule testing services, which helps to improve the stability and security of grid business and reduce operational risks.
[0065] The rule analysis module is used to analyze the power grid business rules submitted by users, check whether the syntax is correct, whether the semantics is reasonable, and whether it complies with the rule base; specifically, by performing syntax analysis on the rules submitted by users, ensure that they comply with the specifications of the programming language, such as indentation, line breaks, etc. If the syntax is wrong, the rule analysis module should prompt the user to make corrections. Perform semantic analysis on the rules submitted by users to check whether their logic is clear and reasonable, and whether there are logical errors or contradictions. If there are problems with the rules, the rule analysis module should prompt the user to modify them. Compare the rules submitted by the user with the rules in the rule base to determine whether they meet the requirements of the rule base. If the rules do not comply with the rule base, the rule analysis module should prompt the user to make adjustments. According to the user's rule definition, the corresponding code implementation is automatically generated to support the user's rule execution.
[0066] The back-end logic processing unit is responsible for receiving requests from the front-end user interface, parsing, processing and executing rules according to the request content, and returning the results to the front-end interface construction unit; the back-end logic processing unit includes:
[0067] The rule parsing module is used to parse the JSON or XML format power grid business rule file sent by the front-end user interface into a Python object, and according to the rule template and rule library of the power grid business rule engine, perform semantic analysis and processing on the parsed rule object, generate a rule execution plan, and perform rule matching and optimization; specifically, by receiving the power grid business rule file from the front-end user interface, it can be in JSON or XML format. The file should contain information such as the definition and constraints of the rule; parse the received rule file into a Python object, and methods such as json.l oads() or xml.etree.E l ementTree.to_python() can be used; according to the rule template and rule library, perform semantic analysis and processing on the parsed rule object, such as: rule name, conditional expression, action, etc., to ensure that it meets the rule requirements; if there is a semantic problem with the rule object, it needs to be repackaged into a correct object and returned. According to the rule object obtained after parsing, a rule execution plan is generated, including: rule instance, parameters, conditions and processing functions, etc., for subsequent rule matching and optimization. The rule objects and execution plans generated after parsing are matched with the rule base to find the rule instances that meet the conditions, and the rule processing function is called to execute the rules. During the execution process, the rule instances and execution plans can be optimized in real time by collecting the rule execution results and monitoring indicators to improve the effectiveness and adaptability of the rules. The matching and optimization results are returned to the user interface for users to view and manage.
[0068] The rule execution module is used to execute the rule execution plan of the power grid business rule engine and monitor the rule execution status and results in real time; then return the rule execution results to the front-end user interface and provide feedback and suggestions; specifically, by obtaining the parsed rule execution plan from the rule parsing module, the plan should include information such as rule instances, parameters, conditions and processing functions. Create an empty rule engine instance and load the rule library to prepare for rule execution. According to the rule execution plan, match the rule instances one by one and call the corresponding processing function to execute the rules. During the execution process, it is necessary to check whether the rule instance meets the rule requirements and whether the conditions for rule execution are met. If not, an exception needs to be thrown or the execution is interrupted. For each successfully matched rule instance, its execution status and results are recorded. This information will be used to update the current status of the rule execution plan and provide feedback and optimization suggestions to users. Monitor the execution status of the rule engine in real time to ensure that all rules can be executed in order. During the execution process, if any abnormal situation occurs, the administrator needs to be notified and handled immediately. According to the results of rule execution, feedback information and optimization suggestions are generated and returned to the front-end user interface as a response.
[0069] The rule data collection unit is used to collect historical rule engine data and corresponding related events in the power grid business, and associate and save the historical rule engine data and corresponding related events based on the ReTe network structure to form a ReTe relational database; the rule data collection unit includes:
[0070] The data collection module is used to collect various business rule data from the enterprise's existing business systems, including: rule name, description, trigger conditions, processing logic, and execution results;
[0071] The data sorting module is used to classify, archive, and deduplicate the collected business rule data to ensure the accuracy and completeness of the rule data; and based on the rule data, comprehensively evaluate the enterprise's power grid business rules, including: the effectiveness, rationality, and practicality of the rules, to provide a reference for the optimization of power grid business rules; and extract feature information from the power grid business rule data, and improve and innovate the existing power grid business rules based on the feature information, and put forward new power grid business rule suggestions;
[0072] The database creation module is used to create a ReTe relational database, import historical rule engine data and corresponding related events into the ReTe relational database, use the ReTe algorithm to logically associate the historical rule engine data with the corresponding related events, and use the ReTe algorithm to prioritize the historical rule engine data according to the importance of related events; specifically, the creation of a ReTe relational database requires good data collection, processing, analysis and reporting capabilities, which can effectively meet the company's diverse needs for power grid business rule data; in addition, it must also be flexible and scalable to adapt to the continuous development and changes of power grid companies.
[0073] The rule model building unit is used to build a neural network model, use historical rule engine data and corresponding related events for training and testing, so that the neural network model learns and extracts rules from historical rule engine data and corresponding related events, completes the intelligent generation and update of power grid business rules, and puts the optimized neural network model into the power grid business system for use; the rule model building unit includes:
[0074] The sample processing module is used to select some historical rule engine data and corresponding related events, and clean and normalize the data and related event content to make the format of the data and related events conform to the neural network model learning; and divide the processed data and related events into training sets and test sets; specifically, the module selects historical data and related events within a certain time range from the rule engine, cleans and normalizes the data and related event content to ensure the subsequent data processing and model learning effects. The module cleans the collected raw data, removes invalid information and duplicates, and then normalizes the format to meet the requirements of neural network model learning; the processed data set and related event set will be divided into training sets and test sets, which are used for model training and testing respectively. The division principle is such as the 70-20-10 rule, that is, 80% of the data is used for training, 10% of the data is used for verification, and the remaining 10% is used for testing.
[0075] The sample training module is used to import the training set and the test set into the neural network model for training and testing. The neural network model obtains the feature content by parsing the content of the associated events in the training set, and outputs the corresponding business rules for the feature content; the training results are then verified through the test set to determine whether the business rules output by the neural network model are accurate; specifically, by introducing the neural network model, the construction of rules can be automatically generated through the model, thereby reducing the manual labor burden of grassroots personnel; secondly, by developing intelligent algorithms to learn and refine rules from historical data and practical applications, the intelligent generation and update of rules can be realized, and the efficiency and accuracy of rule establishment can be improved. At the same time, an easy-to-use interface is provided so that grassroots personnel can intuitively participate in the adjustment and optimization of rules, further lowering the technical threshold and making rule management more repetitive work.
[0076] The model optimization module is used to continuously collect different types of power grid business rules and corresponding related events, and regularly optimize and update the neural network model through the latest events and power grid industry rules to ensure the accuracy of the output results of the neural network model; specifically, by continuously optimizing and iterating the neural network model, the diversity of the model's feature points is ensured, the data learned by the model is richer, and the accuracy of the model is improved.
[0077] The distributed operation and maintenance unit is used to deploy and execute rules using a distributed computing framework. When processing large-scale data, the problem is decomposed into multiple sub-problems and these sub-problems are assigned to different computing nodes for processing, so as to realize distributed computing resources and improve computing efficiency. The distributed operation and maintenance unit includes:
[0078] The framework creation module is used to deploy and execute rules using a distributed computing framework, such as Hadoop YARN, Apache Spark, or Apache Flink. This framework provides high fault tolerance, high performance, and scalability, and can effectively process large-scale data. By combining these frameworks with a graphical rule engine, their advantages can be fully utilized to improve the performance of the entire system. When processing large-scale data, the problem is decomposed into multiple sub-problems, and these sub-problems are assigned to different computing nodes for processing, thereby effectively utilizing distributed computing resources and improving computing efficiency. For example, data is divided according to geographic location, device type, and other factors, and then processed and analyzed independently in each partition. Load balancing algorithms such as polling and minimum connection methods are used to allocate computing tasks, and parallel computing technologies such as data parallelism and model parallelism are simultaneously introduced to ensure computing efficiency.
[0079] The operation and maintenance monitoring module is used to continuously monitor the distributed system, promptly detect and report abnormal conditions, such as hardware failure, software error, performance degradation, etc., so that the operation and maintenance personnel can respond quickly and take appropriate measures. The operation and maintenance monitoring module conducts comprehensive and real-time monitoring of the distributed system, including information such as CPU usage, memory usage, network traffic, system logs, etc., to ensure the normal operation of the system. If an abnormal condition is found, the operation and maintenance monitoring module will immediately issue an alarm to notify the operation and maintenance personnel to respond and resolve it in a timely manner. Abnormal conditions include but are not limited to: hardware failure, software error, performance degradation, attack intrusion, etc. When the operation and maintenance monitoring module detects an abnormal condition, it will automatically generate a detailed abnormal report and push the report to the operation and maintenance management personnel through various methods such as email, SMS, and instant messaging.
[0080] The resource tuning module is used to uniformly manage and schedule resources in distributed systems to ensure the rational use and efficient operation of resources, such as CPU, memory, network, etc. Through real-time monitoring of key resources such as CPU, memory, network, etc., the actual occupancy of each task or process is understood, providing data support for resource allocation and tuning. According to factors such as task priority and workload, appropriate CPU, memory and other resources are intelligently allocated to tasks or processes to avoid waste or shortage of resources. Dynamic adjustment and optimization are carried out for the distribution of resources in the system to meet the ever-changing business needs. This may involve horizontal or vertical expansion of resources, or other forms of resource scheduling strategies. If the monitored resource usage exceeds the preset threshold, or the idle rate of a certain type of resource reaches an excessively high level, the early warning mechanism will be automatically triggered to remind the administrator to intervene to prevent excessive resource tension or inefficient operation. The resource usage is regularly summarized and analyzed, and various types of reports are generated, such as resource usage reports, resource bottleneck reports, resource distribution reports, etc., for administrators to make reference for decision-making.
[0081] The fault diagnosis module is used to conduct in-depth analysis of faults in distributed systems, find out the causes of faults, and propose effective solutions to ensure the continuous availability of the system. By real-time monitoring of system operation status, abnormal conditions are detected, such as slow system response, application crash, and inability to access the database. The detected abnormal conditions are further located to specific modules, components or code locations to better understand the root cause of the problem. The located causes of the faults are analyzed, which may be caused by hardware failures, software defects, configuration problems, operational errors, etc. A detailed fault diagnosis report is generated, including information such as fault type, location, scope of impact, and recommended solutions, which is convenient for managers to review and make decisions. It also provides managers with feasible solutions, such as updating software versions, modifying configuration files, and strengthening monitoring, to help managers quickly restore the normal operation of the system.
[0082] The security protection module is used to protect the distributed system from malicious attacks and destruction through real-time monitoring and access control. By real-time monitoring and analysis of data entering and leaving the system, it can effectively prevent unauthorized illegal access and respond quickly to known attack behaviors to prevent security risks such as data leakage and system destruction. By using advanced data encryption algorithms, it can ensure that sensitive information is not stolen during transmission, and the correct information can be safely decrypted when needed. Different subsystems and services are isolated from the network, so that even if a subsystem is attacked, it will not affect other subsystems, thereby improving the security of the entire system. At the same time, according to business needs, set appropriate security policies to prevent malicious traffic intrusion. Through user roles, permission control and other mechanisms, strictly limit user access rights to prevent users from abusing or misoperating, causing potential risks. Record all security events and security activities, and conduct regular audits to understand the security status of the system, identify problems in a timely manner and make improvements.
[0083] The performance optimization module is used to continuously track the work efficiency of the distributed system, identify performance bottlenecks and make optimization improvements to improve the system's operating performance. Specifically, in a distributed environment, task scheduling may be affected by factors such as network latency and hardware resource fluctuations. In order to ensure the utilization of computing resources, we need to monitor these factors in real time and dynamically adjust tasks. For example, we can use strategies such as adaptive adjustment of scheduling cycles and task priorities to cope with real-time changes in the environment.
[0084] The environment management module is used to uniformly manage and maintain the environment that the distributed system relies on, such as the operating system, virtualization layer, middleware, etc., to ensure its stable and secure operation;
[0085] The upgrade management module is used to manage the versions and patches of the distributed system to ensure the security, reliability and optimal performance of the system. In summary, when building a graphical rule engine framework, it is necessary to fully consider the factors of distributed computing and adopt a series of corresponding technical means to ensure that the framework can make full use of distributed computing resources and meet the needs of power grid operation and maintenance for large-scale data processing. Based on this, the graphical rule engine framework can truly achieve the greatest benefit.
[0086] The rule mechanism construction unit is used to introduce fault tolerance mechanism and backup mechanism to build the fault emergency mechanism in the rule engine system, introduce the circuit breaker mode to monitor the threshold of the fault rate to avoid the spread of faults; and encrypt the data access rights in the rule engine system. The rule engine system verifies the identity of the user and grants the corresponding permissions to prevent unauthorized access. The rule mechanism construction unit includes:
[0087] The first mechanism module is used to introduce backup mechanism and fault-tolerant mechanism to build the rule engine system. By deploying backup components on key components in the rule engine system, once the main component fails, the backup component can quickly take over the work to ensure the continuity of the system. In addition, redundancy is another effective means. By introducing redundant components in the system, it can automatically switch to the backup component when the main component fails, thereby reducing the probability of system crash. Fast failover means that the system can quickly switch to the backup component when a component failure is detected to avoid service interruption. The combined use of these technologies can provide a solid high-availability foundation for the rule engine to ensure that even if a failure occurs, it can quickly recover to the previous stable state; by regularly sending heartbeat signals to monitor the health status of the component, if an abnormality is detected in the component, the system will respond in time and take corresponding measures; such as: starting the backup component or notifying the system administrator, the automatic recovery mechanism further enhances the system's self-healing ability, so that the system can automatically take measures after detecting a problem without manual intervention; including: automatic restart of the failed component, data recovery and other measures, thereby minimizing the impact of the failure on the system stability;
[0088] The second mechanism module is used to introduce the circuit breaker mode. By monitoring the call request of the system, if it is detected that the failure rate exceeds the threshold, the access to the faulty component is interrupted to avoid the spread of the fault. The opening of the circuit breaker can prevent the system from crashing due to continuous failures and protect the overall availability of the system. Therefore, the comprehensive design of high availability and fault tolerance mechanism will ensure that the rule engine can maintain stable operation in the face of various failures and abnormal situations, and can immediately switch to the backup plan when a problem occurs, so as to ensure the normal operation of the system. In this embodiment, for example, by introducing a fault monitoring tool, the working status of the rule engine system is detected in real time, and once a problem is found, an alarm is immediately issued; when a fault occurs, the circuit breaker mode is used to switch the system to the backup path, and after the backup path succeeds, it automatically switches back to the main path to restore the system to normal operation.
[0089] The encryption mechanism module is used to encrypt data access rights in the rule engine system. When a user logs in to the rule engine system, he / she provides a valid username and password for verification. The system will compare the user's username and password. If they match, the user will be granted the corresponding permissions. This ensures that only authorized users can access the rule engine, thereby effectively preventing unauthorized access. Common identity authentication methods include: OAuth, JWT, etc. Through these mechanisms, the system can verify the user's identity and grant corresponding permissions.
[0090] In order to better demonstrate the operation process of a graphical power grid business rule engine construction system, the present invention provides a graphical power grid business rule engine construction method, comprising the following steps:
[0091] Step 1: By building a front-end user interface for handling power grid business, the system can display the rule editing, debugging and management tools of power grid business in a graphical way;
[0092] Step 2: Logically associate and store the collected historical rule engine data with the corresponding related events through the ReTe network structure to form a ReTe relational database; specifically, the following steps are included:
[0093] Define rules and facts: Define the rules and corresponding related events in the power grid business. The rules are usually expressed in the form of IF-THEN, for example: "IF the voltage is lower than 100V THEN cut off the power supply", and the corresponding related events are the conditions for triggering the rules. For example, "The current voltage is 95V", which will be regarded as triggering the rule "IF the voltage is lower than 100V THEN cut off the power supply".
[0094] Build Rete network: Use Rete algorithm to build the network structure of rule engine. Rete algorithm performs pattern matching by forming Rete network. It uses two characteristics of rule-based system: time redundancy and structural similarity to improve the system pattern matching efficiency. When a fact is added to the rule network through session, the matching process is as follows: find the corresponding EntryPointNode object from the Map collection of EntryPointNode through the root node object. The EntryPointNode object has a Map collection of ObjectTypeNode, convert the class of fact into ClassObjectType, and find ObjectTypeNode from the collection. The sink attribute of ObjectTypeNode object refers to the rule network of this fact. Take out an alphaNode from the linked list in the sink attribute for matching, recursively traverse all the child nodes of alphaNode, and compare the fact data according to the conditions in alphaNode. If the conditions hidden in all the child nodes alphaNode are met, a rule is completely matched, and the agenda is formed to join the conflict set. After all rules are matched, the result part of the matched rule is executed according to the priority of the rule to change the fact data.
[0095] Execution rules: After the matching is completed, the matched rules are executed according to the priority of the power grid business rules; if all conditions are met, the corresponding operation is performed, such as "cut off the power supply";
[0096] Cache intermediate results: The Rete algorithm caches intermediate results and optimizes performance based on the intermediate results. It obtains corresponding information in the process of adding related events and reuses it in subsequent deletion operations to reduce unnecessary calculations. Through the above steps, a rule engine for the Rete network structure suitable for power grid business can be built to achieve efficient rule matching and execution.
[0097] Step 3: Use the historical rule engine data and corresponding related events in the ReTe relational database to train the neural network model, use the optimized neural network model to analyze the events triggered later, and output the corresponding power grid business rules;
[0098] Step 4: Use a distributed computing framework to deploy and execute rules. When processing large-scale data, decompose the problem into multiple sub-problems and assign these sub-problems to different computing nodes for processing, thus realizing distributed computing resources.
[0099] Step 5: Introduce relevant fault emergency mechanisms to promptly resolve system faults; and introduce relevant security mechanisms to limit data access objects within the system to prevent unauthorized access.
[0100] The beneficial effects achieved by the above content are: through the above operations, it supports the business to quickly build rule decision flows in a drag-and-drop manner, so that business personnel can quickly and accurately build rules; reduce the manual labor burden of grassroots personnel and improve the efficiency and accuracy of rule establishment; realize distributed computing resources to accelerate the computing process; ensure that the system can maintain stable operation in the face of component failures, thereby reducing the probability of system crashes; ensure that only authorized users can access the rule engine to ensure the security of data in transmission and storage.
[0101] Working principle: By building a front-end user interface for handling power grid business, the system displays the rule editing, debugging and management tools of power grid business in a graphical way; using the ReTe network structure to logically associate and store the collected historical rule engine data with the corresponding related events to form a ReTe relational database; and through the training of the neural network model, the optimized neural network model is used to analyze the events triggered later and output the corresponding power grid business rules; the distributed computing framework is used to deploy and execute rules. When processing large-scale data, the problem is decomposed into multiple sub-problems, and these sub-problems are assigned to different computing nodes for processing to realize distributed computing resources; relevant fault emergency mechanisms are introduced to promptly solve the fault phenomena that occur in the system; and relevant security mechanisms are introduced to limit the data access objects in the system to prevent unauthorized access.
[0102] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0103] While the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and alterations may be made to the embodiments without departing from the principles and spirit of the invention.
Claims
1. A graphical power grid business rule engine construction system, characterized in that: include: A front-end interface construction unit is used to construct a front-end user interface for handling power grid services, and to graphically display the rule editing, debugging and management tools for power grid services; A rule model building unit is used to build a neural network model, and use historical rule engine data and corresponding related events for training and testing, so that the neural network model can learn and extract rules from historical rule engine data and corresponding related events, complete the intelligent generation and update of power grid business rules, and put the optimized neural network model into the power grid business system for use; Distributed operation and maintenance unit, which is used to deploy and execute rules using a distributed computing framework. When processing large-scale data, it decomposes the problem into multiple sub-problems and assigns these sub-problems to different computing nodes for processing, thus realizing distributed computing resources. The rule mechanism construction unit is used to introduce fault tolerance mechanism and backup mechanism to build a fault emergency mechanism in the rule engine system, and introduce the circuit breaker mode to monitor the threshold of the fault rate to avoid the spread of faults; The data access rights in the rule engine system are encrypted. The rule engine system prevents unauthorized access by verifying the user's identity and granting corresponding permissions.
2. A graphical power grid business rule engine construction system according to claim 1, characterized in that: Also includes: The back-end logic processing unit is responsible for receiving requests from the front-end user interface, parsing, processing and executing rules according to the request content, and returning the results to the front-end interface construction unit; The rule data collection unit is used to collect historical rule engine data and corresponding related events in power grid business, and associate and save the historical rule engine data and corresponding related events based on the ReTe network structure to form a ReTe relational database.
3. A graphical power grid business rule engine construction system according to claim 1, characterized in that: The front-end interface construction unit includes: The rule editing module is used to create edit links for visual power grid business rules, allowing users to add, modify, and delete power grid business rules in a visual way; The rule management module is used to optimize the management of the links based on the power grid business rule editing links, so that users can view, filter, sort, export and back up the power grid business rules; The rule testing module is used to test the power grid business rule editing link, allowing users to simulate the operation of power grid business rules online and monitor the rule execution status and results in real time; The rule analysis module is used to analyze the power grid business rules submitted by users to check whether the syntax is correct, the semantics is reasonable, and whether they comply with the rule base.
4. A graphical power grid business rule engine construction system according to claim 1, characterized in that: The rule model building unit includes: The sample processing module is used to select some historical rule engine data and corresponding related events, and clean and normalize the data and related event content to make the format of the data and related events conform to the neural network model learning; and divide the processed data and related events into training sets and test sets; The sample training module is used to import the training set and the test set into the neural network model for training and testing. The neural network model parses the content of the associated events in the training set to obtain the feature content and outputs the corresponding business rules for the feature content. The training results are then verified with the test set to determine whether the business rules output by the neural network model are accurate. The model optimization module is used to continuously collect different types of power grid business rules and corresponding related events, and regularly optimize and update the neural network model based on the latest events and power grid business rules.
5. A graphical power grid business rule engine construction system according to claim 1, characterized in that: The distributed operation and maintenance unit includes: The framework creation module is used to deploy and execute rules using a distributed computing framework. When processing large-scale data, the problem is decomposed into multiple sub-problems, and these sub-problems are assigned to different computing nodes for processing. The load balancing algorithm is used to distribute computing tasks, and parallel computing technology is introduced simultaneously to ensure computing efficiency. Operation and maintenance monitoring module, used to continuously monitor distributed systems, detect and report abnormal conditions in a timely manner; Resource tuning module, which is used to uniformly manage and schedule resources in distributed systems to ensure rational use and efficient operation of resources; The fault diagnosis module is used to conduct in-depth analysis of faults in distributed systems, find out the causes of the faults, and propose effective solutions; Security protection module, which is used to protect the distributed system from malicious attacks and destruction through real-time monitoring and access control; Performance optimization module, which is used to continuously track the work efficiency of distributed systems, identify performance bottlenecks and make optimization improvements; The environment management module is used to uniformly manage and maintain the environment on which the distributed system depends; The upgrade management module is used to manage the versions and patches of distributed systems to ensure the security, reliability and optimal performance of the system.
6. A graphical power grid business rule engine construction system according to claim 1, characterized in that: The rule mechanism building unit includes: The first mechanism module is used to introduce backup mechanism and fault-tolerant mechanism to build the rule engine system. By deploying backup components on key components in the rule engine system, when the main components fail, the backup components can quickly take over the work to ensure the continuity of the system. By regularly sending heartbeat signals to monitor the health status of components, if an abnormality is detected in a component, the system will respond in time and take corresponding measures. The second mechanism module is used to introduce the circuit breaker mode. By monitoring the call requests of the system, if it is detected that the failure rate exceeds the threshold, the access to the faulty component is interrupted to prevent the spread of the failure. The encryption mechanism module is used to encrypt data access rights in the rule engine system. When a user logs in to the rule engine system, he provides a valid username and password for verification. The user's username and password will be compared. If they match, the user will be granted the corresponding permissions.
7. A graphical power grid business rule engine construction system according to claim 2, characterized in that: The backend logic processing unit includes: The rule parsing module is used to parse the power grid business rule file sent by the front-end user interface into a Python object, and perform semantic analysis and processing on the parsed rule object according to the rule template and rule library of the power grid business rule engine, generate a rule execution plan, and perform rule matching and optimization; The rule execution module is used to execute the rule execution plan of the power grid business rule engine and monitor the rule execution status and results in real time; it then returns the rule execution results to the front-end user interface and provides feedback and suggestions.
8. A graphical power grid business rule engine construction system according to claim 2, characterized in that: The rule data collection unit comprises: The data collection module is used to collect various business rule data from the enterprise's existing business systems, including: rule name, description, trigger conditions, processing logic, and execution results; The data sorting module is used to classify, archive, and remove duplicates of the collected business rule data; and based on the rule data, comprehensively evaluate the enterprise's power grid business rules; and extract characteristic information from the power grid business rule data, and improve and innovate the existing power grid business rules based on the characteristic information, and put forward new power grid business rule suggestions; The database creation module is used to create a ReTe relational database and import historical rule engine data and corresponding related events into the ReTe relational database, use the ReTe algorithm to logically associate the historical rule engine data with the corresponding related events, and use the ReTe algorithm to prioritize the historical rule engine data according to the importance of related events.
9. A method for constructing a graphical power grid business rule engine, implemented based on the graphical power grid business rule engine construction system according to any one of claims 1 to 8, characterized in that: The following steps are involved: Step 1: By building a front-end user interface for handling power grid business, the system can display the rule editing, debugging and management tools of power grid business in a graphical way; Step 2: The collected historical rule engine data and corresponding related events are logically associated and stored through the ReTe network structure to form a ReTe relational database; Step 3: Use the historical rule engine data and corresponding related events in the ReTe relational database to train the neural network model, use the optimized neural network model to analyze the events triggered later, and output the corresponding power grid business rules; Step 4: Use a distributed computing framework to deploy and execute rules. When processing large-scale data, decompose the problem into multiple sub-problems and assign these sub-problems to different computing nodes for processing, thus realizing distributed computing resources. Step 5: Introduce relevant fault emergency mechanisms to promptly resolve system faults; And introduce relevant security mechanisms to limit data access objects within the system to prevent unauthorized access.
10. A method for constructing a graphical power grid business rule engine according to claim 9, characterized in that: In the step 2, a ReTe relational database is formed, which specifically includes the following steps: Define rules and facts: Define the rules and corresponding related events in the power grid business; Build Rete network: Use the Rete algorithm to build the network structure of the rule engine. The Rete algorithm performs pattern matching by forming a Rete network; Execute rules: After the matching is completed, the matched rules are executed according to the priority of the power grid business rules; if all conditions are met, the corresponding operation is performed; Cache intermediate results: The Rete algorithm caches intermediate results and optimizes performance based on the intermediate results. It obtains corresponding information in the process of adding related events and reuses it in subsequent deletion operations.
Citation Information
Cited By
Electric power settlement visual configuration method and system based on node dragging
CN120429484A