A method and device for processing business rules

By using factor path and scene identification combined with factor expression collection in the Internet application system, executable business rules are determined, which solves the problem of inflexible binding of business rules and page elements, and achieves precise execution and flexible display of business rules. .

CN112150091BActive Publication Date: 2024-09-20HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910576569.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-28
Publication Date
2024-09-20
Estimated Expiration
2039-06-28

AI Technical Summary

Technical Problem

In existing Internet application systems, the binding of business rules and page elements is inflexible, and precise execution of business rules cannot be achieved, especially when different product contents are displayed on the same page.

Method used

By obtaining the factor path and scene identifier in the input parameters, combined with the factor expression set of the business object, the executable business rules in the current scenario are determined, and the flexible binding and precise execution of business rules and page elements are achieved.

Benefits of technology

It realizes the display of business rules for different product contents on the same page, improving the accuracy and flexibility of business rule execution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112150091B
    Figure CN112150091B
Patent Text Reader

Abstract

The present application provides a method and device for processing business rules. The method includes: obtaining input parameters, the input parameters include: factor path and scenario identifier; determining a first factor expression corresponding to the factor path from a factor expression set corresponding to the business object; determining a second factor expression corresponding to the scenario identifier from a factor expression set; determining a third factor expression based on the first factor expression and the second factor expression; obtaining the value of the third factor expression, the value of the third factor expression is used to represent the execution result of the executable business rule. In the present application, by combining the changed part of the business object with the current scenario, the corresponding business rules are obtained, so that the same page can display different business rules for the content of different products, thereby realizing flexible binding of business rules and page elements and accurate execution of business rules.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and device for processing business rules. Background Art

[0002] Today's Internet application systems, such as customer relationship management (CRM) systems in the telecommunications field, enterprise resource planning (ERP) systems, e-commerce systems, etc., are basically Internet applications. It is common that system services run on background servers, and users access system services on background servers through the network through various terminal devices.

[0003] Usually, these systems use the browser and server architecture (i.e., B / S (browser / server) architecture) mode. When users access remote services on terminal devices, they first need to use a browser to open the user page, and then interact with the background service through the operation page to complete the business function. In addition, for the user's operations on the terminal device, the system service responds to the user's operations according to the business rules. When the user operates on the page, the various elements in the page will be linked, and this linkage relationship between the elements is the embodiment of the business rules.

[0004] It can be seen that business rules are bound to page elements, and the same page can be used to display the content of different products. The requirements for business data carried by the same page element are different. For different requirements for business data, the binding rules of business rules and page elements are not flexible and cannot achieve accurate execution of business rules. Summary of the invention

[0005] The present application provides a method and device for processing business rules, so that the same page can display different business rules for the content of different products, thereby realizing flexible binding of business rules with page elements and realizing accurate execution of business rules.

[0006] In a first aspect, the present application provides a method for processing business rules, comprising: obtaining input parameters, the input parameters comprising: a factor path and a scenario identifier, wherein the factor path is used to characterize changes in a business object, and the scenario identifier is used to characterize a current scenario; determining a first factor expression corresponding to the factor path from a factor expression set corresponding to the business object, the factor expression set being a set used to represent business rules corresponding to the business object; determining a second factor expression corresponding to the scenario identifier from the factor expression set; determining a third factor expression based on the first factor expression and the second factor expression, the third factor expression being used to represent an executable business rule corresponding to the business object after the change in the current scenario; and obtaining a value of the third factor expression, the value of the third factor expression being used to represent an execution result of the executable business rule.

[0007] In this application, by targeting the changed parts of the business object and combining them with the current scenario, corresponding business rules are obtained, so that the same page can display different business rules for the content of different products, thereby achieving flexible binding of business rules and page elements and precise execution of business rules.

[0008] Based on the first aspect, in some possible implementations, the method also includes: obtaining attribute information of the business object; determining a fourth factor expression corresponding to the attribute information from the factor expression set; and determining the third factor expression based on the first factor expression, the second factor expression and the fourth factor expression.

[0009] In this application, the attribute information of the business object may be user operation, business channel, customer level, etc.

[0010] Based on the first aspect, in some possible implementations, determining the first factor expression corresponding to the factor path from the factor expression set corresponding to the business object includes: obtaining a rule index tree constructed by the factor expression set, wherein the factors in each factor expression in the factor expression set correspond to each node of the rule index tree; and searching for the first factor expression in the rule index tree according to the factor path.

[0011] Based on the first aspect, in some possible implementations, searching for the first factor expression in the rule index tree according to the factor path includes: converting the factor expression corresponding to the factor path into a first expression node chain; obtaining the first nodes in the first expression node chain in turn, and determining whether the first nodes have parameters; if the first node has parameters, searching for a corresponding tree node in the rule index tree based on the node name of the previous node of the first node and the corresponding parameters; if a corresponding tree node exists, determining whether the first node is the last node of the first expression node chain; if the first node is the last node of the first expression node chain, determining the factor expression corresponding to the subtree in the rule index tree with the tree node corresponding to the first node as the root node as the first factor expression.

[0012] In this application, the expression node chain is a data structure inside the rule engine, which is used to describe the factor expression.

[0013] Based on the first aspect, in some possible implementations, the method also includes: if the first node does not have parameters, then searching in the rule index tree whether there is a corresponding tree node based on the node name of the previous node of the first node; if there is a corresponding tree node, determining whether the first node is the last node of the first expression node chain; if the first node is the last node of the first expression node chain, then determining the factor expression corresponding to the subtree in the rule index tree with the tree node corresponding to the first node as the root node as the first factor expression.

[0014] Based on the first aspect, in some possible implementations, the method also includes: converting each factor expression in the factor expression set into a second expression node chain; traversing the second expression node chain, and performing the following steps on the i-th second node in the second expression node chain in turn, where i is a positive integer: determining whether the i-th second node has parameters; if the i-th second node has parameters, searching for the corresponding tree node in a pre-created rule index tree model according to the node name of the i-th second node and the corresponding parameters; if the tree node corresponding to the i-th second node is not found, creating a new tree node for the i-th second node, and adding the new tree node to the child node of the previous tree node in the rule index tree model; determining whether the i-th second node is the last node in the second expression node chain in which it is located; if the i-th second node is the last node in the second expression node chain in which it is located, determining the rule index tree model as the rule index tree.

