Method and device for realizing decision table component, equipment, storage medium and program product

By supporting cell information of variables, residual and empty types in the decision table component, the problem of cumbersome configuration of existing decision table components and the inability to implement variable comparison and bottom-up rules is solved, and a simpler configuration process and more efficient Policy execution.

CN119473286APending Publication Date: 2025-02-18JINGDONG TECH HLDG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411534578.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The decision table component in the existing decision engine has the following problems when configuring and executing: The cell information of the condition column and the assignment column can only be numerical constants, numerical intervals or string constants, resulting in cumbersome configuration of the decision table and the inability to achieve variable comparison. Direct configuration and guarantee rules.

Method used

In the decision table component, the types of cell information supported are variables, leftover or empty. By configuring other cases through the leftover operation, the comparison between variables and the direct configuration of the bottom-up rules can be achieved.

Benefits of technology

The configuration process of decision tables is simplified, dynamic matching of variables and compatibility of bottom-up strategies is achieved, and the cost of policy review and testing is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473286A_ABST
    Figure CN119473286A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a method and device for realizing a decision table component, equipment, a storage medium and a program product. The method comprises: obtaining configuration information of a decision table, the decision table comprising a header and a plurality of cells corresponding to the header, the configuration information comprising header information of the header and cell information of the plurality of cells, the type of the cell information comprising at least one of a variable, a remainder or an air; compiling the cell information of the plurality of cells according to the type of the header information and the type of the cell information of the plurality of cells to form an executable expression of the plurality of cells; and executing the executable expressions of the plurality of cells. Therefore, a complex decision table can be realized, the configuration process of the strategy is simplified, dynamic matching of variables is realized, the strategy is compatible, the time for rechecking and testing the strategy is shortened, and the cost for rechecking and testing the strategy is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Example embodiments of the present disclosure generally relate to the field of computer technology, and more particularly, to methods, apparatuses, electronic devices, computer-readable storage media, and computer program products for implementing a decision table component. Background Art

[0002] With the development of computer technology, decision engines have been widely used in various industries. Decision engines support users to use various rule components to visually configure the construction of decision flows to achieve risk business or evaluation business. In decision engines, decision tables are widely used components. With the help of decision table components, users can configure the required decision rules, so as to conveniently execute decision processes such as risk business. Summary of the invention

[0003] In a first aspect of the present disclosure, a method for implementing a decision table component is provided. The method comprises: obtaining configuration information of a decision table, the decision table comprising a table header and a plurality of cells corresponding to the table header, the configuration information comprising table header information of the table header and cell information of the plurality of cells, the type of the cell information comprising at least one of a variable, a modulo, or a null; compiling the cell information of the plurality of cells according to the type of the table header information and the type of the cell information of the plurality of cells to form executable expressions of the plurality of cells; and executing the executable expressions of the plurality of cells.

[0004] In a second aspect of the present disclosure, a device for implementing a decision table component is provided. The device includes: an acquisition module configured to acquire configuration information of a decision table, the decision table including a table header and a plurality of cells corresponding to the table header, the configuration information including table header information of the table header and cell information of the plurality of cells, the type of the cell information including at least one of a variable, a modulo, or a null; a compilation module configured to compile the cell information of the plurality of cells according to the type of the table header information and the type of the cell information of the plurality of cells to form executable expressions of the plurality of cells; and an execution module configured to execute the executable expressions of the plurality of cells.

[0005] In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When the instructions are executed by the at least one processing unit, the electronic device executes the method of the first aspect.

[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the medium, and when the computer program is executed by a processor, the method of the first aspect is implemented.

[0007] In a fifth aspect of the present disclosure, a computer program product is provided, which includes a computer program, wherein when the computer program is executed by a processor, the method according to the first aspect of the present disclosure is implemented.

[0008] It should be understood that the content described in this section is not intended to limit the key features or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In the following, in conjunction with the accompanying drawings and with reference to the following detailed description, the above and other features, advantages and aspects of various implementations of the present disclosure will become more apparent. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0010] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;

[0011] Figure 2 A flowchart showing a method for a decision table component according to some embodiments of the present disclosure is shown;

[0012] Figure 3A A schematic diagram showing a complex decision table component according to some embodiments of the present disclosure;

[0013] Figure 3B A schematic diagram of a configuration interface of a complex decision table component according to some embodiments of the present disclosure is shown;

[0014] Figure 4 A flowchart of a method of executing an executable expression according to some embodiments of the present disclosure;

[0015] Figure 5 A structural diagram of a class for a decision table component according to some embodiments of the present disclosure is shown;

[0016] Figure 6 A schematic structural block diagram showing an apparatus for implementing a decision table component according to some embodiments of the present disclosure; and

