A data processing method and device, electronic equipment and storage medium

By integrating expression syntax description information into the business system, parsing and converting it into an abstract syntax tree, the dependency of the business system on the Spring environment is resolved, independent execution of business rules is achieved, and the system's flexibility and efficiency are improved.

CN122173092APending Publication Date: 2026-06-09BEIJING QIYI CENTURY SCI & TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING QIYI CENTURY SCI & TECH CO LTD
Filing Date
2026-02-24
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

In existing technologies, business systems rely on the SpEL expression language of the Spring environment, which limits deployment and makes it impossible to independently parse and execute business rules.

Method used

By integrating expression syntax description information locally, the expression of business rules is parsed and converted into an abstract syntax tree. The execution result of the business rules is calculated by utilizing the logical operation methods of the branch nodes and leaf nodes in the abstract syntax tree, without relying on a specific runtime environment.

Benefits of technology

It reduces the dependence of business systems on specific operating environments, improves the readability and maintainability of business rules, reduces development costs, and is suitable for devices and data processing platforms with limited computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122173092A_ABST
    Figure CN122173092A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data processing method and device, electronic equipment and storage medium, relating to the technical field of data processing, and the specific implementation scheme is: in response to an execution operation for a business rule in an application system, based on locally integrated expression syntax description information, the expression of the business rule is parsed, and based on the parsing result, the expression is converted into an abstract syntax tree, the abstract syntax tree includes: branch nodes and leaf nodes, the branch nodes represent the logical operation mode of each expression in the expression, and the leaf nodes represent the parameters required for the logical operation mode of the connected branch nodes; based on the updated value of the parameter represented by the leaf node in the application system running process, starting from the root node in the branch node in the abstract syntax tree, the logical operation of each branch node in the abstract syntax tree is performed, and the execution result of the business rule is obtained. The scheme provided by the embodiments of the present application can reduce the dependence of the business system on a specific running environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a data processing method, apparatus, electronic device, and storage medium. Background Technology

[0002] Various business systems configure relevant business rules for the services they provide. For example, an e-commerce system might configure shopping discount rules, and a game system might configure skill trigger rules. These business rules are generally described in the form of expressions.

[0003] In related technologies, existing expression languages ​​such as SpEL (Spring Expression Language, an expression language provided by the Spring framework) are generally used to generate expressions describing business rules. However, SpEL depends on the Spring environment (an environment provided by the Spring framework), requiring that the device running the application system has a Spring environment deployed. Thus, when the business system needs to determine whether a business rule is met during operation, it relies on the Spring environment to parse the expression of the business rule and then generates a judgment result based on the parsing result.

[0004] It is evident that the above method of generating business rule expressions using existing expression languages ​​such as SpEL will lead to limitations in the deployment of business systems. Summary of the Invention

[0005] The purpose of this invention is to provide a data processing method, apparatus, electronic device, and storage medium to reduce the dependence of business systems on specific operating environments. The specific technical solutions are as follows:

[0006] According to one aspect of the present invention, a data processing method is provided, the method comprising:

[0007] In response to the execution operation of business rules in the application system, the expression of the business rule is parsed based on the locally integrated expression syntax description information, and the expression is converted into an abstract syntax tree based on the parsing result. The abstract syntax tree includes: branch nodes and leaf nodes. The branch nodes represent the logical operation method of each expression in the expression, and the leaf nodes represent the parameters required for the logical operation method of the connected branch nodes.

[0008] Based on the updated values ​​of the parameters represented by the leaf nodes during the operation of the application system, logical operations are performed on each branch node in the abstract syntax tree, starting from the root node, to obtain the execution result of the business rule.

[0009] In one embodiment of the present invention, parsing the expression of the business rule based on locally integrated expression syntax description information includes:

[0010] Obtain an element sequence obtained by performing lexical analysis on the expression of the business rule, wherein the element sequence includes expression elements in the expression and is arranged in the order of the expression elements in the expression;

[0011] Obtain the abstract syntax tree of the expression, wherein the abstract syntax tree is obtained by performing syntactic analysis on the element sequence based on locally integrated expression syntax description information.

[0012] In one embodiment of the present invention, a lexical analyzer generated by an open-source syntax analysis tool is locally integrated. The step of obtaining the element sequence obtained by performing lexical analysis on the expression of the business rule includes: calling the lexical analyzer to perform lexical analysis on the expression of the business rule, extracting expression elements in the expression, and obtaining an element sequence arranged in the order of the expression elements in the expression.

[0013] and / or

[0014] The local system integrates a parser generated by the open-source parser. Obtaining the abstract syntax tree of the expression includes: calling the parser to perform syntactic analysis on the element sequence based on the locally integrated expression syntactic description information to obtain the abstract syntax tree of the expression.

[0015] and / or

[0016] The system is locally integrated with a syntax tree interpreter generated by the open-source syntax analysis tool. The values ​​of the parameters represented by the leaf nodes are updated during the operation of the application system. Starting from the root node of the branch nodes in the abstract syntax tree, logical operations are performed on each branch node in the abstract syntax tree. This includes: calling the syntax tree interpreter based on the updated values ​​of the parameters represented by the leaf nodes during the operation of the application system, and performing logical operations on each branch node in the abstract syntax tree, starting from the root node of the branch nodes in the abstract syntax tree.

[0017] In one embodiment of the present invention, logical operations are performed on each branch node of the abstract syntax tree in the following manner:

[0018] Obtain the value of the parameter corresponding to the leaf node connected to the branch node;

[0019] Based on the values ​​of the obtained parameters, logical operations are performed according to the logical operation method represented by the branch node to obtain the node operation result of the branch node.

[0020] Update the values ​​of the parameters corresponding to the node operation results of this branch node;

[0021] If a branch node in the abstract syntax tree has a child node, then perform logical operations on the child node of that branch node in the abstract syntax tree.

[0022] If there are no child nodes of a branch node in the abstract syntax tree, the processing result of the business rule is obtained based on the operation results of each node and the logical operation method represented by each branch node.

[0023] In one embodiment of the present invention, a custom interface is provided locally;

[0024] If a rule registry is set up locally, in response to the custom interface receiving a rule definition request for a business rule, the business rule defined in the rule definition request is registered in the rule registry with the rule name carried in the rule definition request as the key and the expression carried in the rule definition request as the value.