[0015] Based on the first aspect, in some possible implementations, the method also includes: if the i-th second node does not have parameters, searching for a corresponding tree node in the rule index tree model according to the node name of the i-th second node; if the tree node corresponding to the i-th second node is not found, creating a new tree node for the i-th second node, and adding the new tree node to the child node of the previous tree node in the rule index tree model; determining whether the i-th second node is the last node in the second expression node chain in which it is located; if the i-th second node is the last node in the second expression node chain in which it is located, determining the rule index tree model as the rule index tree.

[0016] Based on the first aspect, in some possible implementations, determining the second factor expression corresponding to the scene identifier from the factor expression set includes: obtaining the corresponding factor expression configured for the current scene based on the scene identifier; and determining the second factor expression in the factor expression set based on the factor expression configured for the current scene.

[0017] Based on the first aspect, in some possible implementations, determining the second factor expression in the factor expression set according to the factor expression configured for the current scene includes: obtaining a rule index tree constructed by the factor expression set, wherein factors in each factor expression in the factor expression set correspond to each node of the rule index tree; and finding the second factor expression in the rule index tree according to the factor expression configured for the current scene.

[0018] Based on the first aspect, in some possible implementations, after obtaining the execution result of the executable business rule, the method further includes: when the executable business rule is a verification rule, assembling a message according to a message template and outputting the execution result.

[0019] In a second aspect, an embodiment of the present application provides a business rule processing device, comprising: an interface module, used to obtain input parameters, the input parameters including: a factor path and a scenario identifier, wherein the factor path is used to characterize changes in a business object, and the scenario identifier is used to characterize a current scenario; a processing module, used to determine a first factor expression corresponding to the factor path from a factor expression set corresponding to the business object, the factor expression set being a set used to represent business rules corresponding to the business object; determine a second factor expression corresponding to the scenario identifier from the factor expression set; determine a third factor expression based on the first factor expression and the second factor expression, the third factor expression being used to represent an executable business rule corresponding to the business object after the change in the current scenario; obtain a value of the third factor expression, the value of the third factor expression being used to represent an execution result of the executable business rule.

[0020] Based on the second aspect, in some possible implementations, the processing module is also used to obtain attribute information of the business object; determine a fourth factor expression corresponding to the attribute information from the factor expression set; and determine the third factor expression based on the first factor expression, the second factor expression and the fourth factor expression.

[0021] Based on the second aspect, in some possible implementations, the processing module is used to obtain a rule index tree constructed by the factor expression set, wherein the factors in each factor expression in the factor expression set correspond to each node of the rule index tree; and according to the factor path, the first factor expression is searched in the rule index tree.

[0022] Based on the second aspect, in some possible implementations, the processing module is used to convert the factor expression corresponding to the factor path into a first expression node chain; obtain the first node in the first expression node chain in turn, and determine whether the first node has parameters; if the first node has parameters, search the rule index tree for a corresponding tree node based on the node name of the previous node of the first node and the corresponding parameters; if a corresponding tree node exists, determine whether the first node is the last node of the first expression node chain; if the first node is the last node of the first expression node chain, determine the factor expression corresponding to the subtree in the rule index tree with the tree node corresponding to the first node as the root node as the first factor expression.

[0023] Based on the second aspect, in some possible implementations, the processing module is also used to, if the first node does not have parameters, search in the rule index tree whether there is a corresponding tree node based on the node name of the previous node of the first node; if there is a corresponding tree node, determine whether the first node is the last node of the first expression node chain; if the first node is the last node of the first expression node chain, determine the factor expression corresponding to the subtree in the rule index tree with the tree node corresponding to the first node as the root node as the first factor expression.

[0024] Based on the second aspect, in some possible implementations, the device also includes: a tree construction module, used to convert each factor expression in the factor expression set into a second expression node chain; traverse the second expression node chain, and perform the following steps on the i-th second node in the second expression node chain in turn, where i is a positive integer: determine whether the i-th second node has parameters; if the i-th second node has parameters, search for the corresponding tree node in a pre-created rule index tree model according to the node name of the i-th second node and the corresponding parameters; if the tree node corresponding to the i-th second node is not found, create a new tree node for the i-th second node, and add the new tree node to the child node of the previous tree node in the rule index tree model; determine whether the i-th second node is the last node in the second expression node chain where it is located; if the i-th second node is the last node in the second expression node chain where it is located, determine the rule index tree model as the rule index tree.

[0025] Based on the second aspect, in some possible implementations, the tree construction module is also used to search for a corresponding tree node in the rule index tree model according to the node name of the i-th second node if the i-th second node does not have parameters; if the tree node corresponding to the i-th second node is not found, create a new tree node for the i-th second node, and add the new tree node to the child node of the previous tree node in the rule index tree model; determine whether the i-th second node is the last node in the second expression node chain where it is located; if the i-th second node is the last node in the second expression node chain where it is located, determine the rule index tree model as the rule index tree.

[0026] Based on the second aspect, in some possible implementations, the processing module is also used to obtain the corresponding factor expression configured for the current scene according to the scene identifier; and determine the second factor expression in the factor expression set according to the factor expression configured for the current scene.

[0027] Based on the second aspect, in some possible implementations, the processing module is used to obtain a rule index tree constructed by the factor expression set, wherein the factors in each factor expression in the factor expression set correspond to each node of the rule index tree; and according to the factor expression configured for the current scene, the second factor expression is found in the rule index tree.

[0028] Based on the second aspect, in some possible implementations, the interface module is also used to assemble a message according to a message template and output the execution result after the processing module obtains the execution result of the executable business rule, when the executable business rule is a verification rule.

[0029] In a third aspect, the present application provides a user device, comprising a processor, wherein the processor is used to couple with a memory, read and execute instructions in the memory, so as to implement a method for processing business rules as described in any one of the first aspects above.

[0030] Based on the third aspect, in some possible implementations, the user equipment further includes a memory.

[0031] In a fourth aspect, the present application provides a background server, including a processor, the processor is used to couple with a memory, read and execute instructions in the memory, so as to implement the business rule processing method as described in any one of the first aspects above.

[0032] Based on the fourth aspect, in some possible implementations, the background server also includes a memory.

[0033] In a fifth aspect, the present application provides a computer-readable storage medium, which stores instructions, and when the instructions are run on a computer, is used to execute the business rule processing method described in any one of the first aspects above.

