Method, device, computer device and storage medium for fusing rule engine and state machine

By analyzing business requirements and generating a dual-track model, the rule engine and state machine are integrated, solving the complexity problem in the integration of the rule engine and state machine, realizing efficient collaboration between business processes and rule management, and ensuring the consistency of business decisions and a clear process view.

CN119693119BActive Publication Date: 2026-06-12CHINA PING AN LIFE INSURANCE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA PING AN LIFE INSURANCE CO LTD
Filing Date
2024-11-21
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

The integration of rule engines and state machines in existing technologies suffers from problems such as rule conflicts, performance bottlenecks, state inconsistencies, and maintenance difficulties, which increases the complexity and challenges of enterprise business process management and business rule management.

Method used

By analyzing target business requirements, business rules and business processes are generated, and a business rule track based on a rule engine and a business process track based on a state machine are established to generate a dual-track model. The dual-track model is then used for interaction and fusion to generate interactive and fused information.

🎯Benefits of technology

It improves the efficiency of enterprises in managing business processes and business rules, ensures the consistency of business decisions, provides a clear view of business processes, and enables faster response to market changes and compliance requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693119B_ABST
    Figure CN119693119B_ABST
Patent Text Reader

Abstract

The application relates to the field of research and development management, is applied to the field of financial technology business, and discloses a fusion method and device of a rule engine and a state machine, computer equipment and a storage medium, the method comprises the following steps: establishing a business rule track based on a rule engine and a business process track based on a state machine, and generating a double-track model according to the business rule track and the business process track; and through the double-track model, target business rules and target business processes are interactively fused to generate interactive fusion information. In the manner, the business rules and the business processes are separately managed, market changes and compliance requirements can be responded to more quickly, the use of the rule engine ensures the consistency of business decisions, the use of the state machine provides a clear business process view, the interactive fusion information generated through the double-track model provides a detailed view of business process and rule execution, and the efficiency of enterprise business process management and business rule management is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of R&D management and is applied to the field of financial technology business. In particular, it relates to a method, device, computer equipment and storage medium for integrating rule engine and state machine. Background Technology

[0002] In modern enterprises, business process management and business rule management are two core components, crucial for ensuring efficient operation and compliance. With technological advancements, rule engines and state machines, as two distinct technical solutions, have been widely adopted in business process and rule management. A rule engine is a software component that separates business decision logic and implements it as a manageable set of rules. These rules can be easily modified without altering application code. Various commercial rule engine products exist, such as Drools, JBoss Rules, and IBM Operational Decision Manager (ODM), offering integration capabilities with business logic to help enterprises quickly build rule engine systems. Simultaneously, open-source rule engine frameworks, such as Jess, CLIPS, and JRules, provide flexible rule writing and execution mechanisms to adapt to different scenario requirements. A state machine is a computational model that determines the next state based on inputs and the current state. State machines are widely used to represent state transitions and event handling. Squirrel state machines are a common state machine tool, while open-source state machine frameworks such as XState and Boost.Statechart provide the ability to model and execute state machines, helping developers to better manage and control state transitions.

[0003] While existing technologies have achieved some success in rule engines and state machines, they still have some shortcomings and deficiencies. In rule engines, due to their complexity, rule conflicts and performance bottlenecks are prone to occur. Regarding state machines, modeling and maintaining them requires consideration of the complexity of state transitions, which can easily lead to inconsistencies and maintenance difficulties. In terms of integration, integrating rule engines and state machines requires consideration of version control, log management, and other issues, increasing the complexity and challenges of integration. Therefore, how to integrate rule engines and state machines to improve the efficiency of enterprise business process management and business rule management has become an urgent technical problem to be solved. Summary of the Invention

[0004] This application provides a method, apparatus, computer device, and storage medium for integrating a rule engine and a state machine, thereby improving the efficiency of enterprise business process management and business rule management.

[0005] Firstly, this application provides a method for integrating a rule engine and a state machine, the method comprising:

[0006] Analyze the target business requirements and generate target business rules and target business processes;

[0007] Establish a business rule track based on a rule engine and a business process track based on a state machine, and generate a dual-track model based on the business rule track and the business process track;

[0008] The dual-track model integrates the target business rules and the target business process to generate interactive and integrated information.

[0009] Secondly, this application also provides a fusion device for a rule engine and a state machine, the device comprising:

[0010] The target business requirement parsing module is used to parse target business requirements and generate target business rules and target business processes.