[0025] and / or

[0026] If a function registry is set up locally, in response to the function definition request received by the custom interface, the custom function defined in the function definition request is registered in the function registry with the function name carried in the function definition request as the key and the function body carried in the function definition request as the value.

[0027] In one embodiment of the present invention, when the function registry is set locally, logical operations are performed on each branch node in the abstract syntax tree in the following manner:

[0028] If the logical operation represented by the branch node in the abstract syntax tree is a logical operation implemented by a custom function, then the custom function corresponding to the branch node is searched in the function registry.

[0029] Call the found custom function to perform logical operations.

[0030] In one embodiment of the present invention, after parsing the expression of the business rule based on locally integrated expression syntax description information in response to the execution operation of a business rule in the application system, and converting the expression into an abstract syntax tree based on the parsing result, the method further includes:

[0031] For the execution operation, a parameter container corresponding to the execution operation is created;

[0032] The parameter container stores the values ​​of all parameters in the application system.

[0033] According to another aspect of the present invention, a data processing apparatus is provided, the apparatus comprising:

[0034] The expression parsing module is used to respond to the execution operation of business rules in the application system, parse the expression of the business rule based on the locally integrated expression syntax description information, and convert the expression into an abstract syntax tree based on the parsing result. The abstract syntax tree includes: branch nodes and leaf nodes. The branch nodes represent the logical operation method of each expression in the expression, and the leaf nodes represent the parameters required for the logical operation method of the connected branch nodes.

[0035] The logic operation module is used to perform logical operations on each branch node in the abstract syntax tree, starting from the root node, based on the updated values ​​of the parameters represented by the leaf nodes during the operation of the application system, to obtain the execution result of the business rule.

[0036] In one embodiment of the present invention, the expression parsing module includes:

[0037] An element sequence obtaining unit is used to obtain an element sequence obtained by performing lexical analysis on the expression of the business rule, wherein the element sequence includes expression elements in the expression and is arranged in the order of the expression elements in the expression;

[0038] An abstract syntax tree obtaining unit is used to obtain an abstract syntax tree of the expression, wherein the abstract syntax tree is obtained by performing syntactic analysis on the element sequence based on locally integrated expression syntax description information.

[0039] In one embodiment of the present invention, a lexical analyzer generated by an open-source syntax analysis tool is locally integrated. The element sequence obtaining unit is specifically used to: call the lexical analyzer to perform lexical analysis on the expression of the business rule, extract the expression elements in the expression, and obtain an element sequence arranged in the order of the expression elements in the expression.

[0040] and / or

[0041] The local system integrates a parser generated by the open-source parser. The abstract syntax tree obtaining unit is specifically used to: call the parser to perform grammatical analysis on the element sequence based on the locally integrated expression grammar description information to obtain the abstract syntax tree of the expression.

[0042] and / or

[0043] The system is locally integrated with a syntax tree interpreter generated by the open-source syntax analysis tool. The logic operation module is specifically used to: call the syntax tree interpreter based on the updated values ​​of the parameters represented by the leaf nodes during the operation of the application system, and perform logical operations on each branch node of the abstract syntax tree, starting from the root node of the branch nodes.

[0044] In one embodiment of the present invention, logical operations are performed on each branch node of the abstract syntax tree in the following manner:

[0045] Obtain the value of the parameter corresponding to the leaf node connected to the branch node;

[0046] Based on the values ​​of the obtained parameters, logical operations are performed according to the logical operation method represented by the branch node to obtain the node operation result of the branch node.

[0047] Update the values ​​of the parameters corresponding to the node operation results of this branch node;

[0048] If a branch node in the abstract syntax tree has a child node, then perform logical operations on the child node of that branch node in the abstract syntax tree.

[0049] If there are no child nodes of a branch node in the abstract syntax tree, the processing result of the business rule is obtained based on the operation results of each node and the logical operation method represented by each branch node.

[0050] In one embodiment of the present invention, a custom interface is locally provided; the device further includes:

[0051] The rule registration module is used to register the business rule defined in the rule definition request in the rule registry in response to the rule definition request for business rules received by the custom interface, when a rule registry is set up locally, using the rule name carried in the rule definition request as the key and the expression carried in the rule definition request as the value.

[0052] and / or

[0053] The function registration module is used to, when a function registry is set up locally, respond to the function definition request received by the custom interface, register the custom function defined in the function definition request in the function registry with the function name carried in the function definition request as the key and the function body carried in the function definition request as the value.

[0054] In one embodiment of the present invention, when the function registry is set locally, logical operations are performed on each branch node in the abstract syntax tree in the following manner:

[0055] If the logical operation represented by the branch node in the abstract syntax tree is a logical operation implemented by a custom function, then the custom function corresponding to the branch node is searched in the function registry.

[0056] Call the found custom function to perform logical operations.

[0057] In one embodiment of the present invention, the apparatus further includes:

[0058] A container creation module is used to create a parameter container corresponding to the execution operation for the execution operation;

[0059] The parameter storage module is used to store the values ​​of all parameters in the application system in the parameter container.

[0060] According to another aspect of the present invention, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0061] Memory, used to store computer programs;

[0062] A processor, when executing a program stored in memory, implements any of the data processing methods described above.

[0063] According to another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and the computer program, when executed by a processor, implements any of the data processing methods described above.

[0064] According to another aspect of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform any of the data processing methods described above.

[0065] As can be seen from the above, the data processing method provided by the embodiments of the present invention, by integrating expression syntax description information locally, enables the business system to parse the expressions of business rules and convert them into an abstract syntax tree. The branch nodes in the abstract syntax tree can represent the logical operation methods of each expression, and the leaf nodes in the abstract syntax tree can represent the parameters required for the logical operation methods of the connected branch nodes. Based on such an abstract syntax tree, logical operations can be performed on each branch node in the abstract syntax tree based on the updated values ​​during the operation of the application system to obtain the execution result of the business rule. In this way, the business system can realize expression parsing and generate an abstract syntax tree based on the locally integrated expression syntax description information, and then perform logical operations on each branch node in the abstract syntax tree to obtain the execution result of the business rule. This process does not depend on a specific runtime environment, which can reduce the business system's dependence on a specific runtime environment. Attached Figure Description