[0034] In a sixth aspect, the present application provides a computer program or a computer program product. When the computer program or the computer program product is executed on a computer, the computer implements the method for processing business rules described in any one of the first aspects above.

[0035] It should be understood that the second to sixth aspects of the present application are consistent with the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.

[0037] Figure 1 It is a schematic diagram of the structure of the CRM system in the embodiment of the present application;

[0038] Figure 2 This is a schematic diagram of the structure of the rule engine in the CRM system in the embodiment of the present application;

[0039] Figure 3 A schematic diagram of a business rule in an embodiment of the present application;

[0040] Figure 4 A flowchart of a method for processing business rules in an embodiment of the present application;

[0041] Figure 5 A schematic diagram of a rule index tree in an embodiment of the present application;

[0042] Figure 6 A schematic diagram of the process of constructing a rule index tree in an embodiment of the present application;

[0043] Figure 7 A schematic diagram of the process of searching the rule index tree in an embodiment of the present application;

[0044] Figure 8 A schematic diagram of the structure of a device for processing business rules in an embodiment of the present application;

[0045] Fig. 9 This is a schematic diagram of the structure of a user equipment in an embodiment of the present application;

[0046] Fig.10 This is a schematic diagram of the structure of the backend server in the embodiment of the present application. DETAILED DESCRIPTION

[0047] The following is a description of the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. In the following description, reference is made to the drawings that form a part of the present application and show the specific aspects of the embodiments of the present application or the specific aspects of the embodiments of the present application in an illustrative manner. It should be understood that the embodiments of the present application can be used in other aspects and may include structural or logical changes not depicted in the drawings. Therefore, the following detailed description should not be understood in a restrictive sense, and the scope of the present application is defined by the appended claims. For example, it should be understood that the disclosure of the described method can be equally applicable to the corresponding device or system for performing the method, and vice versa. For example, if one or more specific method steps are described, the corresponding device may include one or more units such as functional units to perform the one or more method steps described (for example, one unit performs one or more steps, or multiple units, each of which performs one or more of the multiple steps), even if such one or more units are not explicitly described or illustrated in the drawings. On the other hand, for example, if a specific device is described based on one or more units such as functional units, the corresponding method may include a step to perform the functionality of the one or more units (e.g., a step to perform the functionality of the one or more units, or multiple steps, each of which performs the functionality of one or more of the multiple units), even if such one or more steps are not explicitly described or illustrated in the drawings. Further, it should be understood that, unless otherwise explicitly stated, the features of the various exemplary embodiments and / or aspects described herein may be combined with each other.

[0048] In an embodiment of the present application, a CRM system in the field of telecommunication operation management is provided. Figure 1 This is a schematic diagram of the structure of the CRM system in the embodiment of the present application, see Figure 1As shown, the CRM system 100 may include: a user device 101 and a backend server 102, a browser is deployed on the user device, an application (app) is deployed on each backend server, and services are published on each app. The CRM system adopts a browser and server architecture (i.e., B / S (browser / server) architecture) mode. When a user accesses a remote service on a terminal device, he first needs to use a browser to open the user page, and then interact with the backend service through the operation page to complete the business function, and for the user's operation on the terminal device, the system service responds to the user's operation according to the business rules. When the user operates on the page, there will be linkage between the elements in the page, and this linkage relationship between the elements is the embodiment of the business rules. It can be seen that the business rules are bound to the page elements, and the same page can be used to display the content of different products. The requirements for the business data carried by the same page element are different. For different requirements for business data, the binding rules between the business rules and the page elements are not flexible, and the precise execution of the business rules cannot be achieved.

[0049] In order to solve this problem, the embodiment of the present application provides a method for processing business rules, which can be applied to the processing device in the above CRM system, such as the backend server 102 or the user device 101 communicating with the backend server. An app is deployed on the processing device, and a rule engine can be deployed in the app. Figure 2 This is a schematic diagram of the structure of the rule engine in the CRM system in the embodiment of the present application, see Figure 2 As shown, the rule engine 20 may include: a factor layer 21 and a rule layer 22. The factor layer 21 is used to calculate the factor expression. During the rule execution process, the value of the factor is calculated according to the context provided by the rule layer 22. The rule layer 22 may include: a rule index tree 221, a rule filter 222, a scenario calculator 223 and a rule executor 224.

[0050] In practical applications, the rule engine may be one or more processors.

[0051] It should be noted that in the embodiment of the present application, business rules can be divided into verification rules and configuration rules. Verification rules are used to verify whether the business object meets the condition of the business rules and give a prompt message; configuration rules are used to determine whether the business object meets the condition of the business rules and perform corresponding actions (such as: graying out buttons, adjusting drop-down box options). Figure 3 This is a schematic diagram of the business rules in the embodiment of the present application, see Figure 3 As shown, business rules can include three parts:

[0052] Condition: refers to the business rule condition, which is described by a factor expression.

[0053] success-action: refers to the action that should be executed when the rule condition is true.

[0054] failure-action: refers to the action that should be performed when the rule condition is false.

[0055] Therefore, the semantics of the entire business rule is: if the condition is true, execute the success-action, otherwise execute the failure-action.

[0056] For example, when a user selects the "Full Network Premium Edition" on the page through a browser, assuming that the current product is encapsulated with the factor orderitem, "color", "mode", "capacity", etc. can all be considered as attributes, so "mode" can be described as attribute['mode'] ("mode" means "mode"). At this time, if you want to gray out "capacity"

[0057] The option "6GB+64G" is not grayed out, and the option "Capacity" is "6GB+128GB". Then, the business rule can be set as:

[0058] condition:orderitem.attribute['mode'] == "All Network Access Premium Edition".

[0059] success-action: Gray out the option with "Capacity" of "6GB+64G" and do not gray out the option with "Capacity" of "6GB+128GB".

[0060] Of course, the above business rules are not limited to including the above three parts, and can also be set according to actual applications. The embodiments of the present application do not make specific limitations.

[0061] The following describes the method for processing business rules provided in the embodiment of the present application in combination with the structure of the above-mentioned rule engine.

[0062] Figure 4 This is a flow chart of the method for processing business rules in the embodiment of the present application, see Figure 4 As shown, the method includes:

[0063] S401: Obtain input parameters;

