Rule arrangement execution method, device and system and rule arrangement method, device and system

By introducing rule orchestration execution services in the exception detection and classification system, using message middleware and local caching mechanisms, the problem of difficulty in quickly responding and high maintenance costs of multiple versions is solved, and the effect of quickly adjusting business rules and reducing maintenance costs is achieved.

CN119806958AActive Publication Date: 2025-04-11GE CHUANG DONGZHI TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411849125.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-11
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

The existing exception detection and classification systems are difficult to respond quickly when realizing user personalized needs, and the maintenance cost of multi-version systems is high.

Method used

By introducing rule orchestration execution services into the system, using message middleware and local caching mechanisms, rapid adjustment and update of business rules are achieved, and direct modification of application code is avoided.

Benefits of technology

It realizes rapid adjustment of business rules, efficiently meets user personalized needs, reduces the cost of multi-version system maintenance, and simplifies the maintenance and update process of rules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806958A_ABST
    Figure CN119806958A_ABST
Patent Text Reader

Abstract

The invention discloses a rule arrangement execution method, device and system, and a rule arrangement method, device and system, and relates to the technical field of electronic information. A server side can execute the steps that logic rule configuration is pulled and stored in a local cache of the server side during starting; if a first rule change notification sent by the configuration service is monitored, obtaining a first change rule configuration; updating the logic rule configuration in the cache by adopting the first change rule configuration; if the notification message sent by the client is monitored, the target logic rule triggered by the notification message is inquired from the local cache of the server for execution, and the client is an anomaly detection and classification system application of the client toolkit in which the rule arrangement service is introduced. In the implementation process of an anomaly detection and classification system (FDC system), the service rule can be quickly adjusted, so that the personalized requirements of a user are efficiently met, the service rule is separated from an application program code and is easy to maintain and update, and the problem of high cost of maintenance of a multi-version system is effectively avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic information technology, and in particular to a rule arrangement execution, rule arrangement method, device and system. Background Art

[0002] During the implementation of the Fault Detection and Classification (FDC) system, users often raise some personalized business requirements. To meet customer business requirements, developers need to redevelop business rules based on the original system, which increases the implementation cycle and cost of the entire project. If users have changes in requirements in the future, they will have to continue to invest in development and testing manpower. As the number of users increases, the number of system versions to be maintained will also increase. More manpower will be needed to maintain these customized versions, which is not conducive to the unified planning of products.

[0003] Therefore, the current implementation of anomaly detection and classification systems has the problem of being unable to quickly realize the personalized needs of users, and there is a high cost problem of maintaining multiple versions of systems. Summary of the invention

[0004] The embodiment of the present application provides a rule orchestration execution solution, which can realize rapid adjustment of business rules to efficiently meet the personalized needs of users during the implementation of the anomaly detection and classification system. The business rules are separated from the application code, which is easy to maintain and update, and effectively avoids the high cost of maintaining multiple versions of the system.

[0005] The embodiments of the present application provide the following technical solutions:

[0006] According to one embodiment of the present application, a rule orchestration execution method includes: a server applied to a rule orchestration service, the rule orchestration service also including a configuration service, the method including: pulling a logic rule configuration from a predetermined database at startup, saving the logic rule configuration to a local cache of the server, and monitoring through a message middleware; if a first rule change notification sent by the configuration service when a rule change occurs is monitored through the message middleware, a first change rule configuration is obtained from a first interface provided by the configuration service; the first change rule configuration is used to update the logic rule configuration in the local cache of the server; if a notification message sent by a client to the message middleware is monitored, a target logic rule triggered by the notification message is queried from the logic rule configuration in the local cache of the server for execution, wherein the client is an anomaly detection and classification system application of a client toolkit that has introduced the rule orchestration service.

[0007] In some embodiments of the present application, if the first rule change notification sent by the configuration service when a rule change occurs is monitored by the message middleware, a first change rule configuration is obtained from a first interface provided by the configuration service, including: parsing the first rule change notification to obtain a first rule identifier; and obtaining a first change rule configuration corresponding to the first rule identifier from the first interface provided by the configuration service.

[0008] In some embodiments of the present application, after querying the target logic rule triggered by the notification message from the logic rule configuration in the local cache of the server for execution, the method also includes: collecting the first component operation log during the execution of the target logic rule; and recording the first component operation log into the predetermined database.

[0009] In some embodiments of the present application, after querying the target logic rule triggered by the notification message from the logic rule configuration in the local cache of the server for execution, the method also includes: if the notification message is an alarm message, accumulating the number of alarm messages in the local cache of the server; if the number exceeds a predetermined threshold, performing an upgraded alarm operation and clearing the accumulated number of notification messages in the local cache of the server.

[0010] In some embodiments of the present application, after querying the target logic rule triggered by the notification message from the logic rule configuration in the local cache of the server for execution, the method also includes: if the notification message is an event message, judging whether to start or stop the equipment preventive maintenance according to the event content in the event message; if the equipment preventive maintenance is started, setting the detection instance of the target device to an inactive state by calling the detection instance update interface provided by the abnormal detection and classification system application; if the equipment preventive maintenance is stopped, setting the detection instance of the target device to an activated state by calling the detection instance update interface provided by the abnormal detection and classification system application.

