Rule management method and device based on graph structure, storage medium and electronic equipment

Through the interactive visualization of graph structure rules management method, the problem of cumbersome business rules orchestration in the existing technology is solved, and flexible adjustment and efficient management of business logic is realized, which is suitable for multiple business scenarios.

CN120373712APending Publication Date: 2025-07-25WUHAN JIYI NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510376652.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

In the prior art, the business rule orchestration method based on graph structure requires staff to design from scratch, and the operation is cumbersome, resulting in low business flexibility and high development costs.

Method used

Create a flow chart to be executed through interactive visualization, generate a graph rule file, and classify it based on input and output nodes to form a graph rule recommendation column list, supporting flexible arrangement and update of rules.

Benefits of technology

It improves business management efficiency, reduces development costs, and supports real-time and flexible adjustment of business logic. It is suitable for multiple business scenarios such as e-commerce, business risk control, and aviation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120373712A_ABST
    Figure CN120373712A_ABST
Patent Text Reader

Abstract

The invention discloses a rule management method and device based on a graph structure, a storage medium and electronic equipment, and relates to the technical field of rule engines, the method comprises the following steps: creating each node in a to-be-executed flow chart, and generating a corresponding graph rule file; forming an updated execution flow chart based on the to-be-executed flow chart in the graph rule file, and storing the updated execution flow chart as an updated graph rule file; storing each graph rule file and the updated graph rule file; and performing classification based on the number of the input nodes and the output nodes in the to-be-executed flow chart of each graph rule file and the updated execution flow chart of the updated graph rule file, and summarizing to form a corresponding graph rule recommendation column table. According to the method, rule arrangement is completed in an interactive visualization mode, the graph structure rule file is generated, arrangement is performed for a user in the later period, and the service management working efficiency is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of rule engines, and specifically relates to a rule management method, device, storage medium, and electronic device based on a graph structure. Background Art

[0002] A rule engine system is a software system that uses formal definitions of business logic and makes decisions based on these rules at runtime. It is often applied to business scenarios with a large number of business rules to handle the situation where business rules change frequently. At present, there are some technologies for formulating business rules through graph structure orchestration methods, but all of them require staff to design from scratch, and the operation is cumbersome. Therefore, how to improve business flexibility and effectively reduce development costs is a technical problem that urgently needs to be solved at present.

[0003] Therefore, to meet the actual needs, a rule management technology based on a graph structure is provided. Summary of the Invention

[0004] Aiming at the defects existing in the prior art, the purpose of this application is to provide a rule management method, device, storage medium, and electronic device based on a graph structure, which completes rule orchestration through an interactive visualization method, generates a graph structure rule file, and later orchestrates for users, effectively improving the efficiency of business management work.

[0005] To achieve the above objectives, the technical solutions adopted by this application are as follows:

[0006] In a first aspect, this application provides a rule management method based on a graph structure, and the method includes the following steps:

[0007] Create each node in the to-be-executed flowchart, and after sorting and combining the processes of each node in the to-be-executed flowchart, generate a corresponding graph rule file;

[0008] Based on the to-be-executed flowchart in the graph rule file, re-sort and combine the processes of each node in the to-be-executed flowchart to form an updated execution flowchart, and save the updated execution flowchart as an updated graph rule file;

[0009] Store each graph rule file and the updated graph rule file;

[0010] Classify based on the number of input nodes and output nodes in the to-be-executed flowchart of each graph rule file and the updated execution flowchart of the updated graph rule file, and summarize and form a corresponding graph rule recommendation column table;

[0011] The node types include input nodes, output nodes, and rule nodes;

[0012] The rule nodes include decision table nodes, branch nodes, script function nodes, expression nodes, and custom function nodes;

[0013] Both the to-be-executed flowchart and the updated to-be-executed flowchart include one input node, at least one output node, and at least one rule node.

[0014] Based on the above technical solution, storing each of the graph rule files and the updated graph rule files includes the following steps:

[0015] Store the to-be-executed flowchart corresponding to each of the graph rule files and the updated to-be-executed flowchart corresponding to the updated graph rule file.

[0016] Based on the above technical solution, classifying according to the number of input nodes and output nodes in the to-be-executed flowchart of each graph rule file and the updated to-be-executed flowchart of the updated graph rule file, and summarizing and forming a corresponding graph rule recommendation column table includes the following steps:

[0017] Receive the set numbers of the input node, the output node, and the rule node, extract the graph rule files and the updated graph rule files whose quantities of all three match and whose time interval from the current time is the first set interval time, and mark them as to-be-recommended graph rule files.

[0018] Based on the above technical solution, classifying according to the number of input nodes and output nodes in the to-be-executed flowchart of each graph rule file and the updated to-be-executed flowchart of the updated graph rule file, and summarizing and forming a corresponding graph rule recommendation column table includes the following steps:

[0019] Count the selection times of each to-be-recommended graph rule file, and display them in order based on the selection times of the to-be-recommended graph rule files.

[0020] Based on the above technical solution, creating each node in the to-be-executed flowchart, and after performing process sorting and process combination on each node in the to-be-executed flowchart, generating a corresponding graph rule file includes the following steps;

[0021] Create each node in the to-be-executed flowchart, and perform process arrangement work on each node in the to-be-executed flowchart. The process arrangement work includes process sorting and process combination;

[0022] Generate a corresponding graph rule file based on the to-be-executed flowchart completed by the process arrangement work.

[0023] In a second aspect, the present application provides a rule management device based on a graph structure. The device includes:

[0024] A rule arrangement module, which is used to create each node in the flowchart to be executed, and after sorting and combining the processes of each node in the flowchart to be executed, generate a corresponding graph rule file;

[0025] A rule update module, which is used to re-sort and combine the processes of each node in the flowchart to be executed based on the flowchart to be executed in the graph rule file, form an updated execution flowchart, and save the updated execution flowchart as an updated graph rule file;

[0026] A rule storage module, which is used to store each of the graph rule files and the updated graph rule files;

[0027] A rule recommendation module, which is used to classify based on the number of input nodes and output nodes in the flowchart to be executed of each of the graph rule files and the updated execution flowchart of the updated graph rule file, and summarize and form a corresponding graph rule recommendation column table; where

[0028] The node types include input nodes, output nodes, and rule nodes;

[0029] The rule nodes include decision table nodes, branch nodes, script function nodes, expression nodes, and custom function nodes;

[0030] Both the flowchart to be executed and the updated execution flowchart include one of the input nodes, at least one of the output nodes, and at least one of the rule nodes.

[0031] Based on the above technical solution, the rule storage module is further used to store the flowchart to be executed corresponding to each of the graph rule files and the updated flowchart to be executed corresponding to the updated graph rule files.

[0032] Based on the above technical solution, the rule recommendation module is further used to receive the set numbers of the input nodes, the output nodes, and the rule nodes, extract the graph rule files and the updated graph rule files in which the quantities of the three match and the time interval from the current time is the first set interval time, mark them as graph rule files to be recommended, and feedback them to the rule update module for display.

[0033] Based on the above technical solution, the rule recommendation module is further used to count the selection times of each of the graph rule files to be recommended, and feedback them to the rule update module for sequential display based on the selection times of the graph rule files to be recommended.

[0034] Based on the above technical solution, the rule arrangement module includes an arrangement sub-module and a graph rule file generation sub-module;

[0035] The arrangement sub-module is used for visual rule node arrangement, including creating each node in the to-be-executed flowchart and performing process arrangement work on each node in the to-be-executed flowchart. The process arrangement work includes process sorting and process combination;

[0036] The graph rule file generation sub-module is used to generate the corresponding graph rule file based on the to-be-executed flowchart completed by the process arrangement work.

[0037] In a third aspect, the present application provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method mentioned in the first aspect is implemented.

[0038] In a fourth aspect, the present application provides an electronic device, including a memory and a processor. A computer program is stored on the memory and runs on the processor. When the processor executes the computer program, the method mentioned in the first aspect is implemented.

[0039] Compared with the prior art, the advantages of the present application are as follows:

[0040] The present application completes rule arrangement through an interactive visualization method, generates a graph structure rule file, and arranges for users later, effectively improving the efficiency of business management work. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0042] Figure 1 It is a step flowchart of the rule management method based on the graph structure in the embodiment of the present application;

[0043] Figure 2 It is a structural block diagram of the rule management device based on the graph structure in the embodiment of the present application;

[0044] Figure 3 It is a structural block diagram of an electronic device of the rule management method based on the graph structure in the embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0045] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the following will clearly and completely describe the technical solutions in the embodiments of this application with reference to the accompanying drawings in the embodiments of this application. Apparently, the described embodiments are some, but not all, of the embodiments of this application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts shall fall within the scope of protection of this application.

