Business rule configuration method and apparatus, computer device, and storage medium

CN122711264APending Publication Date: 2026-09-08KINGDEE SOFTWARE(CHINA) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610952939.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-29
Publication Date
2026-09-08

AI Technical Summary

Technical Problem

在规则配置过程中,操作人员需要从字段、函数、运算符以及常量等配置项中逐步选择相应内容,并按照预设语法组合形成规则表达式,以完成业务规则的配置,从而导致业务规则配置的效率较低

Benefits of technology

[0018]The aforementioned business rule configuration method, apparatus, computer equipment, storage medium, and computer program product, in response to input operations in the input area of ​​the business rule configuration page, obtain business rule description information; determine candidate rule items that match the business rule description information, and display the candidate rule items in the candidate area of ​​the business rule configuration page; in response to selection operations for target rule items among the candidate rule items, determine a target rule expression based on the target rule item, and display the target rule expression in the display area of ​​the business rule configuration page; and determine the target business rule corresponding to the business rule description information based on the target rule expression. By responding to input operations in the input area of ​​the business rule configuration page, the system obtains business rule description information and determines matching candidate rule items based on this information, thus automatically recommending candidate rule items and narrowing down the search scope for target rule items. By displaying candidate rule items in the candidate area and responding to selection operations for the target rule item, the system determines the target rule expression, enabling operators to quickly construct the target rule expression based on the recommended candidate rule items. This reduces the operation time in the target rule item search and combination process, thereby improving the efficiency of target rule expression construction. Furthermore, the system determines the target business rule based on the target rule expression, enabling the target business rule to be generated quickly, thus improving the efficiency of business rule configuration. Moreover, operators can configure business rules simply by inputting business rule description information, without needing to search and combine target rule expressions from a large number of fields, functions, and operators, thereby lowering the threshold for business rule configuration and improving the convenience and flexibility of the business rule configuration process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122711264A_ABST
    Figure CN122711264A_ABST
Patent Text Reader

Abstract

The application relates to a business rule configuration method and device, computer equipment and a storage medium. The method comprises the following steps: in response to an input operation of an input area in a business rule configuration page, acquiring business rule description information; determining a candidate rule item matched with the business rule description information, and displaying the candidate rule item in a candidate area in the business rule configuration page; in response to a selection operation on a target rule item in the candidate rule item, determining a target rule expression based on the target rule item, and displaying the target rule expression in a display area in the business rule configuration page; and determining a target business rule corresponding to the business rule description information based on the target rule expression. The method can improve the business rule configuration efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a business rule configuration method, apparatus, computer equipment, storage medium, and computer program product. Background Technology

[0002] With the development of computer technology, more and more business systems are using business rules to control business processes, configure data processing logic, and automate decision-making. To adapt to complex and ever-changing business needs, the configuration of business rules has gradually evolved from developers writing code to configuring rules through a visual configuration interface, thereby reducing the threshold for configuring business rules and improving the efficiency of rule configuration.

[0003] In traditional technologies, operators typically construct business rules by configuring rule expressions. During the rule configuration process, operators need to step by step select the corresponding content from configuration items such as fields, functions, operators, and constants, and combine them according to preset syntax to form a rule expression to complete the configuration of the business rule, resulting in low efficiency in business rule configuration. Summary of the Invention

[0004] Therefore, it is necessary to provide a business rule configuration method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the efficiency of business rule configuration in response to the above-mentioned technical problems.

[0005] Firstly, this application provides a method for configuring business rules. The method includes:

[0006] Responding to input operations in the input area of ​​the business rule configuration page, obtain the business rule description information;

[0007] Identify candidate rule items that match the business rule description information and display them in the candidate area of ​​the business rule configuration page;

[0008] In response to the selection operation of the target rule item among the candidate rule items, the target rule expression is determined based on the target rule item and displayed in the display area of ​​the business rule configuration page;

[0009] Based on the target rule expression, determine the target business rule corresponding to the business rule description information.

[0010] Secondly, this application also provides a business rule configuration device. The device includes:

[0011] The acquisition module is used to retrieve business rule description information in response to input operations in the input area of ​​the business rule configuration page;

[0012] The retrieval module is used to identify candidate rule items that match the business rule description information and display the candidate rule items in the candidate area of ​​the business rule configuration page;

[0013] The generation module is used to respond to the selection operation of the target rule item in the candidate rule items, determine the target rule expression based on the target rule item, and display the target rule expression in the display area of ​​the business rule configuration page.

[0014] The configuration module is used to determine the target business rule corresponding to the business rule description information based on the target rule expression.

[0015] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the methods described in the first aspect.

[0016] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any one of the first aspects.

[0017] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in any one of the first aspects.

[0018] The aforementioned business rule configuration method, apparatus, computer equipment, storage medium, and computer program product, in response to input operations in the input area of ​​the business rule configuration page, obtain business rule description information; determine candidate rule items that match the business rule description information, and display the candidate rule items in the candidate area of ​​the business rule configuration page; in response to selection operations for target rule items among the candidate rule items, determine a target rule expression based on the target rule item, and display the target rule expression in the display area of ​​the business rule configuration page; and determine the target business rule corresponding to the business rule description information based on the target rule expression. By responding to input operations in the input area of ​​the business rule configuration page, the system obtains business rule description information and determines matching candidate rule items based on this information, thus automatically recommending candidate rule items and narrowing down the search scope for target rule items. By displaying candidate rule items in the candidate area and responding to selection operations for the target rule item, the system determines the target rule expression, enabling operators to quickly construct the target rule expression based on the recommended candidate rule items. This reduces the operation time in the target rule item search and combination process, thereby improving the efficiency of target rule expression construction. Furthermore, the system determines the target business rule based on the target rule expression, enabling the target business rule to be generated quickly, thus improving the efficiency of business rule configuration. Moreover, operators can configure business rules simply by inputting business rule description information, without needing to search and combine target rule expressions from a large number of fields, functions, and operators, thereby lowering the threshold for business rule configuration and improving the convenience and flexibility of the business rule configuration process. Attached Figure Description

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

[0020] Figure 1 An application environment diagram of a business rule configuration method in one embodiment;

[0021] Figure 2 A flowchart illustrating a business rule configuration method in one embodiment;

[0022] Figure 3 A schematic diagram of a business rules configuration page in one embodiment;

[0023] Figure 4 A schematic diagram of a business rules configuration page in another embodiment;

[0024] Figure 5A schematic diagram of a business rules configuration page in another embodiment;

[0025] Figure 6 A schematic diagram of a business rules configuration page in another embodiment;