[0017] Figure 7 A block diagram of a computing device is shown in which one or more embodiments of the present disclosure may be implemented. DETAILED DESCRIPTION

[0018] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0019] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.

[0020] It should be noted that the acquisition, storage and application of user personal information involved in the technical solution of the present disclosure are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0021] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0022] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information, so that the user can independently choose whether to provide personal information to software or hardware such as electronic devices, applications, servers or storage media that execute operations of the technical solution of the present disclosure based on the prompt message.

[0023] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information is sent to the user in a manner such as a pop-up window, in which the prompt information can be presented in text form. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0024] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation to the embodiments of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the embodiments of the present disclosure.

[0025] As used herein, the term "decision engine" refers to an engine used in, for example, risk control decision platforms for underlying policy configuration and execution. Decision engines generally include components such as variable libraries, variable segments, rules & rule sets, decision trees, decision tables, scoring models, code blocks, business processes, etc.

[0026] The term "variable library" refers to the component that stores variable information in the decision engine. Users can add new variables to the variable library.

[0027] The term "rule component" refers to the container used to assemble different policy types in the decision engine, such as decision flow, scorecard, policy rule, wizard rule, segmentation, etc.

[0028] The term "variable" refers to the input and output parameter data used for rule components. The essence of various rule components is the change of input and output parameters, and the decision engine reflects the results after the rule components are executed in the output parameters.

[0029] The term "decision table" refers to a component that represents rules in a tabular form. It is very suitable for describing situations where there are many processing conditions, the conditions are combined with each other, and there are multiple decision plans. The decision table provides a precise and concise way to describe complex logic, and can graphically correspond multiple conditions and the actions to be performed after these conditions are met.

[0030] The term "complex decision table" refers to the introduction of higher-level operations such as condition type, assignment type, else calculation, empty logic, and conditional support for selecting variables on the basis of the decision table, which simplifies the configuration process of conditional rules and makes the decision table interface much simpler.

[0031] The term "remainder" refers to the else calculation, which allows you to configure other situations in the decision table. The detailed meaning of remainder and else is described later.

[0032] The term "empty" refers to the situation where there is no cell information in a cell of the decision table, which means that the variable corresponding to the cell has no input or output.

[0033] Figure 1 1 is a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. Figure 1 As shown, the example environment 100 may include an electronic device 110. The electronic device 110 may be configured to implement a decision table 122 based on a decision engine 120.

[0034] In the example environment 100, the electronic device 110 can use the components provided by the decision engine 120, such as a variable library, a decision table component, etc. to configure a complex decision table 122. The configured complex decision table 122 can be a control or module deployed on the electronic device 110, which will not be described in detail here. Exemplarily, the electronic device 110 can use the complex decision table to execute a decision based on relevant inputs.

[0035] The electronic device 110 may include any computing system with computing capabilities, such as various computing devices / systems, terminal devices, server devices, etc. The terminal device may be any type of mobile terminal, fixed terminal or portable terminal, including a mobile phone, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a media computer, a multimedia tablet, a handheld computer, a portable game terminal, a VR / AR device, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an e-book device, a game device, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof.

[0036] The server-side device can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks, and big data and artificial intelligence platforms. Server-side devices can include computing systems / servers such as mainframes, edge computing nodes, computing devices in cloud environments, and so on.

[0037] It should be understood that the structure and function of the various elements in the environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure.

[0038] As briefly mentioned above, the information in the cells of the condition column and the assignment column of the decision table component in the current decision engine can usually only be numeric constants, numeric ranges or string constants. When users, such as policy designers, need to list all kinds of situations when configuring the decision table, the number of rule configuration lines in the decision table is very large, which not only makes the decision table configuration cumbersome, but also increases the difficulty of policy review.

[0039] Furthermore, since the information in the conditional column cells can usually only be constants or numerical ranges but not variables, users cannot implement decision rules or decision strategies in the decision table that require comparing two variables. At this time, users such as strategy designers have to consider implementing such strategies in a more cumbersome manner through other components.

[0040] In addition, neither the conditional column nor the assignment column can handle the situation where the cell information is empty (that is, the conditional information of the conditional column cell and the assignment information of the assignment column cell cannot be empty). This makes it impossible to implement some fallback rules in risk control, such as in the current decision table. Users, such as strategy designers, have to implement fallback rules elsewhere, which not only causes inconvenience to users, but also increases the cost for subsequent users in strategy review and strategy testing.