[0011] The dual-track model generation module is used to establish a business rule track based on a rule engine and a business process track based on a state machine, and to generate a dual-track model based on the business rule track and the business process track.

[0012] The interactive fusion module is used to interact and fuse the target business rules and the target business process through the dual-track model to generate interactive fusion information.

[0013] Thirdly, this application also provides a computer device, the computer device including a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and, when executing the computer program, implement the rule engine and state machine fusion method as described above.

[0014] Fourthly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the above-described method for integrating a rule engine and a state machine.

[0015] This application discloses a method, apparatus, computer device, and storage medium for fusing a rule engine and a state machine. The method includes parsing target business requirements to generate target business rules and target business processes; establishing a business rule track based on the rule engine and a business process track based on the state machine; and generating a dual-track model based on the business rule track and the business process track; and interactively fusing the target business rules and the target business processes through the dual-track model to generate interactive fusion information. By separating the management of business rules and business processes, this application can respond more quickly to market changes and compliance requirements. The use of the rule engine ensures the consistency of business decisions, the use of the state machine provides a clear view of the business processes, and the interactive fusion information generated by the dual-track model provides a detailed view of business processes and rule execution, thereby improving the efficiency of enterprise business process management and business rule management. Attached Figure Description

[0016] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a schematic flowchart of a method for fusing a rule engine and a state machine, provided in the first embodiment of this application.

[0018] Figure 2 This is a schematic flowchart of a method for fusing a rule engine and a state machine, provided in the second embodiment of this application;

[0019] Figure 3 This is a schematic flowchart of a method for fusing a rule engine and a state machine, provided in the third embodiment of this application;

[0020] Figure 4 This is a schematic flowchart of a method for fusing a rule engine and a state machine, provided in the fourth embodiment of this application;

[0021] Figure 5 A schematic block diagram of a device for fusing a rule engine and a state machine, provided for embodiments of this application;

[0022] Figure 6 A schematic block diagram of the structure of a computer device provided for an embodiment of this application. Detailed Implementation

[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0024] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.

[0025] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0026] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0027] This application provides a method, apparatus, computer device, and storage medium for integrating a rule engine and a state machine. The method for integrating the rule engine and state machine can be applied to a server. By separating the management of business rules and business processes, it can respond more quickly to market changes and compliance requirements. The use of the rule engine ensures the consistency of business decisions, while the use of the state machine provides a clear view of the business process. The interactive fusion information generated through the dual-track model provides a detailed view of business processes and rule execution, improving the efficiency of enterprise business process management and business rule management. The server can be a standalone server or a server cluster.

[0028] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0029] Please see Figure 1 , Figure 1This is a schematic flowchart illustrating a method for integrating a rule engine and a state machine, provided in the first embodiment of this application. This method can be applied to servers to separate the management of business rules and business processes, enabling faster response to market changes and compliance requirements. The use of the rule engine ensures consistency in business decisions, while the use of the state machine provides a clear view of the business processes. The interactive fusion information generated through the dual-track model provides a detailed view of business processes and rule execution, improving the efficiency of enterprise business process management and business rule management.

[0030] like Figure 1 As shown, the method for integrating the rule engine and the state machine specifically includes steps S10 to S30.

[0031] Step S10: Analyze the target business requirements and generate target business rules and target business processes;

[0032] Step S20: Establish a business rule track based on a rule engine and a business process track based on a state machine, and generate a dual-track model based on the business rule track and the business process track;

[0033] Step S30: Through the dual-track model, the target business rules and the target business process are interactively integrated to generate interactive integration information.

[0034] In one embodiment, to better support the definition and management of business rules and business processes, a dual-track model is introduced. The dual-track model includes a business rule track and a business process track, used to manage business rules and business processes respectively. The business rule track is used to define and manage business rules, and the business process track is used to define and manage business processes. The business rule track and the business process track interact through events and actions, thereby supporting the coordinated execution of business rules and business processes. The introduction of the dual-track model makes the definition and management of business rules and business processes clearer and more controllable.

[0035] To better support the definition and execution of business rules, this embodiment integrates a rule engine and a state machine. The rule engine defines and manages business rules, while the state machine controls the execution of business processes. This integration makes the execution of business rules more standardized and controllable, while also making the execution of business processes more flexible and scalable. Specifically, the rule engine and state machine interact through events and actions, thereby supporting the collaborative execution of business rules and business processes.

[0036] Based on the parsed business requirements, identify and define key business rules, organize these rules into documents to ensure their clarity and understandability, and input the defined business rules into the rule engine to build a manageable rule library.