[0026] Figure 7 A schematic diagram of a business rules configuration page in another embodiment;

[0027] Figure 8 This is a schematic diagram illustrating how a component saves a page in one embodiment.

[0028] Figure 9 A schematic diagram illustrating the component saving a page in another embodiment;

[0029] Figure 10 This is a schematic diagram of an editing page in one embodiment;

[0030] Figure 11 This is a schematic diagram of an editing page in another embodiment;

[0031] Figure 12 This is a schematic diagram of an editing page in another embodiment;

[0032] Figure 13 A schematic diagram of the interaction flow for configuring business rules in one embodiment;

[0033] Figure 14 An interaction sequence diagram for configuring business rules in one embodiment;

[0034] Figure 15 A structural block diagram of a business rule configuration device in one embodiment;

[0035] Figure 16 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0036] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0037] The business rule configuration method provided in this application embodiment can be applied to, for example, Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated on server 104 or placed on the cloud or other network servers. Both the terminal and the server can be used independently to execute the business rule configuration method provided in this embodiment. The terminal and server can also be used collaboratively to execute the business rule configuration method provided in this embodiment. For example, in response to an input operation in the input area of ​​the business rule configuration page, terminal 102 obtains business rule description information; determines candidate rule items that match the business rule description information and displays the candidate rule items in the candidate area of ​​the business rule configuration page; in response to a selection operation for a target rule item among the candidate rule items, determines a target rule expression based on the target rule item and displays the target rule expression in the display area of ​​the business rule configuration page; and determines the target business rule corresponding to the business rule description information based on the target rule expression. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0038] In one embodiment, such as Figure 2 As shown, a business rule configuration method is provided. This embodiment takes the application of this method to a computer device as an example for illustration, including steps 202 to 208.

[0039] Step 202: In response to the input operation in the input area of ​​the business rule configuration page, obtain the business rule description information.

[0040] The business rule configuration page refers to the interactive page used for configuring business rules. This page may include, but is not limited to, functional areas such as input areas, candidate areas, and display areas. For example, a diagram of the business rule configuration page is shown below. Figure 3 As shown, the business rule configuration page includes an input area 302, a candidate area 304, and a display area 306. The input area is used to receive business rule description information. The input area refers to the area on the business rule configuration page used to receive business rule description information. The input area can be a text input box, a dialog input box, a search input box, or other interactive controls capable of receiving natural language description information. The business rule description information refers to the descriptive information used to describe the business logic corresponding to the target business rule. The business rule description information can be natural language description information, for example, filtering customers with sales exceeding 100,000 yuan in the past three months, or counting the number of users who placed orders for three consecutive days.

[0041] For example, the computer device displays a business rule configuration page. The operator enters business rule description information through the input area in the business rule configuration page. The computer device responds to the input operation in the input area of ​​the business rule configuration page and obtains the business rule description information.

[0042] Step 204: Determine the candidate rule items that match the business rule description information and display the candidate rule items in the candidate area of ​​the business rule configuration page.

[0043] Candidate rule items refer to rule content determined based on business rule description information and usable for constructing business rules. Candidate rule items may include, but are not limited to, candidate expressions, candidate expression fragments, and candidate structure items. The candidate area refers to the area on the business rule configuration page used to display candidate rule items. The candidate area can display candidate rule items in a list, tree structure, card, or group format, and supports user selection of candidate rule items. The candidate area includes a candidate expression area and a candidate expression fragment area. The candidate expression area displays candidate expressions, and the candidate expression fragment area displays candidate expression fragments. The candidate area may also include a recommendation result control and a structure filter control. The recommendation result control triggers the display of candidate expressions and candidate expression fragments, while the structure filter control triggers the display of field lists, function lists, and operator lists. For example, a schematic diagram of the business rule configuration page is shown below. Figure 4 As shown, candidate region 402 includes a candidate expression region and a candidate expression fragment region. The candidate expression region contains 3 candidate expressions, and the candidate expression fragment region contains 6 candidate expression fragments. The business rule configuration page also includes a recommendation result control and a structure filter control. The operator triggers the structure filter control. A schematic diagram of the business rule configuration page is shown below. Figure 5 As shown, candidate region 502 includes a list of fields, a list of functions, and a list of operators.

[0044] For example, the computer device parses and processes the business rule description information, extracts business keywords from the business rule description information, determines candidate rule items that match the business rule description information based on the business keywords, and displays the candidate rule items in the candidate area of ​​the business rule configuration page.

[0045] In one embodiment, during the process of determining candidate rule items that match the business rule description information, the computer device displays parsing prompt information in the candidate area of ​​the business rule configuration page; after determining the candidate rule items that match the business rule description information, it displays the candidate rule items in the candidate area of ​​the business rule configuration page. The parsing prompt information refers to the prompt information used to indicate that the business rule description information is being parsed. For example, a schematic diagram of the business rule configuration page is shown below. Figure 6 As shown, in candidate area 602 of the business rule configuration page, the parsing prompt message "Parsing" is displayed.

[0046] Step 206: In response to the selection operation of the target rule item among the candidate rule items, determine the target rule expression based on the target rule item, and display the target rule expression in the display area of ​​the business rule configuration page.

[0047] The target rule item refers to the rule item determined from the candidate rule items in response to the user's selection. A target rule item can be at least one of the following: a target expression, a target expression fragment, or a target structure item. The target rule item is used to generate the target rule expression. The target rule expression is a rule expression generated based on the target rule item, used to describe the logic of the target business rule. The display area refers to the area in the business rule configuration page used to display the current rule expression or the target rule expression. The display area supports the display, editing, supplementary configuration, and iterative updates of rule expressions, and is used to reflect the construction results of the business rules.

[0048] For example, in response to a selection operation for a target expression in a candidate region, the computer device displays the target expression as the current rule expression in the display region, determines the target rule expression based on the current rule expression, and updates the current rule expression in the display region to the target rule expression.

[0049] In one embodiment, in response to a selection operation on a target expression in a candidate region, the computer device displays the target expression as the current rule expression in a display region; in response to a selection operation on a target supplement, the computer device configures the target supplement into the current rule expression to obtain the target rule expression; and updates the current rule expression in the display region to display the target rule expression.

[0050] Step 208: Based on the target rule expression, determine the target business rule corresponding to the business rule description information.

[0051] Among them, target business rules refer to business rules determined according to target rule expressions. Target business rules can be used for business process control, data processing logic configuration, automated decision-making, or rule engine execution. Target business rules can be saved in the business rule base and invoked and executed in subsequent business processes.