[0041] In view of this, an embodiment of the present disclosure provides an improved scheme for implementing a decision table component. In this scheme, the type of the cell information of the decision table supports at least one of variable, remainder and empty, so that when configuring the decision table, the cell information of the type of variable, remainder and empty can be configured, so that in the decision table component, the remainder operation can be used to configure other situations, thereby saving the cost of additional manual calculation and reconfiguration required when there is no remainder operation, and can also solve the problem that the "remainder operation" cannot be performed when constants and intervals exist at the same time. By configuring variables in cells, comparisons between variables can be achieved, making dynamic matching possible. By configuring cells to be empty, complex decision tables can handle the situation where condition columns and assignment columns are empty, so that the bottom-line rule can be implemented in the same component, improving the compatibility and fault tolerance of the component itself, simplifying the policy design process, and reducing the cost of policy review and policy testing.

[0042] Some example embodiments of the present disclosure will be described below with continued reference to the accompanying drawings.

[0043] Figure 2 1 shows a flowchart of a process 200 for implementing a decision table component according to some embodiments of the present disclosure. The process 200 may be implemented at the electronic device 110. For ease of discussion, reference will be made to Figure 1 The process 200 is described with reference to the environment 100 of FIG.

[0044] At box 210, the electronic device 110 or the decision engine 120 obtains configuration information of the decision table 122, the decision table includes a table header and multiple cells corresponding to the table header, the configuration information includes header information of the table header and cell information of the multiple cells, and the type of the cell information includes at least one of a variable, a modulus, or a null.

[0045] In some embodiments, the decision table 122 may be configured by the user in the decision engine 120 . After the user configures the decision table component 122 , the electronic device 100 may obtain configuration information of the decision table through the decision engine 120 .

[0046] The example process of configuring the decision table 122 and the example of the decision table can be referred to respectively. Figure 3A and Figure 3B .

[0047] Figure 3A An example configuration interface 300A of a decision table is shown. Figure 3A As shown, with the help of similar Figure 3A The example configuration interface 300A of the decision table shown in the figure allows the user to configure the decision table in the decision engine 120. The configuration interface 300A is, for example, an interface for configuring the decision table component of the console of the decision engine. In the configuration interface 300A, the user can import the variable library, constant library, parameter library, action library and other components of the decision engine 120 or other engines.

[0048] In the configuration interface 300A of the electronic device 110 or the decision engine 120, the user can add condition items, assignment items, and rule rows by operating the corresponding controls. The table header and cells can also be configured by operating the corresponding controls. For example, by operating Figure 3B The control 350 can configure the information type of the table header or the cell. By operating the configuration control of the table header or the cell, specific configuration items can be configured for the table header, and specific condition information or assignment information can be configured for the cell. Figure 3B The configuration control of the condition cell 322 can configure the condition information else of the type of remainder for the condition cell 322. Figure 3B The configuration control of the condition item 312 can configure a global variable 1.name of a variable type for the condition item 312.

[0049] It should be understood that Figure 3A The configuration interface 300B shown is only an example and does not constitute a limitation to the embodiments of the present disclosure.

[0050] like Figure 3B As shown, it illustrates a complex decision table 300B according to some embodiments of the present disclosure. Figure 3B As shown, in some embodiments of the present disclosure, the complex decision table 300B includes a table header 310 and a plurality of cells 320 corresponding to the table header 310 .

[0051] Table header 310 includes condition item 312, condition item 314 and assignment item 316. In this article, the term condition item refers to the input condition configured by the user in the decision table. For example, condition item 312 means that the user has configured an input condition: global variable 1.name, which can be, for example, the name of a member (global variable 1). The term assignment item refers to the output result that needs to be assigned a value configured by the user. For example, assignment item 316 means that the user has configured an output result: global variable 1.result, which can be, for example, a member's discount.

[0052] It should be understood that Figure 3B Only two condition items and one assignment item are schematically shown, which does not constitute a limitation to the embodiments of the present disclosure. The embodiments of the present disclosure can configure any number of condition items and any of the assignment items for a complex decision table as needed.

[0053] Continue to refer Figure 3B The cell 320 of the complex decision table 300B includes a condition cell 322 corresponding to the condition item 312, a condition cell 324 corresponding to the condition item 314, and an assignment cell 326 corresponding to the assignment item 316. The condition item 312 and the condition cell 322 corresponding to the condition item 312 constitute a condition column 332. The condition item 314 and the condition cell 324 corresponding to the condition item 314 constitute a condition column 334. The assignment item 316 and the assignment cell 326 corresponding to the assignment item 316 constitute an assignment column 336.

[0054] like Figure 3B As shown, in the decision table 300B, cells in the same row constitute a rule row 340 , by way of example. Figure 3B Three rule rows are schematically shown. In some embodiments of the present disclosure, when the decision table 300B is executed, that is, when the decision table 300B is used to execute a decision, the rule rows 340 are matched row by row, so as to determine which rule row 340 the current input condition matches, and output the corresponding result according to the matched rule row 340. The execution process of the decision table 300B will be described in detail later.