[0064] The input parameters include: a factor path and a scene identifier; the factor path is used to characterize the changes in the business object, and the scene identifier is used to characterize the current scene.

[0065] In the embodiment of the present application, the input parameters may also include: the object to be checked is used to characterize the business object (owner). The object to be checked carries an attribute field to describe the attribute information of the business object, such as user operation, business channel, customer level, etc. Of course, the input parameters may also include other parameters, which are not specifically limited in the embodiment of the present application.

[0066] Here, after the user performs an operation on the page, the rule engine obtains the input parameters corresponding to the user operation input by the page.

[0067] S402: Determine a first factor expression corresponding to the factor path from a factor expression set corresponding to the business object;

[0068] The factor expression set is a set of business rules corresponding to the business object.

[0069] Here, after the rule engine obtains the input parameters, the rule filter filters the business rules in the factor expression set corresponding to the preset business object, and determines the first factor expression corresponding to the factor path in the input parameters. In practical applications, the factor expression set corresponding to the business object can be used to represent all business rules corresponding to the business object. Then, the rule filter filters out the business rules corresponding to the factor path from all the business rules corresponding to the business object, that is, the business rules corresponding to the changed part of the business object.

[0070] In some possible implementations, the factor expression set corresponding to the business object (owner) can be represented in the form of a rule index tree, and each rule index tree is organized according to the business object. For example, Figure 5 is a schematic diagram of a rule index tree in an embodiment of the present application. For the conditions of the three business rules shown in Table 1 below, each condition is described by a factor expression. Then, the rule index trees corresponding to the three conditions can be referred to as Figure 5 As shown, the node name of the rule index tree can be the factor name or parameter of the factor expression corresponding to the condition of the business rule, and the business rule can be set under the corresponding node of the rule index tree, so that the path of the tree node where the business rule is located is the factor expression of the business rule condition.

[0071] Table 1

[0072] [1]orderitem.attribute['mode'] == "Full Network Premium Edition" [2]orderitem.attribute['mem']=="4G+64G" [3]orderitem.relateditem['option'] == "Headphones"

[0073] It should be noted that the above is only an example of the rule index tree and does not limit the rule index tree.

[0074] In the specific implementation process, before S402, a process of constructing a rule index tree may also be included. Accordingly, the rule engine may also include: a rule index tree construction module. Then, Figure 6 This is a schematic diagram of the process of constructing a rule index tree in the embodiment of the present application, see Figure 6 As shown, the process may include:

[0075] Step 1: The rule index tree construction module converts each factor expression in the factor expression set into a second expression node chain (second node chain);

[0076] Here, the rule index tree construction module converts each factor expression in the factor expression set corresponding to the business object into a corresponding second node chain. In the embodiment of the present application, the second Node chain is a data structure inside the rule engine, which is used to describe the factor expression.

[0077] Step 2: The rule index tree construction module traverses the second expression node chain and sequentially performs the following steps on the i-th second node in the second expression node chain, where i is a positive integer:

[0078] So, Figure 6 This is a schematic diagram of the process of constructing a rule index tree in the embodiment of the present application, see Figure 6 As shown,

[0079] S601: The rule index tree construction module determines whether the i-th second node has parameters. If the i-th second node has parameters, jump to S602; otherwise, jump to S606;

[0080] S602: The rule index tree construction module searches for the corresponding tree node in the pre-created rule index tree model according to the node name of the i-th second node and the corresponding parameters; if the tree node corresponding to the i-th second node is not found, jump to S603, otherwise, the process ends.

[0081] S603: The rule index tree construction module creates a new tree node for the i-th second node, and adds the new tree node to the child node of the previous tree node in the rule index tree model;

[0082] S604: The rule index tree construction module determines whether the i-th second node is the last node in the second expression node chain where it is located; if the i-th second node is the last node in the second expression node chain where it is located, it jumps to S605, otherwise, i = i + 1, and returns to step S601.

[0083] S605: The rule index tree construction module determines the rule index tree model as the rule index tree;

[0084] S606: The rule index tree construction module searches for the corresponding tree node in the rule index tree model according to the node name of the i-th second node; if the tree node corresponding to the i-th second node is not found, the rule index tree construction module jumps to S603, otherwise, the process ends.

[0085] In the embodiments of the present application, the above rule index tree model may be a blank tree structure preset when creating the rule index tree.

[0086] Then, based on the above rule index tree, the above S402 may include: obtaining the rule index tree constructed by the factor expression set; searching for the first factor expression in the rule index tree according to the factor path.

[0087] Among them, the factors in each factor expression in the factor expression set correspond to the nodes of the rule index tree.

[0088] Here, the rule filter first reads the rule index tree corresponding to the business object stored in advance according to the business object, and then uses the factor path to search in the rule index tree to obtain the first factor expression. For example, if the value of the factor path is "orderitem.attribute['system type']", then, as long as the factor expression with the prefix equal to the value of the factor path of the business rule condition is searched, such as the above condition[1].

[0089] In some possible implementation manners, Figure 7 is the flow schematic diagram of searching the rule index tree in the embodiments of the present application. Refer to Figure 7 As shown, the step of searching for the first factor expression in the rule index tree according to the factor path may include:

[0090] S701: The rule filter converts the factor expression corresponding to the factor path into a first expression node chain;

[0091] S702: The rule filter obtains the first node in the first expression node chain in turn, and determines whether the first node has parameters; if the first node has parameters, jumps to S703, otherwise, if the first node does not have parameters, jumps to S706.

[0092] S703: The rule filter searches the rule index tree for a corresponding tree node based on the node name of the previous node of the first node and the corresponding parameters; if a corresponding tree node exists, jump to S704, otherwise, the process ends.

[0093] S704: the rule filter determines whether the first node is the last node of the first expression node chain; if the first node is the last node of the first expression node chain, jump to S705, otherwise, return to S702;

[0094] S705: The rule filter determines the factor expression corresponding to the subtree with the tree node corresponding to the first node in the rule index tree as the root node as the first factor expression.

[0095] S706: The rule filter searches the rule index tree for a corresponding tree node based on the node name of the previous node of the first node; if a corresponding tree node exists, jump to S704, otherwise, return to S702.

[0096] Thus, the rule filter filters out the first factor expression corresponding to the factor path. In practical applications, the rule filter can also obtain the first factor expression corresponding to the factor path in other ways, such as searching for nodes whose node names are consistent with the factor path in the expression set, thereby obtaining the corresponding first factor expression, which is not specifically limited in the embodiments of the present application.