[0052] For example, the computer device determines the target business rule corresponding to the business rule description information based on the target rule expression.

[0053] In the aforementioned business rule configuration method, business rule description information is obtained by responding to input operations in the input area of ​​the business rule configuration page. Based on this description, candidate rule items matching the description are determined, automatically recommending candidate rule items and narrowing the search scope for the target rule item. By displaying candidate rule items in the candidate area and responding to selection operations for the target rule item, the target rule expression is determined. This allows operators to quickly construct the target rule expression based on the recommended candidate rule items, reducing the operation time during the search and combination process and improving the efficiency of target rule expression construction. Furthermore, the target business rule is determined based on the target rule expression, enabling rapid generation of the target business rule and further improving the configuration efficiency of business rules. Moreover, operators can configure business rules simply by inputting the business rule description information, eliminating the need to search and combine target rule expressions from numerous fields, functions, and operators, thus lowering the threshold for business rule configuration and improving the convenience and flexibility of the configuration process.

[0054] In one embodiment, determining candidate rule items that match the business rule description information includes:

[0055] The process involves several steps: First, identifying business keywords from the business rule description information and determining the corresponding business field identifiers. Second, obtaining the rule item mapping relationship and determining the initial rule item based on the business keywords and business field identifiers. Third, determining the configuration position of the configuration operation in the current rule expression based on the configuration operation in the display area of ​​the business rule configuration page and determining the target expression type corresponding to the configuration position. Fourth, obtaining the initial expression type corresponding to the initial rule item and identifying the initial rule item whose initial expression type is the target expression type as a candidate rule item that matches the business rule description information.

[0056] In this context, "business keywords" refers to keywords extracted from the business rule description information that characterize business needs, business objects, or business logic. Business keywords can be business object names, business indicator names, business action names, or business condition names. "Business field identifiers" are the field identifiers corresponding to the business keywords. Business field identifiers characterize the data fields that actually store business data in the business system. Business field identifiers can be database field names, data model field names, indicator field names, or rule engine field identifiers. For example, the business field identifier corresponding to the business keyword "sales amount" is "sale_amount," and the business field identifier corresponding to the business keyword "customer level" is "customer_level." "Rule item mapping relationship" refers to the correspondence between business keywords, business field identifiers, and rule items. Rule items in the rule item mapping relationship can include candidate expressions, candidate expression fragments, and other reusable rule content. "Initial rule item" refers to the rule item determined from the rule item mapping relationship based on the business keywords and business field identifiers. "Current rule expression" refers to the expression currently displayed in the business rule configuration page's display area. The current rule expression can be the target expression selected by the operator or an intermediate expression after supplementary configuration. The configuration location refers to the position within the current rule expression used to insert, replace, or expand rule content. The target expression type refers to the expression type corresponding to the configuration location. The target expression type can be a field type, function type, operator type, conditional expression type, numeric expression type, or logical expression type, etc. The initial expression type refers to the expression type corresponding to the initial rule item. The initial expression type is used to characterize the expression structure features or semantic type of the initial rule item.

[0057] For example, the computer device parses the business rule description information, extracts business keywords from the business rule description information, and determines the business field identifiers corresponding to the business keywords; obtains the rule item mapping relationship, and determines the initial rule item from the rule item mapping relationship based on the business keywords and business field identifiers; determines the configuration position of the configuration operation in the current rule expression based on the configuration operation for the current rule expression in the display area of ​​the business rule configuration page, and determines the target expression type corresponding to the configuration position; obtains the initial expression type corresponding to the initial rule item, determines the initial rule item whose initial expression type is the target expression type as a candidate rule item that matches the business rule description information, and displays the candidate rule item in the candidate area of ​​the business rule configuration page.

[0058] In this embodiment, business keywords and their corresponding business field identifiers are determined from the business rule description information. Initial rule items are then determined based on the business keywords, business field identifiers, and the rule item mapping relationship. This process not only utilizes the semantic features in the business rule description information but also leverages the association between business field identifiers and rule items to retrieve initial rule items, thereby improving the accuracy of rule item retrieval. Furthermore, the target expression type corresponding to the configuration position in the current rule expression is determined, and the initial expression type corresponding to the initial rule item is obtained. Initial rule items whose initial expression type matches the target expression type are identified as candidate rule items. This ensures that candidate rule items not only meet the semantic requirements of the business rule description information but also the expression structure requirements of the configuration position, thereby reducing the number of rule items that do not match the current configuration requirements and improving the targeting of candidate rule item screening results. Ultimately, this enhances the accuracy and effectiveness of candidate rule item recommendation results.

[0059] In one embodiment, in response to a selection operation for a target rule item among candidate rule items, a target rule expression is determined based on the target rule item, and the target rule expression is displayed in the display area of ​​the business rule configuration page, including:

[0060] In response to a selection operation on the target expression in the candidate rule item, the target expression is displayed as the current rule expression in the display area of ​​the business rule configuration page; the candidate rule item includes at least one candidate expression, and the target expression is the candidate expression corresponding to the selection operation; in response to a selection operation on the target supplementary item, the target supplementary item is configured into the current rule expression to obtain the target rule expression; the target supplementary item includes a target expression fragment and / or a target structure item; the candidate rule item includes at least one candidate expression fragment, and the target expression fragment is the candidate expression fragment corresponding to the selection operation; the target structure item includes at least one of the fields, functions, operators, and constants determined based on the structure filter control in the business rule configuration page; the current rule expression in the display area is updated to display the target rule expression.

[0061] The target expression refers to the expression determined from the candidate expressions in response to a selection operation on the candidate rule items. The target expression can be a complete rule expression or a rule template with complete business logic. The rule template can include conditional judgment logic, statistical logic, or calculation logic. The current rule expression refers to the expression currently displayed in the display area of ​​the business rule configuration page. Target supplementary items refer to rule content used to supplement the current rule expression. Target supplementary items include at least one of target expression fragments and target structure items. Target supplementary items are used to expand, supplement, or improve the current rule expression to generate the target rule expression. A target expression fragment refers to an expression fragment determined from the candidate expression fragments in response to a selection operation on the candidate expression fragments. Target expression fragments can be conditional fragments, statistical fragments, function fragments, calculation fragments, or other reusable rule content. A target structure item refers to the structured configuration content determined based on the structure filter control in the business rule configuration page. A target structure item can include at least one of fields, functions, operators, and constants. A structure filter control refers to the control used to trigger the display of a list of fields, a list of functions, a list of operators, and a list of constants.