[0055] It should be understood that although in some embodiments of the present disclosure, input conditions and output results are shown in the form of columns and rules are shown in the form of rule rows, in other embodiments, input conditions and output results may also be shown in the form of rows, and rules may also be shown in the form of rule columns, all of which are included in the scope of the embodiments of the present disclosure.

[0056] refer to Figure 3B The configuration information may include header information of the header 310 and cell information of the plurality of cells 320 .

[0057] In some embodiments of the present disclosure, the type of cell information includes at least one of a variable, a modulus, or a null. For example, in some embodiments of the present disclosure, the type of cell information includes a variable, a modulus, and a null. Figure 3B For example, the type of the unit cell information else of cell 322 is modulo. The type of the cell information of cell 324 is empty. The type of the cell information global variable 1.name1 of cell 326 is variable.

[0058] As mentioned above, the cell 320 includes a conditional cell and a value assignment cell. Accordingly, the cell information includes the conditional information of the conditional cell and the value assignment information of the value assignment cell.

[0059] In some embodiments of the present disclosure, the type of condition information includes at least one of variable, remainder, or null. Figure 3B For example, the type of the condition information of the condition cell 322 / 324 supports at least one of variable, modulus or null.

[0060] In some embodiments of the present disclosure, the type of the assignment information includes at least one of a variable or a blank. That is, in some embodiments of the present disclosure, the type of the condition information of the condition cell 322 / 324 supports at least one of a variable, a modulo, or a blank. That is, in some embodiments of the present disclosure, the condition information of the condition cell 322 / 324 supports at least one of a variable, a modulo, or a blank. Figure 3B For example, the type of the assignment information of the assignment cell 326 supports at least one of a variable or a void.

[0061] Furthermore, in some embodiments of the present disclosure, the type of condition information includes at least one of the following: variable, custom, empty string, operator, remainder, and arbitrary value.

[0062] In some embodiments of the present disclosure, the type of the assignment information includes at least one of the following: a constant, a variable, an empty string, and no operation.

[0063] In some embodiments of the present disclosure, by making the types of condition information and assignment information support variables, remainder and null, the decision table component 122 can be configured for other situations through remainder operation, thereby saving the cost of additional manual calculation and reconfiguration required when there is no remainder operation, and can also solve the problem that the "remainder operation" cannot be performed when constants and intervals exist at the same time. Figure 3A For example, by configuring else in the condition cell 322, the decision table 300B can directly include non-aa conditions without exhaustive enumeration or additional approval calculation and configuration for non-aa situations.

[0064] By configuring variables in cells, you can compare variables and make dynamic matching possible. Figure 3B For example, by configuring the global variable 1.name of type variable in the assignment cell 326, dynamic matching can be performed when the global variable 1.name is else and the global variable 1.age is 2. There is no need to match constants or parameters for each condition like in the previous decision table.

[0065] By configuring cells to be empty, complex decision tables can handle empty condition columns and assignment columns, so that the fallback rules can be implemented in the same component, improving the compatibility and fault tolerance of the component itself, simplifying the strategy design process, and reducing the cost of strategy review and strategy testing. Figure 3B For example, by configuring a blank in the condition cell 324, the decision table can be configured with a fallback rule or some special rules. For example, the corresponding rule is that as long as the global variable 1.name is aa, the output result global variable 1.result is 2, and there is no need to separately configure multiple global variables 1.age condition information.

[0066] In summary, the decision table component of the embodiment of the present disclosure can simplify the policy configuration process, realize dynamic matching of variables and be compatible with the fallback policy, while also shortening the time for policy review and testing and reducing the cost of review and testing.

[0067] Continue to refer Figure 2 At box 220, the electronic device 110 or the decision engine 120 compiles the cell information of the multiple cells according to the type of the header information and the type of the cell information of the multiple cells to form executable expressions of the multiple cells.

[0068] Since there are multiple types of header information and cell information, and different types of cell information express different meanings, it is necessary to select a corresponding compilation mode according to the type of header information and the type of cell information of the multiple cells to compile the cell.

[0069] In some embodiments of the present disclosure, when the type of cell information is a variable, the variable value of the cell information is first obtained, and then compiled according to the type of header information corresponding to the cell. Figure 3B For example, when the electronic device 110 or the decision engine 120 compiles the assignment cell 326, since the type of the assignment information global variable 1.name1 is a variable, it is necessary to first obtain the variable value of the global variable 1.name1, and then compile the assignment cell 326 according to the type of the global variable 1.result.