[0037] Based on business requirements, identify the main business processes that need to be implemented, and use flowchart tools (such as BPMN, UML, etc.) to draw business process diagrams, clarifying the steps, decision points and participating roles of each process.

[0038] Document the detailed steps and logic of the business process to ensure clarity and understandability. Create a business rule track based on a rule engine to ensure all business rules can be dynamically invoked and executed. Create a business process track based on a state machine to ensure the effective management of the states and transitions of all business processes. Define events and actions to ensure that key steps in the business process track can trigger the evaluation of relevant rules in the business rule track.

[0039] Identify the key steps in the business process and the key conditions in the business rules to facilitate interaction during execution. Set event triggers at the key steps of the business process; when these steps are reached, the corresponding business rule evaluation is triggered. During business process execution, make decisions based on the evaluation results of the business rules and record information from the interaction process.

[0040] This embodiment discloses a method, apparatus, computer device, and storage medium for fusing a rule engine and a state machine. The method includes parsing target business requirements to generate target business rules and target business processes; establishing a business rule track based on the rule engine and a business process track based on the state machine; and generating a dual-track model based on the business rule track and the business process track. Through the dual-track model, the target business rules and the target business processes are interactively fused to generate interactive fusion information. By separating the management of business rules and business processes, this application can respond more quickly to market changes and compliance requirements. The use of the rule engine ensures the consistency of business decisions, the use of the state machine provides a clear view of the business processes, and the interactive fusion information generated by the dual-track model provides a detailed view of business processes and rule execution, thereby improving the efficiency of enterprise business process management and business rule management.

[0041] Please see Figure 2 , Figure 2 This is a schematic flowchart illustrating a method for integrating a rule engine and a state machine, provided in the second embodiment of this application. This method can be applied to servers to separate the management of business rules and business processes, enabling faster response to market changes and compliance requirements. The use of the rule engine ensures consistency in business decisions, while the use of the state machine provides a clear view of the business processes. The interactive fusion information generated through the dual-track model provides a detailed view of business processes and rule execution, improving the efficiency of enterprise business process management and business rule management.

[0042] based on Figure 1 The illustrated embodiment, for example Figure 2 As shown, step S20 includes steps S201 to S204.

[0043] Step S201: Identify at least one key business rule and at least one key business process in the preset business;

[0044] Step S202: Obtain the rule engine and the state machine;

[0045] Step S203: Based on the rule engine and each of the key business rules, establish the business rule track;

[0046] Step S204: Based on the state machine and each of the key business processes, establish the business process track.

[0047] In one embodiment, the business team is collaborated to gain a deep understanding of business objectives and needs, identify key factors influencing business decisions and processes, determine at least one key business rule, such as "all sales orders must undergo credit checks," and document the logic and conditions of the rule to ensure it is clear and enforceable.

[0048] Identify at least one key business process, such as the "new customer onboarding process," and draw a flowchart to clearly define the steps and decision points of the process.

[0049] Choose a suitable rule engine based on business needs, such as Drools or Jess, and evaluate the rule engine's functionality, performance, and integration capabilities. Choose a suitable state machine tool based on the complexity of the business process, such as XState or Boost.Statechart, and evaluate the state machine's modeling capabilities, execution efficiency, and scalability.

[0050] The identified key business rules are transformed into a format that the rule engine can understand. For example, the rule "all sales orders must undergo credit checks" is defined as an IF-THEN rule. The defined business rules are then loaded into the rule engine, and the rule engine is configured to ensure that the rules can be correctly interpreted and executed.

[0051] Test the business rules loaded into the rule engine to ensure they function as expected. Transform the identified key business processes into a format that the state machine can understand. For example, define the "new customer onboarding process" as a series of states and transitions, and load the defined business processes into the state machine. Configure the state machine to ensure the processes can be correctly managed and executed, and test the business processes loaded into the state machine to ensure they function as expected.

[0052] This embodiment discloses a method, apparatus, computer device, and storage medium for fusing a rule engine and a state machine. The method includes parsing target business requirements to generate target business rules and target business processes; identifying at least one key business rule and at least one key business process in a preset business; acquiring the rule engine and the state machine; establishing a business rule track based on the rule engine and each of the key business rules; establishing a business process track based on the state machine and each of the key business processes, and generating a dual-track model based on the business rule track and the business process track; and interactively fusing the target business rules and the target business processes through the dual-track model to generate interactive fusion information. Through this approach, by managing business rules and business processes separately, this application can respond more quickly to market changes and compliance requirements. The use of the rule engine ensures consistency in business decisions, the use of the state machine provides a clear view of business processes, and the interactive fusion information generated through the dual-track model provides a detailed view of business processes and rule execution, improving the efficiency of enterprise business process management and business rule management.