[0062] For example, in response to a selection operation on the target expression among the candidate rule items, the computer device displays the target expression as the current rule expression in the display area of ​​the business rule configuration page; in response to a selection operation on the target supplementary item, the target supplementary item is configured into the current rule expression to obtain the target rule expression; and the current rule expression in the display area is updated to the target rule expression to complete the construction of the target rule expression.

[0063] In one embodiment, in response to a selection operation on a candidate expression fragment in a candidate rule item, a target expression fragment is obtained; and / or, in response to a triggering operation on a structure filter control in the candidate area, a candidate list is displayed in the candidate area, and in response to a selection operation on at least one of fields, functions, operators, and constants in the candidate list, a target structure item is obtained; the target expression fragment and / or the target structure item is determined as a target supplement; the target supplement is configured into the current rule expression to obtain the target rule expression. The candidate list is used to display at least one structured configuration content of fields, functions, operators, and constants, and includes, but is not limited to, a field list, a function list, an operator list, and a constant list. For example, if the operator selects the target expression "profit margin = (sales revenue - business cost) / sales revenue", and the operator triggers the structure filter control, a schematic diagram of the business rule configuration page is shown below. Figure 7As shown, candidate area 702 displays a list of fields, a list of functions, and a list of operators. The operator selects "-" from the list of operators and "loss" from the list of fields. Display area 704 displays the target rule expression as "Profit margin = (Sales revenue - Business cost) / Sales revenue - Loss".

[0064] In this embodiment, by responding to the selection operation of the target expression in the candidate rule item, the target expression is displayed as the current rule expression in the display area. This allows operators to configure rules directly based on the existing expression framework without having to build rule expressions from scratch, thereby reducing manual configuration operations in the target rule expression construction process. Furthermore, by responding to the selection operation of the target supplementary item, the target expression fragment and / or target structure item are configured into the current rule expression, enabling the target rule expression to be extended and modified based on the existing expression. This avoids operators from rebuilding the complete rule expression, reducing the amount of operation in the process of repeatedly configuring rule content and improving the construction efficiency of the target rule expression. At the same time, by combining the candidate expression fragment with the candidate list displayed triggered by the structure filter control, the reusability of the existing expression fragment can be utilized, and the flexible configuration of structured content such as fields, functions, operators, and constants can be supported, thereby improving the flexibility and convenience of the target rule expression construction process.

[0065] In one embodiment, the target supplement is configured into the current rule expression to obtain the target rule expression, which includes:

[0066] The current rule expression is parsed into an initial expression tree; the target supplementary item is parsed into a subtree of expression to be configured; the configuration position of the target supplementary item in the current rule expression is determined; based on the configuration position, the subtree of expression to be configured is configured into the initial expression tree to obtain a fused expression tree; based on the operator precedence rules, the fused expression tree is structurally adjusted to obtain the target expression tree; based on the target expression tree, the target rule expression is generated.

[0067] The initial expression tree refers to the tree structure obtained by parsing the current rule expression. It represents the hierarchical and logical relationships between the nodes in the current rule expression. Nodes in the initial expression tree can include field nodes, function nodes, operator nodes, constant nodes, and condition nodes. The subtree to be configured refers to the tree structure obtained by parsing the target supplementary item. Nodes in the subtree to be configured can include field nodes, function nodes, operator nodes, constant nodes, and condition nodes. The fused expression tree is the expression tree obtained after configuring the subtree to be configured into the initial expression tree. It represents the expression structure after the target supplementary item and the current rule expression are merged. Operator precedence rules are rules used to determine the order of operations for different operators. Operator precedence rules are used to adjust the hierarchical relationships of nodes in the fused expression tree to ensure the correct operation logic corresponding to the target rule expression. The target expression tree is the expression tree obtained after structurally adjusting the fused expression tree based on the operator precedence rules. It represents the final tree structure corresponding to the target rule expression.

[0068] For example, the computer device parses the current rule expression into an initial expression tree and parses the target supplement into a subtree of expression to be configured; determines the configuration position of the target supplement in the current rule expression, and configures the subtree of expression to be configured into the initial expression tree based on the configuration position to obtain a fused expression tree; adjusts the structure of the fused expression tree based on the operator precedence rules to obtain a target expression tree; and generates a target rule expression based on the target expression tree.

[0069] In this embodiment, by parsing the current rule expression into an initial expression tree and the target supplementary item into a subtree of expression to be configured, the configuration process of the rule expression is transformed from text-level configuration to structure-level configuration, thereby improving the accuracy of rule expression structure processing. By determining the configuration position corresponding to the target supplementary item and configuring the subtree of expression to be configured into the initial expression tree, the target supplementary item can be inserted into the target position according to the configuration requirements, thereby improving the accuracy of the fusion process between the target supplementary item and the current rule expression. Furthermore, by adjusting the structure of the fused expression tree based on operator priority rules, the node hierarchy relationship and operation order corresponding to different operators are kept consistent, avoiding the problem of operation logic errors after the target supplementary item is configured, thereby improving the accuracy and reliability of the generated result of the target rule expression.

[0070] In one embodiment, based on the configuration location, the expression subtree to be configured is configured into the initial expression tree to obtain a fused expression tree, including:

[0071] The target node corresponding to the configuration position is determined from the initial expression tree, and the target node information of the target node is obtained based on the initial expression tree; the root node information of the root node in the expression subtree to be configured is obtained; based on the target node information and the root node information, the node fusion method of the expression subtree to be configured is determined; based on the node fusion method, the expression subtree to be configured is merged with the target node in the initial expression tree to obtain the fused expression tree.

[0072] The target node refers to the node in the initial expression tree corresponding to the configuration position. The target node can be a field node, function node, operator node, constant node, or condition node. Target node information refers to information used to characterize the target node. Target node information can include at least one of node type, node level, node association, and node context information. Root node information refers to the information corresponding to the root node in the subtree of the expression to be configured. Root node information can include at least one of node type, node level, node association, and node context information. Node fusion method refers to the fusion method between the subtree of the expression to be configured and the target node. The node fusion method is used to determine the structural fusion relationship between the subtree of the expression to be configured and the target node. Node fusion methods can include at least one of node replacement, node expansion, and node nesting. Node replacement means replacing the target node with the subtree of the expression to be configured; node expansion means retaining the target node and constructing a new parent node structure with the subtree of the expression to be configured and the target node using a preset operator; node nesting means attaching the subtree of the expression to be configured as a child node of the target node or a function parameter node. For example, if the current rule expression is "sales revenue + profit × commission rate", in response to the selection operation of the target node corresponding to "commission rate", the target node corresponding to the configuration position is determined to be the node corresponding to "commission rate". The expression content corresponding to the subtree of the expression to be configured is "refund amount + discount amount". When the node fusion method is node replacement, the fused expression is "sales revenue + profit × (refund amount + discount amount)". When the node fusion method is node expansion, the fused expression is "sales revenue + profit × (commission rate + refund amount + discount amount)".