[0011] According to one embodiment of the present application, a rule orchestration execution method is applied to a client of the rule orchestration service described in any of the aforementioned embodiments, the method comprising: calling a second interface provided by a configuration service at startup to obtain a logical rule configuration in the predetermined database, and saving the logical rule configuration to a local cache of the client, and monitoring through the message middleware; if a second rule change notification sent by the configuration service when a rule change occurs is monitored through the message middleware, obtaining a second change rule configuration from a second interface provided by the configuration service; using the second change rule configuration to update the logical rule configuration in the local cache of the client; when executing a rule node in the application logic, searching the logical rule configuration in the local cache of the client for a specific logical rule matched by the rule node for execution.

[0012] In some embodiments of the present application, if the second rule change notification sent by the configuration service when a rule change occurs is monitored by the message middleware, the second change rule configuration is obtained from the second interface provided by the configuration service, including: parsing the second rule change notification to obtain a second rule identifier; and obtaining the second change rule configuration corresponding to the second rule identifier from the second interface provided by the configuration service.

[0013] In some embodiments of the present application, after searching for a specific logical rule matched by the rule node in the logical rule configuration in the client local cache and executing it, the method further includes: collecting an operation log of a second component during the execution of the specific logical rule; and recording the operation log of the second component into the predetermined database through a logging interface provided by the configuration service.

[0014] According to one embodiment of the present application, a rule orchestration method is provided, the method comprising: displaying a rule orchestration interface corresponding to the rule orchestration service described in any of the foregoing items, the rule orchestration interface comprising a plurality of rule orchestration components; and obtaining a user constructed rule according to an orchestration operation based on the rule orchestration component in the rule orchestration interface.

[0015] According to one embodiment of the present application, a rule orchestration execution device is applied to the server of a rule orchestration service, the rule orchestration service also includes a configuration service, the device includes: a server-side configuration module, used to: pull the logic rule configuration in a predetermined database at startup, save the logic rule configuration to the server-side local cache, and monitor it through a message middleware; a server-side acquisition module, used to: if a first rule change notification sent by the configuration service when a rule change occurs is monitored through the message middleware, then a first change rule configuration is obtained from a first interface provided by the configuration service; a server-side update module, used to: use the first change rule configuration to update the logic rule configuration in the server-side local cache; a server-side execution module, used to: if a notification message sent by a client to the message middleware is monitored, query the target logic rule triggered by the notification message from the logic rule configuration in the server-side local cache for execution, wherein the client is an anomaly detection and classification system application of a client toolkit that has introduced the rule orchestration service.

[0016] According to one embodiment of the present application, a rule orchestration execution device is applied to a client of a rule orchestration service, the device comprising: a client configuration module, used to: call a second interface provided by the configuration service at startup to obtain the logical rule configuration in the predetermined database, save the logical rule configuration to the client local cache, and monitor through the message middleware; a client acquisition module, used to: if a second rule change notification sent by the configuration service when a rule change occurs is monitored through the message middleware, then obtain a second change rule configuration from the second interface provided by the configuration service; a client update module, used to: use the second change rule configuration to update the logical rule configuration in the client local cache; a client execution module, used to: when executing a rule node in the application logic, search for a specific logical rule matched by the rule node from the logical rule configuration in the client local cache for execution.

[0017] According to one embodiment of the present application, a rule orchestration execution system includes a rule orchestration service, a client and a message middleware, wherein the client is an anomaly detection and classification system application of a client toolkit that introduces the rule orchestration service, and the rule orchestration service includes a configuration service and a server; the configuration service is used to: send a first rule change notification or a second rule change notification to the message middleware when a rule change occurs; the server is used to: pull the logic rule configuration in a predetermined database at startup, and save the logic rule configuration to the server local cache; and update the first rule change notification when the first rule change notification is monitored by the message middleware. The server-side local cache has logic rule configurations; and, when a notification message sent by the client is monitored through the message middleware, the target logic rule triggered by the notification message is searched from the server-side local cache and executed; the client is used to: pull the logic rule configurations from a predetermined database at startup, and save the logic rule configurations to the client-side local cache; and, when the second rule change notification is monitored through the message middleware, update the logic rule configurations in the client-side local cache; and, when executing a rule node in the application logic, search the logic rule configurations in the server-side local cache for the specific logic rule matched by the rule node and execute it.

[0018] According to another embodiment of the present application, a storage medium stores a computer program thereon, and when the computer program is executed by a processor of a computer, the computer executes the method described in the embodiment of the present application.

[0019] According to another embodiment of the present application, an electronic device may include: a memory storing a computer program; and a processor reading the computer program stored in the memory to execute the method described in the embodiment of the present application.

[0020] According to another embodiment of the present application, a computer program product or a computer program includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in various optional implementations described in the embodiments of the present application.

[0021] In an embodiment of the present application, a rule orchestration service is provided, and the rule orchestration service includes a server and a configuration service, wherein the server can execute: pulling the logic rule configuration in a predetermined database at startup, saving the logic rule configuration to the local cache of the server, and monitoring through the message middleware; if the first rule change notification sent by the configuration service when a rule change occurs is monitored through the message middleware, the first change rule configuration is obtained from the first interface provided by the configuration service; the first change rule configuration is used to update the logic rule configuration in the local cache of the server; if a notification message sent by the client to the message middleware is monitored, the target logic rule triggered by the notification message is queried from the logic rule configuration in the local cache of the server for execution, wherein the client is an anomaly detection and classification system application of the client toolkit that has introduced the rule orchestration service.