[0070] In some embodiments of the present disclosure, when the type of cell information in the current condition cell is modulus, first determine the executable expressions of all cells between the current condition cell and the previous condition cell of the same condition group whose cell information type is modulus, and then perform an OR operation and then a complement operation on the cell executable expressions of all cells between the current condition cell and the previous condition cell of the same condition group whose cell information type is modulus, to generate the executable expression of the current condition cell. Figure 3B For example, when the electronic device 110 or the decision engine 120 compiles the conditional cell 322, since the type of the cell conditional information else is modulo, the electronic device 110 or the decision engine 120 first determines the conditional cell 322 and a cell with conditional information else before the conditional cell 322 in the global variable 1.name condition column (for example Figure 3B The executable expressions of all cells between the conditional cell 327 in the conditional cell 322, such as the executable expression of the conditional cell 328, are firstly performed with an OR operation and then with a complement operation on the executable expression of the conditional cell 328 between the conditional cell 322 and the conditional cell 327 to generate the executable expression of the current conditional cell. Figure 3B For example, the executable expression of the conditional cell 322 is an expression corresponding to the global variable 1.name being non-aa.

[0071] exist Figure 3B In the example, there is only one conditional cell 328 between conditional cells 322 and conditional cells 327, and the executable expression of conditional cell 322 can be obtained by directly performing a complement operation on the executable expression of conditional cell 328. It should be understood that when there are multiple conditional cells between conditional cell 322 and conditional cell 327, it is necessary to first perform an OR operation on the executable expressions of the multiple conditional cells, and then perform a complement operation.

[0072] In some embodiments of the present disclosure, when the current condition cell and the condition cell of the previous cell information of the same condition group whose cell information type is modulo include condition cells whose cell information type is empty, the executable expression of the current cell does not include cell information of empty type. Figure 3B For example, the condition information of condition cell 327 is else. Since there is no other cell before condition cell 327, that is, condition cell 327 condition cell 327, the executable expression of condition cell 327 does not include null. That is, the meaning of the condition information else of condition cell 327 is that global variable 1.nname = all situations, but does not include the situation that global variable 1.nname is null.

[0073] In some embodiments of the present disclosure, when there is no conditional cell whose cell information type is empty between the current cell and the cell whose cell information type is modulo of the previous cell in the same conditional group, the executable expression of the current conditional cell includes conditional information whose type is empty. Figure 3B For example, since there is no conditional cell with empty conditional information between conditional cell 322 and conditional cell 327, the executable expression of conditional cell 322 includes null, that is, the global variable 1.name is not aa, including the situation that the global variable 1.name is null.

[0074] In some embodiments of the present disclosure, process 200 also includes: the electronic device 110 or the decision engine 120 builds a unified processor, and assembles the configuration information of a decision table, such as decision table 300A, into a serializable unified processor, so as to implement the aforementioned process of forming the executable expression of the cell through the serializable unified processor, and to implement the execution of the executable expressions of multiple cells at box 230.

[0075] Continue to refer Figure 2 At block 230 , the electronic device 110 or the decision engine 120 executes executable expressions of a plurality of cells of the decision table, thereby utilizing the decision table, such as the decision table 300A, to perform a decision.

[0076] Figure 4 Flowchart of process 400 of executing executable expressions according to some embodiments of the present disclosure. Figure 4 As shown, the electronic device 110 or the decision engine 120 executes executable expressions of multiple cells of the decision table, including:

[0077] At block 410, the electronic device 110 or the decision engine 120 obtains the value of the header information of the decision table. Figure 3B For example, the electronic device 110 or the decision engine 120 obtains the values ​​of the global variables 1.name and 1.age. Specifically, the values ​​of the global variables 1.name and 1.age may be obtained according to the current context.

[0078] At block 420, the electronic device 110 or the decision engine 120 traverses the decision table and executes the executable expressions of the conditional cells in the plurality of cells row by row or column by column. Figure 3B For example, the executable expressions in the conditional cells in rule row 340 are executed line by line.

[0079] At block 430, the electronic device 110 or the decision engine 120 obtains the cell information of the assignment cell when the execution results of the executable expressions of all conditional cells corresponding to the same assignment cell are true. Figure 3B For example, if the global variable 1.name is BB and the global variable 1.age is 2, the electronic device 110 or the decision engine 120 hits the third rule line 340 when executing the expression. Then the electronic device 110 or the decision engine 120 obtains the cell information global variable 1.name1 of the assignment cell 326.

[0080] At block 440, the electronic device 110 or the decision engine 120 returns the value assignment information of the value assignment cell. Figure 3B For example, if the global variable 1.name is BB and the global variable 1.age is 2, the electronic device 110 or the decision engine 120 executes the expression and hits the third rule line 340. Then the electronic device 110 or the decision engine 120 obtains the cell information global variable 1.name1 of the assignment cell 326, and returns the global variable 1.name1 as the output result of the global variable 1.result.

[0081] In some embodiments of the present disclosure, the electronic device 110 or the decision engine 120 assigns a value to the assignment information of the assignment cell when the type of the cell information of the assignment cell is a variable. Figure 3B For example, if the global variable 1.name is BB and the global variable 1.age is 2, the execution expression hits the third rule line 340. Then the electronic device 110 or the decision engine 120 obtains the cell information of the assignment cell 326 as the global variable 1.name1 and assigns a value to the global variable 1.name1. The specific variable value of the global variable 1.name1 can be obtained by the electronic device 110 or the decision engine 120 through the current context.

[0082] In an embodiment of the present disclosure, in order to enable the type of condition information of a complex decision table, such as the decision table 300A, to support variable, modulo, or null types, the electronic device 110 defines or constructs related classes in the decision engine 120 . Figure 5 A structural diagram of a class 500 for a decision table component according to some embodiments of the present disclosure is shown.

[0083] The description of Class 500 is as follows:

[0084] 1. ComplexStrategyTableProcessor class structure description

[0085] ComplexStrategyTableProcessor is a processing class for complex decision tables and is used at runtime.

[0086]

[0087] 2. IRunstateContext class structure description

[0088] The IRunstateContext class is the runtime context information. The variable values ​​passed in are stored in it, and the variables can also be retrieved or assigned values.

[0089]

[0090]

[0091] 3. ComplexStrategyTableComponent class structure description

[0092] The ComplexStrategyTableComponent class is a complex decision table component configuration class that stores configuration information and table data.

[0093] name type illustrate componentId property Component ID, component unique identifier name property Component Name version property Component Version componentObject property Component Object variableSet property Component variable collection

[0094] 4. ComplexStrategyTable class structure description

[0095] The ComplexStrategyTable class is a table object of a complex decision table and stores table data.

[0096] name type illustrate componentId property Component ID, component unique identifier strategyTableEntries property Decision table data headerCells property Decision table header

[0097] 5. ComplexStrategyHeaderCell class structure description

[0098] The ComplexStrategyHeaderCell class is the header class of the complex decision table, which stores header information.

[0099] name type illustrate name property name type property Column value type, string, numeric, etc. vtype property Column type, conditional column or assignment column variableUUID property Variable unique ID

[0100] 6. ComplexStrategyTableEntry class structure description

[0101] ComplexStrategyTableEntry is a complex decision table row data class that stores row data, including condition columns and assignment columns.

[0102] name type illustrate conditionVariables property Conditional Column Collection assignVariables property Assigning Column Collections

[0103] 7. ComplexConditionVariable class structure description

[0104] ComplexConditionVariable is a complex decision table condition class that stores condition configuration information.

[0105]

[0106] 8. ComplexAssignVariable class structure description

[0107] ComplexAssignVariable is a complex decision table assignment class that stores assignment configuration information.

[0108]

[0109] 9. SerializablePredicate class structure description

[0110] SerializablePredicate is an expression class that stores cell expression information.

[0111]

[0112] Figure 6 A schematic structural block diagram of an apparatus for implementing a decision table component according to some embodiments of the present disclosure is shown.

[0113] like Figure 6 As shown, the device 600 includes an acquisition module 610, which is configured to acquire configuration information of a decision table 122 in the decision engine 120. The decision table 122 includes a table header and multiple cells corresponding to the table header. The configuration information includes header information of the table header and cell information of multiple cells. The type of the cell information includes at least one of a variable, a modulus, or a null.

[0114] The apparatus 600 further includes a compiling module 620 configured to compile the cell information of the plurality of cells in the decision engine 120 according to the type of the header information and the type of the cell information of the plurality of cells to form executable expressions of the plurality of cells.

[0115] The apparatus 600 further includes an execution module 630 configured to execute executable expressions of the plurality of cells in the decision engine 120 .

[0116] In some embodiments, the cell information includes condition information and assignment information, the type of the condition information includes at least one of a variable, a modulus, or a space, and the type of the assignment information includes at least one of a variable or a space.

[0117] In some embodiments, the compiling module 620 is further configured to: when the type of the cell information is a variable, obtain the variable value of the cell information.

[0118] In some embodiments, the compiling module 620 is further configured to: when the type of the cell information in the current condition cell is modulo, determine executable expressions of all cells between the current condition cell and the previous condition cell of the same condition group whose cell information type is modulo; and

[0119] The executable expression of the current condition cell is generated by first performing an OR operation and then performing a complement operation on the cell executable expressions of all cells between the current condition cell and the previous cell information of the same condition group whose type is the modulo condition cell.

[0120] In some embodiments, when the current conditional cell and the previous conditional cell of the same conditional group whose cell information type is modulo include conditional cells whose cell information type is empty, the executable expression of the current cell does not include cell information of empty type.

[0121] In some embodiments, between the current cell and the cell whose cell information type is modulo of the previous cell of the same condition group, excluding a condition cell whose cell information type is empty, the executable expression of the current condition cell includes condition information of empty type.

[0122] In some embodiments, the device 600 also includes a construction module configured to: construct a unified processor and assemble the configuration information of the decision table into a serializable unified processor to form executable expressions of multiple cells through the serializable unified processor, and execute the executable expressions of the multiple cells.

[0123] In some embodiments, the execution module 630 includes an acquisition unit configured to: acquire the value of the header information.

[0124] The execution module 630 further includes an execution unit configured to: traverse the decision table and execute the executable expressions of the conditional cells in the plurality of cells row by row or column by column.

[0125] In some embodiments, the execution module 630 also includes a return unit configured to: obtain cell information of the assignment cell when the execution result of the executable expression of all conditional cells corresponding to the same assignment cell is true; and return the assignment information of the assignment cell.

[0126] In some embodiments, the execution module 630 further includes an assignment unit configured to: when the type of the cell information of the assignment cell is a variable, assign a value to the assignment information of the assignment cell.

[0127] In some embodiments, the building module is further configured to: pre-build a decision table condition class and a decision table assignment class for the decision table, the decision table condition class includes a condition type, the decision table assignment class includes an assignment type,

[0128] The condition type corresponds to the type of condition information, and the assignment type corresponds to the type of assignment information.

[0129] In some embodiments, the condition type of the decision table condition class includes at least one of the following: variable, custom, empty string, operator, remainder, and arbitrary value, and the assignment type of the decision table assignment class includes at least one of the following: constant, variable, empty string, and no operation.

[0130] In some embodiments, the device 600 also includes an assembly module, which is configured to: when the type of the header information and the cell information is a variable, obtain the variable information from the variable library of the decision engine to which the decision table belongs according to the identification information of the variable, the variable information including the name, type and length of the variable; and assemble at least one condition group and at least one assignment group according to the variable information.

[0131] The units and / or modules included in the device 600 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units and / or modules can be implemented using software and / or firmware, such as machine executable instructions stored on a storage medium. In addition to or as an alternative to machine executable instructions, some or all of the units and / or modules in the device 600 can be implemented at least in part by one or more hardware logic components. As an example and not limitation, exemplary types of hardware logic components that can be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0132] It should be understood that one or more steps in the above method can be performed by a suitable electronic device or a combination of electronic devices. Such an electronic device or a combination of electronic devices may include, for example, Figure 1 The electronic device 110 in.