[0073] For example, the computer device determines the target node corresponding to the configuration position from the initial expression tree and obtains the target node information corresponding to the target node; obtains the root node information corresponding to the root node in the expression subtree to be configured; determines the node fusion method based on the target node information and the root node information; and then merges the expression subtree to be configured with the target node according to the node fusion method to obtain the fused expression tree.

[0074] In one embodiment, based on the node fusion method, the subtree of the expression to be configured is merged with the target node in the initial expression tree to obtain a fused expression tree. This includes: when the node fusion method is node replacement, the target node is replaced with the subtree of the expression to be configured to obtain a fused expression tree; when the node fusion method is node expansion, the target node is retained, and a new parent node structure is constructed between the subtree of the expression to be configured and the target node using a preset operator to obtain a fused expression tree; when the node fusion method is node nesting, the subtree of the expression to be configured is attached as a child node of the target node or a function parameter node to obtain a fused expression tree.

[0075] In this embodiment, the target node corresponding to the configuration position is determined from the initial expression tree, and the target node information and the root node information of the root node in the expression subtree to be configured are obtained. The node fusion method is determined based on the target node information and the root node information, so that the determination process of the node fusion method can simultaneously consider the information corresponding to the target node and the expression subtree to be configured, thereby improving the accuracy of the node fusion method determination. By merging the expression subtree to be configured with the target node based on the node fusion method, the expression subtree to be configured can be configured into the initial expression tree in a way that is compatible with the target node, thereby improving the accuracy of the fused expression tree.

[0076] In one embodiment, the business rule configuration method further includes:

[0077] In response to a save operation on an item to be saved in a target rule expression, the item to be saved is retrieved from the target rule expression; based on the target expression tree corresponding to the target rule expression, the structural information and context information corresponding to the item to be saved are determined; based on the item to be saved, the structural information, and the context information, the tag set of the item to be saved is determined; based on the item to be saved and the tag set corresponding to the item to be saved, the rule item mapping relationship is updated to obtain the updated rule item mapping relationship.

[0078] The term "item to be saved" refers to the rule content extracted from the target rule expression for subsequent reuse. The item to be saved can be an expression fragment, conditional expression, computational expression, function expression, or other reusable rule content. "Structure information" refers to information used to characterize the structural features of the item to be saved. Structure information can include at least one of the following: node type, node hierarchy, parent node relationship, child node relationship, and subtree structure. "Context information" refers to the association information of the item to be saved within the target rule expression. Context information can include at least one of the following: the positional relationship of the item to be saved, the relationship between preceding and following nodes, the expression path it belongs to, and the expression role. "Label set" refers to the set of labels determined based on the item to be saved, structure information, and context information. The label set is used to characterize the business semantic features and expression structural features corresponding to the item to be saved. The label set can include at least one of the following: business semantic labels, field association labels, function type labels, and expression structure type labels.

[0079] For example, in response to a save operation for an item to be saved in a target rule expression, the computer device retrieves the item to be saved from the target rule expression; determines the structural information and context information corresponding to the item to be saved based on the target expression tree corresponding to the target rule expression; determines the tag set corresponding to the item to be saved based on the item to be saved, the structural information, and the context information; and then updates the rule item mapping relationship based on the item to be saved and the tag set corresponding to the item to be saved, to obtain the updated rule item mapping relationship.

[0080] In one embodiment, determining the tag set for the item to be saved based on the item to be saved, structural information, and context information includes: determining business semantic tags based on the item to be saved; determining expression structure type tags based on structural information; determining field association tags and / or function type tags based on the item to be saved and context information; and determining the tag set corresponding to the item to be saved based on the business semantic tags, expression structure type tags, field association tags, and / or function type tags.

[0081] In one embodiment, in response to the selection operation of the item to be saved in the target rule expression, an operation menu for the item to be saved is displayed; the operation menu includes "Save as Component Control"; in response to the trigger operation of "Save as Component Control", based on the target expression tree corresponding to the target rule expression, the structural information and context information corresponding to the item to be saved are determined, and based on the item to be saved, the structural information, and the context information, the tag set of the item to be saved is determined, and a "Save Component" dialog box is displayed; the "Save Component" dialog box includes a tag display area for displaying tags in the tag set; in response to the trigger operation of the "Confirm Save" control in the "Save Component" dialog box, an association relationship is established between the item to be saved and the tag set, and the rule item mapping relationship is updated to obtain the updated rule item mapping relationship. For example, a schematic diagram of the component save page is shown below. Figure 8 As shown, when the operator selects the item to be saved, "Commission = Sales Revenue × 0.05", the operation menu 802 on the component save page includes "Save as Component Control", "Copy Fragment Control", and "Load into Search Box Edit Control". After the operator triggers "Save as Component Control", the component save page will display the following diagram: Figure 9 As shown, the component save page displays a save component dialog box 902, which includes the component name and a label display area 904. The label display area 904 displays the labels of the item to be saved, "Commission = Sales Revenue * 0.05", including the type labels "Commission Formula" and "Multiplication Operation", the scenario labels "Sales" and "Q4", and the keyword labels "Sales Revenue" and "0.05".

[0082] In this embodiment, in response to a save operation on an item to be saved, the item to be saved is obtained from the target rule expression. The structural and contextual information corresponding to the item to be saved is determined based on the target expression tree. Then, a tag set is determined based on the item to be saved, the structural information, and the contextual information. This ensures that the tag set determination process considers not only the item to be saved itself but also its corresponding structural and contextual information. The tag set can simultaneously represent the business semantic features and expression structural features corresponding to the item to be saved, thereby improving the completeness of the tag set's description of the item to be saved. By updating the rule item mapping relationship based on the item to be saved and the tag set, subsequent rule item retrieval processes can quickly locate rule items matching the business rule description information based on the tag set, thereby improving the accuracy of candidate rule item retrieval results and increasing the reuse efficiency of rule items.

[0083] In one embodiment, the business rule configuration method further includes:

[0084] In response to an edit operation on a target edit item in the target rule expression, the system determines the target subtree corresponding to the target edit item based on the target expression tree corresponding to the target rule expression; it determines the edit type corresponding to the target edit item and displays the edit panel corresponding to the edit type in the candidate area of ​​the business rule configuration page; in response to an edit operation on the edit panel, it updates the target subtree to obtain the updated target subtree; based on the updated target subtree, it updates the target expression tree to obtain the updated target expression tree; based on the updated target expression tree, it generates the updated target rule expression and displays the updated target rule expression in the display area of ​​the business rule configuration page.