[0066] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0067] Figure 1a This is a flowchart illustrating a data processing method provided in an embodiment of the present invention;

[0068] Figure 1b This is a schematic diagram of an abstract syntax tree provided in an embodiment of the present invention;

[0069] Figure 1c This is a flowchart illustrating a logical operation method provided in an embodiment of the present invention;

[0070] Figure 2 This is a flowchart illustrating an expression parsing method provided in an embodiment of the present invention;

[0071] Figure 3 This is a schematic diagram of the structure of a data processing device provided in an embodiment of the present invention;

[0072] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0073] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention.

[0074] The application scenarios of the data processing method provided in the embodiments of the present invention will be described below.

[0075] The data processing method provided by this invention can be applied to the processing of business rules such as e-commerce discount conditions and marketing strategies. It can also be applied to the processing of business rules such as branch judgment and condition execution in various automated processing processes such as data processing flow, form processing flow, etc. It can also be applied to the processing of business rules such as skill trigger conditions and game AI (Artificial Intelligence) behavior judgment logic in game systems.

[0076] The data processing method provided by this invention can also be applied to IoT devices, edge devices, and other devices with limited computing resources to process business rules such as temperature threshold judgment, humidity threshold judgment, air pressure threshold judgment, light intensity threshold judgment, and action linkage under different conditions. It can also be applied to data processing platforms such as low-code platforms, configuration centers, or policy platforms to process business rules.

[0077] The execution subject of the embodiments of the present invention will be described below.

[0078] The solutions provided in this invention can be applied to desktop computers, laptops, servers, edge devices, etc. For ease of description, the executing entity of this invention is referred to as a business system.

[0079] In one scenario, the business system can be integrated into the application system. For example, if the application system is a game system, the business system can be integrated into the game system. Similarly, if the application system is a temperature detection system within an IoT device, the business system can be integrated into the game system.

[0080] In another scenario, the business system can be an independent system, and the business system and application system can be deployed on different nodes. For example, the business system can be deployed on a strategy platform for processing business rules, and the application system can send execution requests to the strategy platform for the business rules in the application system, so that the business system can process data based on the business rules in the application system.

[0081] The data processing method provided in the embodiments of the present invention will be described in detail below.

[0082] In one embodiment of the present invention, a data processing method is provided. The method includes: responding to an execution operation of a business rule in an application system, parsing the expression of the business rule based on locally integrated expression syntax description information, and converting the expression into an abstract syntax tree based on the parsing result. The abstract syntax tree includes branch nodes and leaf nodes. The branch nodes represent the logical operation methods of each expression in the expression, and the leaf nodes represent the parameters required for the logical operation methods of the connected branch nodes. Based on the updated values ​​of the parameters represented by the leaf nodes during the operation of the application system, logical operations are performed on each branch node in the abstract syntax tree, starting from the root node, to obtain the execution result of the business rule.

[0083] As can be seen from the above, the data processing method provided by the embodiments of the present invention, by integrating expression syntax description information locally, enables the business system to parse the expressions of business rules and convert them into an abstract syntax tree. The branch nodes in the abstract syntax tree can represent the logical operation methods of each expression, and the leaf nodes in the abstract syntax tree can represent the parameters required for the logical operation methods of the connected branch nodes. Based on such an abstract syntax tree, logical operations can be performed on each branch node in the abstract syntax tree based on the updated values ​​during the operation of the application system to obtain the execution result of the business rule. In this way, the business system can realize expression parsing and generate an abstract syntax tree based on the locally integrated expression syntax description information, and then perform logical operations on each branch node in the abstract syntax tree to obtain the execution result of the business rule. This process does not depend on a specific runtime environment, which can reduce the business system's dependence on a specific runtime environment.

[0084] In one embodiment of the present invention, see Figure 1a A flowchart of a data processing method is provided, which includes the following steps S101-S102.

[0085] Step S101: In response to the execution operation of business rules in the application system, the expression of the business rule is parsed based on the locally integrated expression syntax description information, and the expression is converted into an abstract syntax tree based on the parsing result.

[0086] The abstract syntax tree includes: branch nodes and leaf nodes. Branch nodes represent the logical operation methods of each expression in the expression, and leaf nodes represent the parameters required for the logical operation methods of the connected branch nodes.

[0087] For example, if the expression is a + b × c, the generated abstract syntax tree can be referenced. Figure 1b Provides a schematic diagram of the abstract syntax tree structure. Figure 1bIn the abstract syntax tree (API), circular nodes represent branch nodes, and diamond-shaped nodes represent leaf nodes. The node 'a' in a leaf node indicates that the addition operation represented by the branch node with the plus sign (+) requires parameters 'a'. A branch node with the multiplication sign (×) connected to a branch node with the plus sign (+) is a child node of that branch node. A branch node with the plus sign (+) connected to a branch node with the multiplication sign (×) requires parameters obtained from logical operations performed on that branch node. The nodes 'b' and 'c' in the two leaf nodes connected to a branch node with the multiplication sign (×) indicate that the multiplication operation represented by that branch node requires parameters 'b' and 'c'.

[0088] The following is an explanation of the expression syntax description.

[0089] Business systems can store expression syntax description information through pre-defined syntax files, and then integrate these syntax files into the business system to achieve locally integrated expression syntax description information. For example, a syntax file can store the following:

[0090] expression

[0091] The section for "expression K_OR expression" contains syntactic descriptions of the OR logical expression.

[0092] The section containing the expression K_AND expression provides a syntactic description of the AND logical expression.

[0093] The section with left=arithmeticExpression K_IS K_NOT and right=arithmeticExpression contains the syntax description information for identity logical expressions.

[0094] The section with `| Left=arithmeticExpression K_ IS right=arithmeticExpression` contains syntactic description information for negation logical expressions.

[0095] For example, a grammar file can store the following:

[0096] arithmeticExpression

[0097] : arithmeticExpression op=(ADD | SUB) arithmeticTerm

[0098] The above content contains the syntax description information for addition and subtraction logical operation expressions.

[0099] | arithmeticTerm ;

[0101] arithmeticTerm