[0046] The following further elaborates on the embodiments of this application with reference to the accompanying drawings.

[0047] The embodiments of this application provide a rule management method, device, storage medium, and electronic device based on a graph structure. Through an interactive visualization method, rule orchestration is completed, and a graph structure rule file is generated. Later, it is orchestrated for the user, effectively improving the efficiency of business management work.

[0048] To achieve the above technical effects, the general idea of this application is as follows:

[0049] A rule management method based on a graph structure, the method comprising the following steps:

[0050] S1. Create each node in the to-be-executed flowchart, and after performing process sorting and process combination on each node in the to-be-executed flowchart, generate a corresponding graph rule file;

[0051] S2. Based on the to-be-executed flowchart in the graph rule file, perform re-process sorting and process combination on each node in the to-be-executed flowchart to form an updated execution flowchart, and save the updated execution flowchart as an updated graph rule file;

[0052] S3. Store each graph rule file and the updated graph rule file;

[0053] S4. Classify based on the number of input nodes and output nodes in the to-be-executed flowchart of each graph rule file and the updated execution flowchart of the updated graph rule file, and summarize and form a corresponding graph rule recommendation column table;

[0054] The node types include input nodes, output nodes, and rule nodes;

[0055] The rule nodes include decision table nodes, branch nodes, script function nodes, expression nodes, and custom function nodes;

[0056] Both the to-be-executed flowchart and the updated execution flowchart include one input node, at least one output node, and at least one rule node.

[0057] The following further elaborates on the embodiments of this application with reference to the accompanying drawings.

[0058] In a first aspect, as shown in Figure 1 the present application provides a rule management method based on a graph structure, and the method includes the following steps:

[0059] S1. Create each node in the flowchart to be executed, and after performing process sorting and process combination on each node in the flowchart to be executed, generate a corresponding graph rule file;

[0060] S2. Based on the flowchart to be executed in the graph rule file, perform re - process sorting and process combination on each node in the flowchart to be executed to form an updated execution flowchart, and save the updated execution flowchart as an updated graph rule file;

[0061] S3. Store each graph rule file and the updated graph rule file;

[0062] S4. Classify based on the number of input nodes and output nodes in the flowchart to be executed of each graph rule file and the updated execution flowchart of the updated graph rule file, and summarize and form a corresponding graph rule recommendation column table;

[0063] The node types include input nodes, output nodes, and rule nodes;

[0064] The rule nodes include decision table nodes, branch nodes, script function nodes, expression nodes, and custom function nodes;

[0065] Both the flowchart to be executed and the updated execution flowchart include one input node, at least one output node, and at least one rule node.

[0066] In the embodiments of the present application, rule arrangement is completed through an interactive visualization method, and a graph - structured rule file is generated, and later arrangement is performed for users, effectively improving the efficiency of business management work.

[0067] Further, the storing of each of the graph rule files and the updated graph rule file includes the following steps:

[0068] Store the flowchart to be executed corresponding to each graph rule file and the updated flowchart to be executed corresponding to the updated graph rule file.

[0069] It should be noted that in the graph rule recommendation column table, classification is performed based on different numbers of input nodes and output nodes, and the graph rule files and the updated graph rule files are correspondingly stored, and the flowchart to be executed of the graph rule files and the updated execution flowchart of the updated graph rule files are also correspondingly stored.

[0070] Further, classify based on the number of input nodes and output nodes in the to-be-executed flowchart based on each of the graph rule files and the updated execution flowchart of the updated graph rule file, and summarize and organize them into a corresponding graph rule recommendation column table, including the following steps:

[0071] Receive the set numbers of the input nodes, the output nodes, and the rule nodes, extract the graph rule files and the updated graph rule files whose quantities of all three match and whose time interval from the current time is the first set interval time, and mark them as to-be-recommended graph rule files.

[0072] Further, classify based on the number of input nodes and output nodes in the to-be-executed flowchart based on each of the graph rule files and the updated execution flowchart of the updated graph rule file, and summarize and organize them into a corresponding graph rule recommendation column table, including the following steps:

[0073] Count the selection times of each of the to-be-recommended graph rule files, and display them in order based on the selection times of the to-be-recommended graph rule files.

[0074] Further, create each node in the to-be-executed flowchart, and after performing process sorting and process combination on each node in the to-be-executed flowchart, generate the corresponding graph rule file, including the following steps;