[0085] In this context, the target editable item refers to the selected rule content within the target rule expression for editing. Target editable items can include at least one of the following: formula fragments, fields, constants, functions, and nested functions. Different types of target editable items correspond to different editing types. The target subtree refers to the subtree structure within the target expression tree corresponding to the target editable item. The editing type refers to the type corresponding to the target editable item. Editing types can include at least one of the following: ordinary fragment type, field type, constant type, function call type, or nested function type. The editing panel refers to the editing page used to edit the target editable item. The editing panel can be an ordinary fragment editing panel, a field editing panel, a constant editing panel, a function call editing panel, or a nested function editing panel. The updated target subtree refers to the subtree structure obtained after updating the target subtree based on the editing panel. The updated target expression tree refers to the expression tree obtained by replacing the corresponding target subtree in the target expression tree with the updated target subtree.

[0086] For example, in response to an editing operation on a target edit item in a target rule expression, the computer device determines the target subtree corresponding to the target edit item based on the target expression tree corresponding to the target rule expression; determines the editing type corresponding to the target edit item and displays the editing panel corresponding to the editing type in the candidate area of ​​the business rule configuration page; in response to an editing operation on the editing panel, updates the target subtree to obtain the updated target subtree; replaces the corresponding target subtree in the target expression tree with the updated target subtree to obtain the updated target expression tree; generates an updated target rule expression based on the updated target expression tree and displays the updated target rule expression in the display area of ​​the business rule configuration page.

[0087] In one embodiment, determining the editing type corresponding to the target editing item and displaying the editing panel corresponding to the editing type in the candidate area of ​​the business rule configuration page includes: determining the type of the target editing item; when the target editing item is a formula fragment, determining the editing type as a normal fragment type and displaying a normal fragment editing panel in the candidate area; when the target editing item is a field, determining the editing type as a field type and displaying a field editing panel in the candidate area; when the target editing item is a constant, determining the editing type as a constant type and displaying a constant editing panel in the candidate area; when the target editing item is a function, determining the editing type as a function call type and displaying a function call editing panel in the candidate area; when the target editing item is a nested function, determining the editing type as a nested function type and displaying a nested function editing panel in the candidate area.

[0088] In one embodiment, in response to the selection operation of the target edit item in the target rule expression, an operation menu for the target edit item is displayed; the operation menu includes an edit control loaded into the search box; in response to the trigger operation of loading the edit control into the search box, based on the target expression tree corresponding to the target rule expression, the target subtree corresponding to the target edit item is determined, and the edit type corresponding to the target edit item is determined, and the edit panel corresponding to the edit type is displayed in the candidate area of ​​the business rule configuration page; in response to the edit operation on the edit panel, the target subtree is updated to obtain the updated target subtree; based on the updated target subtree, the target expression tree is updated to obtain the updated target expression tree; based on the updated target expression tree, the updated target rule expression is generated, and the updated target rule expression is displayed in the display area of ​​the business rule configuration page.

[0089] For example, a diagram of the editing page is shown below. Figure 10 As shown, after the operator selects the target editing item in the target rule expression, operation menu 1002 is displayed. Operation menu 1002 includes a loading control for the search box. After the operator triggers the loading control for the search box, the editing panel corresponding to the editing type is displayed in the candidate area. When the target editing item is a formula fragment, the editing type is determined to be a normal fragment type. A schematic diagram of the editing page is shown below. Figure 11 As shown, the candidate area displays a normal fragment editing panel 1102, which includes an left-value editing area, an operator editing area, and an right-value editing area. After the operator modifies the expression content corresponding to the target edit item through the normal fragment editing panel 1102, the computer device updates the target subtree based on the modified expression content, and updates the target expression tree based on the updated target subtree, generating an updated target rule expression. When the target edit item is a nested function, the editing type is determined to be a nested function type. A schematic diagram of the editing page is shown below. Figure 12 As shown, the candidate area displays the function nesting editing panel 1202. The function nesting editing panel 1202 displays the function parameters of each level according to the function nesting level. After the operator modifies the target function parameters through the function nesting editing panel 1202, the computer device updates the target subtree based on the modified function parameters, and updates the target expression tree based on the updated target subtree to generate the updated target rule expression.

[0090] In this embodiment, by responding to the editing operation on the target edit item, the target subtree corresponding to the target edit item is determined based on the target expression tree, enabling the editing process to accurately locate the expression structure corresponding to the target edit item, thereby improving the accuracy of local editing of the target rule expression. By determining the editing type corresponding to the target edit item and displaying the editing panel corresponding to the editing type, different types of target edit items can be edited using an editing method that is suitable for them, thereby improving the targeting and convenience of the editing process. Furthermore, by updating the target subtree based on the editing panel and updating the target expression tree based on the updated target subtree, the target rule expression can be partially modified while retaining the expression structure of the unedited part, avoiding the need to rebuild the complete target rule expression, thereby reducing the amount of operation in the rule expression editing process and improving the editing efficiency and flexibility of the target rule expression.

[0091] In an exemplary embodiment, the interactive flow diagram for business rule configuration is as follows: Figure 13 As shown, the business rule configuration process includes inputting business rule description information, recommending candidate rule items, constructing target rule expressions, editing target rule expressions, and saving and reusing rule items.

[0092] The interaction sequence diagram for business rule configuration is as follows: Figure 14 As shown, the operator configures business rules, including:

[0093] Operators can enter the description information of the business rules in the input area of ​​the business rule configuration page.

[0094] After obtaining the business rule description information from the business rule configuration page, the business rule description information is sent to the recommendation and parsing module.

[0095] The recommendation and parsing module determines the business keywords and their corresponding business field identifiers from the business rule description information, generates query candidate expressions based on the business keywords and their corresponding business field identifiers, and sends the query candidate expressions to the rule index library.

[0096] The rule index returns initial rule items determined from the rule item mapping relationship based on business keywords and business field identifiers in the query candidate expression;

[0097] The recommendation and parsing module determines the target expression type by combining the configuration position in the current rule expression, obtains the initial expression type corresponding to the initial rule item, determines the initial rule item whose initial expression type matches the target expression type as the candidate rule item, and returns it to the business rule configuration page.

[0098] After receiving candidate rule items, the business rule configuration page displays them in the candidate area. Each candidate rule item includes a candidate expression and a fragment of that expression.