[0133] Figure 7 1 shows a block diagram of an electronic device 700 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 7 The electronic device 700 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. Figure 7 The electronic device 700 shown can be used to implement Figure 1 Electronic device 110 or Figure 6 Device 600.

[0134] like Figure 7 As shown, the electronic device 700 is in the form of a general electronic device. The components of the electronic device 700 may include, but are not limited to, one or more processors or processing units 710, a memory 720, a storage device 730, one or more communication units 740, one or more input devices 750, and one or more output devices 760. The processing unit 710 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 720. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 700.

[0135] The electronic device 700 typically includes a plurality of computer storage media. Such media can be any available media accessible to the electronic device 700, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 720 can be a volatile memory (e.g., register, cache, random access memory (RAM)), a non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory) or some combination thereof. The storage device 730 can be a removable or non-removable medium, and can include a machine-readable medium, such as a flash drive, a disk, or any other medium, which can be used to store information and / or data and can be accessed within the electronic device 700.

[0136] The electronic device 700 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 7 As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. The memory 720 may include a computer program product 725 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.

[0137] The communication unit 740 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 700 can be implemented with a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 700 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.

[0138] The input device 750 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 760 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 700 may also communicate with one or more external devices (not shown) through the communication unit 740 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 700, or communicate with any device that allows the electronic device 700 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).