[0053] based on Figure 2 In the illustrated embodiment, step S203 includes:

[0054] The key business rules are parsed to generate rationality rules, strategy rules, and business logic rules;

[0055] Based on the rationality rules, the strategy rules, and the business logic rules, the triggering conditions for the key business rules are defined through the rule engine;

[0056] The business rule track is established based on at least one of the aforementioned triggering conditions.

[0057] In one embodiment, collaboration with business experts is used to gain a deep understanding of business objectives and needs, identifying key decision points and rule application scenarios within business processes. Key business rules are categorized into rationale rules, strategy rules, and business logic rules.

[0058] Reasonableness rules: Ensure that business operations conform to basic logic and common sense;

[0059] Strategy rules: Rules formulated based on company policies and market strategies;

[0060] Business logic rules: These involve the specific operations and processing logic of the business process.

[0061] For each type of rule, define its logic, conditions, and expected results in detail. For example, a rationality rule might include "order amount cannot be negative"; a strategy rule might include "prioritize high-value customer orders"; and a business logic rule might include "delay shipment if inventory is insufficient".

[0062] Determine which events or conditions will trigger the evaluation of each type of business rule. For example, order submission might trigger a reasonableness rule, and a change in customer category might trigger a policy rule. Configure the triggering conditions for each business rule in the rule engine. Define IF-THEN rules using the rule engine's syntax and functionality, such as: "Reject the order if the order amount is less than 0". Test the defined triggering conditions to ensure they correctly trigger the rules under the expected events or conditions. Adjust the rule logic and triggering conditions, and fix any issues found during testing.

[0063] The overall architecture of the business rule track is designed, including components for rule storage, rule evaluation, and rule execution. The defined business rules and their triggering conditions are loaded into the rule engine to ensure that the rules are organized according to business logic and priority order.

[0064] based on Figure 2 In the illustrated embodiment, step S204 includes:

[0065] Analyze the key business processes to determine the business execution sequence and business decision points;

[0066] The state machine visualizes the key business processes based on the business execution order and the business decision points, and establishes the business process track.

[0067] This embodiment discloses a method, apparatus, computer device, and storage medium for fusing a rule engine and a state machine. The method includes parsing target business requirements to generate target business rules and target business processes; identifying at least one key business rule and at least one key business process in a preset business; acquiring the rule engine and the state machine; parsing the key business rules to generate rationality rules, strategy rules, and business logic rules; defining triggering conditions for the key business rules through the rule engine based on the rationality rules, strategy rules, and business logic rules; establishing the business rule track based on at least one triggering condition; parsing the key business processes to determine the business execution order and business decision points; visualizing the key business processes through the state machine according to the business execution order and business decision points to establish the business process track, and generating a dual-track model based on the business rule track and the business process track; and interactively fusing the target business rules and the target business processes through the dual-track model to generate interactive fusion information. By separating business rules and business processes through the above methods, this application can respond more quickly to market changes and compliance requirements. The use of a rule engine ensures the consistency of business decisions, the use of a state machine provides a clear view of business processes, and the interactive fusion information generated by the dual-track model provides a detailed view of business processes and rule execution, thereby improving the efficiency of enterprise business process management and business rule management.

[0068] Please see Figure 3 , Figure 3 This is a schematic flowchart illustrating a method for integrating a rule engine and a state machine, as provided in the third embodiment of this application. This method can be applied to servers to separate the management of business rules and business processes, enabling faster response to market changes and compliance requirements. The use of the rule engine ensures consistency in business decisions, while the use of the state machine provides a clear view of the business processes. The interactive fusion information generated through the dual-track model provides a detailed view of business processes and rule execution, improving the efficiency of enterprise business process management and business rule management.

[0069] based on Figure 1 The illustrated embodiment, for example Figure 3 As shown, step S20 also includes steps S205 to S208.

[0070] Step S205: Define the target business rule node in the business rule track and the target business process node in the business process track according to the target business rule and the target business process.

[0071] Step S206: Extract the event information contained in each of the target business rule nodes and each of the target business process nodes;

[0072] Step S207: Based on the event information, match the target business rule nodes and the target business process nodes.

[0073] Step S208: Merge the matching target business rule nodes and target business process nodes to generate at least one event decision point, and generate the dual-track model based on each event decision point.