[0099] The operator selects a target expression from the candidate rule items. In response to the selection, the business rule configuration page displays the target expression as the current rule expression in the display area. Subsequently, the operator continues to select target expression fragments and / or target structure items using the structure filter control, and identifies the target expression fragments and / or target structure items as target supplementary items.

[0100] The business rules configuration page sends the target supplementary items to the expression structure processing module.

[0101] The expression structure processing module parses the current rule expression into an initial expression tree and the target supplementary item into a subtree of the expression to be configured; then it determines the configuration position of the target supplementary item in the current rule expression. It identifies the target node corresponding to the configuration position from the initial expression tree and obtains the target node information; simultaneously, it obtains the root node information corresponding to the root node in the subtree of the expression to be configured. Based on the target node information and the root node information, the expression structure processing module determines the node fusion method and merges the subtree of the expression to be configured with the target node according to the node fusion method to obtain a fused expression tree. The expression structure processing module adjusts the structure of the fused expression tree based on operator precedence rules to obtain the target expression tree, and generates the target rule expression based on the target expression tree. The generated target rule expression is then returned to the business rule configuration page.

[0102] The business rules configuration page displays the target rule expression in the display area.

[0103] The business rule configuration page determines the target business rule corresponding to the business rule description information based on the target rule expression, thereby completing the business rule configuration process.

[0104] Operators can edit the target edit items in the target rule expression, including:

[0105] The business rules configuration page responds to editing operations on the target edit item, determines the editing type corresponding to the target edit item, and displays the editing panel corresponding to the editing type in the candidate area.

[0106] Operators can edit target items through the editing panel.

[0107] The business rule configuration page calls the expression structure processing module, which updates the target subtree to obtain the updated target subtree. Then, the updated target subtree is used to update the target expression tree to obtain the updated target expression tree. Based on the updated target expression tree, the updated target rule expression is regenerated and returned to the business rule configuration page.

[0108] The business rule configuration page displays the updated target rule expression in the display area and generates updated target business rules based on the updated target rule expression.

[0109] Operators can also perform save operations on items to be saved in the target rule expression, including:

[0110] In response to a save operation for an item to be saved, the business rule configuration page retrieves the item to be saved from the target rule expression and determines the structural and contextual information of the item to be saved based on the target expression tree corresponding to the target rule expression. Then, it determines the tag set corresponding to the item to be saved based on the item to be saved, the structural information, and the contextual information.

[0111] The business rules configuration page displays a save component dialog box and shows the tags from the tag collection in the tag display area.

[0112] In response to a trigger operation on the confirm save control, an association is established between the item to be saved and the tag collection, and the association is sent to the component library.

[0113] The component library updates the rule item mapping relationship based on the association relationship to obtain the updated rule item mapping relationship.

[0114] In the aforementioned business rule configuration method, business rule description information is obtained by responding to input operations in the input area of ​​the business rule configuration page. Based on this description, candidate rule items matching the description are determined, automatically recommending candidate rule items and narrowing the search scope for the target rule item. By displaying candidate rule items in the candidate area and responding to selection operations for the target rule item, the target rule expression is determined. This allows operators to quickly construct the target rule expression based on the recommended candidate rule items, reducing the operation time during the search and combination process and improving the efficiency of target rule expression construction. Furthermore, the target business rule is determined based on the target rule expression, enabling rapid generation of the target business rule and further improving the configuration efficiency of business rules. Moreover, operators can configure business rules simply by inputting the business rule description information, eliminating the need to search and combine target rule expressions from numerous fields, functions, and operators, thus lowering the threshold for business rule configuration and improving the convenience and flexibility of the configuration process.

[0115] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0116] Based on the same inventive concept, this application also provides a business rule configuration apparatus for implementing the business rule configuration method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more business rule configuration apparatus embodiments provided below can be found in the limitations of the business rule configuration method described above, and will not be repeated here.

[0117] In one embodiment, such as Figure 15 As shown, a business rule configuration device is provided, including: an acquisition module 1502, a retrieval module 1504, a generation module 1506, and a configuration module 1508, wherein:

[0118] The acquisition module 1502 is used to acquire business rule description information in response to input operations in the input area of ​​the business rule configuration page;

[0119] The retrieval module 1504 is used to determine candidate rule items that match the business rule description information and display the candidate rule items in the candidate area of ​​the business rule configuration page;

[0120] The generation module 1506 is configured to, in response to the selection operation of the target rule item among the candidate rule items, determine the target rule expression based on the target rule item, and display the target rule expression in the display area of ​​the business rule configuration page;

[0121] The configuration module 1508 is used to determine the target business rule corresponding to the business rule description information based on the target rule expression.

[0122] In one embodiment, the retrieval module 1504 is further configured to: determine business keywords from the business rule description information and determine the business field identifier corresponding to the business keywords; obtain a rule item mapping relationship, and determine an initial rule item from the rule item mapping relationship based on the business keywords and the business field identifier; determine the configuration position of the configuration operation in the current rule expression based on the configuration operation for the current rule expression in the display area of ​​the business rule configuration page, and determine the target expression type corresponding to the configuration position; obtain the initial expression type corresponding to the initial rule item, and determine the initial rule item whose initial expression type is the target expression type as a candidate rule item that matches the business rule description information.

[0123] In one embodiment, the generation module 1506 is further configured to: in response to a selection operation on a target expression in the candidate rule item, display the target expression as the current rule expression in the display area of ​​the business rule configuration page; the candidate rule item includes at least one candidate expression, and the target expression is the candidate expression corresponding to the selection operation; in response to a selection operation on a target supplementary item, configure the target supplementary item into the current rule expression to obtain a target rule expression; the target supplementary item includes a target expression fragment and / or a target structure item; the candidate rule item includes at least one candidate expression fragment, and the target expression fragment is the candidate expression fragment corresponding to the selection operation; the target structure item includes at least one of a field, function, operator, and constant determined based on the structure filter control in the business rule configuration page; and update the current rule expression in the display area to display the target rule expression.

[0124] In one embodiment, the generation module 1506 is further configured to: parse the current rule expression into an initial expression tree; parse the target supplementary item into a subtree of expression to be configured; determine the configuration position of the target supplementary item in the current rule expression; configure the subtree of expression to be configured into the initial expression tree based on the configuration position to obtain a fused expression tree; perform structural adjustments on the fused expression tree based on operator precedence rules to obtain the target expression tree; and generate the target rule expression based on the target expression tree.