[0139] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.

[0140] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0141] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0142] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0143] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.

[0144] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.

Claims

1. A method for implementing a decision table component, comprising: Acquire configuration information of a decision table, the decision table comprising a table header and a plurality of cells corresponding to the table header, the configuration information comprising table header information of the table header and cell information of the plurality of cells, the type of the cell information comprising at least one of a variable, a modulus, or a null; Compiling the cell information of the multiple cells according to the type of the header information and the type of the cell information of the multiple cells to form executable expressions of the multiple cells; as well as The executable expressions of the plurality of cells are executed.

2. The method according to claim 1, wherein the cell information includes condition information and assignment information, the type of the condition information includes at least one of a variable, a modulus, or a null, and the type of the assignment information includes at least one of a variable or a null.

3. The method according to claim 1, wherein the cell information of the plurality of cells is compiled according to the type of the header information and the type of the cell information of the plurality of cells to form the cell executable expressions of the plurality of cells, comprising: When the type of the cell information is a variable, the variable value of the cell information is obtained.

4. The method according to claim 1, wherein the table header includes at least one condition item, the cell includes at least one condition cell corresponding to the at least one condition item, and the at least one condition item and the at least one condition cell corresponding to the at least one condition item constitute at least one condition group; Compiling the cell information of the multiple cells according to the type of the header information and the type of the cell information of the multiple cells to form executable expressions of the multiple cells, including: When the type of the cell information in the current condition cell is modulo, determining executable expressions of all cells between the current condition cell and a previous condition cell of the same condition group whose cell information type is modulo; as well as The executable expression of the current condition cell is generated by first performing an OR operation and then performing a complement operation on the cell executable expressions of all cells between the current condition cell and the previous condition cell of the same condition group whose cell information type is modulo.