[0074] In one embodiment, the specific execution point of each rule in the business rule track is determined and defined as a business rule node. For example, if a rule is "provide a discount when the order amount exceeds a certain value", then the execution point of this rule is a business rule node. The specific steps of each process in the business process track are determined and defined as business process nodes. For example, in the order processing process, "order confirmation" and "payment processing" can be two business process nodes.

[0075] Identify the events contained in each business rule node that trigger rule execution, and record the event type, conditions, and expected input / output. Identify the events that may occur in each business process node that may affect rule execution, and record the event type, conditions, and expected input / output.

[0076] Based on the extracted event information, business rule nodes and business process nodes are matched to determine which process node events can trigger rule nodes and which rule node events can affect process nodes. The matched nodes are verified to ensure they meet the business logic and rule conditions, guaranteeing that they are meaningful within the business process and can correctly trigger or respond to events.

[0077] Event decision points are defined between matching business rule nodes and business process nodes. These event decision points are key points in the process where decisions are made based on the evaluation results of the rules. The matching business rule nodes and business process nodes are integrated to ensure they can work collaboratively at the event decision points. A rule engine and state machine are configured to receive and process events at these points.

[0078] Based on the fusion of nodes and event decision points, a dual-track model framework is constructed to ensure that the business rule track and the business process track can communicate and interact with each other architecturally. The interaction logic between the business rule track and the business process track is implemented, and a rule engine and state machine are configured so that the process can be adjusted based on the rule evaluation results at event decision points.

[0079] This embodiment discloses a method, apparatus, computer device, and storage medium for fusing a rule engine and a state machine. The method includes parsing target business requirements to generate target business rules and target business processes; establishing a business rule track based on the rule engine and a business process track based on the state machine; defining target business rule nodes in the business rule track and target business process nodes in the business process track according to the target business rules and the target business processes; extracting event information contained in each target business rule node and each target business process node; matching each target business rule node and each target business process node based on the event information; fusing the matched target business rule nodes and target business process nodes to generate at least one event decision point, and generating the dual-track model based on each event decision point; and interactively fusing the target business rules and the target business processes through the dual-track model to generate interactive fusion information. By separating business rules and business processes through the above methods, this application can respond more quickly to market changes and compliance requirements. The use of a rule engine ensures the consistency of business decisions, the use of a state machine provides a clear view of business processes, and the interactive fusion information generated by the dual-track model provides a detailed view of business processes and rule execution, thereby improving the efficiency of enterprise business process management and business rule management.

[0080] Please see Figure 4 , Figure 4 This is a schematic flowchart illustrating a method for integrating a rule engine and a state machine, as provided in the fourth embodiment of this application. This method can be applied to servers to separate the management of business rules and business processes, enabling faster response to market changes and compliance requirements. The use of the rule engine ensures consistency in business decisions, while the use of the state machine provides a clear view of the business processes. The interactive fusion information generated through the dual-track model provides a detailed view of business processes and rule execution, improving the efficiency of enterprise business process management and business rule management.

[0081] based on Figure 1 The illustrated embodiment, for example Figure 4 As shown, step S30 also includes steps S301 to S303.

[0082] Step S301: Generate target event interaction instructions using the dual-track model, the target business rules, and the target business process;

[0083] Step S302: In response to the target event interaction command, the target business rule and the target business process are executed respectively through the dual-track model to generate target business rule data and target business process data;

[0084] Step S303: Merge the target business rule data and the target business process data to generate the interactive fusion information.

[0085] In one embodiment, the target business rules and target business processes are analyzed to identify their interaction points. These interaction points are typically specific events within the business process that trigger the evaluation of the business rules. Specific event interaction instructions are defined for each interaction point. These event interaction instructions should contain sufficient information to guide the dual-track model on when and where to trigger the business rules and business processes.

[0086] Configure business rules in the rule engine so they can respond to event interaction commands, and configure business processes in the state machine so they can execute at appropriate times and respond to the output of business rules. When a business process reaches a predefined interaction point, the corresponding business rule evaluation is triggered. The rule engine executes business rules based on event interaction commands and current business data.

[0087] According to the definition of a state machine, each step of the business process is executed. During the execution of the business process, the evaluation results of the business rules are responded to, and the execution path of the process is adjusted. During the execution, the evaluation results of the business rules are recorded, and the target business rule data is generated. At the same time, the execution status and results of the business process are recorded, and the target business process data is generated.

[0088] According to the defined fusion rules, the target business rule data and target business process data are merged to ensure data consistency and integrity during the fusion process. The merged data constitutes interactive fusion information, which includes the execution results and impacts of business rules and business processes.