[0022] In this way, during the implementation of the anomaly detection and classification system, business rules can be quickly adjusted to efficiently meet users' personalized needs. Business rules are separated from application code, making them easy to maintain and update, effectively avoiding the high cost of maintaining multiple versions of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0024] Figure 1 The diagram shows an architecture diagram of a rule orchestration execution system according to an embodiment of the present application.

[0025] Figure 2 The flowchart of the rule arrangement execution method in the service mode according to an embodiment of the present application is schematically shown.

[0026] Figure 3 The flowchart of the rule arrangement execution method in the client mode according to an embodiment of the present application is schematically shown.

[0027] Figure 4 A diagram of a rule arrangement interface according to an embodiment of the present application is shown.

[0028] Figure 5 A block diagram of a rule orchestration execution device according to an embodiment of the present application is shown.

[0029] Figure 6 A block diagram of a rule orchestration execution device according to an embodiment of the present application is shown.

[0030] Figure 7 A block diagram of a rule arrangement device according to another embodiment of the present application is shown. DETAILED DESCRIPTION

[0031] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the embodiments provided herein are only used to explain the present disclosure and are not intended to limit the present disclosure. In addition, the embodiments provided below are partial embodiments for implementing the present disclosure, rather than providing all embodiments for implementing the present disclosure. In the absence of conflict, the technical solutions recorded in the embodiments of the present disclosure can be implemented in any combination.

[0032] It should be noted that, in the embodiments of the present disclosure, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a method or apparatus including a series of elements includes not only the elements explicitly recorded, but also includes other elements not explicitly listed, or also includes elements inherent to the implementation of the method or apparatus. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other related elements in the method or apparatus including the element (such as a step in the method or a unit in the apparatus, for example, a unit may be a part of a circuit, a part of a processor, a part of a program or software, etc.).

[0033] For example, the rule orchestration execution method provided by the embodiment of the present disclosure includes a series of steps, but the rule orchestration execution method provided by the embodiment of the present disclosure is not limited to the recorded steps. Similarly, the rule orchestration execution device provided by the embodiment of the present disclosure includes a series of units, but the device provided by the embodiment of the present disclosure is not limited to including the units explicitly recorded, and may also include units required to obtain relevant information or perform processing based on the information.

[0034] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present disclosure belongs. The terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present disclosure.

[0035] It is understandable that in the specific implementation of this application, relevant data is involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0036] During the implementation of the Fault Detection and Classification (FDC) system, users often raise some personalized business requirements. To meet customer business requirements, developers need to redevelop business rules based on the original system, which increases the implementation cycle and cost of the entire project. If users have changes in requirements in the future, they will have to continue to invest in development and testing manpower. As the number of users increases, the number of system versions to be maintained will also increase. More manpower will be needed to maintain these customized versions, which is not conducive to the unified planning of products.

[0037] To this end, the present application provides the following technical solution to solve the technical problem. Through the following solution of the embodiment of the present application, when the anomaly detection and classification system is implemented, the architecture of the rule orchestration execution system can be adopted, so as to realize rapid adjustment of business rules to efficiently meet the personalized needs of users, and the business rules are separated from the application code, which is easy to maintain and update, and effectively avoids the high cost of maintaining multiple versions of the system.

[0038] Specifically, Figure 1 The following schematically shows an architecture diagram of a rule arrangement execution system according to an embodiment of the present application. Figure 1 As shown, the architecture of the rule orchestration execution system may include a rule orchestration service 110, a client 120, a message middleware 130, a predetermined database 140, a server local cache 150, and a client local cache 160. The rule orchestration service includes a server 111 and a configuration service 112. The client is an anomaly detection and classification system application (FDC application) that introduces the client toolkit (client jar package) of the rule orchestration service. The anomaly detection and classification system (FDC, Fault Detection and Classification) is a system for detecting, analyzing and classifying anomalies during the operation of the device.

[0039] The rule orchestration service (Workflow service) is a service that can complete a specific business process according to certain rules or steps. It usually involves multiple steps or stages, and there may be dependencies or conditional judgments between the steps. The rule orchestration service can help reduce human errors, improve efficiency, and ensure that the business process proceeds smoothly according to the predetermined process.

[0040] The predetermined database 140 may be a relational database (such as MySQL) or other databases. The predetermined database 140 may be used to store logic rule configurations and component operation logs (such as a first component operation log and a second component operation log).

[0041] The server local cache 150 and the client local cache 160 may be Redis cache systems, and the server local cache 150 and the client local cache 160 may be used to store cache data of the rule execution process and the logic rule configuration pulled from a predetermined database.

[0042] The message middleware 130 may be Kafka or other middleware. The message middleware is used to transmit messages between various systems, and the messages may include notification messages or rule change notifications.

[0043] The configuration service 112 is used to arrange rules (Logic). The configuration service also provides an interface for remotely obtaining logic rule configuration or saving component operation logs.

[0044] The server 111 may be used to execute target logic rules triggered by notification messages.

[0045] The client 120 is an anomaly detection and classification system application (FDC application) that has introduced a client toolkit (client jar package) of a rule orchestration service. Any anomaly detection and classification system application (FDC application) that needs to access the rule orchestration service needs to introduce the client toolkit (client jar package) of the rule orchestration service. Through the client, the client can implement specific logical rules matched by the rule node.