[0102] : arithmeticTerm op=(MUL | DIV | MOD) primary

[0103] The above content contains the syntax description information for multiplication, division, and modulo logical operation expressions.

[0104] The syntax description information recorded in the syntax file mentioned above is DSL (Domain-Specific Language) syntax rules, which supports features such as expression precedence, nested structures, function calls, and chained member access. The priority of the syntax description information for each expression can be recorded by arranging the order of the syntax description information. For example, the priority of the syntax description information can be represented by a descending order of priority, or it can be represented by a ascending order of priority. This embodiment of the invention does not impose any limitations on this approach.

[0105] In this way, by integrating the above expression syntax description information, the expressions processed by the business system can be defined through a concise and clear custom syntax. For example, the expression "a is not null and b in [1,2,3]" means that the value of parameter a is not null and the value of parameter b is in the set [1,2,3]. Such an expression language makes it easier for personnel configuring business rules to view and write expressions for business rules. This expression language is closer to natural language, greatly improving the readability and maintainability of expressions for business rules and reducing the development cost of expressions for business rules. For another example, the expression language defined by the above expression syntax description information can be called SFEL (Simple Flow Expression Language).

[0106] The following describes the situation in which step S101 responds to the execution of business rules in the application system.

[0107] When the business system is an independent system, it can trigger the execution of business rules in the application system after receiving an execution request for business rules from the application system.

[0108] When a business system is integrated into an application system, the business system can trigger the execution of business rules in the application system according to preset rules.

[0109] The implementation method of step S101 will be described in the following embodiments, and will not be detailed here.

[0110] Step S102: Based on the updated values ​​of the parameters represented by the leaf nodes during the operation of the application system, starting from the root node of the branch nodes in the abstract syntax tree, perform logical operations on each branch node in the abstract syntax tree to obtain the execution result of the business rule.

[0111] The following is combined Figure 1c A flowchart illustrating a logical operation method is provided to explain the implementation of step S102. The business system can perform logical operations on each branch node in the abstract syntax tree according to the following steps S1021-S1026:

[0112] Step S1021: Obtain the parameter values ​​corresponding to the leaf nodes connected to the branch node.

[0113] In one implementation, the parameter value can be found in the parameter container corresponding to the above-mentioned operation based on the parameter corresponding to the leaf node connected to the branch node.

[0114] In this context, the parameter container can store parameters and their values ​​as key-value pairs, with the parameter as the key and the parameter value as the value. For example, the parameter container can be a FlowContext object.

[0115] The method for creating the parameter container can be found in the following example, which will not be detailed here.

[0116] Step S1022: Based on the obtained parameter values, perform logical operations according to the logical operation method represented by the branch node to obtain the node operation result of the branch node.

[0117] In one implementation, based on the value of the obtained parameter, the access method corresponding to the type of the branch node is called according to the type of the branch node to perform logical operations according to the logical operation mode represented by the branch node, so as to obtain the node operation result of the branch node.

[0118] The types of branch nodes can include: function call type, variable declaration type, expression statement type, binary expression type, etc. For each type of branch node, the corresponding `visit` method is called to perform logical operations according to the logical operation method represented by that branch node.

[0119] The results of logical operations performed on different branch nodes will vary. For example, the results may be parameter values, yes / no statements, or no / no statements. Different types of branch nodes can be used to perform logical operations such as conditional statements, Boolean operations, assignment operations, and function execution.

[0120] Step S1023: Update the values ​​of the parameters corresponding to the node operation results of the branch node.

[0121] One implementation involves updating the values ​​of the parameters corresponding to the node operation results in the parameter container. If the parameter container includes the parameters corresponding to the node operation results, the values ​​of the parameters corresponding to the node operation results in the parameter container are updated to the values ​​obtained in step S1022. If the parameter container does not include the parameters corresponding to the node operation results, the values ​​of the parameters corresponding to the node operation results of the branch node are stored in the parameter container using the parameters corresponding to the node operation results as the keys and the values ​​obtained in step S1022 as the values.

[0122] Step S1024: Determine whether there are child nodes of the branch node in the abstract syntax tree.

[0123] If a branch node in the abstract syntax tree has a child node, that is, if the condition is met, then step S1025 is executed to perform logical operations on the child node of the branch node in the abstract syntax tree.

[0124] If there is no child node of the branch node in the abstract syntax tree, that is, the judgment is negative, then step S1026 is executed to obtain the processing result of the business rule based on the operation results of each node and the logical operation method represented by each branch node.

[0125] Step S1025: Perform logical operations on the child nodes of the branch node in the abstract syntax tree.

[0126] In step S1025, the above-mentioned child node is taken as a new branch node that needs to be logically operated on, and the process returns to step S1021 to obtain a new branch node that needs to be logically operated on. Then, steps S1021-S1024 are executed sequentially to perform logical operations on the new branch node that needs to be logically operated on.

[0127] Step S1026: Based on the obtained operation results of each node and the logical operation method represented by each branch node, obtain the processing result of the business rule.

[0128] In one implementation, in step S1025, a recursive call can be used. If there are no child nodes of a branch node in the abstract syntax tree, it means that the logical operation of each branch node has been completed. Then, based on the node operation results corresponding to each branch node and the logical operation method represented by each branch node, a logical operation is performed on the operation result of each node to obtain the processing result of the business rule.

[0129] For example, with Figure 1b Taking the abstract syntax tree shown as an example, with 'a' taking the value 9, 'b' taking the value 5, and 'c' taking the value 2, after performing a logical operation on the branch node with the plus sign (+), the node operation result is 9. The branch node with the plus sign (+) has a child node with the multiplication sign (×). Therefore, we need to perform a logical operation on the branch node with the multiplication sign (×), which gives the node operation result 5 × 2 = 10. The branch node with the multiplication sign (×) has no child nodes. The node operation result of the branch node with the plus sign (+) is 9, and the node operation result of the branch node with the multiplication sign (×) is 10. The logical operation of the branch node with the multiplication sign (×) has been completed, but the logical operation of the branch node with the plus sign (+) has not been completed and no real result has been obtained. Therefore, it is necessary to perform a logical addition operation on the node operation result 10 of the child node connected to the branch node with the plus sign (+) and the node operation result 9 of the branch node with the plus sign (+), so as to obtain the processing result of the business rule as 19.