[0075] Create each node in the to-be-executed flowchart, and perform process arrangement work on each node in the to-be-executed flowchart, and the process arrangement work includes process sorting and process combination;

[0076] Generate the corresponding graph rule file based on the to-be-executed flowchart completed by the process arrangement work.

[0077] Further, the input node is used to act as the entry for all data related to the context;

[0078] The output node is used to output the result of the final business decision-making process.

[0079] Further, the decision table node is a rule node structured with multiple groups of inputs, expressions, and outputs, and is used to describe the logic of relevant calculations in business.

[0080] Further, the expression node is a rule node with a key-value pair structure and is used to create new data fields.

[0081] Further, the branch node is a rule node that can dynamically branch the decision evaluation according to conditions and is used in scenarios where different decisions need to be made according to different inputs in business logic.

[0082] Further, the function node is a rule node that can quickly parse, remap, and customize data through JS scripts, and is used for data preprocessing and parsing.

[0083] Further, the custom node is a rule node extended according to the business.

[0084] Specifically, in order to reduce the access cost on different business services and reuse the rule through the API (Application Programming Interface), the API generation group module generates call templates for multiple preset Web backend development programming languages for the HTTP (Hypertext Transfer Protocol) / HTTPS API calls of the rule system. For example, common Web backend development programming languages such as Shell, NodeJS, Python, Java, and Go. This module only needs to replace the open interface ID and open interface key of the called API according to the preset call template to generate a specific call example. Business personnel can select a specific call example according to the actual situation, which is convenient for quickly accessing specific business scenarios.

[0085] Furthermore, specifically, in order to be flexibly and steadily applied to different business scenarios, in addition to being able to edit the JDM file in this rule orchestration system, a certain rule scheme can be managed in the management sub-module of this system. Management operations include rule editing, permission setting, observation, publishing, and closing, etc.

[0086] The editing of the rule can enter the rule orchestration module to modify and save the nodes of the graph rule, the specific rule logic of the nodes, and the orchestration relationship between the nodes;

[0087] The rule permission setting is to set permissions for each user accessing this system, including read-only, read-write, and other permissions;

[0088] The rule observation is an execution that inputs the data of the business scenario into this system for evaluation, writes the decision result into the specified database for recording, but only observes the specific business scenario without making a decision. This avoids some inappropriate rules from being discovered during testing before formal application, ensuring the stability of the actual business;

[0089] The rule publishing is to formally apply the corresponding graph rule to the specific business scenario, which has a specific impact on the processing of the business;

[0090] The rule closing is to stop inputting business data into the corresponding graph rule for evaluation and execution.

[0091] In summary, based on the technical solution of the embodiments of the present application, it helps business personnel extract the business logic that needs to be frequently changed in the business program into rules described by a graph data structure. Through the rule orchestration system based on the graph data structure in this solution, business personnel can edit and modify rule nodes, and achieve real-time and flexible adjustment of business logic through the orchestration method. It can be widely applied to business scenarios such as e-commerce business scenarios, business risk control scenarios, aviation business scenarios, and enterprise internal process systems, etc.

[0092] The graph-based rule orchestration engine system in the technical solution of the embodiments of the present application has the following advantages compared with the previous Drools-based rule engine solution in scenarios where business rules change frequently, business flexibility needs to be improved, and complex logic development needs to be reduced:

[0093] Rule orchestration is visual, which can make the business rule solution more complete, rather than in Drools where business personnel often focus on the local part and it is difficult to have an overall view.

[0094] Rule orchestration is interactive. The rule nodes are orchestrated by dragging and connecting nodes, and each node can be edited according to its type. After editing and orchestration, a graph data structure file of the corresponding rule solution is generated.

[0095] Updating rules based on the graph structure data file means that updating the file can hot-update the rules. The performance bottleneck depends on the current server's IO performance, and there is a significant improvement in performance compared to updating rules based on JAVA bytecode.

[0096] The rule file describes the rules in the form of a graph structure. Utilizing the characteristics of the graph, it is easier to orchestrate the rule nodes, with higher flexibility, and it is easy to detect dead loops or conflicts in the rules based on the graph structure.

[0097] Use common Javascript and SQL-like (Structured Query Language) data science scripts to implement rule expressions, and the learning threshold is relatively friendly.

[0098] The technical advantages of the present application are:

[0099] Orchestrate rules quickly and flexibly through an interactive and visual method, and generate a graph structure rule file corresponding to the rules;