[0046] When the anomaly detection and classification system is implemented, the architecture of the rule orchestration execution system is adopted, and the configuration service can be used to: send a first rule change notification or a second rule change notification to the message middleware when a rule change occurs; the server can be used to: pull the logic rule configuration in the predetermined database at startup, and save the logic rule configuration to the server local cache; and, when the first rule change notification is heard through the message middleware, update the logic rule configuration in the server local cache; and, when the notification message sent by the client is heard through the message middleware, search the target logic rule triggered by the notification message from the server local cache and execute it; the client can be used to: pull the logic rule configuration in the predetermined database at startup, and save the logic rule configuration to the client local cache; and, when the second rule change notification is heard through the message middleware, update the logic rule configuration in the client local cache; and, when executing the rule node in the application logic, search the specific logic rule matched by the rule node from the logic rule configuration in the server local cache and execute it.

[0047] Based on this rule orchestration service (Workflow service) Figure 1The rule orchestration execution system shown in the figure has the following good features: (1) Automated decision-making: Decisions can be made automatically according to predefined rules, reducing human intervention and achieving rapid response. At the same time, errors and deviations in manual decision-making are also reduced, ensuring the consistency and accuracy of decisions. (2) Easy to maintain and update: The complex business logic is separated from the application code, so that business rules can be configured, managed and maintained on a centrally managed platform. When business needs change, the rules can be adjusted quickly without modifying the underlying code, thereby reducing development and testing time. (3) Enhanced business flexibility: It can handle complex business logic and trigger different business processes according to conditions, allowing enterprises to flexibly respond to changing market needs. By configuring different rules, enterprises can adjust strategies in real time according to changes in customers, markets or environments to achieve highly customized decisions. (4) Improved efficiency and productivity: Automated execution of repetitive tasks reduces the need for manual operations and improves work efficiency. Developers can focus more on core business logic rather than repeatedly adjusting and writing rule code, thereby speeding up the development cycle. (5) Promote the participation of business personnel: Business personnel can directly participate in the definition and management of rules, reducing dependence on technical personnel and promoting close cooperation between business and technology.

[0048] In short, when implementing the anomaly detection and classification system, the architecture of the rule orchestration execution system can be used to quickly adjust business rules to efficiently meet users' personalized needs. The business rules are separated from the application code, making them easy to maintain and update, effectively avoiding the high cost of maintaining multiple versions of the system.

[0049] Based on the above-mentioned architecture of the rule orchestration execution system, this application can provide two logic rule (Logic) execution modes: server mode and client mode.

[0050] In server mode, the execution subject of the rule arrangement execution method can be as follows Figure 1 The server side, such as Figure 2 A flowchart of a rule arrangement execution method in a server mode according to an embodiment of the present application is schematically shown. The rule arrangement execution method may include steps S210 to S240.

[0051] Step S210, pulling the logic rule configuration in the predetermined database at startup, saving the logic rule configuration to the local cache of the server, and monitoring it through the message middleware;

[0052] Step S220: if the first rule change notification sent by the configuration service when a rule change occurs is monitored by the message middleware, a first change rule configuration is obtained from a first interface provided by the configuration service;

[0053] Step S230, using the first change rule configuration to update the logic rule configuration in the local cache of the server;

[0054] Step S240, if a notification message sent by the client to the message middleware is monitored, the target logic rule triggered by the notification message is queried from the logic rule configuration in the local cache of the server for execution, wherein the client is an anomaly detection and classification system application of the client toolkit that has introduced the rule orchestration service.

[0055] In server mode, the server can pull the full amount of logic rule configuration in the predetermined database when it starts, and save the pulled logic rule configuration to the server local cache, and can monitor messages and notifications through the message middleware. Among them, the logic rule configuration can include the rule configuration of multiple logic rules.

[0056] The configuration service can be used to arrange rules. Relevant users arrange rules through the configuration service. The configuration service can determine whether a rule change occurs (for example, adding or adjusting a rule, etc.). When it is determined that a rule change occurs, the configuration service sends a first rule change notification to the message middleware.

[0057] When the server monitors the first rule change notification sent by the configuration service when a rule change occurs through the message middleware, it can obtain the corresponding first change rule configuration from the first interface (such as Dubbo interface) provided by the configuration service. Further, the server can use the first change rule configuration to update the cached logical rule configuration in the server's local cache.

[0058] When the predetermined trigger conditions are met, the client can send a notification message to the message middleware. The notification message can be an event message or an alarm message. When the server listens to the notification message sent by the client to the message middleware, it can query the logical rule triggered by the notification message from the logical rule configuration in the server's local cache as the target logical rule, and execute the target logical rule.

[0059] Therefore, in the server-side mode, when the anomaly detection and classification system is implemented, the server queries the corresponding logical rules from the server's local cache for execution based on the notification messages of the anomaly detection and classification system application that it monitors. The logical rule configuration in the server's local cache is dynamically updated with the notification of the configuration service, so that the business rules can be quickly adjusted to efficiently meet the personalized needs of users. The business rules are separated from the application code, which is easy to maintain and update, and effectively avoids the high cost of maintaining multiple versions of the system.

[0060] Furthermore, in one embodiment, if the first rule change notification sent by the configuration service when a rule change occurs is monitored by the message middleware, a first change rule configuration is obtained from a first interface provided by the configuration service, which may specifically include: parsing the first rule change notification to obtain a first rule identifier; and obtaining a first change rule configuration corresponding to the first rule identifier from the first interface provided by the configuration service.