[0130] In this way, by updating the parameter values ​​corresponding to the node operation results of the branch node each time a logical operation is performed according to the logical operation method represented by the branch node, the accuracy of each logical operation can be guaranteed.

[0131] As can be seen from the above, the data processing method provided by the embodiments of the present invention, by integrating expression syntax description information locally, enables the business system to parse the expressions of business rules and convert them into an abstract syntax tree. The branch nodes in the abstract syntax tree can represent the logical operation methods of each expression, and the leaf nodes in the abstract syntax tree can represent the parameters required for the logical operation methods of the connected branch nodes. Based on such an abstract syntax tree, logical operations can be performed on each branch node in the abstract syntax tree based on the updated values ​​during the operation of the application system to obtain the execution result of the business rule. In this way, the business system can realize expression parsing and generate an abstract syntax tree based on the locally integrated expression syntax description information, and then perform logical operations on each branch node in the abstract syntax tree to obtain the execution result of the business rule. This process does not depend on a specific runtime environment, which can reduce the business system's dependence on a specific runtime environment.

[0132] Furthermore, after step S102, the business system can perform action triggering operations based on the execution results of the obtained business rules. The action triggering operation performed by the business system can be sending the processing result to the application system, so that the application system can execute the operation corresponding to the processing result in the business rule. For example, in the case of a game system, if the business rule includes a condition that the judgment result of business rule A is yes, then the game AI is controlled to execute behavior A; if the application system receives a processing result indicating that the judgment result of business rule A is yes, then the game AI is controlled to execute behavior A. For example, in the case of a temperature control system in an IoT device, if the business rule includes a condition that the judgment result of a business rule indicating that the temperature is greater than or equal to temperature A is yes, then temperature control method A is used for temperature control; if the business rule includes a condition that the judgment result of a business rule indicating that the temperature is greater than or equal to temperature A is no, then temperature control method B is used for temperature control; if the application system receives a condition that the judgment result of a business rule indicating that the temperature is greater than or equal to temperature A is no, then temperature control method B is used for temperature control.

[0133] In one embodiment of the present invention, after step S101, the business system can establish a parameter container corresponding to the execution operation for the execution operation, and store the values ​​of all parameters in the application system in the parameter container.

[0134] In one implementation, for each execution operation, the business system can create a FlowContext object in dedicated memory as a parameter container for that execution operation, and store the values ​​of all parameters in the application system in the parameter container.

[0135] The business system can receive execution requests for business rules from multiple different application systems, trigger the execution of business rules for different application systems, and establish independent parameter containers. This enables scope isolation for the execution of business rules from different application systems, reduces interference between parameters involved in different execution operations, and improves the security of data processing.

[0136] The following explains how step S101 parses the expression to obtain the abstract syntax tree.

[0137] In one embodiment of the present invention, step S101 can be implemented by steps A and B.

[0138] Step A: Obtain the element sequence obtained by performing lexical analysis on the expression of the business rule.

[0139] The element sequence includes the expression elements in the expression and is arranged in the order in which the expression elements are in the expression.

[0140] Step B: Obtain the abstract syntax tree of the expression.

[0141] The abstract syntax tree is obtained by performing syntactic analysis on the element sequence based on locally integrated expression syntax description information.

[0142] For details on how to implement steps A and B, please refer to the following: Figure 2 The provided examples.

[0143] This decouples the steps of parsing the expressions of business rules from the steps of converting the expressions into an abstract syntax tree based on the parsing results, facilitating the maintenance of the business system. Furthermore, by obtaining the element sequence through lexical analysis of the expressions, the information used to generate the abstract syntax tree can be made more concise, reducing the computational resources required for data processing.

[0144] In another embodiment of the present invention, see Figure 2 A flowchart of an expression parsing method is provided, wherein step A can be implemented by step S1011 and / or step B can be implemented by step S1012 and / or step S102 can be implemented by step S1027.

[0145] Step S1011: Call the lexical analyzer to perform lexical analysis on the expression of the business rule, extract the expression elements in the expression, and obtain the element sequence arranged in the order of the expression elements in the expression.

[0146] This includes a locally integrated lexical analyzer generated by an open-source parsing tool. For example, the open-source parsing tool could be ANTLR (an open-source parsing tool).

[0147] In one implementation, the lexical analyzer can identify expression elements in the expression of the business rule and arrange the identified elements in the order of the expression elements in the expression to generate an element sequence.

[0148] For example, the generated sequence of elements can be in the form of a sequence of tokens. Expression elements can include identifiers, operators, numbers, parentheses, and keywords, etc.

[0149] Step S1012: Call the parser to perform syntactic analysis on the element sequence based on the locally integrated expression syntactic description information to obtain the abstract syntax tree of the expression.

[0150] It includes a locally integrated parser generated by an open-source parser tool.

[0151] In one implementation, the parser can determine the syntax of each element sequence based on the element sequence and the locally integrated expression syntax description information, determine the parameters that the expression elements belonging to logical operations depend on and / or other expression elements belonging to logical operations based on the order of the expression elements belonging to logical operations in the element sequence, and then generate an abstract syntax tree based on the dependency relationship of the expression elements belonging to logical operations.

[0152] Furthermore, in step S1012, when the business system calls the parser to perform syntactic analysis on the element sequence based on the locally integrated expression syntactic description information to obtain an abstract syntax tree, it can further detect syntax errors in the expression. If a syntax error is detected, an error message is displayed for the expression with the syntax error.

[0153] Step S1027: Call the syntax tree interpreter based on the updated values ​​of the parameters represented by the leaf nodes during the application system operation, and start from the root node of the branch nodes in the abstract syntax tree to perform logical operations on each branch node in the abstract syntax tree.

[0154] It includes a syntax tree interpreter generated by an open-source syntax analysis tool.

[0155] In one implementation, the business system can call the syntax tree interpreter, which then performs logical operations on each branch node in the abstract syntax tree according to steps S1021-S1026 to obtain the processing result of the business rules.

[0156] Furthermore, during the process of the business system calling the syntax tree interpreter to perform logical operations, system runtime errors can be detected. For example, runtime errors can include: data type errors, reference errors, memory overflow errors, etc.