[0100] Parse and verify the graph structure rule file to obtain a graph structure describing the rules, including node relationships, rule node types, and other rule node information;

[0101] Evaluate and execute the input data according to the rules described by the rule nodes to obtain the decision results of the nodes;

[0102] Determine the way the input data is transmitted in the graph according to the node connection relationship described in the graph structure and the result of the previous rule node, and complete the execution of the decision-making between nodes;

[0103] Through the technical solution of the embodiments of the present application, the input data completes the execution of the decision-making in the rules described by the graph structure and outputs the final result.

[0104] In a second aspect, as shown in Figure 2 The embodiments of the present application provide a rule management device based on a graph structure, and the device includes:

[0105] A rule arrangement module, which is used to create each node in the to-be-executed flow chart, and generate a corresponding graph rule file after sorting and combining the processes of each node in the to-be-executed flow chart;

[0106] A rule update module, which is used to re-sort and combine the processes of each node in the to-be-executed flow chart based on the to-be-executed flow chart in the graph rule file to form an updated execution flow chart, and save the updated execution flow chart as an updated graph rule file;

[0107] A rule storage module, which is used to store each of the graph rule files and the updated graph rule files;

[0108] A rule recommendation module, which is used to classify based on the number of input nodes and output nodes in the to-be-executed flow chart of each of the graph rule files and the updated execution flow chart of the updated graph rule file, and summarize and form a corresponding graph rule recommendation column table; wherein,

[0109] The node types include input nodes, output nodes, and rule nodes;

[0110] The rule nodes include decision table nodes, branch nodes, script function nodes, expression nodes, and custom function nodes;

[0111] Both the to-be-executed flow chart and the updated execution flow chart include one input node, at least one output node, and at least one rule node.

[0112] In the embodiments of the present application, rule arrangement is completed in an interactive and visual manner, and a graph structure rule file is generated for later arrangement for users, effectively improving the efficiency of business management work.

[0113] Further, the rule storage module is further used to store the to-be-executed flow chart corresponding to each of the graph rule files and the updated to-be-executed flow chart corresponding to the updated graph rule file.

[0114] It should be noted that in the figure rule recommendation column table, classification is carried out according to different numbers of input nodes and output nodes, and the figure rule file and the updated figure rule file are correspondingly stored, and the to-be-executed flow chart of the figure rule file and the updated execution flow chart of the updated figure rule file are also correspondingly stored.

[0115] Furthermore, the rule recommendation module is also used to receive the set numbers of the input nodes, the output nodes, and the rule nodes, extract the figure rule file and the updated figure rule file in which the quantities of the three match and the time interval from the current time is the first set interval time, mark them as the to-be-recommended figure rule files, and feedback them to the rule update module for display.

[0116] Furthermore, the rule recommendation module is also used to count the selection times of each to-be-recommended figure rule file, and feedback them to the rule update module for sequential display based on the selection times of the to-be-recommended figure rule files.

[0117] Furthermore, the rule arrangement module includes an arrangement sub-module and a figure rule file generation sub-module;

[0118] The arrangement sub-module is used for visual rule node arrangement, including creating each node in the to-be-executed flow chart and performing flow arrangement work on each node in the to-be-executed flow chart. The flow arrangement work includes flow sorting and flow combination;

[0119] The figure rule file generation sub-module is used to generate the corresponding figure rule file based on the to-be-executed flow chart completed by the flow arrangement work.

[0120] Furthermore, the input node is used to act as the entry for all data related to the context;

[0121] The output node is used to output the result of the final business decision-making process.

[0122] Furthermore, the decision table node is a rule node structured with multiple groups of inputs, expressions, and outputs, and is used to describe the logic of relevant calculations in business.

[0123] Furthermore, the expression node is a rule node with a key-value pair structure and is used to create new data fields.

[0124] Furthermore, the branch node is a rule node that can dynamically branch the decision evaluation according to conditions and is used in scenarios where different decisions need to be made according to different inputs in business logic.

[0125] Further, the function node is a rule node that can quickly parse, remap, and customize data through JS scripts, and is used for data preprocessing and parsing.

[0126] Further, the custom node is a rule node that can be extended according to business requirements.