[0061] The configuration service can carry the first rule identifier (LogicId) of the changed rule in the first rule change notification, so that the server can parse the first rule change notification to obtain the first rule identifier, and then the server can accurately obtain the first changed rule configuration corresponding to the first rule identifier from the first interface provided by the configuration service.

[0062] Further, in one embodiment, after querying the target logic rule triggered by the notification message from the logic rule configuration in the local cache of the server for execution, the method may also include: collecting the first component operation log in the process of executing the target logic rule; and recording the first component operation log into the predetermined database.

[0063] In the process of executing the target logic rule, the server can collect the component operation log of each component in the target logic rule, thereby obtaining the first component operation log. Then, the server can record the first component operation log into the predetermined database. Thus, in the server mode, it is further convenient to track and audit the rule execution process, ensuring the transparency and auditability of the decision-making process.

[0064] Furthermore, in one embodiment, after querying the target logic rule triggered by the notification message from the logic rule configuration in the local cache of the server for execution, the method may also include: if the notification message is an alarm message, accumulating the number of alarm messages in the local cache of the server; if the number exceeds a predetermined threshold, performing an upgraded alarm operation and clearing the accumulated number of notification messages in the local cache of the server.

[0065] For example, the server can accumulate the number of the same alarm message in the local cache of the server (that is, the number of times in the local cache of the server is accumulated by 1 each time an alarm message is monitored). If the accumulated number of times exceeds a predetermined threshold (for example, 3), the server performs an upgraded alarm operation (for example, executes a corresponding alarm notification or out-of-control action plan) and clears the accumulated number of notification messages in the local cache of the server.

[0066] Furthermore, in one embodiment, after searching for a specific logical rule matched by the rule node in the logical rule configuration in the local cache of the client and executing the result, the method may also include: if the notification message is an event message, determining whether to enable or disable equipment preventive maintenance based on the event content in the event message; if the equipment preventive maintenance is enabled, setting the detection instance of the target device to an inactive state by calling the detection instance update interface provided by the anomaly detection and classification system application; and if the equipment preventive maintenance is disabled, setting the detection instance of the target device to an activated state by calling the detection instance update interface provided by the anomaly detection and classification system application.

[0067] Thus, after the target equipment (such as several semiconductor processing units) starts equipment preventive maintenance (PM), the event message generated by the abnormal detection and classification system application can be used to notify the start of equipment preventive maintenance, and then all detection instances of the target equipment can be set to an inactive state by calling the detection instance update interface provided by the abnormal detection and classification system application, so as to avoid detecting the target equipment through the detection instance (detection instance of the abnormal detection and classification system) after the target equipment starts equipment preventive maintenance. Until the preventive maintenance of the target equipment is completed, the event message generated by the abnormal detection and classification system application can be used to notify the cancellation of the start of equipment preventive maintenance, so that the detection instance can be set to an active state again by calling the detection instance update interface provided by the abnormal detection and classification system application. Thus, false alarms during PM are avoided as a whole, and detection can be restarted after PM is completed.

[0068] In client mode, the execution subject of the rule arrangement execution method can be as follows Figure 1 The client, such as Figure 3 A flowchart of a rule arrangement execution method in a client mode according to an embodiment of the present application is schematically shown. The rule arrangement execution method may include steps S310 to S340.

[0069] Step S310, calling the second interface provided by the configuration service at startup to obtain the logic rule configuration in the predetermined database, saving the logic rule configuration to the client local cache, and monitoring through the message middleware;

[0070] Step S320: if the second rule change notification sent by the configuration service when a rule change occurs is monitored by the message middleware, a second rule change configuration is obtained from a second interface provided by the configuration service;

[0071] Step S330, using the second change rule configuration to update the logic rule configuration in the client local cache;

[0072] Step S340: when executing a rule node in the application logic, a specific logic rule matched by the rule node is searched from the logic rule configuration in the local cache of the client for execution.

[0073] In client mode, when the client starts, it can call the second interface (such as HTTP interface) provided by the configuration service to pull the full amount of logic rule configuration in the predetermined database, save the pulled logic rule configuration to the local cache of the server, and monitor messages and notifications through the message middleware. Among them, the logic rule configuration can include the rule configuration of multiple logic rules.

[0074] The configuration service can be used to arrange rules. Relevant users arrange rules through the configuration service. The configuration service can determine whether a rule change occurs (for example, adding or adjusting a rule, etc.). When it is determined that a rule change occurs, the configuration service sends a second rule change notification to the message middleware.

[0075] When the client monitors the second rule change notification sent by the configuration service when a rule change occurs through the message middleware, it can obtain the corresponding second change rule configuration from the second interface (such as HTTP interface) provided by the configuration service. Further, the client can use the second change rule configuration to update the cached logical rule configuration in the client's local cache.

[0076] The client can execute the specified application logic. When executing to a rule node in the application logic, the client can search the logic rule matched by the rule node from the logic rule configuration in the client's local cache as a specific logic rule, and execute the specific logic rule.

[0077] Therefore, in the client mode, when the anomaly detection and classification system is implemented, the client queries the corresponding logical rules from the client's local cache for execution according to the execution requirements. The logical rule configuration in the client's local cache is dynamically updated with the notification of the configuration service, so that the business rules can be quickly adjusted to efficiently meet the personalized needs of users. The business rules are separated from the application code, which is easy to maintain and update, and effectively avoids the high cost of maintaining multiple versions of the system.