[0157] During the process of the business system calling the syntax tree interpreter to perform logical operations on each branch node, the syntax tree interpreter can convert list literals into Java.List (a Java (a programming language) list) to support high-concurrency scenarios.

[0158] As can be seen from the above, the lexical analyzer, syntax analyzer, and syntax tree interpreter generated by the open-source syntax analysis tool perform lexical analysis, syntax analysis, and logical operations respectively. This enables module decoupling for lexical analysis, syntax analysis, and syntax tree evaluation operations, allowing for lightweight data processing. This further reduces the computing resources required for data processing and facilitates integration, embedding, or deployment into lightweight application systems.

[0159] In one embodiment of the present invention, the business system has a custom interface set locally.

[0160] If a rule registry is set up locally, in response to a rule definition request for a business rule received by a custom interface, the business rule defined in the rule definition request is registered in the rule registry with the rule name carried in the rule definition request as the key and the expression carried in the rule definition request as the value.

[0161] The rule registry can be implemented based on ConcurrentHashMap.

[0162] Developers can register business rules and their corresponding expressions in the rule registry by calling a custom interface and sending a rule definition request to the custom interface.

[0163] If the business rule defined in the registration rule definition request is an existing business rule in the rule registry, then the expression corresponding to the existing business rule in the rule registry can be updated.

[0164] If a function registry is set up locally, in response to a function definition request received by a custom interface, the custom function defined in the function definition request is registered in the function registry with the function name carried in the function definition request as the key and the function body carried in the function definition request as the value.

[0165] Developers of business rules can register custom functions in the function registry by calling a custom interface and sending a function definition request to the custom interface.

[0166] If the custom function requested by the registration rule definition is an existing custom function in the function registry, then the function body corresponding to the existing custom function in the function registry can be updated.

[0167] In this way, the custom interface enables the business system to support hot updates of custom functions and / or business rule expressions, making it easy to update custom functions and / or business rules when the business rules of the business system change.

[0168] In another embodiment of this application, when a function registry is set up locally, logical operations are performed on each branch node in the abstract syntax tree in the following manner:

[0169] If the logical operation represented by a branch node in the abstract syntax tree is implemented by a user-defined function, then the user-defined function corresponding to the branch node is searched in the function registry. The searched user-defined function is then called to perform the logical operation.

[0170] In one implementation, the business system can call the syntax tree interpreter to search for the custom function corresponding to the branch node in the function registry. The found custom function is then called to perform logical operations.

[0171] The syntax tree interpreter can perform logical operations based on the steps S1021-S1023 above. The difference is that the logical operation represented by the branch node needs to be performed by calling the found custom function.

[0172] The following example illustrates user-defined functions.

[0173] For example, developers of business rules can register custom functions in the function registry using the following function definition request:

[0174] registerFunction("isMember", id -> id.startsWith("abc"));

[0175] Here, registerFunction indicates the registration of a custom function, "isMember" is the name of the custom function, and id -> id.startsWith("abc") is the function body of the custom function.

[0176] By calling the custom function mentioned above, a logical operation can be performed to determine whether the value of the parameter id starts with "abc".

[0177] In this way, when performing logical operations on the branches and nodes in the abstract syntax tree, the user-defined function can be called by looking up the corresponding user-defined function in the function registry, thereby improving the flexibility of function calls when the business system processes data.

[0178] In one embodiment of the present invention, in response to the startup of the business system, the business system calls an open-source syntax analysis tool to generate a lexical analyzer, calls the open-source syntax analysis tool to generate a syntax analyzer based on locally integrated expression syntax description information, and calls the open-source syntax analysis tool to generate a syntax tree interpreter.

[0179] Corresponding to the above data processing method, this embodiment of the invention also provides a data processing device.

[0180] In one embodiment of the present invention, see Figure 3 A schematic diagram of a data processing apparatus is provided, the apparatus comprising:

[0181] The expression parsing module 301 is used to respond to the execution operation of business rules in the application system, parse the expression of the business rule based on the locally integrated expression syntax description information, and convert the expression into an abstract syntax tree based on the parsing result. The abstract syntax tree includes: branch nodes and leaf nodes. The branch nodes represent the logical operation method of each expression in the expression, and the leaf nodes represent the parameters required for the logical operation method of the connected branch nodes.

[0182] The logic operation module 302 is used to perform logical operations on each branch node in the abstract syntax tree, starting from the root node in the branch node of the abstract syntax tree, to obtain the execution result of the business rule based on the updated values ​​of the parameters represented by the leaf nodes during the operation of the application system.

[0183] As can be seen from the above, the data processing method provided by the embodiments of the present invention, by integrating expression syntax description information locally, enables the business system to parse the expressions of business rules and convert them into an abstract syntax tree. The branch nodes in the abstract syntax tree can represent the logical operation methods of each expression, and the leaf nodes in the abstract syntax tree can represent the parameters required for the logical operation methods of the connected branch nodes. Based on such an abstract syntax tree, logical operations can be performed on each branch node in the abstract syntax tree based on the updated values ​​during the operation of the application system to obtain the execution result of the business rule. In this way, the business system can realize expression parsing and generate an abstract syntax tree based on the locally integrated expression syntax description information, and then perform logical operations on each branch node in the abstract syntax tree to obtain the execution result of the business rule. This process does not depend on a specific runtime environment, which can reduce the business system's dependence on a specific runtime environment.

[0184] In one embodiment of the present invention, the expression parsing module includes: an element sequence obtaining unit, configured to obtain an element sequence obtained by performing lexical analysis on an expression of a business rule, wherein the element sequence includes expression elements in the expression and is arranged in the order of the expression elements in the expression; and an abstract syntax tree obtaining unit, configured to obtain an abstract syntax tree of the expression, wherein the abstract syntax tree is obtained by performing syntactic analysis on the element sequence based on locally integrated expression syntax description information.

[0185] This decouples the steps of parsing the expressions of business rules from the steps of converting the expressions into an abstract syntax tree based on the parsing results, facilitating the maintenance of the business system. Furthermore, by obtaining the element sequence through lexical analysis of the expressions, the information used to generate the abstract syntax tree can be made more concise, reducing the computational resources required for data processing.