[0127] Specifically, in order to reduce the access cost on different business services and reuse the rule through the API (Application Programming Interface), the API generation group module generates call templates for multiple preset Web backend development programming languages for the HTTP (Hypertext Transfer Protocol) / HTTPS API calls of this rule system. For example, common Web backend development programming languages such as Shell, NodeJS, Python, Java, and Go. This module only needs to replace the open interface ID and open interface key of the called API according to the preset call template to generate a specific call example. Business personnel can select a specific call example according to the actual situation, which is convenient for quickly accessing specific business scenarios.

[0128] Furthermore, specifically, in order to be flexibly and stably applied to different business scenarios, in addition to being able to edit the JDM file in this rule orchestration system, a certain rule scheme can be managed in the management sub-module of this system. Management operations include rule editing, permission setting, observation, publishing, and closing, etc.

[0129] The editing of the rule can be entered into the rule orchestration module to modify and save the nodes of the graph rule, the specific rule logic of the nodes, and the orchestration relationship between the nodes;

[0130] The rule permission setting is to set permissions for each user accessing this system, including read-only, read-write, and other permissions;

[0131] The rule observation is an execution that inputs the data of the business scenario into this system for evaluation, writes the decision result into the specified database for recording, but only observes the specific business scenario without making a decision. This avoids some inappropriate rules from being discovered during testing before formal application and ensures the stability of the actual business;

[0132] The rule publishing is to formally apply the corresponding graph rule to the specific business scenario, which has a specific impact on the processing of the business;

[0133] The rule closing is to stop inputting business data into the corresponding graph rule for evaluation and execution.

[0134] In summary, based on the technical solution of the embodiments of the present application, business personnel are helped to extract the business logics that need to be frequently changed in business programs into rules described by graph data structures. Through the rule orchestration system based on graph data structures in this solution, business personnel can edit and modify rule nodes, and achieve real-time and flexible adjustment of business logics through the orchestration method. It can be widely applied to business scenarios such as e-commerce business scenarios, business risk control scenarios, aviation business scenarios, enterprise internal process systems, and so on.

[0135] The graph-based rule orchestration engine system in the technical solution of the embodiments of the present application has the following advantages compared with the previous rule engine solution based on Drools in scenarios where business rules change frequently, business flexibility needs to be improved, and the development of complex logics is reduced:

[0136] Rule orchestration is visual, which can make the business rule solution more complete, rather than in Drools where business personnel often focus on the local part and it is difficult to have an overall view.

[0137] Rule orchestration is interactive. Rule nodes are orchestrated by dragging and connecting nodes, and each node can be edited according to its type. After editing and orchestration, a graph data structure file of the corresponding rule solution is generated.

[0138] Updating rules based on the graph structure data file means that updating the file can hot-update the rules, and the performance bottleneck depends on the current server's IO performance, which has a significant improvement compared to the performance of updating rules based on JAVA bytecode.

[0139] The rule file describes rules in the form of a graph structure. Utilizing the characteristics of the graph, it is easier to orchestrate rule nodes, with higher flexibility, and it is easy to discover dead loops or conflicts in the rules based on the graph structure.

[0140] Common Javascript and SQL (Structured Query Language)-like data science scripts are used to implement rule expressions, and the learning threshold is relatively friendly.

[0141] The technical advantages of the present application are as follows:

[0142] Quickly and flexibly orchestrate rules in an interactive and visual manner, and generate a graph structure rule file corresponding to the rules;

[0143] Parse and verify the graph structure rule file to obtain a graph structure describing the rules, including node relationships, rule node types, and other rule node information;

[0144] Evaluate and execute the input data according to the rules described by the rule nodes to obtain the decision results of the nodes;

[0145] Determine the way the input data is transmitted in the graph based on the node connection relationship described in the graph structure and the result of the previous rule node, and complete the execution of the decision-making between nodes;

[0146] Through the technical solution of the embodiments of the present application, the input data has completed the execution of the decision-making in the rules described by the graph structure and outputs the final result.

[0147] In a third aspect, the present application provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method mentioned in the first aspect is implemented.

[0148] In a fourth aspect, refer to Figure 3 As shown, the present application provides an electronic device, which can specifically be called a rule management electronic device based on a graph structure, including a memory and a processor. A computer program is stored on the memory and runs on the processor. When the processor executes the computer program, the method mentioned in the first aspect is implemented.

[0149] In the description of the present application, it should be noted that the orientation or positional relationship indicated by terms such as "upper" and "lower" is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation to the present application. Unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, and it can be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to specific situations.

[0150] It should be noted that in the present application, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, the element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.