[0078] Furthermore, in one embodiment, if the second rule change notification sent by the configuration service when a rule change occurs is monitored by the message middleware, a second change rule configuration is obtained from a second interface provided by the configuration service, which may specifically include: parsing the second rule change notification to obtain a second rule identifier; and obtaining a second change rule configuration corresponding to the second rule identifier from the second interface provided by the configuration service.

[0079] The configuration service can carry the second rule identifier (LogicId) of the changed rule in the second rule change notification, so that the client can parse the second rule change notification to obtain the second rule identifier, and then the server can accurately obtain the second changed rule configuration corresponding to the second rule identifier from the second interface provided by the configuration service.

[0080] Furthermore, in one embodiment, after searching for a specific logical rule matched by the rule node in the logical rule configuration in the client local cache and executing it, the method may also include: collecting an operation log of a second component during the execution of the specific logical rule; and recording the operation log of the second component into the predetermined database through a logging interface provided by the configuration service.

[0081] In the process of executing a specific logic rule, the client can collect the component operation log of each component in the specific logic rule, thereby obtaining a second component operation log. Then, the client can record the second component operation log into a predetermined database through the log recording interface provided by the configuration service. Thus, in the client mode, it is further convenient to track and audit the rule execution process, ensuring the transparency and auditability of the decision-making process.

[0082] A rule orchestration method is also provided in an embodiment of the present application, the method comprising: displaying a rule orchestration interface corresponding to the rule orchestration service described in any of the above items, the rule orchestration interface comprising a plurality of rule orchestration components; and obtaining a user constructed rule according to an orchestration operation based on the rule orchestration component in the rule orchestration interface.

[0083] Relevant users can open the rule orchestration interface corresponding to the rule orchestration service through the interface start operation. The rule orchestration interface includes a variety of rule orchestration components. Through the visual rule orchestration interface, users can easily orchestrate logical rules of arbitrary complexity based on the rule orchestration components according to their needs (such as dragging components, connecting components, and configuring components). As a result, the configuration service can obtain the logical rules orchestrated by the user (that is, the user-built rules), that is, the configuration service can obtain the relevant configurations of the changed logical rules (such as the logical rules added or adjusted by the user). These relevant configurations may include the logical rules themselves, the triggering conditions of the rules, the rule identifiers, and the like.

[0084] For example, a rule-compilation interface such as Figure 4 As shown, the rule arrangement interface 400 may include a component display area 410, an arrangement area 420, and an information input area 430. A variety of rule arrangement components may be displayed in the component display area 410. In the arrangement area 420, the user may drag the component in the component display area 410 to the arrangement area 420, and perform operations such as connection and dragging in the arrangement area 420. At the same time, in the information input area 430, the user may input information such as trigger conditions and rule identifiers through controls such as input boxes.

[0085] The various rule arrangement components displayed in the component display area 410 may include but are not limited to: Start: process start component, which can configure rule trigger conditions; End: process end component; If-Else: judgment component, which supports multiple conditions to be met or any of them to be met; Switch: selection component, which supports multiple cases and defaults; Number of loops: the upper limit of the number of loops can be set; While loop: supports multiple condition judgments, which can be met or any of them to be met; Iteration loop: can traverse each element in the list data; Variable: supports variable definition and assignment; Sub-process: can introduce other nested Logic to participate in the execution of the current Logic. row; extension: support python, js, groovy, java, lua and other mainstream scripting languages; data reading: read data in the specified business data table; data storage: write data to the specified business data table; format conversion: support conversion between different data formats; data filtering: support multi-condition filtering, and can extract data by row number and column name; mathematical calculation: support basic mathematical operations such as addition, subtraction, multiplication and division; function calculation: support 24 functions, including SUM, MIN, etc.; timer: can set waiting time; execute OCAP: support calling third-party system interface to execute OCAP; alarm notification: can send alarm email notification.

[0086] In order to better implement the rule arrangement execution method provided in the embodiment of the present application, the embodiment of the present application also provides a rule arrangement execution device based on the above rule arrangement execution method. The meanings of the terms are the same as those in the above rule arrangement execution method, and the specific implementation details can refer to the description in the method embodiment.

[0087] Figure 5 FIG. 1 is a block diagram of a rule arrangement execution device according to an embodiment of the present application. Figure 5The rule orchestration execution device 500 shown can be applied to the server of the rule orchestration service, and the rule orchestration service also includes a configuration service. The rule orchestration execution device 500 includes: a server configuration module 510 can be used to: pull the logic rule configuration in the predetermined database at startup, save the logic rule configuration to the server local cache, and monitor it through the message middleware; the server acquisition module 520 can be used to: if the first rule change notification sent by the configuration service when a rule change occurs is monitored through the message middleware, then obtain the first change rule configuration from the first interface provided by the configuration service; the server update module 530 can be used to: use the first change rule configuration to update the logic rule configuration in the server local cache; the server execution module 540 can be used to: if the notification message sent by the client to the message middleware is monitored, query the target logic rule triggered by the notification message from the logic rule configuration in the server local cache for execution, wherein the client is an anomaly detection and classification system application of the client toolkit that has introduced the rule orchestration service.

[0088] In some embodiments of the present application, the server-side acquisition module 520 may be used to: parse the first rule change notification to obtain a first rule identifier; and obtain a first change rule configuration corresponding to the first rule identifier from a first interface provided by the configuration service.

[0089] In some embodiments of the present application, after querying the target logic rule triggered by the notification message from the logic rule configuration in the local cache of the server for execution, the device may also include a logging module for: collecting the first component operation log during the execution of the target logic rule; and recording the first component operation log into the predetermined database.