5. The method according to claim 4, wherein, in the case where there is a conditional cell whose cell information type is empty between the current conditional cell and the previous conditional cell of the same conditional group whose cell information type is modulo, the executable expression of the current cell does not contain cell information of empty type.

6. The method according to claim 4, wherein, between the current cell and the cell whose cell information type is modulo of the previous cell in the same conditional group, excluding a conditional cell whose cell information type is empty, the executable expression of the current conditional cell contains conditional information of empty type.

7. The method according to any one of claims 1 to 6, wherein the method further comprises: A unified processor is constructed, and the configuration information is assembled into a serializable unified processor, so as to form executable expressions of the plurality of cells through the serializable unified processor, and execute the executable expressions of the plurality of cells.

8. The method according to any one of claims 1 to 6, wherein the cells include conditional cells and assignment cells, Executing the executable expressions of the plurality of cells includes: Obtain the value of the header information; The decision table is traversed, and executable expressions of the conditional cells in the plurality of cells are executed row by row or column by column.

9. The method according to claim 8, wherein executing the executable expressions of the plurality of cells further comprises: When the execution results of the executable expressions of all conditional cells corresponding to the same value assignment cell are true, obtaining the cell information of the value assignment cell; as well as Returns the assignment information of the assignment cell. 10 . The method according to claim 9 , wherein when the type of the cell information of the value assignment cell is a variable, the value assignment information of the value assignment cell is assigned a value.

11. The method according to claim 1, wherein the table header includes at least one condition item and at least one value assignment item, the cell includes at least one condition cell corresponding to the at least one condition item and at least one value assignment cell corresponding to the at least one value assignment item, the at least one condition item and the at least one condition cell corresponding to the at least one condition item constitute at least one condition group, and the at least one value assignment item and the at least one value assignment cell corresponding to the at least one value assignment item constitute at least one value assignment group; The method further comprises: When the type of the table header information and the cell information is a variable, obtaining the information of the variable from a variable library of a decision engine to which the decision table belongs according to the identification information of the variable, wherein the information of the variable includes the name, type and length of the variable; as well as The at least one condition group and the at least one assignment group are assembled according to the information of the variable.

12. The method according to claim 2, wherein the method further comprises: Pre-constructing a decision table condition class and a decision table assignment class for the decision table, wherein the decision table condition class includes a condition type, and the decision table assignment class includes an assignment type, The condition type corresponds to the type of the condition information, and the assignment type corresponds to the type of the assignment information.

13. The method according to claim 12, wherein the condition type of the decision table condition class includes at least one of the following: variable, user-defined, empty string, operator, remainder, and arbitrary value, and The assignment type of the decision table assignment class includes at least one of the following: a constant, a variable, an empty string, and no operation.

14. An apparatus for implementing a decision table component, comprising: an acquisition module configured to acquire configuration information of a decision table, the decision table comprising a table header and a plurality of cells corresponding to the table header, the configuration information comprising table header information of the table header and cell information of the plurality of cells, the type of the cell information comprising at least one of a variable, a modulus, or a null; A compiling module, configured to compile the cell information of the plurality of cells according to the type of the header information and the type of the cell information of the plurality of cells, to form executable expressions of the plurality of cells; as well as The execution module is configured to execute the executable expressions of the plurality of cells.

15. An electronic device, comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 13 when executed by the at least one processing unit.

16. A computer-readable storage medium having a computer program stored thereon, wherein the computer program can be executed by a processor to implement the method according to any one of claims 1 to 13.

17. A computer program product tangibly stored in a computer storage medium and comprising computer executable instructions which, when executed by a device, cause the device to perform the method according to any one of claims 1 to 13.