Flow rule processing method and device based on rule atlas
By constructing a rule graph to replace the traditional two-dimensional rule table, knowledge simplification of ultra-large-scale rule sets is achieved, which solves the problems of low efficiency and complex engine switching of process rule engines in ultra-large-scale rule set scenarios, and improves decision-making efficiency and scope of application.
Patent Information
- Application Number
- CN202510964446.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-14
- Publication Date
- 2025-09-26
AI Technical Summary
Existing process rule engines have huge rule volumes, slow reasoning processes, and complex engine switching in ultra-large-scale rule set scenarios, making them unable to adapt to innovative application scenarios such as financial big data.
Based on the process model input by the user, a standardized rule table is generated, a tree-type concept map is constructed and simplified to form a rule map, which is stored in the database. When the system responds to a business request, the target simplified rules are loaded into the specified process rule engine for matching.
It shortens the business reasoning path, compresses the size of the rule set, improves the execution efficiency of the rule engine, supports consistent and inconsistent decision-making, is suitable for complex financial business scenarios, and reduces the cost of reasoning and analysis.
Smart Images

Figure CN120706532A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data services, and in particular to a process rule processing method and device based on rule graphs. Background Art
[0002] With the in-depth development of digital finance, the application scope, scale, and volume of financial information systems are continuously expanding. Financial information systems are the product of the informatization and computerization of business rules and regulations. As the scale of business scenarios continues to expand, the volume and complexity of their business rules are also increasing. Process rule engines, as software services that automatically and orderly promote business execution, have been widely used by major financial institutions. Based on user-defined process steps, business rules, and case scenarios, they can automatically transfer documents, information, tasks, and make decisions among multiple business participants. This helps decision-makers make decisions faster and more accurately, supports managers in managing more clearly and efficiently, and constrains business personnel to conduct business more strictly and in a standardized manner.
[0003] However, as business scenarios become increasingly complex and business data volumes increase, the scale of business rules within process rule engines is also growing. This has led to a decline in storage and management overhead, as well as business execution and decision-making efficiency, making them less suitable for innovative application scenarios like financial big data. Furthermore, the traditional single-engine, consistent decision-making architecture of process rule engines further limits their scope of application, hindering their integration with different decision engines to maximize business value and objectives. Summary of the Invention
[0004] The present application provides a process rule processing method and device based on a rule graph, aiming to solve the problems of a large rule volume, slow reasoning process, and complex engine switching in a specified process rule engine in a super-large-scale rule set scenario.
[0005] In order to achieve the above objectives, this application provides the following technical solutions:
[0006] A process rule processing method based on a rule graph, comprising:
[0007] Based on the process model input by the user, obtain the corresponding standardized rule table;
[0008] Based on the standardized rule table, a tree-type concept map is determined, and the tree-type concept map is simplified to obtain a rule map; the rule map includes a plurality of simplified rules;
[0009] Storing the rule graph and the corresponding process model in a database;
[0010] When the system responds to a business request, it obtains the corresponding target reduction rules from the database and loads the target reduction rules into the specified process rule engine, so that the specified process rule engine performs rule matching on the business data input by the business requester according to the target reduction rules to obtain the decision result of the business data.
[0011] A process rule processing device based on a rule graph, comprising:
[0012] A rule input unit, used to obtain a corresponding standardized rule table based on a process model input by a user;
[0013] A graph construction unit, configured to determine a tree-type concept graph based on the standardized rule table, and simplify the tree-type concept graph to obtain a rule graph; the rule graph includes a plurality of simplified rules and corresponding rule IDs;
[0014] A rule storage unit, used to store the rule graph and the corresponding process model in a database;
[0015] The rule execution unit is used to obtain the corresponding target simplification rules from the database when the system responds to a business request, and load the target simplification rules into the specified process rule engine, so that the specified process rule engine can match the business data input by the business requester according to the target simplification rules to obtain the decision result of the business data.
[0016] A storage medium includes a stored program, wherein the program is executed by a processor to execute the process rule processing method based on a rule graph.
[0017] An electronic device comprises: a processor, a memory and a bus; the processor and the memory are connected via the bus;
[0018] The memory is used to store programs, and the processor is used to run programs, wherein the program executes the process rule processing method based on rule graph when the processor runs it.
[0019] The technical solution provided by the present application obtains a corresponding standardized rule table based on the process model input by the user. Based on the standardized rule table, a tree-type concept map is determined, and the tree-type concept map is simplified to obtain a rule map. The rule map and the corresponding process model are stored in a database. When the system responds to a business request, the corresponding target simplification rule is obtained from the database, and the target simplification rule is loaded into the specified process rule engine, so that the specified process rule engine performs rule matching on the business data input by the business requester according to the target simplification rule to obtain the decision result of the business data. The present application utilizes a rule map instead of a rule table to achieve knowledge simplification of ultra-large-scale rule sets, thereby solving the problems of the specified process rule engine having a large rule volume, a slow reasoning process, and complex engine switching in ultra-large-scale rule set scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0021] Figure 1 A schematic diagram of a process rule processing method based on a rule graph provided in an embodiment of the present application;
[0022] Figure 2 A flowchart of another process rule processing method based on a rule graph provided in an embodiment of the present application;
[0023] Figure 3 A flowchart of another process rule processing method based on a rule graph provided in an embodiment of the present application;
[0024] Figure 4 A flowchart of another process rule processing method based on a rule graph provided in an embodiment of the present application;
[0025] Figure 5 A schematic diagram of the architecture of a process rule processing device based on a rule graph provided in an embodiment of the present application;
[0026] Figure 6 A functional architecture diagram of a process rule processing device provided in an embodiment of the present application;
[0027] Figure 7 A simplified schematic diagram of a concept provided in an embodiment of the present application;
[0028] Figure 8A consistent rule representation is provided for the embodiment of the present application;
[0029] Figure 9 An inconsistent rule representation is provided for an embodiment of the present application;
[0030] Figure 10 A schematic diagram of a tree-type concept map provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0032] In this application, relational terms such as first and second are used only 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. The terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or apparatus comprising the element.
[0033] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, the type, scope of use, and usage scenarios of the personal information involved in the present invention should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations. For example, in response to receiving an active request from the user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require the acquisition and use of the user's personal information. Thus, the user can independently choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present invention based on the prompt message. As an optional but non-limiting implementation method, in response to receiving an active request from the user, the method of sending a prompt message to the user can be, for example, a pop-up window, in which the prompt message can be presented in text. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0034] It is understandable that the above notification and user authorization process is merely illustrative and does not limit the implementation of the present invention. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present invention.
[0035] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0036] like Figure 1 As shown, it is a flow chart of a process rule processing method based on a rule graph provided in an embodiment of the present application, which includes the following steps.
[0037] S101: Based on the process model input by the user, a corresponding standardized rule table is obtained.
[0038] Among them, users can customize the design of process models through process modeling tools. The so-called process model can be understood as a workflow flowchart, which is composed of several events, tasks, gateways and connection objects. Events mainly include start events and end events, representing the start and end of a process. Tasks represent tasks that need to be completed. Tasks are connected through connection objects. In more complex flowcharts, there are often branches, and the diversion and merging of branches are represented by gateways.
[0039] Optionally, based on the process model input by the user, the implementation process of obtaining the corresponding standardized rule table can be seen in Figure 2 The steps are shown and the corresponding explanations.
[0040] S102: Based on the standardized rule table, determine a tree-type concept map, and simplify the tree-type concept map to obtain a rule map.
[0041] The rule graph includes multiple simplified rules and corresponding rule IDs.
[0042] Optionally, based on the standardized rule table, determine the tree-type concept map and simplify the tree-type concept map to obtain the rule map implementation process, which can be seen in Figure 3 The steps are shown and the corresponding explanations.
[0043] S103: Store the rule graph and the corresponding process model in the database.
[0044] The database is also used to store the rule ID of the reduction rule and the engine ID of the process rule engine matched by the corresponding process model.
[0045] In some examples, the database may be used to store rule concepts, tree-type concept maps, rule IDs of simplified rules, and corresponding process models, etc.
[0046] S104: When the system responds to a business request, it obtains the corresponding target reduction rules from the database and loads the target reduction rules into the specified process rule engine, so that the specified process rule engine matches the business data input by the business requester according to the target reduction rules to obtain the decision result of the business data.
[0047] After obtaining the decision result of the business data, the decision result can be packaged and sent to the business requester.
[0048] Optionally, when the system responds to a business request, it retrieves the corresponding target reduction rule from the database and loads the target reduction rule into the specified process rule engine, so that the specified process rule engine matches the business data input by the business requester according to the target reduction rule and obtains the decision result of the business data. For the implementation process, please refer to Figure 4 The steps are shown and the corresponding explanations.
[0049] Combine Figure 2-Figure 4 The method shown, the process rule processing method based on the rule graph shown in the embodiment of the present application can achieve the following effective effects: (1) The rule graph is used to replace the original two-dimensional rule table as a user-defined rule set storage. Compared with the traditional two-dimensional rule table, the data volume is smaller, the rule validity conditions are fewer, the rule knowledge density is higher, the rule storage overhead is smaller, and it can be better applied to scenarios with large business rule volume and complex business rules; (2) It can be applied to scenarios of consistent decision-making and inconsistent decision-making at the same time, and simplify the rules of related business scenarios. At the same time, it also supports flexible engine switching functions, with small conversion volume and low cost, which can meet the user's needs for applying differentiated reasoning decision engines to different business scenarios for the same rules; (3) During the business execution process, the process rule task can carry out business based on the simplified rule set, without the need for full matching or full path calculation of all rules, and can use fewer valid conditions to process the process rule business, reduce the cost of reasoning analysis, and improve decision-making efficiency; (4) It is transparent to business users and does not change the current user's usage method. It can automatically parse and obtain the minimum rule set based on the user's original rule input, without the need for model training process and cost, and has stronger adaptability to business scenarios.
[0050] The process shown in S101-S104 above simplifies the rule table shown in the process model into a rule graph, realizes knowledge simplification of ultra-large-scale rule sets, shortens the business reasoning path, compresses the size of the rule set, and improves the execution efficiency of the rule engine, so as to solve the problems of large rule volume, slow reasoning process, and complex engine switching in the specified process rule engine in the ultra-large-scale rule set scenario, better coordinate business decision-making and knowledge reasoning, and support complex financial business scenarios such as self-service counters, intelligent marketing, intelligent customer service, and personalized products.
[0051] like Figure 2 As shown, it is a flow chart of another process rule processing method based on rule graph provided in an embodiment of the present application, which includes the following steps.
[0052] S201: receiving a process model input by a user, and parsing the process model to obtain rule primitives.
[0053] The so-called regular primitives may specifically be standardized DMN primitives.
[0054] S202: Extracting rule table data from rule primitives.
[0055] The rule table data includes multiple rules and corresponding attribute information, and the attribute information includes condition attributes and decision attributes.
[0056] S203: performing standardization processing on the rule table data according to the user-defined rule granularity factor to obtain a corresponding standardized rule table.
[0057] Among them, the rule granularity factor is used to limit the processing methods corresponding to different types of rules. Binary rules are not processed, and non-binary rules are normalized based on indistinguishable relationships.
[0058] In some examples, a binary rule refers to a rule in which a logical proposition or function has only two values (true / false or 1 / 0), and a non-binary rule includes at least an interval rule and a descriptive rule.
[0059] In some examples, the rule table data may be defined as , where U represents the user-defined rule set (i.e., the multiple rules shown in the rule table data), C represents the condition attribute set, D represents the decision attribute set, and f represents the reasoning relationship.
[0060] For any attribute B in the condition attribute set and decision attribute set, the indistinguishability relationship is , x and y both represent objects in set U. Based on the indiscernibility relation, the rule set U can be divided into several equivalence classes.
[0061] In a possible implementation, in the process rule business field, rule table data is a business rule representation method and modeling method of standardized DMN primitives. According to the consistency of user-defined rules, rule tables can be divided into consistent rule tables and inconsistent rule tables. In a consistent rule table, the same conditions will definitely lead to the same decision through reasoning calculation, such as Figure 9 In the inconsistent rule table, the same conditions may not necessarily lead to the same decision through reasoning calculation, such as Figure 10 The inconsistent rules table is shown.
[0062] In a possible implementation manner, the standardized rule table can be shown in Table 1, which is obtained by standardizing the consistent rule table.
[0063] Table 1
[0064]
[0065] In Table 1, U represents the rule set, C1, C2, and C3 represent condition attributes, and D1 represents the decision attribute.
[0066] The process shown in S201-S203 above can effectively obtain the standardized rule table corresponding to the process model, providing favorable data support for the subsequent construction of the rule map.
[0067] like Figure 3 As shown, it is a flow chart of another process rule processing method based on rule graph provided in an embodiment of the present application, which includes the following steps.
[0068] S301: Generate multiple decision concepts based on the standardized rule table.
[0069] The decision concept includes a decision attribute subset and corresponding objects, and the objects include rules in the standardized rule table.
[0070] S302: Initialize a tree-type concept map based on each decision concept, and simplify the tree-type concept map according to a preset simplification step to obtain a plurality of simplification rules.
[0071] Among them, the reduction rules include directed relationships composed of condition concepts and decision concepts.
[0072] The preset simplification steps include: obtaining multiple conditional concepts at the current depth of the tree-type concept map, the conditional concepts include a subset of conditional attributes and corresponding objects; determining all objects at the current depth and the corresponding knowledge granularity and rule relevance; grouping all objects in order of knowledge granularity from small to large to obtain multiple small groups; for each small group, sorting multiple objects in the small group in order of rule relevance from large to small; traversing each object in each small group in a specified order to obtain an object set at the current depth; merging and deduplicating the object set to obtain a target object set; judging whether the target object set covers all objects; if the target object set covers all objects, ending the simplification, and generating simplification rules based on the target object set; if the target object set does not cover all objects, re-executing the preset simplification steps based on increasing one unit of measurement to the depth of the tree-type concept map.
[0073] In some examples, condition concepts and decision concepts can be collectively referred to as rule concepts. The rule concept can be defined as (B, X), where B represents a condition attribute subset or a decision attribute subset, and X represents an object in the rule set U (i.e., the rules contained in the standardized rule table) contained in the equivalence class of attribute B.
[0074] In a possible implementation, taking the standardized rule table shown in Table 1 as an example, when the knowledge granularity is 1, the obtained rule concepts can be: (C10, 1234), (C11, 56), (C20, 1256), (C21, 34), (C30, 1), (C31, 246), (C32, 35), (D10, 25), (D11, 1346).
[0075] It should be noted that the main function of simplification is to simplify the rule concepts that have been generated, based on the premise of covering all the original rules, from the perspective of knowledge granularity and according to the rule relevance of the rules, to improve the knowledge density and reasoning value of a single rule concept. Among them, the knowledge granularity is the number of attributes contained in the attribute subset of the rule concept, that is, the number of attributes in B. The smaller the knowledge granularity, the more abstract the rule concept is and the stronger its expressive ability is. Rule relevance is the number of attributes contained in any conditional concept (B c ,X c ) and decision-making concepts (B d ,X d ), if satisfied , then the number of objects contained in the rule concept is the rule relevance. The greater the rule relevance, the stronger the reasonability of the rule concept and the higher the knowledge density. All conditional concepts and decision concepts with rule relevance greater than 0 can generate corresponding reduction rules.
[0076] In some examples, the implementation principle of concept simplification (i.e., simplification of the tree-type concept graph) can be summarized as follows: at the same depth of the tree-type concept graph, priority is given to conditional concepts with small knowledge granularity for rule extraction or generation; when the knowledge granularity is the same, priority is given to conditional concepts with high rule relevance for rule extraction or generation; at the same time, as the depth of the tree-type concept graph continues to increase, it is necessary to continuously update the conditional concepts at the current depth until the objects corresponding to all generated rules cover the objects of the full number of decision concepts; the simplified conditional concepts can obtain the same decision based on fewer conditional attributes, greatly reducing the storage scale of rules in the process model, and also improving the matching efficiency during rule execution.
[0077] In some examples, based on the rule concepts corresponding to Table 1, and taking condition 3 and decision 1 as an example, the rule concept tree (i.e., tree-type concept map) that can be constructed can be found in Figure 10 As shown. Figure 10In the tree-type concept map shown, the knowledge granularity of the three wisdom concepts (C30,1), (C31,246), and (C32,35) is 1. At the same time, the rule relevance of the above three rule concepts is 1, 0, and 0 respectively.
[0078] In some examples, the reduction rule is a directed relationship between a condition concept and a decision concept. For any conditional concept or decision concept, if the rule relevance is greater than 0, the corresponding reduction rule can be generated.
[0079] In a possible implementation, according to a preset reduction step, Figure 10 After simplifying the tree-type concept graph shown, the reduction rules that can be obtained are: .
[0080] It should be noted that reduction rules can be classified into consistent rules and inconsistent rules. For any reduction rule , the rule relevance is ,like =1, the reduction rule is determined to be a consistent rule, otherwise it is determined to be an inconsistent rule. Simply put, if the same condition attribute and its attribute value in the reduction rule corresponds to multiple different decision attributes and their attribute values, the reduction rule is determined to be an inconsistent rule.
[0081] S303: Construct a rule graph based on the correspondence between the reduction rules, condition concepts, and decision concepts.
[0082] Among them, the rule map can be regarded as a mapping map between condition concepts and decision concepts.
[0083] The process shown in S301-S303 above can perform conceptual abstraction on the two-dimensional rule table in the traditional process rule engine to obtain a tree-type concept map, and then simplify the rule set based on the tree-type concept map to obtain the simplest concept map (i.e., the rule map). The rule map is used to replace the original two-dimensional rule table and is stored as a user-defined rule set. Compared with the traditional two-dimensional rule table, it has a smaller data volume, fewer rule validity conditions, higher rule knowledge density, and lower rule storage overhead, and can be better applied to scenarios with large business rule volumes and complex business rules.
[0084] like Figure 4 As shown, it is a flow chart of another process rule processing method based on rule graph provided in an embodiment of the present application, which includes the following steps.
[0085] S401: When the system responds to a service request, it parses the service request to obtain a target rule ID and a designated engine ID.
[0086] The designated engine ID is the engine ID of the specified process rule engine.
[0087] S402: Obtain the target reduction rule and target engine ID corresponding to the target rule ID from the database.
[0088] S403: Determine whether the target engine ID is the same as the designated engine ID.
[0089] If the target engine ID is the same as the designated engine ID, then S404 is executed; if the target engine ID is different from the designated engine ID, then S405 is executed.
[0090] S404: Load the target reduction rule into the designated process rule engine, so that the designated process rule engine performs rule matching on the business data input by the business requester according to the target reduction rule to obtain a decision result of the business data.
[0091] S405: Convert the target simplified rules into new rules that can be recognized by the specified process rule engine.
[0092] After executing S405 , continue to execute S406 .
[0093] Among them, the rule template corresponding to the specified engine ID can be obtained from the database, and according to the directed relationship of the target reduction rule, combined with the rule template, the rules are filled in one by one to obtain a new rule.
[0094] S406: Load the new rule into the designated process rule engine, so that the designated process rule engine performs rule matching on the business data according to the new rule to obtain a decision result of the business data.
[0095] The process shown in S401-S406 above can utilize the simplified rules shown in the rule map to schedule the specified process rule engine to implement business processing.
[0096] like Figure 5 , which is a schematic diagram of the architecture of a process rule processing device based on a rule graph provided in an embodiment of the present application, including the units shown below.
[0097] The rule input unit 100 is used to obtain a corresponding standardized rule table based on the process model input by the user.
[0098] Optionally, the rule input unit 100 is specifically used to: receive a process model input by a user, and parse the process model to obtain a rule primitive; extract rule table data from the rule primitive; the rule table data includes multiple rules and corresponding attribute information; the attribute information includes conditional attributes and decision attributes; according to a user-defined rule granularity factor, the rule table data is standardized to obtain a corresponding standardized rule table; the rule granularity factor is used to limit the processing means corresponding to different types of rules, wherein binary rules are not processed, and non-binary rules are normalized based on indistinguishable relationships.
[0099] The graph construction unit 200 is used to determine a tree-type concept graph based on the standardized rule table, and simplify the tree-type concept graph to obtain a rule graph; the rule graph includes multiple simplified rules and corresponding rule IDs.
[0100] Optionally, the graph construction unit 200 is specifically used to: generate multiple decision concepts based on the standardized rule table; the decision concepts include a subset of decision attributes and corresponding objects; the objects include rules in the standardized rule table; based on each decision concept, initialize the tree concept graph, and simplify the tree concept graph according to the preset simplification steps to obtain multiple simplification rules; the simplification rules include directed relationships composed of conditional concepts and decision concepts; based on the correspondence between simplification rules, conditional concepts, and decision concepts, construct a rule graph; wherein the preset simplification steps include: obtaining multiple conditional concepts at the current depth of the tree concept graph, the conditional concepts include a subset of conditional attributes and corresponding objects; determining all at the current depth Objects and their corresponding knowledge granularity and rule relevance; group all objects in the order of knowledge granularity from small to large to obtain multiple small groups; for each small group, sort the multiple objects in the small group in the order of rule relevance from large to small; traverse each object in each small group in the specified order to obtain the object set at the current depth; merge and remove duplicates from the object set to obtain the target object set; determine whether the target object set covers all objects; if the target object set covers all objects, end the simplification and generate simplification rules based on the target object set; if the target object set does not cover all objects, re-execute the preset simplification steps based on increasing the depth of the tree-type concept map by one unit.
[0101] The rule storage unit 300 is used to store the rule graph and the corresponding process model in a database.
[0102] Optionally, the rule storage unit 300 is further configured to store the rule ID of the reduction rule and the engine ID of the process rule engine matched by the corresponding process model.
[0103] The rule execution unit 400 is used to obtain the corresponding target simplification rules from the database when the system responds to a business request, and load the target simplification rules into the specified process rule engine, so that the specified process rule engine can match the business data input by the business requester according to the target simplification rules to obtain the decision result of the business data.
[0104] Optionally, the rule execution unit 400 is specifically used to: when the system responds to a business request, parse the business request to obtain the target rule ID and the specified engine ID; the specified engine ID is the engine ID of the specified process rule engine; obtain the target reduction rule and the target engine ID corresponding to the target rule ID from the database; determine whether the target engine ID is the same as the specified engine ID; if the target engine ID is the same as the specified engine ID, load the target reduction rule into the specified process rule engine, so that the specified process rule engine performs rule matching on the business data input by the business requester according to the target reduction rule to obtain a decision result for the business data.
[0105] Optionally, the rule execution unit 400 is also used to: if the target engine ID is different from the specified engine ID, convert the target simplification rule into a new rule that can be recognized by the specified process rule engine; load the new rule into the specified process rule engine so that the specified process rule engine matches the business data according to the new rule to obtain the decision result of the business data.
[0106] In actual application scenarios, the functional architecture of the process rule processing device shown in the embodiment of the present application can also be seen in Figure 6 As shown, specifically, the process rule processing device includes an input unit, a concept map construction unit, a storage unit and a rule execution unit. The input unit includes a model inputter and a data processor, the concept map construction unit includes a concept generator and a map builder, and the rule execution unit includes a data receiver, a rule executor, an engine changer and a data transmitter.
[0107] In a possible implementation, the input unit is used to receive a process model custom-designed by a user through a process modeling tool, parse out the rule primitives therein, and then perform data standardization on the rule table data according to the user-defined rule granularity factor, and output a standardized rule table.
[0108] In some examples, the model input includes a graph primitive parsing operator and a rule parsing operator. The graph primitive parsing operator is used to directionally identify rule primitives in the process model, and the rule parsing operator is used to extract rule table data from the rule primitives.
[0109] In some examples, the data processor is used to perform standardization and classification on user-defined rule table data based on indiscernibility relationships.
[0110] In a possible implementation, the concept map construction unit calculates the rule concepts based on the rule table and generates a mapping map of the condition concepts and the decision concepts.
[0111] In some examples, the concept generator mainly includes a concept generation operator, a concept simplification operator, and a rule generation operator. It generates rule concepts based on the input standardized rule table according to the definition of the rule concept, and calculates the rule concept with the highest knowledge density based on the concept simplification operator, and finally generates a simplified rule through the rule generation operator.
[0112] In some examples, the concept generation operator mainly generates concepts based on a standardized rule table.
[0113] In some examples, the main function of the concept reduction operator is to reduce the concepts generated, based on the knowledge granularity and rule relevance, with the premise of covering all the original rules, to improve the knowledge density and reasoning value of a single rule concept. Figure 7 As shown, it includes the following steps: (1) receiving the user-defined original rule table through the model input; (2) obtaining the standardized rule table based on the data processor and data processing method; (3) initializing the depth of the tree concept map to 1, and preferentially generating the full decision concept through the concept generation operator; (4) calculating the full conditional concept at the current depth through the concept generation operator; (5) calculating all the rules at the current depth through the rule generation operator; (6) grouping all the rules at the current depth in order of knowledge granularity from small to large, and sorting the rules within each group from large to small according to the relevance of the rules; (7) obtaining the corresponding rules in order from small to large in terms of knowledge granularity between groups and from large to small in terms of rule relevance within groups. If the objects contained in the rules are repeatedly covered, the corresponding rules are ignored and other rules are obtained; (8) judging whether all objects have been covered. If so, the concept reduction is terminated and the rules are output; if not, the depth of the tree concept map is increased by 1, and steps (4) to (8) are repeated.
[0114] In some examples, the main function of the rule generation operator is to generate rules based on condition concepts and decision concepts and store them in a storage unit.
[0115] In some examples, the graph builder primarily includes conditional graph construction operators and decision graph construction operators. Its primary function is to construct conditional concept trees and decision concept trees based on rule concepts. The concept tree is a tree-like representation and organizational structure of rule concepts, specifically representing the relationship between a subset of conditional attributes and rule concepts at a specific knowledge granularity.
[0116] In a possible implementation manner, the storage unit is used to store user-defined rule granularity factors, rule concepts, etc.
[0117] In some examples, the storage unit is mainly used to store rule concepts, rule graphs, simplified rules, and process models.
[0118] In a possible implementation, the rule execution unit is mainly used to execute actual rule services, matching service data with simplified rules and outputting service execution results. At the same time, it also supports dynamic switching of execution engines according to service inputs.
[0119] In some examples, the main function of the data receiver is to accept business transaction data passed by the user or system during the operation of the process rule engine, and parse and extract the engine ID, rule ID, condition attributes and attribute values, and decision attributes and attribute values.
[0120] In some examples, the rule execution unit mainly includes an engine scheduling operator, a rule loading operator, and a rule matching operator. Based on the content parsed by the data receiver, it schedules the corresponding process rule engine service on demand, executes the rule matching business and obtains the decision result.
[0121] In some examples, the engine scheduling operator mainly pulls up the corresponding process rule engine service based on the engine ID in the data receiver parsing result to load the rules and calculate the results.
[0122] In some examples, the rule loading operator mainly loads the corresponding simplified rules and their attributes and attribute values from the storage unit based on the rule set ID in the data receiver parsing result, and then provides them to the rule matching operator, relying on the process rule engine to perform rule calculation.
[0123] In some examples, the rule matching operator mainly inputs the simplified rule set into the specified process rule engine, and performs rule matching based on the business input of the user or external system to obtain the corresponding results.
[0124] In some examples, the engine changer mainly includes model loading operators and rule conversion operators. Its function is to convert the specified rule set into the rule model structure of the specified engine to adapt to different engine execution rules and improve the rule reuse rate.
[0125] In some examples, the model loading operator mainly determines whether the business-specified engine ID and the rule default engine ID (i.e., the target engine ID) are consistent based on the engine ID and rule ID in the data receiver's parsing results. If they are inconsistent, the reduction rule corresponding to the specified engine ID is obtained from the storage unit for subsequent rule model conversion.
[0126] In some examples, the main function of the rule conversion operator is to convert the rule set into a rule model that is recognizable and executable by the specified engine. The implementation method is as follows: (1) load the rules of the specified rule set ID and obtain the full set of simplified rules; (2) load the rule template corresponding to the specified engine ID and initialize the rule model; (3) fill in the rules one by one according to the directed relationship of the simplified rules and the specified engine rule template; (4) generate new rules and export them.
[0127] In some examples, the main function of the data receiver is to encapsulate the execution results of the rule executor and send them to the user or system when the process rule engine is running.
[0128] The above-mentioned units simplify the rule table shown in the process model into a rule graph, realize the knowledge simplification of ultra-large-scale rule sets, shorten the business reasoning path, compress the size of the rule set, and improve the execution efficiency of the rule engine. This solves the problems of large rule volume, slow reasoning process, and complex engine switching in the specified process rule engine in the ultra-large-scale rule set scenario, better coordinates business decision-making and knowledge reasoning, and supports complex financial business scenarios such as self-service counters, intelligent marketing, intelligent customer service, and personalized products.
[0129] The present application also provides a computer-readable storage medium, which includes a stored program, wherein the program executes the process rule processing method based on the rule graph provided by the present application.
[0130] The present application also provides an electronic device comprising: a processor, a memory, and a bus. The processor and the memory are connected via the bus, the memory is used to store a program, and the processor is used to run the program, wherein when the program is run, the process rule processing method based on the rule graph provided by the present application is executed.
[0131] Although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this application. Certain features described in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented in multiple embodiments individually or in any suitable sub-combination.
[0132] The above description is merely a preferred embodiment of the present application and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the disclosure herein is not limited to technical solutions formed by specific combinations of the aforementioned technical features. It also encompasses other technical solutions formed by any combination of the aforementioned technical features or their equivalents, without departing from the aforementioned disclosure. For example, a technical solution formed by replacing the aforementioned features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A process rule processing method based on rule graph, characterized in that: include: Based on the process model input by the user, obtain the corresponding standardized rule table; Based on the standardized rule table, a tree-type concept map is determined, and the tree-type concept map is simplified to obtain a rule map; the rule map includes a plurality of simplified rules; Storing the rule graph and the corresponding process model in a database; When the system responds to a business request, it obtains the corresponding target reduction rules from the database and loads the target reduction rules into the specified process rule engine, so that the specified process rule engine performs rule matching on the business data input by the business requester according to the target reduction rules to obtain the decision result of the business data.
2. The method according to claim 1, characterized in that Based on the process model pre-entered by the user, the corresponding standardized rule table is obtained, including: Receiving a process model input by a user, and parsing the process model to obtain a rule primitive; Extracting rule table data from the rule primitive; the rule table data includes a plurality of rules and corresponding attribute information; the attribute information includes condition attributes and decision attributes; According to the user-defined rule granularity factor, the rule table data is standardized to obtain a corresponding standardized rule table; the rule granularity factor is used to limit the processing means corresponding to different types of rules, among which binary rules are not processed, and non-binary rules are normalized based on indistinguishable relationships.
3. The method according to claim 1, characterized in that Determining a tree-type concept map based on the standardized rule table and simplifying the tree-type concept map to obtain a rule map includes: Based on the standardized rule table, a plurality of decision concepts are generated; the decision concepts include a subset of decision attributes and corresponding objects; the objects include rules in the standardized rule table; Initializing a tree-type concept map based on each of the decision concepts, and simplifying the tree-type concept map according to a preset simplification step to obtain a plurality of simplification rules; the simplification rules include directed relationships consisting of condition concepts and decision concepts; Constructing a rule graph based on the correspondence between the reduction rule, the condition concept, and the decision concept; Among them, the preset simplification step includes: obtaining multiple conditional concepts at the current depth of the tree-type concept map, the conditional concepts including a subset of conditional attributes and corresponding objects; determining all objects at the current depth and the corresponding knowledge granularity and rule relevance; grouping all objects in the order of knowledge granularity from small to large to obtain multiple small groups; for each of the small groups, sorting multiple objects in the small group in the order of rule relevance from large to small; traversing each object in each of the small groups in a specified order to obtain an object set at the current depth; merging and deduplicating the object set to obtain a target object set; judging whether the target object set covers all objects; if the target object set covers all objects, ending the simplification, and generating the simplification rules based on the target object set; if the target object set does not cover all objects, re-executing the preset simplification step based on increasing one unit of measurement to the depth of the tree-type concept map.
4. The method according to claim 1, wherein The database is further used to store the rule ID of the reduction rule and the engine ID of the process rule engine matched by the corresponding process model; When the system responds to a business request, it obtains the corresponding target reduction rule from the database and loads the target reduction rule into the designated process rule engine, so that the designated process rule engine performs rule matching on the business data input by the business requester according to the target reduction rule to obtain a decision result for the business data, including: When the system responds to a business request, it parses the business request to obtain a target rule ID and a designated engine ID; the designated engine ID is the engine ID of the designated process rule engine; Obtaining a target reduction rule and a target engine ID corresponding to the target rule ID from the database; Determine whether the target engine ID is the same as the specified engine ID; If the target engine ID is the same as the designated engine ID, the target reduction rule is loaded into the designated process rule engine, so that the designated process rule engine performs rule matching on the business data input by the business requester according to the target reduction rule to obtain the decision result of the business data.
5. The method according to claim 4, characterized in that The method further comprises: If the target engine ID is different from the designated engine ID, converting the target reduction rule into a new rule that can be recognized by the designated process rule engine; The new rule is loaded into the designated process rule engine, so that the designated process rule engine performs rule matching on the business data according to the new rule to obtain a decision result of the business data.
6. A process rule processing device based on rule graph, characterized in that: include: A rule input unit, used to obtain a corresponding standardized rule table based on a process model input by a user; A graph construction unit, configured to determine a tree-type concept graph based on the standardized rule table, and simplify the tree-type concept graph to obtain a rule graph; the rule graph includes a plurality of simplified rules and corresponding rule IDs; A rule storage unit, used to store the rule graph and the corresponding process model in a database; The rule execution unit is used to obtain the corresponding target simplification rules from the database when the system responds to a business request, and load the target simplification rules into the specified process rule engine, so that the specified process rule engine can match the business data input by the business requester according to the target simplification rules to obtain the decision result of the business data.
7. The device according to claim 6, characterized in that The rule input unit is specifically used for: Receiving a process model input by a user, and parsing the process model to obtain a rule primitive; Extracting rule table data from the rule primitive; the rule table data includes a plurality of rules and corresponding attribute information; the attribute information includes condition attributes and decision attributes; According to the user-defined rule granularity factor, the rule table data is standardized to obtain a corresponding standardized rule table; the rule granularity factor is used to limit the processing means corresponding to different types of rules, among which binary rules are not processed, and non-binary rules are normalized based on indistinguishable relationships.
8. The device according to claim 6, characterized in that The map construction unit is specifically used for: Based on the standardized rule table, a plurality of decision concepts are generated; the decision concepts include a subset of decision attributes and corresponding objects; the objects include rules in the standardized rule table; Initializing a tree-type concept map based on each of the decision concepts, and simplifying the tree-type concept map according to a preset simplification step to obtain a plurality of simplification rules; the simplification rules include directed relationships consisting of condition concepts and decision concepts; Constructing a rule graph based on the correspondence between the reduction rule, the condition concept, and the decision concept; Among them, the preset simplification step includes: obtaining multiple conditional concepts at the current depth of the tree-type concept map, the conditional concepts including a subset of conditional attributes and corresponding objects; determining all objects at the current depth and the corresponding knowledge granularity and rule relevance; grouping all objects in the order of knowledge granularity from small to large to obtain multiple small groups; for each of the small groups, sorting multiple objects in the small group in the order of rule relevance from large to small; traversing each object in each of the small groups in a specified order to obtain an object set at the current depth; merging and deduplicating the object set to obtain a target object set; judging whether the target object set covers all objects; if the target object set covers all objects, ending the simplification, and generating the simplification rules based on the target object set; if the target object set does not cover all objects, re-executing the preset simplification step based on increasing one unit of measurement to the depth of the tree-type concept map.
9. A storage medium, characterized in that: The storage medium includes a stored program, wherein the program is executed by a processor to execute the process rule processing method based on a rule graph according to any one of claims 1 to 5.
10. An electronic device, characterized in that: include: processor, memory, and bus; The processor is connected to the memory via the bus; The memory is used to store programs, and the processor is used to run programs, wherein the program, when run by the processor, executes the process rule processing method based on rule graphs according to any one of claims 1 to 5.