[0090] In some embodiments of the present application, after querying the target logical rule triggered by the notification message from the logical rule configuration in the local cache of the server for execution, the device may also include an alarm upgrade module, which is used to: if the notification message is an alarm message, accumulate the number of alarm messages in the local cache of the server; if the number exceeds a predetermined threshold, perform an alarm upgrade operation and clear the number of notification messages accumulated in the local cache of the server.

[0091] In some embodiments of the present application, after querying the target logic rule triggered by the notification message from the logic rule configuration in the local cache of the server for execution, the device may also include an activation processing module, which is used to: if the notification message is an event message, determine whether to turn on or off the equipment preventive maintenance according to the event content in the event message; if the equipment preventive maintenance is turned on, set the detection instance of the target device to an inactivated state by calling the detection instance update interface provided by the anomaly detection and classification system application; if the equipment preventive maintenance is turned off, set the detection instance of the target device to an activated state by calling the detection instance update interface provided by the anomaly detection and classification system application.

[0092] Figure 6 FIG. 4 is a block diagram of a rule arrangement execution device according to another embodiment of the present application. Figure 6 The rule orchestration execution device 600 shown can be applied to the client of the rule orchestration service, and the rule orchestration execution device 600 includes: a client configuration module 610 can be used to: call the second interface provided by the configuration service at startup to obtain the logical rule configuration in the predetermined database, and save the logical rule configuration to the client local cache, and monitor through the message middleware; the client acquisition module 620 can be used to: if the second rule change notification sent by the configuration service when a rule change occurs is monitored through the message middleware, then obtain the second change rule configuration from the second interface provided by the configuration service; the client update module 630 can be used to: use the second change rule configuration to update the logical rule configuration in the client local cache; the client execution module 640 can be used to: when executing a rule node in the application logic, search for a specific logical rule matched by the rule node from the logical rule configuration in the client local cache for execution.

[0093] In some embodiments of the present application, the client acquisition module 620 may be used to: parse the second rule change notification to obtain a second rule identifier; and obtain a second change rule configuration corresponding to the second rule identifier from a second interface provided by the configuration service.

[0094] In some embodiments of the present application, after searching for a specific logical rule matched by the rule node in the logical rule configuration in the client local cache and executing it, the device may further include a log processing module for: collecting the operation log of the second component during the execution of the specific logical rule; and recording the operation log of the second component into the predetermined database through the logging interface provided by the configuration service.

[0095] Figure 7FIG. 4 is a block diagram of a rule arrangement device according to another embodiment of the present application. Figure 7 The rule orchestration device 700 shown may include: a display module 710 for: displaying a rule orchestration interface corresponding to the rule orchestration service described in any of the above items, wherein the rule orchestration interface includes multiple rule orchestration components; a generation module 720 for: obtaining user-constructed rules according to the orchestration operation based on the rule orchestration component in the rule orchestration interface.

[0096] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0097] In addition, an embodiment of the present application also provides an electronic device or server. Specifically in this embodiment, the processor in the electronic device or server loads the executable files corresponding to the processes of one or more programs into the memory, and the processor runs the programs stored in the memory, thereby realizing the various functions in the aforementioned embodiments of the present application.

[0098] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0099] To this end, the embodiment of the present application further provides a storage medium, in which a computer program is stored, and the computer program can be loaded by a processor to execute the steps in any method provided in the embodiment of the present application. The storage medium may be a computer-readable storage medium, and the storage medium may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0100] Since the computer program stored in the storage medium can execute the steps in any method provided in the embodiments of the present application, the beneficial effects that can be achieved by the method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0101] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.

[0102] It should be understood that the present application is not limited to the embodiments that have been described above and shown in the accompanying drawings, but various modifications and changes may be made without departing from the scope thereof.

Claims

1. A rule arrangement execution method, characterized in that: The method is applied to a server of a rule arrangement service, wherein the rule arrangement service further includes a configuration service, and the method includes: Pull the logic rule configuration from the predetermined database at startup, save the logic rule configuration to the local cache of the server, and monitor it through the message middleware; If a first rule change notification sent by the configuration service when a rule change occurs is monitored through the message middleware, a first rule change configuration is obtained from a first interface provided by the configuration service; Using the first change rule configuration to update the logic rule configuration in the local cache of the server; If a notification message sent by the client to the message middleware is monitored, the target logic rule triggered by the notification message is queried from the logic rule configuration in the local cache of the server for execution, wherein the client is an anomaly detection and classification system application of the client toolkit that has introduced the rule orchestration service.

2. The method according to claim 1, characterized in that If the first rule change notification sent by the configuration service when a rule change occurs is monitored by the message middleware, obtaining a first change rule configuration from a first interface provided by the configuration service includes: Parsing the first rule change notification to obtain a first rule identifier; A first change rule configuration corresponding to the first rule identifier is obtained from a first interface provided by the configuration service.

3. The method according to claim 1, characterized in that After querying the target logic rule triggered by the notification message from the logic rule configuration in the local cache of the server for execution, the method further includes: Collecting the first component operation log in the process of executing the target logic rule; The first component operation log is recorded in the predetermined database.