[0089] This embodiment discloses a method, apparatus, computer device, and storage medium for fusing a rule engine and a state machine. The method includes parsing target business requirements to generate target business rules and target business processes; establishing a business rule track based on the rule engine and a business process track based on the state machine, and generating a dual-track model based on the business rule track and the business process track; generating target event interaction instructions through the dual-track model, the target business rules, and the target business processes; responding to the target event interaction instructions, executing the target business rules and the target business processes respectively through the dual-track model to generate target business rule data and target business process data; and fusing the target business rule data and the target business process data to generate interactive fusion information. Through this approach, by managing business rules and business processes separately, this application can respond more quickly to market changes and compliance requirements. The use of a rule engine ensures consistency in business decisions, the use of a state machine provides a clear view of business processes, and the interactive fusion information generated through the dual-track model provides a detailed view of business processes and rule execution, thereby improving the efficiency of enterprise business process management and business rule management.

[0090] based on Figure 4 In the illustrated embodiment, step S304 includes:

[0091] The target business rule data is transmitted to the business process track, and the target business process data is transmitted to the business rule track;

[0092] The target business rule data is evaluated through the business process track to generate the first interactive information;

[0093] The target business process data is evaluated using the business rule track to generate second interactive information;

[0094] Based on the first interaction information and the second interaction information, the rule engine and the state machine are collaboratively managed to generate the interaction fusion information.

[0095] Please see Figure 5 , Figure 5 This embodiment of the present application provides a schematic block diagram of a device for fusing a rule engine and a state machine. This device is used to execute the aforementioned method for fusing a rule engine and a state machine. The device can be configured on a server.

[0096] like Figure 5 As shown, the fusion device 400 of the rule engine and state machine includes:

[0097] The target business requirement parsing module 410 is used to parse target business requirements and generate target business rules and target business processes.

[0098] The dual-track model generation module 420 is used to establish a business rule track based on a rule engine and a business process track based on a state machine, and to generate a dual-track model based on the business rule track and the business process track.

[0099] The interactive fusion module 430 is used to interactively fuse the target business rules and the target business process through the dual-track model to generate interactive fusion information.

[0100] Furthermore, the dual-track model generation module 420 includes:

[0101] A preset business identification unit is used to identify at least one key business rule and at least one key business process in a preset business.

[0102] A rule engine and state machine acquisition unit is used to acquire the rule engine and the state machine;

[0103] A business rule track establishment unit is used to establish the business rule track based on the rule engine and each of the key business rules;

[0104] The business process track establishment unit is used to establish the business process track based on the state machine and each of the key business processes.

[0105] Furthermore, the business rule track establishment unit includes:

[0106] The key business rule parsing subunit is used to parse the key business rules and generate rationality rules, strategy rules, and business logic rules.

[0107] The trigger condition definition subunit is used to define the trigger conditions of the key business rules through the rule engine based on the rationality rules, the strategy rules, and the business logic rules.

[0108] A business rule track establishment subunit is used to establish the business rule track based on at least one of the triggering conditions.

[0109] Furthermore, the business process track establishment unit includes:

[0110] The key business process analysis subunit is used to analyze the key business processes and determine the business execution sequence and business decision points.

[0111] The business process track establishment subunit is used to visualize the key business processes and establish the business process track by using the state machine according to the business execution order and the business decision point.

[0112] Furthermore, the dual-track model generation module 420 also includes:

[0113] A node definition unit is used to define target business rule nodes in the business rule track and target business process nodes in the business process track according to the target business rules and the target business process.

[0114] An event information extraction unit is used to extract event information contained in each of the target business rule nodes and each of the target business process nodes;

[0115] A node matching unit is used to match each target business rule node and each target business process node based on each event information.

[0116] The dual-track model generation unit is used to merge the matching target business rule nodes and target business process nodes to generate at least one event decision point, and generate the dual-track model based on each event decision point.

[0117] Furthermore, the interactive fusion module 430 includes:

[0118] The target event interaction instruction generation unit is used to generate target event interaction instructions through the dual-track model, the target business rules, and the target business process;

[0119] A business data generation unit is used to respond to the target event interaction command, execute the target business rules and the target business process respectively through the dual-track model, and generate target business rule data and target business process data.

[0120] The interactive fusion information generation unit is used to fuse the target business rule data and the target business process data to generate the interactive fusion information.

[0121] Furthermore, the interactive fusion information generation unit includes:

[0122] The data transmission subunit is used to transmit the target business rule data to the business process track and transmit the target business process data to the business rule track;

[0123] The first interactive information generation subunit is used to evaluate the target business rule data through the business process track and generate the first interactive information.

[0124] The second interactive information generation subunit is used to evaluate the target business process data through the business rule track and generate second interactive information.

[0125] The interactive fusion information generation subunit is used to collaboratively manage the rule engine and the state machine based on the first interactive information and the second interactive information to generate the interactive fusion information.

[0126] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the above-described apparatus and modules can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0127] The aforementioned device can be implemented as a computer program, which can be used in, for example... Figure 6 It runs on the computer device shown.

[0128] Please see Figure 6 , Figure 6 This is a schematic block diagram illustrating the structure of a computer device according to an embodiment of this application. The computer device may be a server.

[0129] See Figure 6 The computer device includes a processor, memory, and network interface connected via a system bus, wherein the memory may include non-volatile storage media and internal memory.

[0130] Non-volatile storage media can store operating systems and computer programs. These computer programs include program instructions that, when executed, cause the processor to perform any method of fusing rule engines and state machines.

[0131] The processor provides computing and control capabilities, supporting the operation of the entire computer device.

[0132] Internal memory provides an environment for the execution of computer programs in non-volatile storage media. When the computer program is executed by the processor, it enables the processor to execute any method of combining rule engines and state machines.

[0133] This network interface is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that... Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0134] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.

[0135] In one embodiment, the processor is configured to run a computer program stored in memory to perform the following steps:

[0136] Analyze the target business requirements and generate target business rules and target business processes;

[0137] Establish a business rule track based on a rule engine and a business process track based on a state machine, and generate a dual-track model based on the business rule track and the business process track;

[0138] The dual-track model integrates the target business rules and the target business process to generate interactive and integrated information.

[0139] In one embodiment, a business rule track based on a rule engine and a business process track based on a state machine are established to achieve:

[0140] Identify at least one key business rule and at least one key business process in the pre-defined business;

[0141] Obtain the rule engine and the state machine;

[0142] Based on the rule engine and each of the key business rules, the business rule track is established;

[0143] Based on the state machine and each of the key business processes, the business process track is established.

[0144] In one embodiment, based on the rule engine and each of the key business rules, a business rule track is established to achieve:

[0145] The key business rules are parsed to generate rationality rules, strategy rules, and business logic rules;

[0146] Based on the rationality rules, the strategy rules, and the business logic rules, the triggering conditions for the key business rules are defined through the rule engine;

[0147] The business rule track is established based on at least one of the aforementioned triggering conditions.

[0148] In one embodiment, based on the state machine and each of the key business processes, a business process track is established to achieve:

[0149] Analyze the key business processes to determine the business execution sequence and business decision points;

[0150] The state machine visualizes the key business processes based on the business execution order and the business decision points, and establishes the business process track.

[0151] In one embodiment, a dual-track model is generated based on the business rule track and the business process track to achieve:

[0152] Based on the target business rules and the target business process, define the target business rule node in the business rule track and the target business process node in the business process track;

[0153] Extract the event information contained in each of the target business rule nodes and each of the target business process nodes;

[0154] Based on the event information, the target business rule nodes and the target business process nodes are matched.

[0155] The matching target business rule nodes and target business process nodes are merged to generate at least one event decision point, and the dual-track model is generated based on each event decision point.

[0156] In one embodiment, the target business rules and the target business process are interactively integrated through the dual-track model to generate interactive integration information, which is used to achieve:

[0157] The target event interaction instructions are generated using the dual-track model, the target business rules, and the target business process.

[0158] In response to the target event interaction command, the target business rule and the target business process are executed respectively through the dual-track model to generate target business rule data and target business process data;

[0159] The target business rule data and the target business process data are merged to generate the interactive fusion information.

[0160] In one embodiment, the target business rule data and the target business process data are fused to generate the interactive fusion information, which is used to achieve:

[0161] The target business rule data is transmitted to the business process track, and the target business process data is transmitted to the business rule track;

[0162] The target business rule data is evaluated through the business process track to generate the first interactive information;

[0163] The target business process data is evaluated using the business rule track to generate second interactive information;

[0164] Based on the first interaction information and the second interaction information, the rule engine and the state machine are collaboratively managed to generate the interaction fusion information.

[0165] The embodiments of this application also provide a computer-readable storage medium storing a computer program, the computer program including program instructions, and the processor executing the program instructions to implement any of the rule engine and state machine fusion methods provided in the embodiments of this application.