[0097] S403: Determine a second factor expression corresponding to the scene identifier from the factor expression set;

[0098] In the embodiment of the present application, a scenario is a classification of business object operations. For example, the selection of color, capacity, format, etc. can be divided into configuration attribute scenarios.

[0099] The contents that can be carried on the scene include: 1. Error message: The rule message can be customized according to the rule attribute such as rule identifier as the matching factor. 2. Factor expressions that are allowed to be executed in the current scene, described using AND, OR, NOT, and if and only if calculations. Of course, the scene can also carry other contents, which are not specifically limited in the embodiments of this application.

[0100] In the embodiment of the present application, S403 may include: obtaining a corresponding factor expression configured for the current scene according to the scene identifier; and determining the second factor expression in the factor expression set according to the factor expression configured for the current scene.

[0101] Here, in order to achieve accurate execution of business rules in different scenarios, different business rules can be configured for different scenarios in advance. These business rules are described using factor expressions, and then the factor expressions configured for different scenarios are associated with the scenario identifier. Then, the scenario calculator can first obtain the factor expression corresponding to the current scenario according to the scenario identifier, and then filter out the second factor expression that satisfies the factor expression corresponding to the current scenario from the factor expression set. In this way, the scenario calculator can obtain executable business rules in the current scenario. For example, the factor expression configured for the current scenario is: #iff OrderItem.attribute[], where #iff is an if and only if operator, then the scenario calculator can find the factor expression that satisfies "OrderItem.attribute[]" from the expression set as the second factor expression.

[0102] In an embodiment of the present application, since the rule index tree is used to describe each factor expression in an expression set, the scene calculator can filter out a second factor expression that satisfies the factor expression corresponding to the current scene from the factor expression set according to the rule index tree. Specifically, it can be: obtaining the rule index tree constructed by the factor expression set as described in the above embodiment, and then, according to the factor expression configured for the current scene, finding the second factor expression in the rule index tree.

[0103] In practical applications, the rule filter may also obtain the second factor expression corresponding to the scene identifier in other ways, which is not specifically limited in the embodiments of the present application.

[0104] In some possible implementation processes, since the factor expression configured for the current scenario contains operators such as "and", "or", "not" and / or "if and only if", the scenario calculator first converts the factor expression configured for the current scenario into a fifth expression node chain and an operator group, and then sorts all operators in the operator group from high to low according to priority, and then traverses the sorted operator group, obtains the current operator in turn, and determines whether the current operator is the last operator in the operator group; if the current operator is the last operator in the operator group, calculates the calculation result of the current operator, and obtains the value of the second factor expression according to the calculation result of the current operator; here, the calculated value of the second factor expression can represent the execution result of the business rule.

[0105] In some possible implementations, if the current operator is not the last operator in the operator group, the scene calculator may further calculate the calculation result of the current operator, and set the value of the current operator and the associated expression of the current operator in the context; and obtain the next operator as the current operator, and return to the step of determining whether the current operator is the last operator in the operator group.

[0106] Thus, the scene calculator filters out the second factor expression corresponding to the scene identifier.

[0107] It should be noted that the above S402 and S403 can be executed successively or simultaneously, and the embodiment of the present application does not specifically limit the execution order.

[0108] S404: Determine a third factor expression according to the first factor expression and the second factor expression;

[0109] The third factor expression is used to represent the executable business rules corresponding to the changed business object in the current scenario;

[0110] Here, after obtaining the first factor expression and the second factor expression, the rule executor performs an "AND" operation on the two to obtain the intersection of the first factor expression and the second factor expression, thereby obtaining the third factor expression, that is, the executable business rule corresponding to the changed business object in the current scenario.

[0111] S405: Obtain the value of the third factor expression;

[0112] The value of the third factor expression is used to represent the execution result of the executable business rule.

[0113] Here, the rule executor calls the factor layer to calculate the third factor expression and obtains the execution result of the executable business rule, thereby achieving accurate execution of the business rule.

[0114] Furthermore, after S405, the above method may also include: when the executable business rule is a verification rule, assembling the message according to the message template and outputting the execution result, that is, after the rule executor executes the verification rule, it can output the execution result to the page; and when the executable business rule is a configuration rule, the rule executor can execute the corresponding action through S405.

[0115] In some possible implementations, the method may also include: obtaining attribute information of the business object; determining a fourth factor expression corresponding to the attribute information from the factor expression set; and determining the third factor expression based on the first factor expression, the second factor expression and the fourth factor expression.

[0116] Here, the above-mentioned rule filter can also obtain the attribute information of the business object through S401, and then use the attribute information as a screening condition to determine the fourth factor expression corresponding to the attribute information from the expression set. Then, after obtaining the first factor expression, the second factor expression and the fourth factor expression, the rule executor can perform an "and" operation on the three to obtain the intersection of the first factor expression, the second factor expression and the fourth factor expression, thereby obtaining the third factor expression, that is, the executable business rule corresponding to the changed business object in the current scenario.

[0117] The above method is described below with an example.

[0118] Assume that in the page configuration of a mobile phone product, when the model of the mobile phone is "Full Network Premium Edition", the capacity can only be selected as "6G+128G". Then, the following business rule (represented as: rule_1) can be used to achieve this:

[0119] condition:orderitem.attribute["mode"]=="All Network Premium Edition";

[0120] success-action: grayed-out capacity "4G+64G", "6G+64G";

[0121] If there is no data related to the business rule in the system before configuring the business rule, you can make the following configurations:

[0122] 1. Configure the two factors of orderitem and attribute;

[0123] 2. Configure the scene data. For example, if the scene identifier is prod_config, the factor expression configured for the scene is: #iff orderitem.attribute[], where #iff is an if and only if operator;

[0124] 3. Configure rule_1, and the attribute information of the business object is add, which means ordering a product;

[0125] 4. When writing the page code, embed a general page operation listener and call the application programming interface (API) that implements the above rule engine in the listener.

[0126] Then, when the user chooses to order on the product page, the page inputs input parameters to the rule engine, such as factor path: OrderItem.attribute["mode"], scenario identifier: prod_config, and attribute information: add.

[0127] At this point, in the first step, the rule engine obtains the above input parameters: OrderItem.attribute["mode"], prod_config, and add;