4. The method according to claim 1, characterized in that: After querying the target logic rule triggered by the notification message from the logic rule configuration in the local cache of the server for execution, the method further includes: If the notification message is an alarm message, the number of alarm messages is accumulated in the local cache of the server; If the number exceeds a predetermined threshold, an upgraded alarm operation is performed, and the number of notification messages accumulated in the local cache of the server is cleared.

5. The method according to claim 1, characterized in that After querying the target logic rule triggered by the notification message from the logic rule configuration in the local cache of the server for execution, the method further includes: If the notification message is an event message, judging whether to start or stop equipment preventive maintenance according to the event content in the event message; If the device preventive maintenance is enabled, the detection instance of the target device is set to an inactive state by calling the detection instance update interface provided by the anomaly detection and classification system application; If the preventive maintenance of the equipment is cancelled, the detection instance of the target equipment is set to an activated state by calling the detection instance update interface provided by the anomaly detection and classification system application.

6. A rule arrangement execution method, characterized in that: The method applied to a client of the rule arrangement service according to any one of claims 1 to 5 comprises: At startup, calling a second interface provided by the configuration service to obtain the logic rule configuration in the predetermined database, saving the logic rule configuration to the client local cache, and monitoring through the message middleware; If a second rule change notification sent by the configuration service when a rule change occurs is monitored through the message middleware, a second rule change configuration is obtained from a second interface provided by the configuration service; Using the second change rule configuration to update the logic rule configuration in the client local cache; When executing a rule node in the application logic, a specific logic rule matched by the rule node is searched from the logic rule configuration in the local cache of the client for execution.

7. The method according to claim 6, characterized in that If the second rule change notification sent by the configuration service when a rule change occurs is monitored by the message middleware, obtaining the second change rule configuration from the second interface provided by the configuration service includes: Parsing the second rule change notification to obtain a second rule identifier; A second change rule configuration corresponding to the second rule identifier is obtained from a second interface provided by the configuration service.

8. The method according to claim 6, characterized in that After searching for the specific logic rule matched by the rule node in the logic rule configuration in the local cache of the client and executing the specific logic rule, the method further includes: Collecting the second component operation log in the process of executing the specific logic rule; The second component operation log is recorded into the predetermined database through the log recording interface provided by the configuration service.

9. A rule arrangement method, characterized in that: The method comprises: Displaying a rule orchestration interface corresponding to the rule orchestration service according to any one of claims 1 to 8, wherein the rule orchestration interface includes a plurality of rule orchestration components; According to the arrangement operation based on the rule arrangement component in the rule arrangement interface, a user constructed rule is obtained.

10. A rule arrangement execution device, characterized in that: A server for a rule arrangement service, wherein the rule arrangement service further includes a configuration service, and the device includes: The server configuration module is used to: pull the logic rule configuration from the predetermined database at startup, save the logic rule configuration to the server local cache, and monitor it through the message middleware; The server-side acquisition module is used to: if the first rule change notification sent by the configuration service when a rule change occurs is monitored through the message middleware, obtain the first changed rule configuration from the first interface provided by the configuration service; A server-side update module, configured to: update the logic rule configuration in the server-side local cache using the first change rule configuration; The server-side execution module is used to: if a notification message sent by the client to the message middleware is monitored, query the target logic rule triggered by the notification message from the logic rule configuration in the local cache of the server for execution, wherein the client is an anomaly detection and classification system application of the client toolkit that has introduced the rule orchestration service.

11. A rule arrangement execution device, characterized in that: Applied to a client of a rule arrangement service, the device comprises: The client configuration module is used to: call the second interface provided by the configuration service to obtain the logic rule configuration in the predetermined database at startup, save the logic rule configuration to the client local cache, and monitor through the message middleware; The client acquisition module is used to: if the second rule change notification sent by the configuration service when a rule change occurs is monitored by the message middleware, obtain the second change rule configuration from the second interface provided by the configuration service; A client updating module, configured to: update the logic rule configuration in the client local cache by using the second change rule configuration; The client execution module is used to: when executing a rule node in the application logic, search for a specific logic rule matched by the rule node from the logic rule configuration in the local cache of the client for execution.

12. A rule arrangement execution system, characterized in that: The rule orchestration execution system includes a rule orchestration service, a client and a message middleware, wherein the client is an anomaly detection and classification system application of a client toolkit that introduces the rule orchestration service, and the rule orchestration service includes a configuration service and a server; The configuration service is used to: send a first rule change notification or a second rule change notification to the message middleware when a rule change occurs; The server is used to: pull the logic rule configuration from the predetermined database at startup, and save the logic rule configuration to the local cache of the server; and, when the first rule change notification is monitored through the message middleware, update the logic rule configuration in the local cache of the server; and, when the notification message sent by the client is monitored through the message middleware, search the target logic rule triggered by the notification message from the local cache of the server and execute it; The client is used to: pull the logic rule configuration in the predetermined database when starting, and save the logic rule configuration to the client local cache; And, updating the logic rule configuration in the local cache of the client when the second rule change notification is monitored through the message middleware; And, when executing a rule node in the application logic, a specific logic rule matched by the rule node is searched from the logic rule configuration in the local cache of the server and executed.

Citation Information

Patent Citations

  • Configuration information updating method and device under micro-service architecture and electronic equipment

    CN112882738A

  • Cross-application cache updating method

    CN113641690A

  • Gray scale routing control method, gray scale routing component and computer equipment

    CN115250233A

  • Visual business rule arrangement method and configurator

    CN115291857A

  • Configuration data processing method and device, storage medium and electronic equipment

    CN115695183A