[0151] The above are only specific embodiments of the present application, enabling those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined in the embodiments of the present application can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown in the embodiments of the present application, but rather will conform to the broadest scope consistent with the principles and novel features claimed in the embodiments of the present application.

Claims

1. A rule management method based on a graph structure, characterized in that, The method includes the following steps: Create each node in the flowchart to be executed, and generate a corresponding graph rule file after sorting and combining the processes of each node in the flowchart to be executed; Based on the flowchart to be executed in the graph rule file, re-sort and combine the processes of each node in the flowchart to be executed to form an updated execution flowchart, and save the updated execution flowchart as an updated graph rule file; Store each of the graph rule files and the updated graph rule file; Classify based on the number of input nodes and output nodes in the flowchart to be executed in each of the graph rule files and the updated execution flowchart in the updated graph rule file, and summarize and form a corresponding graph rule recommendation column table; The node types include input nodes, output nodes, and rule nodes; The rule nodes include decision table nodes, branch nodes, script function nodes, expression nodes, and custom function nodes; Both the flowchart to be executed and the updated execution flowchart include one input node, at least one output node, and at least one rule node.

2. The rule management method based on a graph structure according to claim 1, wherein The storing each of the graph rule files and the updated graph rule file includes the following steps: Store the flowchart to be executed corresponding to each of the graph rule files and the updated flowchart to be executed corresponding to the updated graph rule file.

3. The rule management method based on a graph structure according to claim 1, characterized in that The classifying based on the number of input nodes and output nodes in the flowchart to be executed in each of the graph rule files and the updated execution flowchart in the updated graph rule file, and summarizing and forming a corresponding graph rule recommendation column table includes the following steps: Receive the set numbers of the input nodes, the output nodes, and the rule nodes, extract the graph rule files and the updated graph rule files whose quantities of all three match and whose time interval from the current time is the first set interval time, and mark them as graph rule files to be recommended.

4. The rule management method based on a graph structure according to claim 3, characterized in that The classifying based on the number of input nodes and output nodes in the flowchart to be executed in each of the graph rule files and the updated execution flowchart in the updated graph rule file, and summarizing and forming a corresponding graph rule recommendation column table includes the following steps: Count the selection times of each of the graph rule files to be recommended, and display them in order based on the selection times of the graph rule files to be recommended.

5. A rule management device based on a graph structure, characterized in that, The device includes: A rule arrangement module, which is used to create each node in the flowchart to be executed, and generate a corresponding graph rule file after sorting and combining the processes of each node in the flowchart to be executed; A rule update module, which is used to re-sort and combine the processes of each node in the flowchart to be executed based on the flowchart to be executed in the graph rule file to form an updated execution flowchart, and save the updated execution flowchart as an updated graph rule file; A rule storage module, which is used to store each of the graph rule files and the updated graph rule file; A rule recommendation module configured to classify based on the number of input nodes and output nodes in the to-be-executed flowchart of each of the graph rule files and the updated to-be-executed flowchart of the updated graph rule file, and summarize and organize them into corresponding graph rule recommendation column tables; wherein, The node types include input nodes, output nodes, and rule nodes; The rule nodes include decision table nodes, branch nodes, script function nodes, expression nodes, and custom function nodes; Both the to-be-executed flowchart and the updated to-be-executed flowchart include one input node, at least one output node, and at least one rule node.

6. The graph structure-based rule management device according to claim 5, wherein: The rule storage module is further configured to store the to-be-executed flowchart corresponding to each of the graph rule files and the updated to-be-executed flowchart corresponding to the updated graph rule file.

7. The graph structure-based rule management device according to claim 5, wherein: The rule recommendation module is further configured to receive the set numbers of the input nodes, the output nodes, and the rule nodes, extract the graph rule files and the updated graph rule files whose quantities of all three match and whose time interval from the current time is the first set time interval, mark them as to-be-recommended graph rule files, and feedback them to the rule update module for display.

8. The graph structure-based rule management device according to claim 7, wherein: The rule recommendation module is further configured to count the selection times of each of the to-be-recommended graph rule files, and feedback them to the rule update module for sequential display based on the selection times of the to-be-recommended graph rule files.

9. A storage medium, on which a computer program is stored, characterized in that: The computer program, when executed by a processor, implements the method according to any one of claims 1 to 4.

10. An electronic device, comprising a memory and a processor, where a computer program running on the processor is stored on the memory, and is characterized in that: The processor, when executing the computer program, implements the method according to any one of claims 1 to 4.