Rule process tree configuration method and device, data processing method and device, electronic equipment and program product
By responding to data source selection and generation of data extraction instructions, combined with building rules and visual rule process trees, the problem of high threshold and high complexity of rule process trees in the existing technology is solved, and efficient and flexible rule process trees are configured and executed.
Patent Information
- Application Number
- CN202510018993.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-04-15
AI Technical Summary
The existing rule process tree configuration scheme has a high threshold, easy to introduce code errors, and difficult to deal with complex process configurations, resulting in poor configuration efficiency and execution performance.
Provide a rule process tree configuration method, which determines the data source configuration in response to data source selection, generates data extraction instructions, establishes the association between instructions and feature variables, and builds rules and visual rules process trees, including start nodes, rule nodes, control nodes and connections.
It improves the flexibility and efficiency of rule process tree configuration, reduces configuration complexity and error rate, and improves the configuration and execution efficiency of business rules.
Smart Images

Figure CN119828935A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer application technology, and in particular to a rule process tree configuration method and device, a data processing method and device, and related electronic equipment and program products. Background Art
[0002] Currently, rule process trees are widely used to realize the automation of business processes. Rule process trees realize automated decision-making and processing of business data by configuring and managing multiple business rules.
[0003] However, in the current rule process tree configuration scheme, programmers are required to write the overall business rule code for each rule node separately. This scheme not only has a high configuration threshold, but also easily introduces errors at the code level and is difficult to cope with complex process configurations, which seriously reduces the configuration efficiency and execution performance of the rule process tree.
[0004] Therefore, there is an urgent need for a rule process tree configuration method that can simplify the business rule configuration process and improve configuration efficiency to meet the growing demand in the field of business process automation.
[0005] The content of this background technology description is only for facilitating understanding of the relevant technology in this field and is not regarded as an admission of the prior art. Summary of the invention
[0006] Accordingly, the embodiments of the present disclosure aim to provide a rule process tree configuration method and device, a rule process tree-based data processing method and device, and related electronic devices and program products, which can alleviate or solve at least one of the technical problems mentioned above.
[0007] In a first aspect, an embodiment of the present disclosure provides a rule process tree configuration method, which may include:
[0008] In response to the data source selection, determining a data source configuration, wherein the data source configuration includes connection parameters and access protocols corresponding to the data source type;
[0009] Based on the data source configuration, generating a data extraction instruction, wherein the data extraction instruction has a query parameter corresponding to the data source type;
[0010] Establishing an association between the data extraction instruction and a plurality of characteristic variables so that the plurality of characteristic variables and a plurality of data fields corresponding to the data extraction instruction have a one-to-one mapping relationship;
[0011] Constructing a plurality of rules according to the characteristic variables, wherein each of the rules includes at least one corresponding characteristic variable and a judgment condition;
[0012] In response to the operation on the visualization node, a visualization rule process tree is constructed, wherein: the visualization rule process tree includes a start node, multiple rule nodes and multiple control nodes and lines for connecting the nodes, the rule nodes are used to execute the rules, and the control nodes and the lines are used to define the execution relationship of the rule nodes.
[0013] Optionally, the visualized rule process tree includes a tree structure in which at least part of the rule nodes and the control nodes are alternately arranged.
[0014] Optionally, the visualized rule flow tree includes one or more pre-filtering nodes, which are arranged between the start node and the tree structure and used to pre-determine whether to continue executing the tree structure subsequent to the pre-filtering node.
[0015] Optionally, the method further comprises: providing a visual operation display interface, the visual operation display interface comprising a node display area for displaying a plurality of configurable visual nodes and a tree display area for displaying a constructed rule flow tree;
[0016] The step of constructing a visualized rule process tree structure in response to the operation on the visualized node includes:
[0017] Create a start node and generate the first node proposal;
[0018] In response to a dragging operation of dragging a visualization node in the node display area to the tree display area, adding the operated visualization node to the constructed rule flow tree;
[0019] Generate a connection between an added node and a direct upstream node, wherein the added node is the operated visualization node added in the rule flow tree;
[0020] In the case where the added nodes conform to the tree structure arranged alternately, subsequent node suggestions are generated according to the types of the added nodes.
[0021] Optionally, the step of constructing a visualized rule process tree structure in response to an operation on a visualized node further includes:
[0022] An overall structure check is performed on the constructed rule process tree, and node supplement suggestions and / or connection adjustment suggestions are generated for the alternately arranged tree structure according to the check result of the overall structure check.
[0023] Optionally, the control node includes a conditional branch node, which defines a conditional execution logic for selecting a conditional branch to be executed according to a rule judgment result; and / or
[0024] The control node includes a parallel node, the parallel node defines parallel execution logic corresponding to a plurality of direct downstream rule nodes; and / or
[0025] The control node includes a merge node that defines result aggregation logic for a plurality of directly upstream rule nodes executed in parallel.
[0026] Optionally, constructing rules according to feature variables includes:
[0027] According to the rule construction instruction, a feature variable involved in constructing the rule is selected, wherein the feature variable has a preset data type;
[0028] Setting a threshold judgment condition for each characteristic variable involved in the rule, wherein the threshold judgment condition matches the data type of the corresponding characteristic variable;
[0029] According to the condition combination instruction, the threshold judgment conditions are combined to form a rule judgment logic.
[0030] In a second aspect, an embodiment of the present disclosure provides a data processing method based on a rule process tree, wherein the rule process tree is configured according to the configuration method described in the first aspect, and the data processing method includes:
[0031] In response to a data processing request, extracting data to be processed from a data source;
[0032] Execution starts according to the start node of the rule flow tree, and the nodes in the rule flow tree are processed sequentially, wherein:
[0033] For a rule node, extract the data field in the data source to obtain a characteristic variable value, and judge the characteristic variable value according to the rule judgment logic in the rule referenced by the rule node to obtain a rule judgment result;
[0034] For a control node, determining the next node to be executed according to the control node and the associated connection;
[0035] Generate data processing results based on the final rule judgment results.
[0036] In a third aspect, an embodiment of the present disclosure provides a rule process tree configuration device, which may include:
[0037] a determining unit configured to determine a data source configuration in response to the data source selection, wherein the data source configuration includes connection parameters and access protocols corresponding to the data source type;
[0038] a generating unit configured to generate a data extraction instruction based on the data source configuration, wherein the data extraction instruction has a query parameter corresponding to the data source type;
[0039] an associating unit configured to establish an association between the data extraction instruction and a plurality of characteristic variables, so that the plurality of characteristic variables and a plurality of data fields corresponding to the data extraction instruction have a one-to-one mapping relationship;
[0040] A first construction unit is configured to construct a plurality of rules according to the characteristic variables, wherein each of the rules includes at least one corresponding characteristic variable and a judgment condition;
[0041] The second construction unit is configured to construct a visualized rule process tree in response to an operation on a visualization node, wherein: the visualized rule process tree includes a start node, multiple rule nodes and multiple control nodes and lines for connecting the nodes, the rule nodes are used to execute the rules, and the control nodes and the lines are used to define the execution relationship of the rule nodes.
[0042] In a fourth aspect, an embodiment of the present disclosure provides a data processing device based on a rule process tree, which may include:
[0043] An extraction unit, configured to extract the data to be processed from the data source in response to the data processing request;
[0044] The execution unit is configured to start execution according to the start node of the rule flow tree and sequentially process the nodes in the rule flow tree, wherein: for the rule node, extract the data field in the data source to obtain the characteristic variable value, judge the characteristic variable value according to the rule judgment logic in the rule referenced by the rule node, and obtain the rule judgment result; for the control node, determine the next node to be executed according to the control node and the associated connection;
[0045] The output unit is configured to generate a data processing result according to the final rule judgment result.
[0046] In a fifth aspect, an embodiment of the present disclosure provides an electronic device, which may include: a processor and a memory storing a computer program, wherein the processor is configured to implement the method described in the first aspect or the second aspect when running the computer program.
[0047] In a sixth aspect, an embodiment of the present disclosure provides a program product, including a computer program, wherein when the computer program is executed by a processor, the method described in the first aspect or the second aspect is implemented.
[0048] The method of the disclosed embodiment can determine the data source configuration in response to the data source selection; generate a data extraction instruction based on the data source configuration; establish an association between the data extraction instruction and multiple feature variables, so that the multiple feature variables have a one-to-one mapping relationship with the multiple data fields corresponding to the data extraction instruction; construct multiple rules according to the feature variables, wherein each of the rules includes at least one corresponding feature variable and a judgment condition; and construct a visualized rule process tree in response to the operation of the visualization node. The method of the disclosed embodiment improves the configuration flexibility of the rule process tree and significantly improves the configuration efficiency and execution efficiency of business rules.
[0049] Other optional features and technical effects of the embodiments of the present disclosure are partially described below, and partially can be understood by reading this document. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. The elements shown are not limited by the proportions shown in the accompanying drawings. The same or similar reference numerals in the accompanying drawings represent the same or similar elements, wherein:
[0051] Figure 1 A first flow chart of a rule process tree configuration method according to an embodiment of the present disclosure is shown;
[0052] Figure 2 A visual data source configuration interface according to a specific embodiment of the present disclosure is shown;
[0053] Figure 3 A visual query parameter configuration interface according to a specific embodiment of the present disclosure is shown;
[0054] Figure 4 A second flow chart of the rule process tree configuration method according to an embodiment of the present disclosure is shown;
[0055] Figure 5 An example diagram of a rule flow tree according to a specific embodiment of the present disclosure is shown;
[0056] Figure 6 A third flow chart of a rule process tree configuration method according to an embodiment of the present disclosure is shown;
[0057] Figure 7 A fourth flow chart of a rule process tree configuration method according to an embodiment of the present disclosure is shown;
[0058] Figure 8 An example diagram of a visual operation display interface for configuring a rule process tree according to a specific embodiment of the present disclosure is shown;
[0059] Fig. 9An exemplary flow chart of a data processing method based on a rule process tree according to an embodiment of the present disclosure is shown;
[0060] Fig.10 An exemplary structural diagram of a rule process tree configuration device according to an embodiment of the present disclosure is shown;
[0061] Fig.11 An exemplary structural diagram showing a data processing device based on a rule process tree according to an embodiment of the present disclosure; and
[0062] Fig.12 An exemplary structural diagram of an electronic device capable of implementing the method according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solution and advantages of the present disclosure more clear, the present disclosure is further described in detail below in conjunction with specific implementation methods and drawings. Here, the illustrative implementation methods and descriptions of the present disclosure are used to explain the present disclosure, but are not intended to limit the present disclosure.
[0064] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one some embodiments". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0065] In an embodiment of the present disclosure, the rule process tree includes a decision-making structure used in fields such as business process automation. The rule process tree can be composed of multiple business rule nodes connected by a tree structure, wherein each rule node can contain specific rules. The rule node determines the execution of subsequent rule nodes by judging the acquired data, and ultimately realizes automated decision-making and processing of business data.
[0066] The inventors of the present disclosure have discovered that although the current rule process tree is widely used in the configuration and processing of business logic, it faces the problem of how to quickly configure a large number of rule nodes when dealing with complex business judgment logic / business rules that require a large number of rule nodes. In this regard, it has been proposed to use a visual interface to arrange rule nodes to assist in the configuration of rule nodes. However, the existing visual interface only involves the layout of rule nodes and the display of upstream and downstream relationships, while the specific functional implementation of individual rule nodes still relies on the configuration personnel to manually write a large amount of code as a whole. This method of relying on manual overall writing of business rule codes is huge in workload and is prone to introduce errors in coding, which seriously slows down the configuration speed of the rule process tree.
[0067] In this regard, in some embodiments of the present disclosure, Figure 1 As shown, a rule process tree configuration method is provided, which can be used in a business decision system, an automated rule engine, etc. The rule process tree method can at least include 110 to 150.
[0068] 110: In response to the data source selection, determine the data source configuration.
[0069] In the embodiment of the present disclosure, the data source may include various types of systems, devices or services that can provide data. In this embodiment, the data source type of the data source may include but is not limited to relational databases, non-relational databases, XML files, JSON data, text files, image data and other types. In a specific example, the data source may include one or more of the following data sources: MySQL relational database, Oracle relational database, MongoDB non-relational database, Redis non-relational database, CSV local file.
[0070] In the embodiments of the present disclosure, data source configurations for various types of data sources may be preset, and the data source configurations may also be referred to as data source configuration templates.
[0071] In the embodiments of the present disclosure, the data source configuration may include but is not limited to connection parameters and access protocols corresponding to the data source type of the data source. As an explanation and not limitation, different types of data sources need to be requested and accessed by different connection parameters and access protocols. In one example, the data source configuration for a relational database may include but is not limited to connection parameters such as a host address, port number, database name, user name, and password; the data source configuration for a third-party API interface data source may include but is not limited to connection parameters such as a service address, authentication key, and request method. In one example, the data source configuration may include access protocols such as HTTP (Hypertext Transfer Protocol), HTTPS (Hypertext Transfer Protocol Secure), and TCP / IP (Transmission Control Protocol / Internet Protocol).
[0072] In a specific example of the present disclosure, in response to the configuration personnel selecting a MySQL relational database, a data source configuration C1 corresponding to the MySQL relational database can be determined, and the data source configuration C1 includes connection parameters for connecting to the MySQL relational database: host, port, database, username, root, password, and access protocol: TCP / IP protocol. It should be understood that in other embodiments of the present disclosure, the data source configuration may also include more parameters according to specific needs, and the present disclosure does not limit this.
[0073] In some embodiments of the present disclosure, a visual data source configuration interface may also be provided. In this embodiment, the method of the embodiment of the present disclosure may also include the step of providing a visual data source configuration page corresponding to the data source type in response to the selection of the data source, wherein the data source configuration page displays a connection parameter configuration area corresponding to the data source type. As an explanation but not limitation, the configuration personnel only need to fill in the parameter values in the connection parameter configuration area to efficiently set a data source configuration, and only need to set it once, and the data source configuration can be reused in a new rule node later.
[0074] In a specific example of the present disclosure, refer to Figure 2 , showing a visual data source configuration interface according to an embodiment of the present disclosure. In this embodiment, in response to the configuration personnel's selection of a MySQL relational database, the data source configuration corresponding to the MySQL relational database is determined, and the configurable parameters are presented in the form of a visual data source configuration interface, wherein database is the database name, username is the user name, and password is the password. It should be understood that in other embodiments, the configuration interface may also include more / fewer parameters, such as a host address (host), a port number (port), etc., and the present disclosure does not limit this. The method of the embodiment of the present disclosure presets data source configurations corresponding to multiple types of data sources. When configuring a rule node, the configuration personnel only needs to select the expected data source type to automatically determine the data source configuration corresponding to that type, without the need to repeatedly use code to configure the connection to the database, thereby improving the configuration efficiency of the rule node.
[0075] 120: Generate data extraction instructions based on the data source configuration.
[0076] In an embodiment of the present disclosure, the data extraction instruction may define how to extract target data from different types of data sources, and the target data may be used, for example, for the logical judgment described below in the present disclosure. In this embodiment, the data extraction instruction may include, for example, a query statement or an access command. In one example, for a relational database (MySQL, Oracle, etc.), the data extraction instruction may include an SQL query statement, and for a non-relational database (MongoDB, etc.), the data extraction instruction may include a query command.
[0077] In the embodiment of the present disclosure, data source configurations for different types of data sources may correspond to different types of data extraction instructions. In this embodiment, the data extraction instruction may have query parameters corresponding to the data source type of the data source. In one example, the data extraction instruction I1 for extracting data from a MySQL type data source may have the following query parameters: database column, database table name, and query condition. In another example, the data extraction instruction I2 for extracting data from an HTTP type data source may have the following query parameters: domain name, request method, and request parameter.
[0078] In the disclosed embodiment, a data query instruction may be generated according to a data source configuration and query parameters corresponding to the data source configuration. In one example, for example, a query instruction assembly template corresponding to different types of data sources may be configured, and the instruction generation template defines a standard query instruction assembly format for data source configurations corresponding to different types of data sources, wherein one or more connection parameters in the data source configuration may be mapped to the instruction generation template to form a basic query structure; and specific query conditions may be filled in according to the obtained specific query parameter values; and the final data extraction instruction may be assembled and generated according to a preset grammatical format.
[0079] The method of the disclosed embodiment defines a standardized query instruction generation mechanism. After confirming the data source configuration, the standard query parameters corresponding to the data source configuration can be automatically confirmed. The configuration personnel only need to input the parameter values to automatically generate data extraction instructions in a standard format corresponding to the data source type, which greatly reduces the configuration complexity and improves the configuration efficiency.
[0080] In some embodiments of the present disclosure, when adding, editing, and other operations to data extraction instructions, a visual query parameter configuration interface may also be provided. In this embodiment, the method of the embodiment of the present disclosure may also include the step of providing a visual query parameter configuration page corresponding to the data source (configuration) in response to the determination of the data source (configuration), wherein the visual query parameter configuration page displays a query parameter area corresponding to the data source configuration. As an explanation and not a limitation, the configuration personnel only need to fill in the parameter value in the query parameter configuration area to efficiently generate the data extraction instruction, and can also conveniently modify it when the rule node is subsequently maintained.
[0081] In a specific example of the present disclosure, refer to Figure 3 , showing a visual query parameter configuration interface according to an embodiment of the present disclosure. In this embodiment, in response to the configuration personnel selecting an existing HTTP type data source D2, configurable query parameters are displayed in the form of a visual query parameter configuration interface, where URL is the domain name and method is the request method. It should be understood that in other embodiments, the configuration interface may also include more / fewer parameters, such as request headers (Headers), request body (Body), request parameters (parameters), etc., and the present disclosure does not limit this.
[0082] The method of the disclosed embodiment presets data source configurations corresponding to various types of data sources. After selecting a data source type, the configuration personnel can obtain the standard query parameters required to request the data source. There is no need to repeatedly use code to configure the connection to the database and the definition of parameters. The configuration personnel can generate query instructions by inputting parameter values, thereby improving the configuration efficiency of rule nodes.
[0083] 130: Establish an association between the data extraction instruction and the plurality of characteristic variables, so that the plurality of characteristic variables and the plurality of data fields corresponding to the data extraction instruction have a one-to-one mapping relationship.
[0084] In the disclosed embodiment, the characteristic variables include business parameters required to be used in the process of logic judgment (rule judgment) of the rule node. In one example, the rule process tree is used for the order review process, and the characteristic variables may include order amount, order status, customer level, etc.
[0085] In an embodiment of the present disclosure, the values of the multiple feature variables are obtained from the data source, for example, through the data extraction instruction configured in step S110. In an embodiment of the present disclosure, the multiple data fields corresponding to the data extraction instruction may include the data fields specified in the data query instruction. In one example, the fields to be queried are specified in the SQL query statement: "SELECT order_id, order_amount, order_status", and the query instruction specifies that the order number (order_id) and the order amount (order_amount) in the order table are to be obtained. In another embodiment, the data extraction instruction may not directly specify the data field, and the data field may include all data fields returned by the data source. In one example, when calling an API interface as a data source, when the data field to be returned is not specified in the request parameters, the API interface may return all user-related fields including user ID, user name, registration time, etc.
[0086] In the embodiment of the present disclosure, the aforementioned feature variables can be associated with the data fields in the data source obtained by the data extraction instruction through a mapping operation, so that multiple feature variables have a one-to-one mapping relationship with multiple data fields corresponding to the data extraction instruction. In a specific example, the amount field "order amount" is obtained from the order table of the data source using the data extraction instruction, and the feature variable "cost" is associated with the amount field "order amount" through a mapping operation.
[0087] 140: Construct multiple rules based on feature variables.
[0088] In the embodiment of the present disclosure, a rule may be set in each rule node, wherein each rule may include at least one corresponding feature variable and a judgment condition of the feature variable. In this embodiment, the judgment condition of the feature variable may include a comparison operator and a threshold value, wherein the comparison operator may include any one of the following comparison operators: greater than (>), less than (<), equal to (=), greater than or equal to (≥), less than or equal to (≤), and not equal to (!=), and the threshold value is a specific value used for comparison.
[0089] In a specific example of the present disclosure, the rule set in the rule node includes the feature variable "cost" (order amount) and its judgment condition, which is composed of the comparison operator ">" and "5000". The rule can be expressed as "cost>5000".
[0090] In some embodiments of the present disclosure, when a rule includes multiple feature variables and judgment conditions corresponding to the multiple feature variables, the rule of each rule node may include a judgment expression obtained by combining the one or more feature variables and the judgment conditions corresponding to the multiple feature variables, and the judgment expression may be composed of multiple feature variables and judgment conditions through logical operators. In this embodiment, the logical operators include but are not limited to (AND), or (OR), not (NOT), etc.
[0091] In another specific example of the present disclosure, the rule of the rule node includes three characteristic variables: "cost" (order amount), "level" (customer level) and "status" (order status). These three characteristic variables and their judgment conditions can be combined into a judgment expression through logical operators: "(cost>10000AND level=1)OR(status=2AND NOT level=0)". The judgment expression indicates that when the order amount is greater than 10,000 and the customer is at level 1, or when the order status is 2 and the customer level is not 0, the subsequent processing flow corresponding to the rule node is triggered.
[0092] By way of explanation and not limitation, one or more characteristic variables may be determined when constructing a rule, and one or more judgment conditions may be constructed based on the one or more characteristic variables. The embodiments of the present disclosure do not limit the number of judgment conditions constructed in a rule node.
[0093] In some embodiments of the present disclosure, Figure 4 As shown, the step of constructing a plurality of rules according to the characteristic variables may include at least 141 to 143.
[0094] In the embodiment of the present disclosure, as described above, one or more judgment conditions can be constructed by the one or more characteristic variables. Accordingly, the method of the embodiment of the present disclosure may also include the step of determining the characteristic variables required to construct a certain judgment condition from multiple associated characteristic variables.
[0095] 141: According to the rule construction instruction, select the feature variables involved in the construction rule.
[0096] In the embodiment of the present disclosure, the rule construction instruction may be generated in response to the user's selection of a feature variable, and the rule construction instruction may include basic information of the rule, such as a rule identifier, a rule name, and the like.
[0097] In the disclosed embodiment, the feature variable may have a preset data type, wherein the data type includes but is not limited to a number type (Number), a string type (String), a Boolean type (Boolean), a time type (DateTime), etc. As an explanation but not limitation, feature variables of different data types are suitable for different types of judgment conditions, which will be described in detail below.
[0098] 142: Set threshold judgment conditions for the characteristic variables involved in each rule.
[0099] In the embodiment of the present disclosure, threshold judgment conditions may be set for multiple feature variables respectively. In this embodiment, the threshold judgment conditions match the data types of the corresponding feature variables.
[0100] In some embodiments of the present disclosure, for numerical feature variables, threshold judgment conditions of numerical comparison type may be set. In one example, judgment conditions such as greater than (>) a specific value, less than (<) a specific value, equal to (=) a specific value, and between a specific numerical interval (between) may be set. In some embodiments, a judgment condition of whether it belongs to a preset numerical set may also be set.
[0101] In some embodiments of the present disclosure, for a string-type feature variable, a threshold judgment condition of a string matching class may be set. In one example, judgment conditions such as being equal to a specific string, containing a specific string, starting with a specific string, and ending with a specific string may be set. In some embodiments, a judgment condition of whether it belongs to a preset string set may also be set, or a judgment condition of a regular expression match may be set.
[0102] In some embodiments of the present disclosure, for Boolean feature variables, a threshold judgment condition equal to the class may be set. In one example, a judgment condition equal to true or equal to false may be set. In some embodiments, a judgment condition not equal to true or not equal to false may also be set.
[0103] In some embodiments of the present disclosure, for time-based feature variables, a threshold judgment condition of the time comparison type may be set. In one example, judgment conditions such as before a specific time, after a specific time, and between a specific time interval may be set. In some embodiments, a relative time judgment condition may also be set.
[0104] In the embodiment of the present disclosure, the selectable judgment condition types can be limited according to the data type of the feature variable, ensuring that only judgment conditions that match the data type of the feature variable can be selected. This mechanism of the embodiment of the present disclosure ensures the validity of the judgment condition in the rule configuration stage, avoiding possible rule execution errors caused by mismatch between the judgment condition and the data type in the subsequent rule execution stage.
[0105] In some embodiments of the present disclosure, the threshold of the set threshold judgment condition can also be checked for legitimacy. In one example, for the threshold of a numerical feature variable, it can be checked whether it is a legal value; for the threshold of a time-type feature variable, it can be checked whether it is a legal time format, etc. In some embodiments of the present disclosure, when the threshold verification result is illegal, illegal information can be fed back to prevent the creation of rules, and a prompt for setting a legal threshold can be generated. In one example, when the threshold of a numerical feature variable is set to non-numeric characters, a prompt "Please enter a valid value" can be generated; when the threshold format of a time-type feature variable is incorrect, a prompt "Please enter the time in the correct format" can be generated.
[0106] The method of the embodiment of the present disclosure can further ensure that the set threshold judgment condition is actually executable through this verification mechanism.
[0107] 143: According to the condition combination instruction, the threshold judgment conditions are combined to form a rule judgment logic.
[0108] In the embodiment of the present disclosure, multiple threshold judgment conditions can be combined according to the condition combination instruction, and the threshold judgment conditions can be combined to form a rule judgment logic. In this embodiment, the condition combination instruction may include but is not limited to a condition combination instruction manually confirmed by a user or a preset template.
[0109] In some embodiments of the present disclosure, the conditional combination instruction may include multiple threshold judgment conditions and logical operators, and the multiple threshold judgment conditions may be combined using logical operators.
[0110] In this embodiment, the logic operator may include an AND operator, an OR operator, a NOT operator, an XOR operator, etc., so as to combine multiple threshold judgment conditions into a rule judgment logic. In one example, the two judgment conditions of "age greater than 18 years old" and "status is active" can be combined by an AND operator, and the judgment condition of "amount greater than 5000" can be combined with the aforementioned combination conditions by an OR operator to form a rule judgment logic of "(age>18AND status='active')OR(amount>5000)".
[0111] In some embodiments of the present disclosure, the conditional combination instruction may include a combination structure type and a logical operator, and the combination structure type may be used to define the organization mode and hierarchical relationship between multiple threshold judgment conditions, and different combination structure types may be used to combine multiple threshold judgment conditions. In this embodiment, the combination structure type may include but is not limited to linear combination, tree combination, and matrix combination.
[0112] In one example, the conditional combination instruction includes a linear combination instruction, so that a plurality of judgment conditions can be simply connected in series by using a linear combination method. In a specific example, the linear combination instruction includes the threshold judgment conditions "annual income greater than 100,000" and "age greater than 18 years old", so that the AND operator can be used to directly form the rule judgment logic of "annual income greater than 100,000 AND age greater than 18 years old".
[0113] In another example, the conditional combination instruction includes a tree combination instruction, and the tree combination instruction may include multiple levels of logical operators and one or more threshold judgment conditions associated with the bottom logical operator, thereby nesting the judgment conditions in a hierarchical manner. In a specific example, the conditional combination instruction may include logical operator 1 "OR" with a level of 1, logical operator 2 "AND" with a level of 2, logical operator 3 "AND" with a level of 2, logical operator 2 associated with "monthly income greater than 8000" and "working years greater than 3 years", logical operator 3 associated with "age greater than 18 years old" and "credit score greater than 600", thereby forming a rule judgment logic of "(monthly income greater than 8000 AND working years greater than 3 years) OR (age greater than 18 years old AND credit score greater than 600)".
[0114] In another example, the conditional combination instruction includes a matrix combination instruction, and the matrix combination instruction may include the number and meaning of rows and columns, as well as the logical operators of specific positions, so that the judgment conditions can be cross-combined. In a specific example, the rows of the 3×3 judgment condition matrix may include age ranges ("18-25", "26-35", "36-50"), and the columns of the matrix combination may include consumption levels ("low", "medium", "high"), wherein each matrix unit corresponds to a rule judgment logic, "(age BETWEEN 18AND 25) AND (level = '1')" represents a young low-consumption group, "(age BETWEEN 26AND 35) AND (level = '3')" represents a middle-aged high-consumption group, etc., and the matrix combination method can clearly define and manage the judgment conditions of multi-dimensional intersection. It should be understood that the disclosed embodiment does not limit the type of the combination structure.
[0115] In some embodiments of the present disclosure, the system can verify the legality of the conditional combination. In one example, it can verify whether the use of logical operators is reasonable, whether the combination structure is complete, whether there is a conflict between the conditions, etc. In one example, for a linear combination structure, it can be verified whether the logical operators between adjacent judgment conditions are completely set. When it is detected that the logical operator is missing, a prompt "Please add a logical operator between adjacent conditions" can be generated. In another example, for a tree combination structure, the matching integrity of the brackets can be verified. When it is found that the brackets do not match, a prompt "Please confirm whether the opening and closing of the brackets are complete" can be generated. In another example, for a matrix combination structure, the integrity of the row and column dimensions can be verified. When there are vacant matrix cells, a prompt "Please complete the judgment conditions of all cross combinations" can be generated. The method of the embodiment of the present disclosure can ensure that the rule judgment logic formed by the combination has practical executability through this verification mechanism.
[0116] In the disclosed embodiments, the above method can realize modular construction of rules, improve the maintainability of rules, reduce the complexity of rule configuration by building in steps, and support flexible condition combinations to meet diverse business needs, and ensure the accuracy and reliability of rule judgment. The method of the disclosed embodiment also combines a visual configuration method to further improve the convenience of rule management, allowing business personnel to intuitively design and maintain complex rule processes.
[0117] 160: In response to the operation on the visualization node, construct a visualization rule process tree.
[0118] In some embodiments of the present disclosure, the visualized rule process tree may include a start node, multiple rule nodes, multiple control nodes, and lines for connecting the nodes.
[0119] In some embodiments of the present disclosure, the start node can be used as the starting point of the process processing. In one example, the start node can be connected to one or more downstream rule nodes to identify the execution entry of the rule process. In this embodiment, the start node can receive input data and pass the data to the downstream node for processing.
[0120] In this embodiment, the rule node can be used to reference a rule, wherein the rule is, for example, a business rule constructed in 140 of the present disclosure. In some embodiments of the present disclosure, the control node and the connection line can be used to define an execution relationship between multiple rule nodes. In this embodiment, the execution relationship includes, but is not limited to, a sequential execution relationship, a conditional jump relationship, a parallel branch relationship, and a summary and merging relationship.
[0121] In some embodiments of the present disclosure, the rule node may be used to execute the specific business rules included therein, such as the business rules constructed in step 140 in the embodiment of the present disclosure. In this embodiment, the rule node may execute the rules included therein to perform corresponding rule judgment on the received data, and determine the subsequent processing flow according to the judgment result.
[0122] In some embodiments of the present disclosure, the start node may be used as the starting point of the process processing. In one example, the start node may be connected to one or more downstream rule nodes to identify the execution entry of the rule process. In this embodiment, the start node may receive input data and pass the data to the downstream nodes for processing. In a specific example, refer to Figure 5 ,The starting node passes the received data to the subsequent “minor judgment” node for age condition judgment.
[0123] In some embodiments of the present disclosure, the rule node assumes the judgment function of the rule execution process. In some embodiments of the present disclosure, the rule node can be used to reference specific business rules, such as the business rules constructed in step 140 of the present disclosure. In this embodiment, the rule node can perform corresponding rule judgment on the received data and determine the subsequent processing flow according to the judgment result. In a specific example, refer to Figure 5 The "Business Location Rules" node executes the judgment logic related to the geographical location and business scope, and decides whether to enter the next node based on the judgment result.
[0124] In some embodiments of the present disclosure, the visualized rule process tree may include a tree structure in which at least some of the rule nodes and the control nodes are alternately arranged. Figure 5 , you can set up an alternating structure of "parallel node" - "equipment anti-fraud" - "personnel anti-fraud" - "merge node" in sequence, where the "equipment anti-fraud" node and the "personnel anti-fraud" node are rule nodes, and the "parallel node" and "merge node" are control nodes.
[0125] In some embodiments of the present disclosure, the visualized rule flow tree may include one or more pre-filtering nodes. In this embodiment, the one or more pre-filtering nodes may be arranged between the start node and the tree structure, and used to pre-determine whether to continue to execute the tree structure located after the pre-filtering node. Figure 5 The rule flow tree of the disclosed embodiment is applied in the credit application scenario: the "minor judgment" node is used as a pre-filtering node to pre-filter the credit application from the start node. When the "minor judgment" node recognizes that the applicant information of the credit application does not meet the age requirement, the "business location rule" node subsequent to the "minor judgment" node will not continue to be executed. On the contrary, when the "minor judgment" node recognizes that the applicant of the loan application meets the age requirement, the "business location rule" node subsequent to the "minor judgment" node will continue to be executed.
[0126] In some embodiments of the present disclosure, the control node may include a parallel node. In this embodiment, the parallel node may define parallel execution logic corresponding to multiple direct downstream rule nodes. In a specific example, refer to Figure 5 ,After the parallel node, the two parallel branches of “device anti-fraud” and “personnel anti-fraud” are executed simultaneously.
[0127] In some embodiments of the present disclosure, the control node may include a merge node. In this embodiment, the merge node may define the result aggregation logic of multiple direct upstream rule nodes executed in parallel. In a specific example, refer to Figure 5, the execution results of "device anti-fraud" - "personnel anti-fraud" are summarized and processed at the merge node. It is used to summarize the results of parallel execution, wherein: in this embodiment, the merge node can be used in pair with the aforementioned parallel node. As an explanation but not limitation, in the embodiments of the present disclosure, when parallel nodes are used in the rule flow tree to open multiple parallel execution branches, the corresponding merge nodes can be used to summarize the execution results of these parallel branches to form a closed parallel processing structure, ensuring that all parallel execution branches can be correctly summarized to avoid the situation where branch execution results are lost or not processed. In a specific example, in reference to Figure 5 The two parallel branches of "device anti-fraud" and "personnel anti-fraud" opened by the parallel node will eventually summarize the results through the corresponding merge node.
[0128] In some embodiments of the present disclosure, the control node may include a conditional branch node. In this embodiment, the conditional branch node may define a conditional execution logic for selecting a conditional branch to be executed according to a rule judgment result. Figure 5 The conditional branch node selectively executes the subsequent "credit rule" node or ends the process according to whether multiple parties are involved and the data input by the "multi-party rule".
[0129] As an explanation but not limitation, the inventors of the present disclosure have found that in addition to the high complexity of the overall coding method for rule nodes in the prior art, there are further technical problems. Specifically, the judgment logic and the flow logic are usually tightly coupled together in the business rule code. For example, in the business rule code of a single rule node, it is directly specified to which downstream node the data is passed when the conditions are met, to which downstream node the data is passed when the conditions are not met, or it is directly specified that the data is passed to all downstream nodes when the conditions are met. This design results in that even if the judgment logic of a certain configured rule node can be reused, since the flow logic is closely related to the position of the rule node in the process tree, when migrating the rule node to a new position, it is often necessary to rewrite the overall code of the rule to adapt to the new downstream node, and the direct reuse of the node cannot be achieved, resulting in the reusability of these nodes is still low even if a lot of resources are invested to complete the node configuration, and their value cannot be fully utilized.
[0130] For example, in a specific scenario, the function implemented by the code of a rule node 1 is: determine whether the input data is greater than 18, if it is greater than 18, send the data to all its downstream nodes, and terminate the execution if it is less than or equal to 18, and the above judgment logic and subsequent processing logic are implemented by the overall written code. When it is necessary to reuse the judgment function of the node in another position of the process tree, although the new position also needs to judge whether the data is greater than 18, it has different subsequent processing requirements: when the data is greater than 18, it is passed to the downstream node A, and when the data is less than or equal to 18, it is passed to the downstream node B. In this case, although the judgment logic of rule node 1 "determine whether the data is greater than 18" can be directly reused, the subsequent execution logic of rule node 1 does not meet the subsequent execution logic requirements of the new position, resulting in the inability to directly reuse the node. It is necessary to modify the code of rule node 1 and rewrite the subsequent execution logic code therein, which is complicated and error-prone.
[0131] In the method of the embodiment of the present disclosure, the above-mentioned technical problem is solved by a technical solution that separates the judgment logic from the flow logic. Specifically, the rule process tree configuration solution provided by the embodiment of the present disclosure includes: the rule node only encapsulates a single judgment logic, such as the "minor judgment" node only contains the age condition judgment code; the control node independently carries the flow control function, including conditional branch nodes for conditional execution, parallel nodes for parallel processing, and merge nodes for result aggregation. The method of the embodiment of the present disclosure uses this decoupling method to unbind the rule node from its position in the process, enhance the reusability of the node, and improve the flexibility of the rule process tree configuration.
[0132] In the embodiments of the present disclosure, when it is necessary to reuse the same judgment logic at different positions in the process tree, the rule nodes can be directly reused, and differentiated flow requirements can be achieved by configuring different control nodes. In one example, for the rule node that determines whether the data is greater than 18, the flow logic of "passing to downstream node X when greater than 18, and passing to downstream node Y when less than or equal to 18" is implemented at position A by configuring the conditional branch node; and the flow logic of "passing to multiple downstream nodes in parallel when greater than 18" is implemented by configuring the parallel node at position B. This method avoids repeatedly writing rule codes containing the same judgment logic at different positions.
[0133] The method of the embodiment of the present disclosure can determine the data source configuration in response to the data source selection, wherein the data source configuration includes the connection parameters and access protocol of the corresponding data source type; based on the data source configuration, generate data extraction instructions; establish the association between the data extraction instructions and multiple feature variables; construct multiple rules according to the feature variables, wherein each of the rules includes at least one corresponding feature variable and a judgment condition; in response to the operation of the visualization node, construct a visualized rule process tree, wherein: the visualized rule process tree includes a start node, multiple rule nodes and multiple control nodes and a line for connecting the nodes, the rule node is used to execute the rule, and the control node and the line are used to define the execution relationship of the rule node. The method of the embodiment of the present disclosure improves the reusability of the rule node and reduces the cost of repeated development by decoupling the judgment logic from the flow logic. By centralizing the flow logic into the control node for unified management, the operational complexity of the process adjustment is simplified, the maintenance efficiency is improved, and the modularization of the rule configuration is realized, so that the rule development and process configuration can be carried out independently, which greatly improves the development efficiency.
[0134] The method of the disclosed embodiment also forms a complete process control system through the combination of three control nodes (conditional branching, parallelism, and merging), and realizes a unified control mechanism for condition selection, parallel processing, and result aggregation, so that the logical relationship in any complex business process can be accurately mapped to a combination structure of rule nodes and control nodes, which is easy to adjust and maintain and can adapt to highly complex rule process tree configuration requirements.
[0135] In some embodiments of the present disclosure, a visual rule process tree configuration page that can be combined with the rule process tree configuration method of the embodiment of the present disclosure may also be provided, such as Figure 6 As shown, the rule process tree configuration method may further include the following 150.
[0136] 150: Provide a visual operation display interface.
[0137] In some embodiments of the present disclosure, the visual operation display interface may include a node display area for displaying a plurality of configurable visual nodes and a tree display area for displaying a constructed rule process tree.
[0138] In some embodiments of the present disclosure, the node display area can display, for example, a start node, an end node, one or more rule nodes, and one or more control nodes, etc., and the tree display area can display a rule process tree being constructed, including but not limited to nodes, lines connecting nodes, etc.
[0139] In a specific example of the present disclosure, reference Figure 8, which shows a visual operation display interface for configuring a rule process tree according to an embodiment of the present disclosure, including a node display area on the left and a tree display area on the right. Among them, the node display area on the left displays optional control nodes and rule nodes, wherein the control nodes include a start node, an end node, a conditional branch node, a merge node, and a parallel node, and the rule nodes include a minor judgment node, a business location rule node, an equipment anti-fraud rule node, a personnel anti-fraud rule node, a multi-head rule node, and a credit rule node; wherein the tree display area on the right displays a complete rule process tree, which is constructed starting from the start node, executing the minor judgment and business location rules in sequence, and is divided into two branches after reaching the parallel node, executing the equipment anti-fraud rule and the personnel anti-fraud rule at the same time, and then the two branches converge at the merge node, and execute the multi-head rule, and after reaching the conditional branch node, it is determined whether to pass the credit rule or finally reach the end node according to whether it involves multiple heads.
[0140] In some embodiments of the present disclosure, Figure 7 As shown, the step of constructing a visualized rule process tree structure in response to the operation on the visualization node may at least include the following 161 to 165.
[0141] 161: Create the start node and generate the first node proposal.
[0142] In an embodiment of the present disclosure, optionally any rule process tree includes a start node and an end node. In this embodiment, in response to creating a start node in the visual operation display interface, a first node suggestion can be provided, and the first node suggestion includes a selection suggestion for the first node after the start node. In some embodiments of the present disclosure, the first node suggestion includes but is not limited to a node type and / or a specific rule node.
[0143] In some embodiments of the present disclosure, the first node suggestion may be generated based on the operation history of the user configuring the process tree, and the operation history may include at least the next node most frequently used by the user after creating the start node.
[0144] In some embodiments of the present disclosure, a suggestion of the first node type after the start node can be provided based on the node type of the next node most frequently used by the user after the start node in the historical operations. In one example, if the user most frequently uses the pre-filter node after the start node in the historical operations, the pre-filter nodes available for selection can be prompted and displayed after the start node is created.
[0145] In some embodiments of the present disclosure, a suggestion of the first node after the start node may be provided based on the next specific node most frequently used by the user after the start node in the historical operations. In one example, if the user most frequently uses a parallel node after the start node in the historical operations, a parallel node may be recommended for the user to select.
[0146] 162: In response to a dragging operation of dragging a visualization node in the node display area to the tree display area, adding the operated visualization node to the constructed rule flow tree.
[0147] In an embodiment of the present disclosure, in response to dragging a node from the node display area to a certain position in the tree display area and releasing it, a node instance of the corresponding type is created at the position.
[0148] In some embodiments of the present disclosure, the validity of the drag release position may also be checked. In this embodiment, the validity check may include but is not limited to: checking whether the release position is located in the tree display area, whether there is a position conflict with an existing node, whether the minimum spacing requirement with adjacent nodes is met, etc. In some embodiments of the present disclosure, when the validity check fails, the following steps may be performed, including but not limited to canceling the node adding operation and returning the dragged node to the original position, etc.
[0149] 163: Generate a connection between the added node and the directly upstream node.
[0150] In an embodiment of the present disclosure, after a node is added, the direct upstream node of the newly added node can be identified. In one example, the nearest potential upstream node can be identified based on the positional relationship of the nodes, and a connection that meets the specification of the rule flow tree can be generated. In some embodiments, it can also be verified whether the output capability of the upstream node matches the input requirements of the newly added node, and the connection is generated only when the matching relationship is satisfied. In this embodiment, if the upstream node and the newly added node do not satisfy the matching relationship, a prompt message "The current node type output does not match the target node input" can be generated.
[0151] 164: Determine whether the added node conforms to the tree structure of the alternating setting at the current position.
[0152] In the embodiment of the present disclosure, after a node is added, it is verified whether the adjacent nodes satisfy the alternating tree structure of "rule node-control node". In one example, it is possible to verify whether the adjacent conditional branch nodes have the necessary branch paths.
[0153] 165: In the case where the added node conforms to the tree structure of the alternating arrangement, a subsequent node suggestion is generated according to the type of the added node.
[0154] In an embodiment of the present disclosure, when the added node conforms to an alternating tree structure, subsequent node suggestions can be intelligently generated based on the type and position of the current node. In one example, if the added node is a rule node, an optional control node type can be suggested, such as a conditional branch node, a parallel node, etc. In another example, if the added node is a control node, an optional control node or rule node type can be suggested. In this embodiment, the suggestion can be combined with, for example, the type of feature variables used in the aforementioned rule node, the type of data field used, etc., and the present disclosure does not limit this.
[0155] In some embodiments of the present disclosure, the step of constructing a visualized rule process tree structure may further include the following 166 (not shown).
[0156] 166: Performing an overall structure check on the constructed rule process tree, and generating node supplement suggestions and / or connection adjustment suggestions for the alternately arranged tree structure according to the check result of the overall structure check.
[0157] In some embodiments of the present disclosure, the overall structure of the constructed rule process tree may also be checked.
[0158] In some embodiments of the present disclosure, the overall structure check includes but is not limited to node structure integrity check and logical structure integrity check. In this embodiment, the node structure integrity check includes, for example, verifying whether there are isolated nodes, verifying whether necessary nodes (such as start nodes, end nodes) are missing, etc., and the logical structure integrity check includes, for example, confirming whether the branch path of the conditional branch node is closed, confirming whether the branch path of the parallel node is aggregated to the merge node, etc. The structural integrity check in this embodiment is combined with the checks in 143 and 162 above, which can further reduce the possibility of node configuration errors in the rule process tree, especially in the rule process tree configuration with high complexity.
[0159] In some embodiments of the present disclosure, specific node supplement suggestions may be generated for detected structural defects.
[0160] The method of the disclosed embodiment not only provides an intuitive visual configuration method, but also ensures the accuracy and standardization of the rule process tree configuration through multiple verification and suggestion mechanisms, significantly improving the configuration efficiency of the rule process tree.
[0161] In some embodiments of the present disclosure, a data processing method based on a rule process tree is also provided, wherein the rule process tree can be configured according to the rule process tree configuration method in any of the above embodiments of the present disclosure.
[0162] In some embodiments of the present disclosure, Fig. 9As shown, the data processing method may at least include the following: 910, 920 and 930.
[0163] 910: In response to the data processing request, extract the data to be processed from the data source.
[0164] In the embodiment of the present disclosure, the data processing request includes but is not limited to a data processing request sent from a business system, such as an order system, a risk control system, etc. In a specific example, the data processing request is a risk assessment request from a business decision system.
[0165] 920: Start execution according to the start node of the rule flow tree, and sequentially process the nodes in the rule flow tree.
[0166] In the embodiment of the present disclosure, the sequential execution includes sequential execution from upstream nodes to downstream nodes, for example, sequentially executing all rule nodes and control nodes therein in the direction from "start node" to "end node".
[0167] In some embodiments of the present disclosure, for a rule node, a data field in a data source may be extracted to obtain a characteristic variable value. In this embodiment, the acquisition of the characteristic variable value may refer to the description of 130 above in this application, for example, it may be determined by mapping the corresponding field value from the extracted data to be processed. In this embodiment, the characteristic variable value may be judged based on the rule judgment logic in the rule referenced by the rule node to obtain a rule judgment result.
[0168] In some embodiments of the present disclosure, for a control node, the next node to be executed can be determined based on the control node and the associated connection. In this embodiment, the corresponding flow control logic can be executed according to the type of the control node (conditional branch node, parallel node, merge node, etc.) to determine the next node connected to it. In one example, for a conditional branch node, a branch path can be selected based on the judgment result output by the upstream rule node, and the nearest node on the branch path can be determined as the next node to be executed. In another example, for a parallel node, all downstream nodes connected to it can be simultaneously determined as nodes to be executed.
[0169] 930: Generate a data processing result according to the final rule judgment result.
[0170] In the disclosed embodiment, the final data processing result can be generated according to the execution result of the last executed node of the rule process tree. In this embodiment, the final data processing result includes but is not limited to: the processing decision result corresponding to the output data of the last executed node, the execution path record, the statistical information of the processing process, etc.
[0171] The data processing method of the rule process tree disclosed above provides efficient and reliable technical support for data processing in complex business scenarios through standardized node processing procedures and flexible flow control mechanisms.
[0172] In some embodiments of the present disclosure, Fig.10 As shown, a rule process tree configuration device 1000 is also provided, which may at least include: a determination unit 1010, a generation unit 1020, an association unit 1030, a first construction unit 1040 and a second construction unit 1050. Among them:
[0173] The determining unit 1010 is configured to determine a data source configuration in response to the data source selection, wherein the data source configuration includes connection parameters and access protocols corresponding to the data source type;
[0174] The generating unit 1020 is configured to generate a data extraction instruction based on the data source configuration, wherein the data extraction instruction has a query parameter corresponding to the data source type;
[0175] The association unit 1030 is configured to establish an association between the data extraction instruction and a plurality of characteristic variables, so that the plurality of characteristic variables and a plurality of data fields corresponding to the data extraction instruction have a one-to-one mapping relationship;
[0176] The first construction unit 1040 is configured to construct a plurality of rules according to the characteristic variables, wherein each of the rules includes at least one corresponding characteristic variable and a judgment condition;
[0177] The second construction unit 1050 is configured to construct a visualized rule process tree in response to an operation on a visualization node, wherein: the visualized rule process tree includes a start node, multiple rule nodes and multiple control nodes and lines for connecting the nodes, the rule nodes are used to execute the rules, and the control nodes and the lines are used to define the execution relationship of the rule nodes.
[0178] In some embodiments of the present disclosure, Fig.11 As shown, a data processing device 1100 based on a rule process tree is also provided, which may at least include: an extraction unit 1110, an execution unit 1120 and an output unit 1130. Among them,
[0179] The extracting unit 1110 is configured to extract the data to be processed from the data source in response to a data processing request;
[0180] The execution unit 1120 is configured to start execution according to the start node of the rule flow tree and sequentially process the nodes in the rule flow tree, wherein: for a rule node, extract the data field in the data source to obtain a characteristic variable value, and judge the characteristic variable value according to the rule judgment logic in the rule referenced by the rule node to obtain a rule judgment result; for a control node, determine the next node to be executed according to the control node and the associated connection;
[0181] The output unit 1130 is configured to generate a data processing result according to the final rule judgment result.
[0182] In the embodiments of the present disclosure, the device embodiments may refer to the method embodiments and may implement the steps described in the method embodiments, and the features of the device embodiments may be incorporated into the method embodiments in a non-contradictory manner, and vice versa.
[0183] In some embodiments of the present disclosure, Fig.12 As shown, a schematic diagram of an electronic device 1200 that can implement the method of the disclosed embodiment is provided, and in some embodiments, more or fewer electronic devices than shown may be included. In some embodiments, it can be implemented using a single or multiple electronic devices. In some embodiments, it can be implemented using cloud or distributed electronic devices.
[0184] like Fig.12 As shown, the electronic device 1200 includes a processor 1201, which can perform various appropriate operations and processes according to the programs and / or data stored in the read-only memory (ROM) 1202 or the programs and / or data loaded from the storage part 1208 to the random access memory (RAM) 1203. CPU 1201 can be a multi-core processor, or it can include multiple processors. In some embodiments, the processor 1201 can include a general main processor and one or more special coprocessors, such as a graphics processing unit (GPU), a neural network processor (NPU), a digital signal processor (DSP), etc. In RAM 1203, various programs and data required for the operation of the electronic device 1200 are also stored. CPU 1201, ROM 1202 and RAM 1203 are connected to each other via bus 1204. Input / output (I / O) interface 1205 is also connected to bus 1204.
[0185] The processor and the memory are used together to execute the program stored in the memory. When the program is executed by the computer, the steps or functions of the methods described in the above embodiments can be implemented.
[0186] The following components are connected to the I / O interface 1205: an input section 1206 including a keyboard, a mouse, a touch screen, etc.; an output section 1207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN card, a modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1210 as needed, so that a computer program read therefrom is installed into the storage section 1208 as needed. Figure 7 Only some components are schematically shown in the figure, which does not mean that the computer system 1200 only includes Fig.12 Components shown.
[0187] The systems, devices, modules or units described in the above embodiments may be implemented by a computer or its associated components. The computer may be, for example, a mobile terminal, a smart phone, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a personal digital assistant, a media player, a navigation device, a game console, a tablet computer, a wearable device, a smart TV, an Internet of Things system, a smart home, an industrial computer, a server or a combination thereof.
[0188] Although not shown, in an embodiment of the present disclosure, a program product is provided, including a computer program, and when the computer program is executed by a processor, the method of any one of the embodiments of the present disclosure is implemented.
[0189] Although not shown, in an embodiment of the present disclosure, a storage medium is provided, the storage medium storing a computer program, the computer program being configured to implement any method of the embodiments of the present disclosure when executed.
[0190] The storage media in the embodiments of the present disclosure include permanent and non-permanent, removable and non-removable items that can be implemented by any method or technology to store information. Examples of storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
[0191] The methods, programs, systems, devices, etc. of the embodiments of the present disclosure may be executed or implemented in a single or multiple networked computers, or may be practiced in a distributed computing environment. In the embodiments of the present specification, in these distributed computing environments, tasks may be performed by remote processing devices connected via a communication network.
[0192] Those skilled in the art should understand that the embodiments of the present specification may be provided as methods, systems or computer program products. Therefore, those skilled in the art may imagine that the functional modules / units or controllers and related method steps described in the above embodiments may be implemented in software, hardware or a combination of software / hardware.
[0193] Unless explicitly stated, the actions or steps of the methods, programs, and embodiments of the present disclosure do not have to be performed in a specific order and can still achieve the desired results. In some implementations, multitasking and parallel processing are also possible or may be advantageous.
[0194] In this article, multiple embodiments of the present disclosure are described, but for the sake of brevity, the description of each embodiment is not exhaustive, and the same or similar features or parts between the embodiments may be omitted. In this article, "one embodiment", "some embodiments", "example", "specific example", or "some examples" are meant to be applicable to at least one embodiment or example according to the present disclosure, rather than all embodiments. The above terms do not necessarily mean to refer to the same embodiment or example. In the absence of contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples.
[0195] The exemplary systems and methods of the present disclosure have been specifically shown and described with reference to the above embodiments, which are merely examples of the best modes for implementing the present systems and methods. It will be appreciated by those skilled in the art that various changes may be made to the embodiments of the systems and methods described herein when implementing the present systems and / or methods without departing from the spirit and scope of the present disclosure as defined in the appended claims.
Claims
1. A rule process tree configuration method, characterized in that: include: In response to the data source selection, determining a data source configuration, wherein the data source configuration includes connection parameters and access protocols corresponding to the data source type; Based on the data source configuration, generating a data extraction instruction, wherein the data extraction instruction has a query parameter corresponding to the data source type; Establishing an association between the data extraction instruction and a plurality of characteristic variables so that the plurality of characteristic variables and a plurality of data fields corresponding to the data extraction instruction have a one-to-one mapping relationship; Constructing a plurality of rules according to the characteristic variables, wherein each of the rules includes at least one corresponding characteristic variable and a judgment condition; In response to the operation on the visualization node, a visualization rule process tree is constructed, wherein: the visualization rule process tree includes a start node, multiple rule nodes and multiple control nodes and lines for connecting the nodes, the rule nodes are used to execute the rules, and the control nodes and the lines are used to define the execution relationship of the rule nodes.
2. The rule process tree configuration method according to claim 1, characterized in that: The visualized rule process tree includes a tree structure in which at least part of the rule nodes and the control nodes are alternately arranged.
3. The rule process tree configuration method according to claim 2, characterized in that: The visualized rule flow tree includes one or more pre-filtering nodes, which are arranged between the start node and the tree structure and used for pre-judgment of whether to continue to execute the tree structure subsequent to the pre-filtering node.
4. The rule process tree configuration method according to claim 2, characterized in that: The method further comprises: providing a visualization operation display interface, the visualization operation display interface comprising a node display area for displaying a plurality of configurable visualization nodes and a tree display area for displaying a constructed rule flow tree; The step of constructing a visualized rule process tree structure in response to the operation on the visualized node includes: Create a start node and generate the first node proposal; In response to a dragging operation of dragging a visualization node in the node display area to the tree display area, adding the operated visualization node to the constructed rule flow tree; Generate a connection between an added node and a direct upstream node, wherein the added node is the operated visualization node added in the rule flow tree; In the case where the added nodes conform to the tree structure arranged alternately, subsequent node suggestions are generated according to the types of the added nodes.
5. The rule process tree configuration method according to claim 4, characterized in that: The step of constructing a visualized rule process tree structure in response to an operation on a visualized node also includes: An overall structure check is performed on the constructed rule process tree, and node supplement suggestions and / or connection adjustment suggestions are generated for the alternately arranged tree structure according to the check result of the overall structure check.
6. The rule process tree configuration method according to any one of claims 1 to 5, characterized in that: The control node includes a conditional branch node, which defines a conditional execution logic for selecting a conditional branch to be executed according to a rule judgment result; and / or The control node includes a parallel node, and the parallel node defines parallel execution logic corresponding to a plurality of direct downstream rule nodes; and / or The control node includes a merge node that defines result aggregation logic for a plurality of directly upstream rule nodes executed in parallel.
7. The rule process tree configuration method according to any one of claims 1 to 5, characterized in that: The step of constructing rules according to feature variables includes: According to the rule construction instruction, a feature variable involved in constructing the rule is selected, wherein the feature variable has a preset data type; Setting a threshold for each characteristic variable involved in the rule, wherein the threshold judgment condition matches the data type of the corresponding characteristic variable; According to the condition combination instruction, the threshold judgment conditions are combined to form a rule judgment logic.
8. A data processing method based on a rule process tree, characterized in that: The rule flow tree is configured according to the configuration method described in any one of claims 1 to 7, and the data processing method includes: In response to a data processing request, extracting data to be processed from a data source; Execution starts according to the start node of the rule flow tree, and the nodes in the rule flow tree are processed sequentially, wherein: For a rule node, extract the data field in the data source to obtain a characteristic variable value, and judge the characteristic variable value according to the rule judgment logic in the rule referenced by the rule node to obtain a rule judgment result; For a control node, determining the next node to be executed according to the control node and the associated connection; Generate data processing results based on the final rule judgment results.
9. A rule process tree configuration device, characterized in that: include: a determining unit configured to determine a data source configuration in response to the data source selection, wherein the data source configuration includes connection parameters and access protocols corresponding to the data source type; a generating unit configured to generate a data extraction instruction based on the data source configuration, wherein the data extraction instruction has a query parameter corresponding to the data source type; an associating unit configured to establish an association between the data extraction instruction and a plurality of characteristic variables, so that the plurality of characteristic variables and a plurality of data fields corresponding to the data extraction instruction have a one-to-one mapping relationship; A first construction unit is configured to construct a plurality of rules according to the characteristic variables, wherein each of the rules includes at least one corresponding characteristic variable and a judgment condition; The second construction unit is configured to construct a visualized rule process tree in response to an operation on a visualization node, wherein: the visualized rule process tree includes a start node, multiple rule nodes and multiple control nodes and lines for connecting the nodes, the rule nodes are used to execute the rules, and the control nodes and the lines are used to define the execution relationship of the rule nodes.
10. A data processing device based on a rule process tree, characterized in that: include: An extraction unit, configured to extract the data to be processed from the data source in response to the data processing request; The execution unit is configured to start execution according to the start node of the rule flow tree and sequentially process the nodes in the rule flow tree, wherein: for the rule node, extract the data field in the data source to obtain the characteristic variable value, judge the characteristic variable value according to the rule judgment logic in the rule referenced by the rule node, and obtain the rule judgment result; for the control node, determine the next node to be executed according to the control node and the associated connection; The output unit is configured to generate a data processing result according to the final rule judgment result.
11. An electronic device, characterized in that: include: A processor and a memory storing a computer program, wherein the processor is configured to implement the method according to any one of claims 1 to 8 when running the computer program.
12. A program product comprising a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.