Rule management platform based on tree arrangement
By introducing tree orchestration structure and pre-definition of rule templates into the rule management platform, the accuracy and consistency of rule management in traditional rule management methods are solved, and the readability and maintainability of rule modifications are improved.
Patent Information
- Application Number
- CN202411689370.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-11
AI Technical Summary
Traditional rule management methods are difficult to meet the platform's needs for business rule management, resulting in the inability to ensure the accuracy and consistency of business rules, and the readability of rule modifications is not high, making it difficult to optimize the rule management platform.
It provides a rule management platform based on tree orchestration, including rule template module, rule editing module, user management module, permission management module, rule analysis module, rule release module and rule listening module. Through the pre-definition of tree orchestration structure and rule templates, users can easily edit and manage rules.
Through the pre-definition of tree orchestration structure and rule templates, system errors caused by configuration errors are reduced, readability and accuracy of rule modifications are improved, burdens are reduced for users and developers, and maintainability and consistency of rule management are enhanced.
Smart Images

Figure CN119597299A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of rule management, and in particular to a rule management platform based on tree arrangement. Background Art
[0002] As customer needs continue to change, the platform needs to adjust business rules accordingly to meet customer needs; traditional rule management methods, such as manual coding by developers and then version release or document recording, can no longer meet the platform's needs for business rule management. Once the configuration logic of a business changes, the business rules need to be modified quickly to reduce the error rate of business execution. This is not only difficult to maintain and update, but also easily leads to configuration errors, untimely modifications and other problems, making it impossible to guarantee the accuracy and consistency of business rules.
[0003] In addition, only developers can understand rule modifications, and the readability of rule modifications is not high for users. Moreover, when a user proposes a rule modification request and other users need to view the modified rules, they can only ask the developer for confirmation. The developer cannot respond in time, which will lead to reduced user satisfaction. Therefore, how to optimize the rule management platform has become a technical problem that needs to be solved at present. Summary of the invention
[0004] The purpose of the present invention is to provide a rule management platform system based on tree arrangement to solve the problems raised in the above background technology.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0006] A rule management platform based on tree arrangement, including a rule template module, a rule editing module, a user management module, a permission management module, a rule parsing module, a rule publishing module and a rule monitoring module;
[0007] The rule template module constructs a rule template, wherein the rule template includes an orchestration logic for defining a rule, a mapping path template, and a rule data template;
[0008] The rule editing module is used to edit rules and generate a rule tree;
[0009] The user management module is used to manage system users and internal users;
[0010] In the authority management module, system users can add rule editing permissions for users;
[0011] The rule parsing module is used to receive the rule tree generated by the rule editing module, and parse the rule tree into corresponding rule data according to the mapping path template in the rule template;
[0012] The rule publishing module generates a new version number corresponding to the rule data, and stores the parsed rule data and the new version number in the database, triggering rule monitoring;
[0013] The rule monitoring module extracts the rules monitored by the listener, and when the listener finds that the rules do not match, it notifies the service corresponding to the listener to obtain the latest version of the rules and update them.
[0014] Furthermore, the rule template module constructs a rule template by collecting preset arrangement logic, mapping path template and rule data template for defining the rule, and records the rule template in a database;
[0015] The orchestration logic includes an orchestration logic structure and a rule node; the orchestration logic structure is a tree-shaped orchestration structure, which is composed of n-level rule trees, each level of the rule tree corresponds to m rule nodes, wherein n and m are constants; the rule node includes the type of the rule node, the content of the rule node, the mapping relationship of the rule node and the attribute of the rule node; the mapping relationship of the rule node indicates that in two connected rule nodes, the latter rule node is the mapping of the former rule node;
[0016] The mapping path template includes a mapping label, a mapping attribute and a data type, wherein the mapping label corresponds to the content of the rule node one-to-one, the mapping attribute corresponds to the attribute of the rule node one-to-one, and the data type corresponds to the attribute of the rule node one-to-one;
[0017] The rule data template includes the basic structure of the rule data and replaceable parameters. The mapping path template corresponds to the basic structure of the rule data one by one. The corresponding basic structure of the rule data can be extracted through the mapping path.
[0018] It should be noted that developers preset the orchestration logic, mapping path template and rule data template of the rules in the front end to build rule templates; the rules are predefined by means of rule templates, and system users or internal users can generate actual rules by clicking on nodes in a predefined manner. Since the basic structure of the rule orchestration logic, mapping path and rule data are all limited, it basically gets rid of the burden of system errors and reviews caused by configuration errors.
[0019] Furthermore, the rule editing module extracts the rule template, and the user selects the type of rule node, the content of the rule node, the mapping relationship of the rule node and the attribute of the rule node in the rule nodes at all levels through the arrangement logic of the rule template to generate a rule tree; after the user defines the rule node, the platform will feed back the content of the rule node defined on the rule node to the user;
[0020] The rule editing module is electrically connected to the rule template module, and an input end of the rule editing module is connected to an output end of the rule template module.
[0021] It needs to be explained that users can only edit rules on the front end. After the user defines the rule node, the platform will display the content of the edited rule node to the user through the front end.
[0022] Furthermore, the rule parsing module generates a mapping path of the rule tree by extracting the rule tree generated by the rule editing module and matching the mapping path template in the rule template according to the rule nodes in the rule tree;
[0023] Matching a rule data template in the rule template according to a mapping path of the rule tree, wherein the mapping path of the rule tree is used to match a basic structure of the rule data, extracting the rule data template according to the basic structure of the rule data, and generating initial rule data;
[0024] Replace the replaceable parameters of the initial rule data with the content of the rule node in the rule tree to generate rule data;
[0025] The rule parsing module is electrically connected to the rule editing module, and the input end of the rule parsing module is connected to the output end of the rule editing module; the rule parsing module is electrically connected to the rule template module, and the input end of the rule parsing module is connected to the output end of the rule template module.
[0026] Furthermore, the user management module, after user authorization, divides users into system users and internal users according to user tags, and the user tag is a unique identifier of the user, one user tag corresponds to one user, and the user tag is automatically generated by the registration rules preset by the platform; the system user can edit the rules and enable the internal user to edit the rules, and the internal user can only view the rules by default;
[0027] When a rule is being edited by a user at the same time, other users' editing permissions to this rule will be closed until the user closes the editing of this rule, and then other users' editing permissions to this rule will be opened;
[0028] The user management module is electrically connected to the rule editing module, and an input end of the user management module is connected to an output end of the rule editing module.
[0029] It should be explained that the purpose of allowing only one user to edit the same rule at the same time is to prevent errors on the platform when multiple people edit the same rule at the same time.
[0030] Furthermore, in the permission management module, when an internal user needs to edit one or more rules, the system user can add editing permissions for the specified rules for the internal user. When the internal user completes editing the specified rules, that is, after the platform generates the rule data of the specified rules, the editing permissions of the specified rules of the internal user are automatically revoked;
[0031] The authority management module is electrically connected to the rule editing module, and the input end of the authority management module is connected to the output end of the rule editing module.
[0032] Furthermore, the rule publishing module is used to extract the current version number, update it to the version number corresponding to the rule data according to a preset version number update template, store the rule data generated by the rule parsing module and the updated version number in the database, and trigger the rule monitoring module;
[0033] The rule issuing module is electrically connected to the rule parsing module, and an input end of the rule issuing module is connected to an output end of the rule parsing module.
[0034] Furthermore, the rule monitoring module, one rule corresponds to one listener and one listener corresponds to one service, extracts the real-time rule monitored by the listener, the real-time rule is the rule tree extracted by the rule parsing module, and when the listener finds that the rule does not match, notifies the service corresponding to the listener to obtain the latest version of the rule and update it;
[0035] The rule monitoring module is electrically connected to the rule publishing module, and the input end of the rule monitoring module is connected to the output end of the rule publishing module; the rule monitoring module is electrically connected to the rule parsing module, and the input end of the rule monitoring module is connected to the output end of the rule parsing module.
[0036] It needs to be explained that during the listener operation cycle, the rules monitored by the listener in real time are compared with the rules preset by the listener. When the two rules are not equal, that is, the structure of the rules, the number of rule nodes, the content of the rule nodes, the mapping relationship between the rule nodes and the attributes of the rule nodes are different, the listener determines that the rules do not match.
[0037] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: a rule management platform based on tree arrangement provided by the present invention includes a rule template module, a rule editing module, a user management module, a permission management module, a rule parsing module, a rule publishing module and a rule listening module; the output end of the rule template module is electrically connected to the input end of the rule editing template and the rule parsing module; the rule editing template, the rule parsing module and the rule publishing module are sequentially connected; the rules are predefined by the rule template, and the user can generate the actual rules by clicking the nodes according to the rule template, thereby getting rid of the system errors caused by configuration errors; through the characteristics of the tree structure, the burden of users and developers is reduced, and the readability of rule modification is increased; through the mapping in the rule parsing module, code generation is made simpler and faster. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0039] Figure 1 It is a flowchart of a rule management platform based on tree arrangement of the present invention;
[0040] Figure 2 It is a structural schematic diagram of a rule management platform based on tree arrangement in the present invention. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] See also Figure 1 In the first embodiment of the present invention, a rule management platform based on tree arrangement is provided, which includes a rule template module, a rule editing module, a user management module, a permission management module, a rule publishing module, a rule parsing module and a rule monitoring module, wherein the output end of the rule template module is electrically connected to the input end of the rule editing template and the rule parsing module; the rule editing template, the rule parsing module and the rule publishing module are sequentially connected;
[0043] Rule template module, builds rule templates, which include the orchestration logic, mapping path templates and rule data templates that define rules;
[0044] The rule editing module is used to edit rules and generate rule trees;
[0045] User management module is used to manage system users and internal users;
[0046] Permission management module, system users can add rule editing permissions for users;
[0047] A rule parsing module is used to receive the rule tree generated by the rule editing module and parse the rule tree into corresponding rule data according to the mapping path template in the rule template;
[0048] The rule publishing module generates a new version number corresponding to the rule data, stores the parsed rule data and the new version number in the database, and triggers rule monitoring;
[0049] The rule monitoring module extracts the rules that the listener monitors. When the listener finds that the rules do not match, it notifies the service corresponding to the listener to obtain the latest version of the rules and update them.
[0050] Preferably, the rule template module constructs a rule template by collecting preset arrangement logic, mapping path template and rule data template for defining the rule, and records the rule template in a database;
[0051] The orchestration logic includes an orchestration logic structure and a rule node; the orchestration logic structure is a tree-shaped orchestration structure, which is composed of n-level rule trees, each level of the rule tree corresponds to m rule nodes, wherein n and m are constants; the rule node includes the type of the rule node, the content of the rule node, the mapping relationship of the rule node and the attribute of the rule node; the mapping relationship of the rule node indicates that in two connected rule nodes, the latter level rule node is the mapping of the former level rule node;
[0052] The mapping path template includes a mapping label, a mapping attribute and a data type, wherein the mapping label corresponds to the content of the rule node one-to-one, the mapping attribute corresponds to the attribute of the rule node one-to-one, and the data type corresponds to the attribute of the rule node one-to-one;
[0053] The rule data template includes the basic structure of the rule data and replaceable parameters. The mapping path template corresponds to the basic structure of the rule data one by one. The corresponding basic structure of the rule data can be extracted through the mapping path.
[0054] Preferably, the rule editing module extracts the rule template, and the user selects the type of rule node, the content of the rule node, the mapping relationship of the rule node and the attribute of the rule node in the rule nodes at all levels through the arrangement logic of the rule template to generate a rule tree; after the user defines the rule node, the platform will feed back the content of the rule node defined on the rule node to the user;
[0055] The rule editing module is electrically connected to the rule template module, and an input end of the rule editing module is connected to an output end of the rule template module.
[0056] Preferably, the rule parsing module generates a mapping path of the rule tree by extracting the rule tree generated by the rule editing module and matching the mapping path template in the rule template according to the rule nodes in the rule tree;
[0057] Matching a rule data template in the rule template according to a mapping path of the rule tree, wherein the mapping path of the rule tree is used to match a basic structure of the rule data, extracting the rule data template according to the basic structure of the rule data, and generating initial rule data;
[0058] Replace the replaceable parameters of the initial rule data with the content of the rule node in the rule tree to generate rule data;
[0059] The rule parsing module is electrically connected to the rule editing module, and the input end of the rule parsing module is connected to the output end of the rule editing module; the rule parsing module is electrically connected to the rule template module, and the input end of the rule parsing module is connected to the output end of the rule template module.
[0060] Preferably, in the user management module, after user authorization, the platform divides users into system users and internal users according to user tags, and the user tag is the unique identifier of the user, one user tag corresponds to one user, and the user tag is automatically generated by the registration rules preset by the platform; system users can edit rules and enable internal users to edit rules, and internal users can only view rules by default;
[0061] When a rule is being edited by a user at the same time, other users' editing permissions to this rule will be closed until the user closes the editing of this rule, and then other users' editing permissions to this rule will be opened;
[0062] The user management module is electrically connected to the rule editing module, and the input end of the user management module is connected to the output end of the rule editing module.
[0063] Preferably, in the authority management module, when an internal user needs to edit one or more rules, the system user can add editing authority for the specified rules to the internal user. When the internal user completes editing the specified rules, that is, after the platform generates the rule data of the specified rules, the internal user's editing authority for the specified rules is automatically revoked;
[0064] The authority management module is electrically connected to the rule editing module, and the input end of the authority management module is connected to the output end of the rule editing.
[0065] Preferably, the rule publishing module is used to extract the current version number, update it to the version number corresponding to the rule data according to a preset version number update template, store the rule data generated by the rule parsing module and the updated version number in the database, and trigger the rule monitoring module;
[0066] The rule issuing module is electrically connected to the rule parsing module, and the input end of the rule issuing module is connected to the output end of the rule parsing module.
[0067] Preferably, the rule monitoring module, one rule corresponds to one listener and one listener corresponds to one service, extracts the real-time rules monitored by the listener, the real-time rules are the rule trees extracted by the rule parsing module, and when the listener finds that the rules do not match, notifies the service corresponding to the listener to obtain the latest version of the rules and update them;
[0068] The rule monitoring module is electrically connected to the rule publishing module, and the input end of the rule monitoring module is connected to the output end of the rule publishing module; the rule monitoring module is electrically connected to the rule parsing module, and the input end of the rule monitoring module is connected to the output end of the rule parsing module.
[0069] For example: Configure Beijing area -> New version login -> Username + Password login -> Invoice collection category, you need to add a real-name lock, then directly find the location of the invoice collection category, click the task lock, and add the "real-name lock". The process is simple and easy to configure the product.
[0070] In this embodiment 2: the operation process of the platform is as follows:
[0071] Rule template module: First, developers define the rule template according to the nature of the rule. Only with the template can they enter the rule editing module and define the rule based on the rule template.
[0072] If "Pre-check->Prohibit sending during time period" is added after "End Type", the actual operation is as follows:
[0073] Rule editing module: first add a new rule node "pre-check" to the corresponding rule node "end type", then add a rule node "prohibit delivery within time period" after the rule node "pre-check"; on the actual rule editing page, click the "+" button at the corresponding position, click "pre-check", and then click "prohibit delivery within time period", and the rule is defined; and so on, each rule node can be defined according to this mode;
[0074] Rule parsing module: Define the mapping path according to the mapping path template in the rule template to form the final available rule; click the rule node in the mapping path template, an edit box will pop up on the right, click "Edit own properties" to define the mapping path; if the edited label is: Verify online, the edited mapping property is: lock.phone.online, and the data type is declared as "Boolean" type, the default value is true, and the rule is parsed into the corresponding JSON through the rule data template;
[0075] Rule publishing module: defines a rule of Beijing area - new version login - user name + password + SMS + invoice collection type. Click the publish button on the front end to publish the rule and trigger the rule monitoring.
[0076] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0077] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A rule management platform based on tree arrangement, characterized in that: It includes rule template module, rule editing module, user management module, authority management module, rule publishing module, rule parsing module and rule monitoring module; The rule template module constructs a rule template, wherein the rule template includes an orchestration logic for defining a rule, a mapping path template, and a rule data template; The rule editing module is used to edit rules and generate a rule tree; The user management module is used to manage system users and internal users; In the authority management module, system users can add rule editing permissions for users; The rule parsing module is used to receive the rule tree generated by the rule editing module, and parse the rule tree into corresponding rule data according to the mapping path template in the rule template; The rule publishing module generates a version number corresponding to the new rule data, and stores the parsed rule data and the new version number in the database, triggering rule monitoring; The rule monitoring module extracts the rules monitored by the listener, and when the listener finds that the rules do not match, it notifies the service corresponding to the listener to obtain the latest version of the rules and update them.
2. A rule management platform based on tree arrangement according to claim 1, characterized in that: The rule template is constructed by collecting the preset arrangement logic, mapping path template and rule data template of the defined rule, and the rule template is recorded in the database; The orchestration logic includes an orchestration logic structure and rule nodes; The arrangement logic structure is a tree-shaped arrangement structure, which is composed of n-level rule trees, each level of the rule tree corresponds to m rule nodes, where n and m are constants; the rule node includes the type of the rule node, the content of the rule node, the mapping relationship of the rule node and the attribute of the rule node; the mapping relationship of the rule node indicates that in two connected rule nodes, the latter rule node is the mapping of the former rule node; The mapping path template includes a mapping label, a mapping attribute and a data type, wherein the mapping label corresponds to the content of the rule node one-to-one, the mapping attribute corresponds to the attribute of the rule node one-to-one, and the data type corresponds to the attribute of the rule node one-to-one; The rule data template includes the basic structure of the rule data and replaceable parameters. The mapping path template corresponds to the basic structure of the rule data one by one. The corresponding basic structure of the rule data can be extracted through the mapping path.
3. A rule management platform based on tree arrangement according to claim 2, characterized in that: The rule editing module extracts the rule template, and the user selects the type of rule node, the content of the rule node, the mapping relationship of the rule node and the attribute of the rule node in the rule nodes at all levels through the arrangement logic of the rule template at the front end to generate a rule tree; When the user defines a rule node, the platform will feed back the content of the rule node defined on the rule node to the user; The rule editing module is electrically connected to the rule template module, and an input end of the rule editing module is connected to an output end of the rule template module.
4. A rule management platform based on tree arrangement according to claim 3, characterized in that: The rule parsing module extracts the rule tree generated by the rule editing module, matches the mapping path template in the rule template according to the rule nodes in the rule tree, and generates a mapping path of the rule tree; Matching a rule data template in the rule template according to a mapping path of the rule tree, wherein the mapping path of the rule tree is used to match a basic structure of the rule data, extracting the rule data template according to the basic structure of the rule data, and generating initial rule data; Replace the replaceable parameters of the initial rule data with the content of the rule node in the rule tree to generate rule data; The rule parsing module is electrically connected to the rule editing module, and the input end of the rule parsing module is connected to the output end of the rule editing module; the rule parsing module is electrically connected to the rule template module, and the input end of the rule parsing module is connected to the output end of the rule template module.
5. A rule management platform based on tree arrangement according to claim 4, characterized in that: The user management module, after user authorization, the platform divides users into system users and internal users according to user tags, and the user tag is the unique identifier of the user, one user tag corresponds to one user, and the user tag is automatically generated by the registration rules preset by the platform; the system user can edit the rules and enable the internal user to edit the rules, and the internal user can only view the rules by default; When a rule is being edited by a user at the same time, other users' editing permissions to this rule will be closed until the user closes the editing of this rule, and then other users' editing permissions to this rule will be opened; The user management module is electrically connected to the rule editing module, and an input end of the user management module is connected to an output end of the rule editing module.
6. A rule management platform based on tree arrangement according to claim 5, characterized in that: In the authority management module, when an internal user needs to edit one or more rules, the system user can add editing authority for the specified rules to the internal user. When the internal user completes editing the specified rules, that is, after the platform generates the rule data for the specified rules, the internal user's editing authority for the specified rules is automatically revoked; The authority management module is electrically connected to the rule editing module, and the input end of the authority management module is connected to the output end of the rule editing module.
7. A rule management platform based on tree arrangement according to claim 6, characterized in that: The rule publishing module is used to extract the current version number, update it to the version number corresponding to the rule data according to a preset version number update template, store the rule data generated by the rule parsing module and the updated version number in the database, and trigger the rule monitoring module; The rule issuing module is electrically connected to the rule parsing module, and an input end of the rule issuing module is connected to an output end of the rule parsing module.
8. A rule management platform based on tree arrangement according to claim 7, characterized in that: The rule monitoring module, one rule corresponds to one listener and one listener corresponds to one service, extracts the real-time rules monitored by the listener, and the real-time rules are the rule trees extracted by the rule parsing module. When the listener finds that the rules do not match, it notifies the service corresponding to the listener to obtain the latest version of the rules and update them; The rule monitoring module is electrically connected to the rule publishing module, and the input end of the rule monitoring module is connected to the output end of the rule publishing module; the rule monitoring module is electrically connected to the rule parsing module, and the input end of the rule monitoring module is connected to the output end of the rule parsing module.