[0186] In one embodiment of the present invention, a lexical analyzer generated by an open-source syntax analysis tool is locally integrated. An element sequence acquisition unit is specifically used to: call the lexical analyzer to perform lexical analysis on the expression of the business rule, extract expression elements from the expression, and obtain an element sequence arranged in the order of the expression elements in the expression; and / or a syntax analyzer generated by an open-source syntax analysis tool is locally integrated. An abstract syntax tree acquisition unit is specifically used to: call the syntax analyzer to perform syntax analysis on the element sequence based on the locally integrated expression syntax description information, and obtain an abstract syntax tree of the expression; and / or a syntax tree interpreter generated by an open-source syntax analysis tool is locally integrated. A logic operation module is specifically used to: call the syntax tree interpreter to perform logical operations on each branch node of the abstract syntax tree, starting from the root node of the branch nodes, based on the updated values ​​of the parameters represented by the leaf nodes during the application system's operation.

[0187] As can be seen from the above, the lexical analyzer, syntax analyzer, and syntax tree interpreter generated by the open-source syntax analysis tool perform lexical analysis, syntax analysis, and logical operations respectively. This enables module decoupling for lexical analysis, syntax analysis, and syntax tree evaluation operations, allowing for lightweight data processing. This further reduces the computing resources required for data processing and facilitates integration, embedding, or deployment into lightweight application systems.

[0188] In one embodiment of the present invention, logical operations are performed on each branch node in the abstract syntax tree in the following manner: obtaining the parameter values ​​corresponding to the leaf nodes connected to the branch node; performing logical operations based on the obtained parameter values ​​according to the logical operation method represented by the branch node to obtain the node operation result of the branch node; updating the parameter values ​​corresponding to the node operation result of the branch node; if there are child nodes of the branch node in the abstract syntax tree, performing logical operations on the child nodes of the branch node in the abstract syntax tree; if there are no child nodes of the branch node in the abstract syntax tree, obtaining the processing result of the business rule according to the obtained node operation results and the logical operation method represented by each branch node.

[0189] In this way, by updating the parameter values ​​corresponding to the node operation results of the branch node each time a logical operation is performed according to the logical operation method represented by the branch node, the accuracy of each logical operation can be guaranteed.

[0190] In one embodiment of the present invention, a custom interface is locally configured; the apparatus further includes: a rule registration module, configured to, in the case of a locally configured rule registry, in response to a rule definition request for a business rule received by the custom interface, register the business rule defined in the rule definition request in the rule registry using the rule name carried in the rule definition request as the key and the expression carried in the rule definition request as the value; and / or a function registration module, configured to, in the case of a locally configured function registry, in response to a function definition request received by the custom interface, register the custom function defined in the function definition request in the function registry using the function name carried in the function definition request as the key and the function body carried in the function definition request as the value.

[0191] In this way, the custom interface enables the business system to support hot updates of custom functions and / or business rule expressions, making it easy to update custom functions and / or business rules when the business rules of the business system change.

[0192] In one embodiment of the present invention, when a function registry is set locally, logical operations are performed on each branch node in the abstract syntax tree in the following manner: if the logical operation represented by the branch node in the abstract syntax tree is a logical operation implemented by a custom function, then the custom function corresponding to the branch node is searched in the function registry; and the searched custom function is called to perform the logical operation.

[0193] In this way, when performing logical operations on the branches and nodes in the abstract syntax tree, the user-defined function can be called by looking up the corresponding user-defined function in the function registry, thereby improving the flexibility of function calls when the business system processes data.

[0194] In one embodiment of the present invention, the apparatus further includes: a container creation module, used to create a parameter container corresponding to the execution operation for the execution operation; and a parameter storage module, used to store the values ​​of all parameters in the application system in the parameter container.

[0195] The business system can receive execution requests for business rules from multiple different application systems, trigger the execution of business rules for different application systems, and establish independent parameter containers. This enables scope isolation for the execution of business rules from different application systems, reduces interference between parameters involved in different execution operations, and improves the security of data processing.

[0196] This invention also provides an electronic device, such as... Figure 4 As shown, it includes a processor 401, a communication interface 402, a memory 403, and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404.

[0197] Memory 403 is used to store computer programs;

[0198] The processor 401, when executing the program stored in the memory 403, implements any of the data processing methods described above.

[0199] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0200] The communication interface is used for communication between the aforementioned terminal and other devices.

[0201] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0202] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0203] In another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, it implements any of the data processing methods described in the above embodiments.

[0204] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform any of the data processing methods described in the above embodiments.

[0205] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0206] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0207] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, electronic devices, storage media, and computer program products are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0208] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.

Claims

1. A data processing method, characterized in that, The method includes: In response to the execution operation of business rules in the application system, the expression of the business rule is parsed based on the locally integrated expression syntax description information, and the expression is converted into an abstract syntax tree based on the parsing result. The abstract syntax tree includes: branch nodes and leaf nodes. The branch nodes represent the logical operation method of each expression in the expression, and the leaf nodes represent the parameters required for the logical operation method of the connected branch nodes. Based on the updated values ​​of the parameters represented by the leaf nodes during the operation of the application system, logical operations are performed on each branch node in the abstract syntax tree, starting from the root node, to obtain the execution result of the business rule.

2. The method according to claim 1, characterized in that, The expression syntax description information based on local integration is used to parse the expression of the business rule, including: Obtain an element sequence obtained by performing lexical analysis on the expression of the business rule, wherein the element sequence includes expression elements in the expression and is arranged in the order of the expression elements in the expression; Obtain the abstract syntax tree of the expression, wherein the abstract syntax tree is obtained by performing syntactic analysis on the element sequence based on locally integrated expression syntax description information.