[0128] Step 2: The rule filter determines factor expression 1, i.e., rule set 1, from the factor expression set corresponding to the business object according to OrderItem.attribute["mode"].

[0129] Step 2: The scenario calculator determines factor expression 2, i.e., rule set 2, from the factor expression set according to prod_config;

[0130] Step 3: The rule filter determines factor expression 3, i.e. rule set 3, from the factor expression set according to add;

[0131] Step 4: The rule executor performs an “AND” operation on rule set 1, rule set 2, and rule set 3, takes the intersection of the three, and obtains the executable business rules;

[0132] Step 5: The rule executor executes the executable business rules.

[0133] It should be noted that the second step, the third step and the fourth step may be performed simultaneously or sequentially, and the embodiment of the present application does not specifically limit this.

[0134] In an embodiment of the present application, by combining the changed parts of the business object with the current scenario, corresponding business rules are obtained, so that the same page can display different business rules for the content of different products, thereby achieving flexible binding of business rules and page elements and precise execution of business rules.

[0135] Based on the same inventive concept as the above method, the embodiment of the present application provides a device for processing business rules, which can be a chip or system on chip in a user device or a backend server, such as the rule engine in the above embodiment, or a functional module in a user device or a backend server for implementing the method described in the above embodiment. For example, Figure 8 This is a schematic diagram of the structure of the processing device of the business rules in the embodiment of the present application, see Figure 8 As shown, the business rule processing device 800 may include: an interface module 801, used to obtain input parameters, the input parameters include: a factor path and a scenario identifier, wherein the factor path is used to characterize the changes in the business object, and the scenario identifier is used to characterize the current scenario; a processing module 802, used to determine a first factor expression corresponding to the factor path from a factor expression set corresponding to the business object, the factor expression set being a set used to represent the business rules corresponding to the business object; determine a second factor expression corresponding to the scenario identifier from the factor expression set; determine a third factor expression based on the first factor expression and the second factor expression, the third factor expression being used to represent the executable business rule corresponding to the business object after the change in the current scenario; and obtain a value of the third factor expression, the value of the third factor expression being used to represent the execution result of the executable business rule.

[0136] In some possible implementations, the processing module is also used to obtain attribute information of the business object; determine a fourth factor expression corresponding to the attribute information from the factor expression set; and determine the third factor expression based on the first factor expression, the second factor expression and the fourth factor expression.

[0137] In some possible implementations, the processing module is used to obtain a rule index tree constructed by the factor expression set, wherein the factors in each factor expression in the factor expression set correspond to each node of the rule index tree; and according to the factor path, the first factor expression is searched in the rule index tree.

[0138] In some possible implementations, the processing module is used to convert the factor expression corresponding to the factor path into a first expression node chain; obtain the first node in the first expression node chain in turn, and determine whether the first node has parameters; if the first node has parameters, search the rule index tree for a corresponding tree node based on the node name of the previous node of the first node and the corresponding parameters; if a corresponding tree node exists, determine whether the first node is the last node of the first expression node chain; if the first node is the last node of the first expression node chain, determine the factor expression corresponding to the subtree in the rule index tree with the tree node corresponding to the first node as the root node as the first factor expression.

[0139] In some possible implementations, the processing module is also used to search, if the first node does not have parameters, whether there is a corresponding tree node in the rule index tree based on the node name of the previous node of the first node; if there is a corresponding tree node, determine whether the first node is the last node of the first expression node chain; if the first node is the last node of the first expression node chain, determine the factor expression corresponding to the subtree in the rule index tree with the tree node corresponding to the first node as the root node as the first factor expression.

[0140] In some possible implementations, the device also includes: a tree construction module, which is used to convert each factor expression in the factor expression set into a second expression node chain; traverse the second expression node chain, and perform the following steps on the i-th second node in the second expression node chain in turn, where i is a positive integer: determine whether the i-th second node has parameters; if the i-th second node has parameters, search for the corresponding tree node in a pre-created rule index tree model according to the node name of the i-th second node and the corresponding parameters; if the tree node corresponding to the i-th second node is not found, create a new tree node for the i-th second node, and add the new tree node to the child node of the previous tree node in the rule index tree model; determine whether the i-th second node is the last node in the second expression node chain where it is located; if the i-th second node is the last node in the second expression node chain where it is located, determine the rule index tree model as the rule index tree.

[0141] In some possible implementations, the tree construction module is also used to search for a corresponding tree node in the rule index tree model according to the node name of the i-th second node if the i-th second node does not have parameters; if the tree node corresponding to the i-th second node is not found, create a new tree node for the i-th second node, and add the new tree node to the child node of the previous tree node in the rule index tree model; determine whether the i-th second node is the last node in the second expression node chain where it is located; if the i-th second node is the last node in the second expression node chain where it is located, determine the rule index tree model as the rule index tree.

[0142] In some possible implementations, the processing module is further used to obtain a corresponding factor expression configured for the current scene according to the scene identifier; and determine the second factor expression in the factor expression set according to the factor expression configured for the current scene.

[0143] In some possible implementations, the processing module is used to obtain a rule index tree constructed by the factor expression set, wherein the factors in each factor expression in the factor expression set correspond to each node of the rule index tree; and according to the factor expression configured for the current scene, the second factor expression is found in the rule index tree.

[0144] In some possible implementations, the interface module is further used to assemble a message according to a message template and output the execution result after the processing module obtains the execution result of the executable business rule, when the executable business rule is a verification rule.

[0145] It should be noted that the functions implemented by the above processing module are consistent with those implemented by the rule filter, the scenario calculator and the rule executor in the above embodiment; the functions implemented by the above tree construction module are consistent with those implemented by the rule index tree.

[0146] In practical applications, the above-mentioned interface module may be a receiving interface, a receiving circuit or a receiver, etc.; the above-mentioned processing module may be one or more processors.

[0147] Based on the same inventive concept as the above method, an embodiment of the present application provides a user equipment, Fig. 9 This is a schematic diagram of the structure of the user equipment in the embodiment of the present application, see Fig. 9 As shown by the solid line, the user equipment 900 may include a processor 901, and the processor 901 is used to couple with the memory, read and execute instructions in the memory, so as to implement the method for processing the service rules as described in the above embodiment.