[0125] In one embodiment, the generation module 1506 is further configured to: determine the target node corresponding to the configuration position from the initial expression tree; obtain the target node information of the target node based on the initial expression tree; obtain the root node information of the root node in the expression subtree to be configured; determine the node fusion method of the expression subtree to be configured based on the target node information and the root node information; and merge the expression subtree to be configured with the target node in the initial expression tree based on the node fusion method to obtain a fused expression tree.

[0126] In one embodiment, the business rule configuration device further includes a saving module, which is configured to: in response to a saving operation for an item to be saved in the target rule expression, obtain the item to be saved from the target rule expression; determine the structural information and context information corresponding to the item to be saved based on the target expression tree corresponding to the target rule expression; determine the tag set of the item to be saved based on the item to be saved, the structural information, and the context information; and update the rule item mapping relationship based on the item to be saved and the tag set corresponding to the item to be saved, to obtain the updated rule item mapping relationship.

[0127] In one embodiment, the business rule configuration device further includes an adjustment module, which is configured to: in response to an editing operation on a target edit item in the target rule expression, determine a target subtree corresponding to the target edit item based on the target expression tree corresponding to the target rule expression; determine an editing type corresponding to the target edit item, and display an editing panel corresponding to the editing type in the candidate area of ​​the business rule configuration page; in response to an editing operation on the editing panel, update the target subtree to obtain an updated target subtree; update the target expression tree based on the updated target subtree to obtain an updated target expression tree; generate an updated target rule expression based on the updated target expression tree, and display the updated target rule expression in the display area of ​​the business rule configuration page.

[0128] Each module in the aforementioned business rule configuration device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can invoke and execute the operations corresponding to each module.

[0129] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 16As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a business rule configuration method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0130] Those skilled in the art will understand that Figure 16 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0131] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0132] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0133] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0134] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0135] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0136] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0137] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for configuring business rules, characterized in that, The method includes: Responding to input operations in the input area of ​​the business rule configuration page, obtain the business rule description information; Identify candidate rule items that match the business rule description information, and display the candidate rule items in the candidate area of ​​the business rule configuration page; In response to the selection operation of a target rule item among the candidate rule items, a target rule expression is determined based on the target rule item, and the target rule expression is displayed in the display area of ​​the business rule configuration page; Based on the target rule expression, the target business rule corresponding to the business rule description information is determined.

2. The method according to claim 1, characterized in that, The process of determining candidate rule items that match the business rule description information includes: Determine business keywords from the business rule description information, and determine the business field identifiers corresponding to the business keywords; Obtain the rule item mapping relationship, and determine the initial rule item from the rule item mapping relationship based on the business keyword and the business field identifier; Based on the configuration operation of the current rule expression in the display area of ​​the business rule configuration page, determine the configuration position of the configuration operation in the current rule expression, and determine the target expression type corresponding to the configuration position; Obtain the initial expression type corresponding to the initial rule item, and determine the initial rule item whose initial expression type is the target expression type as a candidate rule item that matches the business rule description information.

3. The method according to claim 1, characterized in that, The step of responding to the selection operation for a target rule item among the candidate rule items, determining a target rule expression based on the target rule item, and displaying the target rule expression in the display area of ​​the business rule configuration page includes: In response to a selection operation on the target expression in the candidate rule item, the target expression is displayed as the current rule expression in the display area of ​​the business rule configuration page; the candidate rule item includes at least one candidate expression, and the target expression is the candidate expression corresponding to the selection operation; In response to a selection operation for a target supplementary item, the target supplementary item is configured into the current rule expression to obtain a target rule expression; the target supplementary item includes a target expression fragment and / or a target structure item; the candidate rule item includes at least one candidate expression fragment, and the target expression fragment is the candidate expression fragment corresponding to the selection operation; the target structure item includes at least one of fields, functions, operators, and constants determined based on the structure filter control in the business rule configuration page. Update the current rule expression in the display area to the target rule expression.

4. The method according to claim 3, characterized in that, The step of configuring the target supplementary item into the current rule expression to obtain the target rule expression includes: Parse the current rule expression into an initial expression tree; The target supplementary item is parsed into a subtree of expressions to be configured; Determine the configuration position of the target supplement in the current rule expression; Based on the configuration location, the subtree of the expression to be configured is configured into the initial expression tree to obtain the fused expression tree; Based on operator precedence rules, the structure of the fused expression tree is adjusted to obtain the target expression tree; The target rule expression is generated based on the target expression tree.

5. The method according to claim 4, characterized in that, The step of configuring the subtree of the expression to be configured into the initial expression tree based on the configuration location to obtain the fused expression tree includes: Determine the target node corresponding to the configuration position from the initial expression tree, and obtain the target node information of the target node based on the initial expression tree; Obtain the root node information of the root node in the subtree of the expression to be configured; Based on the target node information and the root node information, determine the node fusion method of the expression subtree to be configured; Based on the node fusion method, the subtree of the expression to be configured is merged with the target node in the initial expression tree to obtain a fused expression tree.

6. The method according to claim 1, characterized in that, The method further includes: In response to a save operation for an item to be saved in the target rule expression, the item to be saved is obtained from the target rule expression; Based on the target expression tree corresponding to the target rule expression, determine the structural information and context information corresponding to the item to be saved; Based on the item to be saved, the structural information, and the context information, determine the tag set of the item to be saved; Based on the item to be saved and the tag set corresponding to the item to be saved, the rule item mapping relationship is updated to obtain the updated rule item mapping relationship.

7. The method according to claim 1, characterized in that, The method further includes: In response to an editing operation on a target edit item in the target rule expression, a target subtree corresponding to the target edit item is determined based on the target expression tree corresponding to the target rule expression; Determine the editing type corresponding to the target editing item, and display the editing panel corresponding to the editing type in the candidate area of ​​the business rule configuration page; In response to an editing operation on the editing panel, the target subtree is updated to obtain an updated target subtree; Based on the updated target subtree, the target expression tree is updated to obtain the updated target expression tree; Based on the updated target expression tree, an updated target rule expression is generated and displayed in the display area of ​​the business rule configuration page.

8. A business rule configuration device, characterized in that, The device includes: The acquisition module is used to retrieve business rule description information in response to input operations in the input area of ​​the business rule configuration page; The retrieval module is used to determine candidate rule items that match the business rule description information and display the candidate rule items in the candidate area of ​​the business rule configuration page; A generation module is used to respond to the selection operation of a target rule item among the candidate rule items, determine a target rule expression based on the target rule item, and display the target rule expression in the display area of ​​the business rule configuration page; The configuration module is used to determine the target business rule corresponding to the business rule description information based on the target rule expression.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.