3. The method according to claim 2, characterized in that, The system is locally integrated with a lexical analyzer generated by an open-source syntax analysis tool. The step of obtaining the element sequence obtained by performing lexical analysis on the expression of the business rule includes: calling the lexical analyzer to perform lexical analysis on the expression of the business rule, extracting the expression elements in the expression, and obtaining an element sequence arranged in the order of the expression elements in the expression. and / or The local system integrates a parser generated by the open-source parser. Obtaining the abstract syntax tree of the expression includes: calling the parser to perform syntactic analysis on the element sequence based on the locally integrated expression syntactic description information to obtain the abstract syntax tree of the expression. and / or The system is locally integrated with a syntax tree interpreter generated by the open-source syntax analysis tool. The values ​​of the parameters represented by the leaf nodes are updated during the operation of the application system. Starting from the root node of the branch nodes in the abstract syntax tree, logical operations are performed on each branch node in the abstract syntax tree. This includes: calling the syntax tree interpreter based on the updated values ​​of the parameters represented by the leaf nodes during the operation of the application system, and performing logical operations on each branch node in the abstract syntax tree, starting from the root node of the branch nodes in the abstract syntax tree.

4. The method according to claim 1, characterized in that, Logical operations are performed on each branch node of the abstract syntax tree in the following manner: Obtain the value of the parameter corresponding to the leaf node connected to the branch node; Based on the values ​​of the obtained parameters, logical operations are performed according to the logical operation method represented by the branch node to obtain the node operation result of the branch node. Update the values ​​of the parameters corresponding to the node operation results of this branch node; If a branch node in the abstract syntax tree has a child node, then perform logical operations on the child node of that branch node in the abstract syntax tree. If there are no child nodes of a branch node in the abstract syntax tree, the processing result of the business rule is obtained based on the operation results of each node and the logical operation method represented by each branch node.

5. The method according to claim 1, characterized in that, A custom interface is configured locally; If a rule registry is set up locally, in response to the custom interface receiving a rule definition request for a business rule, the business rule defined in the rule definition request is registered in the rule registry with the rule name carried in the rule definition request as the key and the expression carried in the rule definition request as the value. and / or If a function registry is set up locally, in response to the function definition request received by the custom interface, the custom function defined in the function definition request is registered in the function registry with the function name carried in the function definition request as the key and the function body carried in the function definition request as the value.

6. The method according to claim 5, characterized in that, If the function registry is configured locally, logical operations are performed on each branch node of the abstract syntax tree as follows: If the logical operation represented by the branch node in the abstract syntax tree is a logical operation implemented by a custom function, then the custom function corresponding to the branch node is searched in the function registry. Call the found custom function to perform logical operations.

7. The method according to any one of claims 1-6, characterized in that, After parsing the expression of the business rule based on locally integrated expression syntax description information in response to the execution operation of a business rule in the application system, and converting the expression into an abstract syntax tree based on the parsing result, the method further includes: For the execution operation, a parameter container corresponding to the execution operation is created; The parameter container stores the values ​​of all parameters in the application system.

8. A data processing apparatus, characterized in that, The device includes: The expression parsing module is used to respond to the execution operation of business rules in the application system, parse the expression of the business rule based on the locally integrated expression syntax description information, and convert the expression into an abstract syntax tree based on the parsing result. The abstract syntax tree includes: branch nodes and leaf nodes. The branch nodes represent the logical operation method of each expression in the expression, and the leaf nodes represent the parameters required for the logical operation method of the connected branch nodes. The logic operation module is used to perform logical operations on each branch node in the abstract syntax tree, starting from the root node, based on the updated values ​​of the parameters represented by the leaf nodes during the operation of the application system, to obtain the execution result of the business rule.

9. The apparatus according to claim 8, characterized in that, The expression parsing module includes: an element sequence acquisition unit, used to acquire an element sequence obtained by performing lexical analysis on the expression of the business rule, wherein the element sequence includes expression elements in the expression and is arranged in the order of the expression elements in the expression; and an abstract syntax tree acquisition unit, used to acquire an abstract syntax tree of the expression, wherein the abstract syntax tree is obtained by performing syntactic analysis on the element sequence based on locally integrated expression syntax description information. and / or The system integrates a lexical analyzer generated by an open-source syntax analysis tool. The element sequence acquisition unit is specifically used to: call the lexical analyzer to perform lexical analysis on the expression of the business rule, extract expression elements from the expression, and obtain an element sequence arranged in the order of the expression elements in the expression; and / or integrates a syntax analyzer generated by the open-source syntax analysis tool. The abstract syntax tree acquisition unit is specifically used to: call the syntax analyzer to perform syntax analysis on the element sequence based on the locally integrated expression syntax description information, and obtain an abstract syntax tree of the expression; and / or integrates a syntax tree interpreter generated by the open-source syntax analysis tool. The logical operation module is specifically used to: call the syntax tree interpreter to perform logical operations on each branch node of the abstract syntax tree, starting from the root node of the branch nodes, based on the updated values ​​of the parameters represented by the leaf nodes during the operation of the application system. and / or Logical operations are performed on each branch node in the abstract syntax tree as follows: The parameter values ​​corresponding to the leaf nodes connected to the branch node are obtained; based on the obtained parameter values, logical operations are performed according to the logical operation method represented by the branch node to obtain the node operation result of the branch node; the parameter values ​​corresponding to the node operation result of the branch node are updated; if there are child nodes of the branch node in the abstract syntax tree, logical operations are performed on the child nodes of the branch node in the abstract syntax tree; if there are no child nodes of the branch node in the abstract syntax tree, the processing result of the business rule is obtained according to the obtained node operation results and the logical operation method represented by each branch node. and / or The device further includes: a rule registration module, configured to, in the case of a locally configured rule registry, register the business rule defined in the rule definition request in the rule registry in response to the rule definition request received by the custom interface, using the rule name carried in the rule definition request as the key and the expression carried in the rule definition request as the value; and / or a function registration module, configured to, in the case of a locally configured function registry, register the custom function defined in the function definition request in the function registry in response to the function definition request received by the custom interface, using the function name carried in the function definition request as the key and the function body carried in the function definition request as the value; and / or If the function registry is set up locally, logical operations are performed on each branch node in the abstract syntax tree in the following manner: if the logical operation represented by the branch node in the abstract syntax tree is a logical operation implemented by a custom function, then the custom function corresponding to the branch node is searched in the function registry; the searched custom function is called to perform the logical operation. and / or The device further includes: a container creation module, used to create a parameter container corresponding to the execution operation for the execution operation; and a parameter storage module, used to store the values ​​of all parameters in the application system in the parameter container.

10. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method described in any one of claims 1-7.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-7.