[0148] In some possible implementations, see Fig. 9 As shown by the dotted line, the user equipment 900 may also include a memory 902 for storing computer-executable instructions and data necessary for the user equipment. When the user equipment is running, the processor executes the computer-executable instructions stored in the memory so that the communication device executes the method for processing the service rules as described in the above embodiment.

[0149] Based on the same inventive concept as the above method, the embodiment of the present application provides a background server, Fig.10 This is a schematic diagram of the structure of the backend server in the embodiment of the present application, see Fig.10 As shown by the solid line, the backend server 1000 may include a processor 1001, and the processor 1001 is used to couple with the memory, read and execute instructions in the memory, so as to implement the method for processing business rules as described in the above embodiment.

[0150] In some possible implementations, see Fig.10 As shown by the dotted line, the background server 1000 may also include a memory 1002 for storing computer execution instructions and data necessary for the background server. When the background server is running, the processor executes the computer execution instructions stored in the memory so that the communication device executes the method for processing business rules as described in the above embodiment.

[0151] Based on the same inventive concept as the above method, an embodiment of the present application provides a computer-readable storage medium, which stores instructions. When the instructions are run on a computer, the method for processing business rules described in the above embodiment is executed.

[0152] Based on the same inventive concept as the above method, an embodiment of the present application provides a computer program or a computer program product. When the computer program or the computer program product is executed on a computer, the computer implements the business rule processing method described in the above embodiment.

[0153] Those skilled in the art will appreciate that the functions described in conjunction with the various illustrative logic blocks, modules, and algorithm steps disclosed herein can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions described in the various illustrative logic blocks, modules, and steps can be stored or transmitted as one or more instructions or codes on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to tangible media, such as data storage media, or includes any communication media that facilitates the transfer of computer programs from one place to another (e.g., according to a communication protocol). In this manner, computer-readable media may generally correspond to (1) non-temporary tangible computer-readable storage media, or (2) communication media, such as signals or carrier waves. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the techniques described in this application. A computer program product may include computer-readable media.

[0154] As an example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage, flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and can be accessed by a computer. Also, any connection is properly referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio and microwave are included in the definition of media. However, it should be understood that the computer-readable storage media and data storage media do not include connections, carrier waves, signals or other temporary media, but are actually directed to non-temporary tangible storage media. As used herein, disks and optical disks include compact disks (CDs), laser optical disks, optical optical disks, digital versatile disks (DVDs), and Blu-ray disks, where disks typically reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0155] Instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Thus, the term "processor" as used herein may refer to any of the aforementioned structures or any other structures suitable for implementing the techniques described herein. Additionally, in some aspects, the functions described by the various illustrative logic blocks, modules, and steps described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated in a combined codec. Moreover, the techniques may be fully implemented in one or more circuits or logic elements.

[0156] The techniques of the present application may be implemented in a variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC), or a set of ICs (e.g., a chipset). Various components, modules, or units are described in this application to emphasize functional aspects of devices for performing the disclosed techniques, but do not necessarily need to be implemented by different hardware units. In fact, as described above, the various units may be combined in a codec hardware unit in conjunction with appropriate software and / or firmware, or provided by interoperating hardware units (including one or more processors as described above).

[0157] In the above embodiments, the description of each embodiment has different emphases. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0158] The above is only an exemplary embodiment of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for processing business rules, It is characterized in that include: Obtaining input parameters, the input parameters including: a factor path and a scenario identifier, wherein the factor path is used to characterize changes in the business object, and the scenario identifier is used to characterize the current scenario; Determining a first factor expression corresponding to the factor path from a factor expression set corresponding to the business object, wherein the factor expression set is a set for representing the business rules corresponding to the business object; Determine a second factor expression corresponding to the scene identifier from the factor expression set; Determine a third factor expression according to the first factor expression and the second factor expression, wherein the third factor expression is used to represent an executable business rule corresponding to the changed business object in the current scenario; Obtaining a value of the third factor expression, where the value of the third factor expression is used to represent an execution result of the executable business rule; The determining, from the factor expression set corresponding to the business object, the first factor expression corresponding to the factor path includes: Obtaining a rule index tree constructed by the factor expression set, wherein factors in each factor expression in the factor expression set correspond to each node of the rule index tree; Convert the factor expression corresponding to the factor path into a first expression node chain; Sequentially obtain the first node in the first expression node chain, and determine whether the first node has a parameter, wherein the first node is each node in the node chain; If the first node has parameters, then according to the node name and corresponding parameters of the previous node of the first node, search whether there is a corresponding tree node in the rule index tree, wherein the node name is the factor name of the factor expression corresponding to the factor path, and the parameter corresponding to the node is the parameter of the factor expression corresponding to the factor path; If there is a corresponding tree node, determine whether the first node is the last node of the first expression node chain; If the first node is the last node of the first expression node chain, the factor expression corresponding to the subtree in the rule index tree with the tree node corresponding to the first node as the root node is determined as the first factor expression.

2. The method according to claim 1, It is characterized in that The method further comprises: Obtaining attribute information of the business object; Determine a fourth factor expression corresponding to the attribute information from the factor expression set; The third factor expression is determined according to the first factor expression, the second factor expression and the fourth factor expression.

3. The method according to claim 1, It is characterized in that The method further comprises: If the first node has no parameters, searching in the rule index tree whether there is a corresponding tree node according to the node name of the previous node of the first node; If there is a corresponding tree node, determine whether the first node is the last node of the first expression node chain; If the first node is the last node of the first expression node chain, the factor expression corresponding to the subtree in the rule index tree with the tree node corresponding to the first node as the root node is determined as the first factor expression.

4. The method according to any one of claims 1 to 3, It is characterized in that The method further comprises: Convert each factor expression in the factor expression set into a second expression node chain; Traverse the second expression node chain, and perform the following steps on the i-th second node in the second expression node chain in turn, where i is a positive integer: Determining whether the i-th second node has parameters; If the i-th second node has parameters, searching for a corresponding tree node in a pre-created rule index tree model according to the node name of the i-th second node and the corresponding parameters; If the tree node corresponding to the i-th second node is not found, a new tree node is created for the i-th second node, and the new tree node is added to the child node of the previous tree node in the rule index tree model; Determine whether the i-th second node is the last node in the second expression node chain where the second node is located; If the i-th second node is the last node in the second expression node chain where the second node is located, the rule index tree model is determined as the rule index tree.