[0166] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiments, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, SmartMedia Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the computer device.

[0167] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for integrating a rule engine and a state machine, characterized in that, include: Analyze the target business requirements and generate target business rules and target business processes; Establish a business rule track based on a rule engine and a business process track based on a state machine, and generate a dual-track model based on the business rule track and the business process track; The dual-track model integrates the target business rules and the target business process to generate interactive and integrated information. The establishment of business rule tracks based on rule engines and business process tracks based on state machines includes: Identify at least one key business rule and at least one key business process in the pre-defined business; The key business rules are documented to generate a key business rule document. The rule engine is determined based on the target business requirements, the key business rule document is loaded into the rule engine, and the business rule track is established. Determine the business steps and business decision points of the key business processes, and convert the business steps and business decision points into a key business process diagram; The state machine is determined based on the key business process diagram, and the key business process diagram is loaded into the state machine to generate the business process track.

2. The method for integrating the rule engine and state machine according to claim 1, characterized in that, The establishment of business rule tracks based on rule engines and business process tracks based on state machines includes: Identify at least one of the key business rules and at least one of the key business processes; Obtain the rule engine and the state machine; Based on the rule engine and each of the key business rules, the business rule track is established; Based on the state machine and each of the key business processes, the business process track is established.

3. The method for integrating the rule engine and state machine according to claim 2, characterized in that, The establishment of the business rule track based on the rule engine and each of the key business rules includes: The key business rules are parsed to generate rationality rules, strategy rules, and business logic rules; Based on the rationality rules, the strategy rules, and the business logic rules, the triggering conditions for the key business rules are defined through the rule engine; The business rule track is established based on at least one of the aforementioned triggering conditions.

4. The method for integrating the rule engine and state machine according to claim 3, characterized in that, The establishment of the business process track based on the state machine and each of the key business processes includes: Analyze the key business processes to determine the business execution sequence and business decision points; The state machine visualizes the key business processes based on the business execution order and the business decision points, and establishes the business process track.

5. The method for integrating the rule engine and state machine according to claim 1, characterized in that, The step of generating a dual-track model based on the business rule track and the business process track includes: Based on the target business rules and the target business process, define the target business rule node in the business rule track and the target business process node in the business process track; Extract the event information contained in each of the target business rule nodes and each of the target business process nodes; Based on the event information, the target business rule nodes and the target business process nodes are matched. The matching target business rule nodes and target business process nodes are merged to generate at least one event decision point, and the dual-track model is generated based on each event decision point.

6. The method for fusing rule engine and state machine according to claim 1, characterized in that, The step of using the dual-track model to interactively integrate the target business rules and the target business process to generate interactive integration information includes: The target event interaction instructions are generated using the dual-track model, the target business rules, and the target business process. In response to the target event interaction command, the target business rule and the target business process are executed respectively through the dual-track model to generate target business rule data and target business process data; The target business rule data and the target business process data are merged to generate the interactive fusion information.

7. The method for fusing rule engine and state machine according to claim 6, characterized in that, The step of fusing the target business rule data and the target business process data to generate the interactive fusion information includes: The target business rule data is transmitted to the business process track, and the target business process data is transmitted to the business rule track; The target business rule data is evaluated through the business process track to generate the first interactive information; The target business process data is evaluated using the business rule track to generate second interactive information; Based on the first interaction information and the second interaction information, the rule engine and the state machine are collaboratively managed to generate the interaction fusion information.

8. A device for integrating a rule engine and a state machine, characterized in that, include: The target business requirement parsing module is used to parse target business requirements and generate target business rules and target business processes. The dual-track model generation module is used to establish a business rule track based on a rule engine and a business process track based on a state machine, and to generate a dual-track model based on the business rule track and the business process track. The interactive fusion module is used to interact and fuse the target business rules and the target business process through the dual-track model to generate interactive fusion information; The dual-track model generation module is also used to implement: Identify at least one key business rule and at least one key business process in the pre-defined business; The key business rules are documented to generate a key business rule document. The rule engine is determined based on the target business requirements, the key business rule document is loaded into the rule engine, and the business rule track is established. Determine the business steps and business decision points of the key business processes, and convert the business steps and business decision points into a key business process diagram; The state machine is determined based on the key business process diagram, and the key business process diagram is loaded into the state machine to generate the business process track.

9. A computer device, characterized in that, The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program and, when executing the computer program, implement the method for fusing the rule engine and state machine as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to implement the method of fusing the rule engine and the state machine as described in any one of claims 1 to 7.