5. The method according to claim 4, It is characterized in that The method further comprises: If the i-th second node has no parameters, searching for a corresponding tree node in the rule index tree model according to the node name of the i-th second node; If the tree node corresponding to the i-th second node is not found, a new tree node is created for the i-th second node, and the new tree node is added to the child node of the previous tree node in the rule index tree model; Determine whether the i-th second node is the last node in the second expression node chain where the second node is located; If the i-th second node is the last node in the second expression node chain where the second node is located, the rule index tree model is determined as the rule index tree.

6. The method according to any one of claims 1 to 5, It is characterized in that The determining, from the factor expression set, a second factor expression corresponding to the scene identifier comprises: According to the scene identifier, obtaining a corresponding factor expression configured for the current scene; According to the factor expression configured for the current scenario, the second factor expression is determined in the factor expression set.

7. The method according to claim 6, It is characterized in that The determining the second factor expression from the factor expression set according to the factor expression configured for the current scenario includes: Obtaining a rule index tree constructed by the factor expression set, wherein factors in each factor expression in the factor expression set correspond to each node of the rule index tree; According to the factor expression configured for the current scenario, the second factor expression is found in the rule index tree.

8. The method according to any one of claims 1 to 7, It is characterized in that After obtaining the execution result of the executable business rule, the method further includes: When the executable business rule is a verification rule, the message is assembled according to the message template and the execution result is output.

9. A business rule processing device, It is characterized in that include: An interface module, used to obtain input parameters, the input parameters including: a factor path and a scenario identifier, wherein the factor path is used to characterize changes in a business object, and the scenario identifier is used to characterize a current scenario; A processing module, configured to determine a first factor expression corresponding to the factor path from a factor expression set corresponding to the business object, the factor expression set being a set used to represent the business rules corresponding to the business object; determine a second factor expression corresponding to the scenario identifier from the factor expression set; determine a third factor expression based on the first factor expression and the second factor expression, the third factor expression being used to represent the executable business rule corresponding to the business object after the change in the current scenario; and obtain a value of the third factor expression, the value of the third factor expression being used to represent the execution result of the executable business rule; The processing module is also used to obtain a rule index tree constructed by the factor expression set, wherein the factors in each factor expression in the factor expression set correspond to each node of the rule index tree; convert the factor expression corresponding to the factor path into a first expression node chain; obtain the first node in the first expression node chain in turn, wherein the first node is each node in the node chain, and determine whether the first node has parameters; if the first node has parameters, then search in the rule index tree for a corresponding tree node based on the node name and corresponding parameters of the previous node of the first node, wherein the node name is the factor name of the factor expression corresponding to the factor path, and the parameters corresponding to the node are the parameters of the factor expression corresponding to the factor path; if a corresponding tree node exists, determine whether the first node is the last node of the first expression node chain; if the first node is the last node of the first expression node chain, determine the factor expression corresponding to the subtree in the rule index tree with the tree node corresponding to the first node as the root node as the first factor expression.

10. The device according to claim 9, It is characterized in that The processing module is also used to obtain the attribute information of the business object; determine the fourth factor expression corresponding to the attribute information from the factor expression set; and determine the third factor expression based on the first factor expression, the second factor expression and the fourth factor expression.

11. The device according to claim 9, It is characterized in that The processing module is also used to search whether there is a corresponding tree node in the rule index tree according to the node name of the previous node of the first node if the first node does not have parameters; if there is a corresponding tree node, determine whether the first node is the last node of the first expression node chain; if the first node is the last node of the first expression node chain, determine the factor expression corresponding to the subtree in the rule index tree with the tree node corresponding to the first node as the root node as the first factor expression.

12. The device according to any one of claims 9 to 11, It is characterized in that The device also includes: a tree construction module, which is used to convert each factor expression in the factor expression set into a second expression node chain; traverse the second expression node chain, and perform the following steps on the i-th second node in the second expression node chain in turn, where i is a positive integer: determine whether the i-th second node has parameters; if the i-th second node has parameters, search for the corresponding tree node in a pre-created rule index tree model according to the node name of the i-th second node and the corresponding parameters; if the tree node corresponding to the i-th second node is not found, create a new tree node for the i-th second node, and add the new tree node to the child node of the previous tree node in the rule index tree model; determine whether the i-th second node is the last node in the second expression node chain where it is located; if the i-th second node is the last node in the second expression node chain where it is located, determine the rule index tree model as the rule index tree.

13. The device according to claim 12, It is characterized in that The tree construction module is further configured to search for a corresponding tree node in the rule index tree model according to the node name of the i-th second node if the i-th second node has no parameters; If the tree node corresponding to the i-th second node is not found, a new tree node is created for the i-th second node, and the new tree node is added to the child node of the previous tree node in the rule index tree model; it is determined whether the i-th second node is the last node in the second expression node chain where it is located; if the i-th second node is the last node in the second expression node chain where it is located, the rule index tree model is determined to be the rule index tree.

14. The device according to any one of claims 9 to 13, It is characterized in that The processing module is further used to obtain the corresponding factor expression configured for the current scene according to the scene identifier; and determine the second factor expression in the factor expression set according to the factor expression configured for the current scene.

15. The device according to claim 14, It is characterized in that The processing module is used to obtain a rule index tree constructed by the factor expression set, wherein the factors in each factor expression in the factor expression set correspond to each node of the rule index tree; and according to the factor expression configured for the current scene, find the second factor expression in the rule index tree.

16. The device according to any one of claims 9 to 15, It is characterized in that The interface module is further used to assemble a message according to a message template and output the execution result after the processing module obtains the execution result of the executable business rule, when the executable business rule is a verification rule.

17. A device, It is characterized in that The device includes a processor, which is coupled to a memory, and is used to read and execute instructions in the memory to implement the method as described in any one of claims 1 to 8.

18. The device according to claim 17, It is characterized in that The device also includes a memory.

19. A server, It is characterized in that The server includes a processor, which is used to couple with a memory, read and execute instructions in the memory, so as to implement the method as described in any one of claims 1 to 8.

20. The server according to claim 19, It is characterized in that The server also includes a memory.

21. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores instructions, which are used to execute the method as described in any one of claims 1 to 8 when the instructions are executed on a computer.

22. A computer program product, when the computer program product is executed on a computer, enables the computer to implement the method according to any one of claims 1 to 8.