Service rule condition processing method and related equipment
Through automated number collection and calculation processes, the problem of low configuration of business rules and calculation efficiency in the existing technology is solved, and efficient and accurate processing of business rules and conditions is achieved.
Patent Information
- Application Number
- CN202411845516.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-04-11
AI Technical Summary
The existing business rule conditions process requires manual writing or modification of model code during the configuration stage, resulting in low configuration efficiency and thus affecting computing efficiency.
By obtaining the number-get item mapping table and business rule conditions, determining the number-get rule configuration information and node path, automatically performing node count acquisition and calculating business rule conditions, and realizing zero-code configuration.
Improve the configuration efficiency and computing efficiency of business rule conditions, reduce the complexity of upgrade and maintenance, and enhance processing efficiency and accuracy.
Smart Images

Figure CN119809540A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of business rule condition processing, and more specifically, to a business rule condition processing method, a business rule condition processing apparatus, a computer device, a computer-readable storage medium, and a computer program product including instructions or a computer program. Background Art
[0002] As enterprises' demands for personalized and refined business management grow, business rule conditions need to be processed in order to meet challenges and demands.
[0003] The existing method of handling business rule conditions is that during the configuration phase of the business rule conditions, the old model needs to be upgraded and maintained. Specifically, during the configuration phase of the business rule conditions, each time a new field or rule change occurs, it is necessary to manually write or modify the code corresponding to the preset model structure. During the calculation phase, the system will check whether the newly added field belongs to an existing prefabricated model. Only when the field matches will it be processed according to the pre-set logic, further prolonging the entire calculation process.
[0004] However, in this method of processing business rule conditions, during the configuration stage of the business rule conditions, each time a new field is added, the model needs to be manually rewritten, the configuration efficiency of the business rule conditions is low, and thus the calculation efficiency of the business rule conditions is low. Therefore, the processing efficiency of the business rule conditions is low. Summary of the invention
[0005] The embodiments of the present application provide a method for processing business rule conditions, a device for processing business rule conditions, a computer device, a computer-readable storage medium, and a computer program product including instructions or a computer program, which can process business rule conditions while improving the processing efficiency of business rule conditions.
[0006] In a first aspect, an embodiment of the present application provides a method for processing a business rule condition, including:
[0007] Obtain a data acquisition item mapping table and business rule conditions of the data acquisition subject, wherein the key of the data acquisition item mapping table is used to represent the identifier of each data acquisition item, and the value corresponding to the key is used to represent the data acquisition rule configuration information of each of the data acquisition items, and the business rule conditions include the identifier of each target data acquisition item and the business rule condition configuration information of each of the target data acquisition items;
[0008] For each target data acquisition project, based on the identifier of the target data acquisition project, determine the data acquisition rule configuration information of the target data acquisition project from the data acquisition project mapping table, and determine the data acquisition node path of the target data acquisition project from a preset node relationship diagram based on the data acquisition rule configuration information of the target data acquisition project, wherein the data acquisition node path of the target data acquisition project includes each node corresponding to the target data acquisition project and the dependency relationship between each node;
[0009] According to the dependency relationship between the nodes, data of each node corresponding to the target data acquisition project is acquired based on the data acquisition rule configuration information of the target data acquisition project in turn to obtain the target data of the target data acquisition project;
[0010] The target data of each target data acquisition item is calculated based on the business rule condition configuration information of each target data acquisition item, so as to obtain the calculation result of the business rule condition based on the calculation result of the business rule condition configuration information of each target data acquisition item.
[0011] In a second aspect, an embodiment of the present application provides a device for processing business rule conditions, including:
[0012] An acquisition unit is used to acquire a data acquisition item mapping table and business rule conditions of a data acquisition subject, wherein the key of the data acquisition item mapping table is used to represent the identifier of each data acquisition item, and the value corresponding to the key is used to represent the data acquisition rule configuration information of each of the data acquisition items, and the business rule conditions include the identifier of each target data acquisition item and the business rule condition configuration information of each of the target data acquisition items;
[0013] A determination unit is used to determine, for each target data acquisition item, data acquisition rule configuration information of the target data acquisition item from the data acquisition item mapping table based on the identifier of the target data acquisition item, and determine a data acquisition node path of the target data acquisition item from a preset node relationship diagram based on the data acquisition rule configuration information of the target data acquisition item, wherein the data acquisition node path of the target data acquisition item includes each node corresponding to the target data acquisition item and a dependency relationship between each node;
[0014] A data acquisition unit, configured to acquire data from each node corresponding to the target data acquisition project in sequence based on the data acquisition rule configuration information of the target data acquisition project according to the dependency relationship between the nodes, so as to obtain target data of the target data acquisition project;
[0015] The calculation unit is used to calculate the target data of each target data acquisition item based on the business rule condition configuration information of each target data acquisition item, so as to obtain the calculation result of the business rule condition based on the calculation result of the business rule condition configuration information of each target data acquisition item.
[0016] In a third aspect, an embodiment of the present application provides a computer device, including:
[0017] CPU, memory, input and output interfaces, wired or wireless network interfaces, and power supply;
[0018] The memory is a short-term storage memory or a persistent storage memory;
[0019] The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the aforementioned processing method of the business rule conditions.
[0020] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes instructions. When the instructions are executed on a computer, the computer executes the aforementioned method for processing business rule conditions.
[0021] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when the computer program product is run on a computer, enables the computer to execute the aforementioned method for processing business rule conditions.
[0022] It can be seen from the above technical scheme that the embodiment of the present application has the following advantages: the data acquisition project mapping table and the business rule conditions can be obtained, the key of the data acquisition project mapping table is used to characterize the identification of each data acquisition project, the value corresponding to the key is used to characterize the data acquisition rule configuration information of each data acquisition project, the business rule conditions include the identification of each target data acquisition project and the business rule condition configuration information of each target data acquisition project, the business rule condition configuration requirements can be completed in the runtime state zero code configuration, and there is no need to upgrade and complex maintenance in the existing business rule condition processing method, the business rule condition configuration efficiency is high, so the data acquisition and calculation efficiency of the business rule condition is high, therefore, the processing efficiency of the business rule condition is high. Further, the data acquisition node path of the target data acquisition project can be determined from the preset node relationship diagram based on the data acquisition rule configuration information of the target data acquisition project, and the data is acquired according to the dependency relationship between the nodes of the data acquisition node path, which can improve the feasibility, completeness and accuracy of data acquisition, and can improve the efficiency of determining the data acquisition order, therefore, the processing efficiency and accuracy of the business rule condition are high. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 A schematic diagram of the architecture of a system for processing business rule conditions disclosed in an embodiment of the present application;
[0024] Figure 2 A flowchart of a method for processing business rule conditions disclosed in an embodiment of the present application
[0025] Figure 3A flowchart of another processing of business rule conditions disclosed in an embodiment of the present application;
[0026] Figure 4 A schematic diagram of a flow chart of data acquisition and calculation of a rule engine disclosed in an embodiment of the present application;
[0027] Figure 5 A schematic diagram of a preset node relationship diagram disclosed in an embodiment of the present application;
[0028] Figure 6 A flowchart of a method for acquiring data based on a data acquisition service disclosed in an embodiment of the present application;
[0029] Figure 7 A flowchart of another processing of business rule conditions disclosed in an embodiment of the present application;
[0030] Figure 8 A schematic diagram showing the difference between the processing flow of a business rule condition of an existing application and the processing flow of the present application disclosed in an embodiment of the present application;
[0031] Fig. 9 A schematic diagram of a data acquisition item interface disclosed in an embodiment of the present application;
[0032] Fig.10 A schematic diagram of a data acquisition configuration interface disclosed in an embodiment of the present application;
[0033] Fig.11 A schematic diagram of an interface for a data acquisition application scenario disclosed in an embodiment of the present application;
[0034] Fig.12 A schematic diagram of a business rule condition configuration interface disclosed in an embodiment of the present application;
[0035] Fig.13 A schematic diagram of the structure of a device for processing business rule conditions disclosed in an embodiment of the present application;
[0036] Fig.14 A schematic diagram of the structure of a computer device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0037] The embodiments of the present application provide a method for processing business rule conditions, a device for processing business rule conditions, a computer device, a computer-readable storage medium, and a computer program product including instructions or a computer program, which can process business rule conditions while improving the processing efficiency of business rule conditions.
[0038] The present application can be applied to various information management systems, such as enterprise resource planning systems (ERP), tax systems, financial systems, human resources systems, supply chain systems, etc.
[0039] See also Figure 1 , an architecture of a system for processing business rule conditions in an embodiment of the present application includes:
[0040] Computer device (business rule condition processing device) 101 and client 102. When processing business rule conditions, computer device 101 can be connected to client 102. The computer device 101 can obtain the data acquisition rule configuration information of each data acquisition project sent by the client 102, and generate a data acquisition project mapping table based on the data acquisition rule configuration information of each data acquisition project. It can also obtain the business rule condition configuration information of the data acquisition subject sent by the client 102, and generate business rule conditions based on the business rule condition configuration information of the data acquisition subject. Then, for each target data acquisition project, based on the identifier of the target data acquisition project, the data acquisition rule configuration information of the target data acquisition project can be determined from the data acquisition project mapping table, and based on the data acquisition rule configuration information of the target data acquisition project, the data acquisition node path of the target data acquisition project can be determined from the preset node relationship diagram. Then, according to the dependency relationship between each node, the data of each node corresponding to the target data acquisition project is acquired based on the data acquisition rule configuration information of the target data acquisition project in turn to obtain the target data of the target data acquisition project. Finally, the target data of each target data acquisition project is calculated based on the business rule condition configuration information of each target data acquisition project to obtain the calculation result of the business rule condition, and the calculation result of the business rule condition is returned to the client 102.
[0041] Some key terms in the examples of this application are explained as follows:
[0042] Unicode: A unique (non-repeatable) identifier used to identify a unique "data entry".
[0043] Rules Engine Controls: Controls used to configure rule conditions on a page.
[0044] Rule engine calculation: used to calculate the configured rule conditions and return the results.
[0045] Software running state: In addition to the design state (used to indicate that the software is still in the development stage and a large number of business standard models will be designed), there is another state of the software life cycle. The software running state is used to indicate that the software has been put into operation. At this time, the standard model and standard logic design of the design state cannot be adjusted.
[0046] based on Figure 1 For the processing system of the business rule conditions shown, see Figure 2 , Figure 2 The following is a flow chart of a method for processing a business rule condition disclosed in an embodiment of the present application, wherein the method comprises:
[0047] 201. Obtain a data acquisition item mapping table and business rule conditions of the data acquisition subject. The key of the data acquisition item mapping table is used to represent the identifier of each data acquisition item, and the value corresponding to the key is used to represent the data acquisition rule configuration information of each data acquisition item. The business rule conditions include the identifier of each target data acquisition item and the business rule condition configuration information of each target data acquisition item.
[0048] In this embodiment, when processing business rule conditions, the data acquisition item mapping table and the business rule conditions of the data acquisition subject can be obtained. The keys of the data acquisition item mapping table are used to represent the identifiers of each data acquisition item, and the values corresponding to the keys are used to represent the data acquisition rule configuration information of each data acquisition item. The business rule conditions include the identifiers of each target data acquisition item and the business rule condition configuration information of each target data acquisition item.
[0049] Among them, the method for obtaining the data acquisition project mapping table and the business rule conditions of the data acquisition subject can be, obtaining the data acquisition rule configuration information of each data acquisition project, and generating the data acquisition project mapping table based on the data acquisition rule configuration information of each data acquisition project, the data acquisition project mapping table includes the identification of each data acquisition project and the data acquisition rule configuration information of each data acquisition project, obtaining the business rule condition configuration information of the data acquisition subject, and generating the business rule conditions based on the business rule condition configuration information of the data acquisition subject, the business rule conditions include the identification of each target data acquisition project and the business rule condition configuration information of each target data acquisition project.
[0050] Specifically, the processing of business rule conditions may include but is not limited to the processing of business rule conditions for attendance business and salary business, and the processing of business rule conditions includes but is not limited to the configuration of data acquisition rules of data acquisition items, the configuration of business rule conditions, the execution of business rule conditions, etc. The data acquisition rule configuration information is used to characterize the data acquisition strategy and process details of a specific data acquisition item, including but not limited to the data acquisition source, data acquisition entity (key information for extracting required data from the data source), result output method, etc. The data acquisition item is used to characterize the specific data items that need to be collected in the business system, such as age, overtime location, etc. The business rule condition configuration information of each target data acquisition item may include a comparison value (such as a benchmark value 18, etc.) and a condition symbol (including but not limited to greater than or equal to, equal to, less than or equal to, greater than, less than). The business rule condition of the data acquisition subject may only include the identification of a target data acquisition item and the business rule condition configuration information, or may include the identification of multiple target data acquisition items, the business rule condition configuration information of multiple target data acquisition items, and the conditional logic between the rules corresponding to the multiple target data acquisition items, and the conditional logic includes but is not limited to satisfying all conditions (and), satisfying any condition (or) and custom logic, etc. To be more specific, for example, if there is an application request for "Zhang San worked overtime on October 1 and was given a day off", the business rule condition of the data retrieval subject (<Zhang San, October 1>) can be represented, for example, as "age 001 (identifier) is greater than or equal to 18", or as "age 001 (identifier) is greater than or equal to 18, attendance location 002 (identifier) is equal to Shenzhen, overtime location 003 (identifier) is equal to Shenzhen, and job grade 004 (identifier) is equal to level three".
[0051] It is worth mentioning that you only need to obtain the data retrieval project mapping table and the business rule conditions of the data retrieval subject to complete the business rule configuration requirements with zero code configuration at runtime, which can effectively reduce various costs in the software development and implementation process, significantly improve the efficiency and quality of software delivery, and ensure the on-time delivery of software products that meet high standards.
[0052] It is also worth mentioning that after obtaining the data retrieval rule configuration information of each data retrieval item and generating a data retrieval item mapping table based on the data retrieval rule configuration information of each data retrieval item, the rules for these data retrieval items can be configured in the business rule configuration environment, and a reuse scenario can be provided. There is no need for multiple upgrades and complex maintenance in the existing business rule condition processing method. The configuration efficiency of the business rule conditions is higher, and thus the processing efficiency of the business rule conditions is higher.
[0053] 202. For each target data acquisition project, based on the identifier of the target data acquisition project, determine the data acquisition rule configuration information of the target data acquisition project from the data acquisition project mapping table, and based on the data acquisition rule configuration information of the target data acquisition project, determine the data acquisition node path of the target data acquisition project from the preset node relationship diagram, the data acquisition node path of the target data acquisition project includes each node corresponding to the target data acquisition project and the dependency relationship between each node.
[0054] After obtaining the data retrieval project mapping table and the business rule conditions of the data retrieval subject, for each target data retrieval project, based on the identifier of the target data retrieval project, the data retrieval rule configuration information of the target data retrieval project can be determined from the data retrieval project mapping table, and based on the data retrieval rule configuration information of the target data retrieval project, the data retrieval node path of the target data retrieval project can be determined from the preset node relationship diagram. The data retrieval node path of the target data retrieval project includes each node corresponding to the target data retrieval project and the dependency relationship between each node.
[0055] It should be understood that the preset node relationship diagram refers to a pre-designed graphical model representing the data acquisition process, which is used to characterize each node, the dependency relationship between each node, and the association relationship between each node and the data acquisition item.
[0056] Specifically, please continue to refer to the example corresponding to the application request of "Zhang San worked overtime and was transferred to a vacation on October 1st" in step 201. The business rule condition configuration information is used to represent "meeting the age 001 (identifier) greater than or equal to 18, the attendance location 002 (identifier) is equal to Shenzhen, the overtime location 003 (identifier) is equal to Shenzhen, and the job grade 004 (identifier) is equal to level three", then the data acquisition node path is: "personnel information" → "personnel file" → "job grade and level". The "personnel information" node is a traceable node obtained by reverse recursion based on the data acquisition subject of "<Zhang San, October 1st>". The "personnel file" node can query the values corresponding to the three data acquisition items of "age", "attendance location" and "overtime location", and the "job grade and level" node can query the value corresponding to the data acquisition item of "job grade and level".
[0057] It is worth mentioning that by presetting the node relationship diagram, the system can automatically find the most optimized data acquisition order, avoiding the time-consuming process of manually traversing all possibilities, thereby improving the efficiency of determining the data retrieval order. Secondly, if the data retrieval rules need to be modified or new data sources need to be added, it is only necessary to update the node relationship diagram without changing most of the code of the entire program, which improves the flexibility and scalability of determining the data retrieval order; furthermore, once the data retrieval node path is determined, it can be reused multiple times as a module or function, enhancing the reusability and modularity of the code. Finally, the presetting of the node relationship diagram and the determination of the data retrieval node path are key components for realizing automated and efficient business rule processing, which can be encapsulated and reused, thereby improving the processing efficiency of business rule conditions.
[0058] 203. According to the dependency relationship between the nodes, data is collected from the nodes corresponding to the target data collection project based on the data collection rule configuration information of the target data collection project in turn to obtain target data of the target data collection project.
[0059] After determining the data acquisition node path of the target data acquisition project, data acquisition can be performed on each node corresponding to the target data acquisition project in turn based on the data acquisition rule configuration information of the target data acquisition project according to the dependency relationship between the nodes to obtain the target data of the target data acquisition project.
[0060] Specifically, please continue to refer to the example corresponding to the application request of "Zhang San worked overtime on October 1 and was transferred to a vacation" in step 202. The business rule condition configuration information is used to characterize "meeting the age 001 (identifier) greater than or equal to 18, and determining that the data acquisition node path is: "personnel information" → "personnel file" → "position grade and rank", the data acquisition rule configuration information of the target data acquisition item can be based on the data acquisition rule configuration information, first extract (query) the data corresponding to "<Zhang San, October 1>" from the "personnel information" node, and then extract the data corresponding to the three data acquisition items of "age", "attendance location" and "overtime location" from the "personnel file" node, and finally extract the data corresponding to the data acquisition item "position grade" from the "position grade and rank" node to obtain the target data of the four target data acquisition items of "age", "attendance location", "overtime location" and "position grade and rank".
[0061] It is worth mentioning that acquiring data according to the dependency relationship between the nodes in the data acquisition node path can improve the feasibility, completeness and accuracy of data acquisition.
[0062] 204. Calculate the target data of each target data acquisition item based on the business rule condition configuration information of each target data acquisition item, so as to obtain the calculation result of the business rule condition based on the calculation result of the business rule condition configuration information of each target data acquisition item.
[0063] After obtaining the target data of each target data acquisition item, the target data of each target data acquisition item can be calculated based on the business rule condition configuration information of each target data acquisition item to obtain the calculation result of the business rule condition based on the calculation result of the business rule condition configuration information of each target data acquisition item.
[0064] Specifically, if the business rule conditions of the data acquisition subject only include the identification of a target data acquisition project and the business rule condition configuration information, then the calculation result of the rule condition configuration information of the target data acquisition project can be directly used as the calculation result of the business rule conditions; if the business rule conditions of the data acquisition subject include the identification of multiple target data acquisition projects, the rule condition configuration information of multiple target data acquisition projects, and the conditional logic between the rules corresponding to the multiple target data acquisition projects (meeting all conditions "and", meeting any conditions "or" and custom logic, etc.), then the calculation result of the rule condition configuration information of each target data acquisition project of the multiple target data acquisition projects can be subjected to conditional logic calculation, and the result of the conditional logic calculation can be used as the calculation result of the business rule conditions.
[0065] To be more specific, please continue to refer to the example corresponding to the application request of "Zhang San worked overtime on October 1 and was transferred to a day off" in step 203. If the conditional logic between the rules corresponding to the four target data acquisition items of "age", "attendance location", "overtime location" and "position level" is "and", then the conditional string can be bitwise operated to obtain the final result value (0 or 1) to execute the subsequent process. For example, if the final result value is 1, the application request of "Zhang San worked overtime on October 1 and was transferred to a day off" is confirmed to be approved. If the final result value is 0, the application request of "Zhang San worked overtime on October 1 and was transferred to a day off" is confirmed to be rejected.
[0066] In the embodiment of the present application, a data acquisition project mapping table and business rule conditions can be obtained, the key of the data acquisition project mapping table is used to represent the identifier of each data acquisition project, the value corresponding to the key is used to represent the data acquisition rule configuration information of each data acquisition project, the business rule conditions include the identifier of each target data acquisition project and the business rule condition configuration information of each target data acquisition project, the business rule condition configuration requirements can be completed in the runtime state zero code configuration, and there is no need to upgrade and complex maintenance in the existing business rule condition processing method, the business rule condition configuration efficiency is high, so the data acquisition and calculation efficiency of the business rule condition is high, therefore, the processing efficiency of the business rule condition is high. Further, the data acquisition node path of the target data acquisition project can be determined from the preset node relationship diagram based on the data acquisition rule configuration information of the target data acquisition project, and the data is acquired according to the dependency relationship between the nodes of the data acquisition node path, which can improve the feasibility, completeness and accuracy of data acquisition, and can improve the efficiency of determining the data acquisition order, therefore, the processing efficiency and accuracy of the business rule condition are high. Secondly, after obtaining the data acquisition rule configuration information of each data acquisition item and generating a data acquisition item mapping table based on the data acquisition rule configuration information of each data acquisition item, the rules for these data acquisition items can be configured in the business rule configuration environment, and a reuse scenario can be provided. There is no need for multiple upgrades and complex maintenance in the existing business rule condition processing method. The configuration efficiency of the business rule conditions is higher, and thus the processing efficiency of the business rule conditions is higher.
[0067] based on Figure 2 In the described embodiment, during the process of processing business rule conditions, although the business rule condition configuration requirements can be completed in the runtime state with zero-code configuration, there is no need to upgrade and complex maintenance in the existing business rule condition processing method, and the business rule condition processing efficiency is high, but there is still often a problem of low completeness, accuracy and efficiency when obtaining data, so the processing efficiency and accuracy of the business rule condition are low. In order to solve the above problems, the following provides a detailed embodiment that can be optionally executed during the implementation of this solution, please refer to Figure 3 , Figure 3 This is a flow chart of another processing of business rule conditions disclosed in an embodiment of the present application. Another embodiment of the processing method of business rule conditions of the present application includes:
[0068] 301. Obtain a data acquisition item mapping table and business rule conditions of the data acquisition subject. The key of the data acquisition item mapping table is used to represent the identifier of each data acquisition item, and the value corresponding to the key is used to represent the data acquisition rule configuration information of each data acquisition item. The business rule conditions include the identifier of each target data acquisition item and the business rule condition configuration information of each target data acquisition item.
[0069] Step 301 in this embodiment is similar to the aforementioned Figure 2 Step 201 in the illustrated embodiment is similar and will not be described again here.
[0070] Specifically, the processing of business rule conditions includes but is not limited to the configuration of data acquisition rules for data acquisition items, the configuration of business rule conditions, the execution of business rule conditions, etc. Business rule conditions can be personalized and calculated based on different businesses and different business needs. For example, for attendance business, the attendance rules corresponding to sales personnel who often travel can focus on the control of information such as the place of business trip, while the attendance rules corresponding to production line workers can focus on the control of the compliance of clocking in and out time and overtime hours. For salary business, salary calculation can be based on basic salary and performance bonus.
[0071] More specifically, a preferred implementation method for generating business rule conditions can be found in Figure 4 , Figure 4 A schematic diagram of a flow chart of data acquisition and calculation of a rule engine disclosed in an embodiment of the present application, comprising Figure 4It can be seen that the identification of the target data acquisition item can be obtained based on the attendance file and / or the overtime sheet (bill of lading context, data that has not yet been put into the warehouse), and the business rule condition configuration information of the target data acquisition item can be obtained in a preset manner. The data acquisition rule configuration information of the target data acquisition item can be obtained from the data acquisition item mapping table based on the identification of the target data acquisition item, and then the data acquisition dimension is constructed based on the identification of the target data acquisition item and the data acquisition rule configuration information. The data acquisition dimension is a Map data structure, and the Key is Unicode (the identification corresponding to the data acquisition item under the data acquisition subject, where the data acquisition subject can include but is not limited to <attendance person, attribution date>, <salary calculation person-period (month)>, etc.), and the Value is the data acquisition rule configuration information corresponding to the data acquisition item obtained from the data acquisition item mapping table. After constructing the data acquisition dimension, the business rule conditions can be generated based on the data acquisition dimension and the business rule condition configuration information of each target data acquisition item. For example, after an employee submits an application form (such as an overtime form), the start time and end time of the application form can be read, and then the data acquisition dimension is constructed based on the <attendance person, belonging date> tuple as the data acquisition subject. The data acquisition dimension is a Map data structure, the Key is Unicode (the identifier corresponding to the data acquisition item under the <attendance person, belonging date> tuple), and the Value is the corresponding value of the data acquisition item (for example, including the data acquisition rule configuration information corresponding to the data acquisition item, or including the data acquisition rule configuration information corresponding to the data acquisition item and the corresponding query value of the data acquisition item). The data acquisition dimension Map will contain the attendance person and belonging date data by default, which can be used as the data acquisition configuration associated information condition query data. Finally, based on the data acquisition dimension and the business rule condition configuration information of each target data acquisition item, the business rule condition is generated. For example, the business rule condition of the data acquisition subject is the business rule condition of the data acquisition subject corresponding to the application request of "Zhang San worked overtime and was transferred to a holiday on October 1st", for example, it is used to represent "whether the conditions of being over 18 years old, attendance location in Shenzhen, overtime location in Shenzhen and the rank level of the third grade are met", then the data acquisition subject is <Zhang San, October 1st>, and the business rule condition configuration information is "meeting the conditions of being over 18 years old, attendance location in Shenzhen, overtime location in Shenzhen and the rank level of the third grade". It should be understood that the acquisition of the data acquisition rule configuration information can include but is not limited to acquisition through the interface and direct acquisition, etc., which is not limited here.
[0072] It is worth mentioning that constructing data acquisition dimensions based on data acquisition subjects can ensure that in complex business scenarios, data can be accurately associated with corresponding data acquisition subjects (such as attendance personnel and attribution dates). For example, when acquiring data after the bill of lading, the document or personnel subject to which the data belongs can be confirmed based on the data acquisition dimensions to prevent confusion or incorrect data acquisition. The corresponding data acquisition rules, query results, and calculation rule conditions can be quickly and accurately found according to the data acquisition subject, which is convenient for management, search and calculation, and can dynamically adapt to changing business rules and improve the flexibility and performance of the system.
[0073] 302. For each target data acquisition project, based on the identifier of the target data acquisition project, determine the data acquisition rule configuration information of the target data acquisition project from the data acquisition project mapping table, determine the root node, leaf node and the dependency relationship between the root node and the leaf node, or the root node, branch node, leaf node and the dependency relationship between the root node, branch node and leaf node from the preset node relationship diagram based on the data acquisition rule configuration information of the target data acquisition project, and based on the root node, leaf node and the dependency relationship between the root node and the leaf node, or based on the root node, branch node, leaf node and the dependency relationship between the root node, branch node and leaf node, obtain the data acquisition node path of the target data acquisition project.
[0074] After obtaining the data acquisition project mapping table and the business rule conditions of the data acquisition subject, for each target data acquisition project, based on the identifier of the target data acquisition project, the data acquisition rule configuration information of the target data acquisition project can be determined from the data acquisition project mapping table, and the root node, leaf node and the dependency relationship between the root node and the leaf node, or the root node, branch node, leaf node and the dependency relationship between the root node, branch node and leaf node, can be determined from the preset node relationship diagram based on the data acquisition rule configuration information of the target data acquisition project, and the data acquisition node path of the target data acquisition project can be obtained based on the root node, leaf node and the dependency relationship between the root node and the leaf node, or based on the root node, branch node, leaf node and the dependency relationship between the root node, branch node and leaf node.
[0075] It should be understood that the root node (also called the main node or top-level node) represents the starting point of the entire data retrieval node path and is the source of dependence of all other nodes. It does not directly depend on any other node. Branch nodes and leaf nodes refer to nodes that obtain data directly or indirectly from the root node.
[0076] For details, please continue to refer to Figure 4 ,Depend on Figure 4 It can be known that after obtaining the data acquisition project mapping table and the business rule conditions of the data acquisition subject, the identifier (Unicode) of the target data acquisition project can be parsed. Specifically, the business rule condition configuration information (JSON data) can be read, and the identifier (Unicode) of the target data acquisition project can be parsed from the business rule condition configuration information (JSON data), and then based on the identifier (Unicode) of the target data acquisition project, the data acquisition rule configuration information of the target data acquisition project can be determined from the data acquisition project mapping table, and then based on the data acquisition rule configuration information of the target data acquisition project, the data acquisition node path of the target data acquisition project can be determined from the preset node relationship diagram.
[0077] For more details, please refer to Figure 5 , Figure 5 A schematic diagram of a preset node relationship diagram disclosed in an embodiment of the present application, comprising Figure 5 It can be seen that the preset node relationship diagram is used to represent the root node, leaf node, branch node, and the dependency relationship between nodes. For the data acquisition node path: "Constant code ××, overtime on working days is converted into adjusted leave, attendance item" → "Attendance item Fid" → "Value", "Constant code ××, overtime on working days is converted into adjusted leave, attendance item" is the root node, "Attendance item Fid" is the branch node, and "Value" is the leaf node. To give another specific example, please continue to refer to the example corresponding to the application request of "Zhang San worked overtime and was transferred to a vacation on October 1st" in step 301. The business rule condition configuration information is "age is greater than 18 years old, attendance location is in Shenzhen, overtime location is in Shenzhen, and the rank and grade is level three", then the data retrieval node path is: "personnel information" → "personnel file" → "rank and grade", among which the "personnel information" node is the root node, the "personnel file" node is the branch node, and the "rank and grade" node is the leaf node. It can be understood that the "personnel information" node is a traceable node obtained by reverse recursion based on the data retrieval subject of "<Zhang San, October 1st>", the "personnel file" node can query the values corresponding to the three data retrieval items of "age", "attendance location", and "overtime location", and the "rank and grade" node can query the value corresponding to the data retrieval item of "rank and grade". For example, if the application request for "Zhang San worked overtime on October 1 and was transferred to a compensatory leave" corresponds to the business rule condition configuration information of "age over 18 years old, attendance location in Shenzhen, overtime location in Shenzhen", then the data retrieval node path is: "Personnel Information" → "Personnel File", where the "Personnel Information" node is the root node, the "Personnel File" node is the leaf node, and the "Personnel Information" node is the node where the data retrieval subject "<Zhang San, October 1>" can be traced back to the value, and the "Personnel File" node can query the values corresponding to the three data retrieval items of "age", "attendance location" and "overtime location".
[0078] Wherein, the data acquisition rule configuration information of the target data acquisition project may include association information, the association information is used to characterize the association relationship between the target data acquisition project and the data acquisition entity, the data acquisition entity is used to characterize the data acquisition project and / or the fixed value, and wherein, based on the data acquisition rule configuration information of the target data acquisition project, the method for determining the root node, the leaf node and the dependency relationship between the root node and the leaf node from the preset node relationship graph may be, if it is determined that the association information of the data acquisition rule configuration information of the target data acquisition project exists in the first data acquisition project, and the association information of the data acquisition rule configuration information of the first data acquisition project does not exist in the second data acquisition project, then the node corresponding to the first data acquisition project is used as the root node, the node corresponding to the target data acquisition project is used as the leaf node, and then the association relationship between the target data acquisition project and the first data acquisition project is used as the dependency relationship between the root node and the leaf node. system; and wherein, the method for determining the root node, branch node, leaf node and the dependency relationship between the root node, branch node and leaf node from the preset node relationship diagram based on the data acquisition rule configuration information of the target data acquisition project can be, if it is determined that the associated information of the data acquisition rule configuration information of the target data acquisition project exists in the first data acquisition project, the associated information of the data acquisition rule configuration information of the first data acquisition project exists in the second data acquisition project, and the associated information of the data acquisition rule configuration information of the second data acquisition project does not exist in the third data acquisition project, then the node corresponding to the second data acquisition project is used as the root node, the node corresponding to the first data acquisition project is used as the branch node, and the node corresponding to the target data acquisition project is used as the leaf node, and then the association relationship between the target data acquisition project, the first data acquisition project and the second data acquisition project is used as the dependency relationship between the root node, the branch node and the leaf node.
[0079] Specifically, the associated information includes personnel parameters, attribution date, fixed values and / or data acquisition items, and the associated information includes dependent data acquisition items and / or fixed values of the target data acquisition items. The dependent data acquisition items may refer to the data source on which the target data acquisition items are based or the preconditions in a certain rule; the fixed values may refer to standard values or reference points.
[0080] Please continue to refer to the example corresponding to the application request of "Zhang San worked overtime and was transferred to a vacation on October 1" cited in steps 301 and 302. If the business rule condition configuration information is "age is greater than 18 years old, attendance location is in Shenzhen, overtime location is in Shenzhen, and the rank level is level three", since the associated information of the data acquisition rule configuration information of the "rank level" data acquisition item includes the data acquisition items corresponding to the "personnel file" node ("age", "attendance location" and "overtime location"), the associated information of the data acquisition rule configuration information of the "age", "attendance location" and "overtime location" data acquisition items includes the data acquisition item corresponding to the "personnel information" node ("personnel information"), and there is no data acquisition item in the "personnel information" data acquisition item, then the "personnel information" node can be determined as the root node, the "personnel file" node as the branch node, and the "rank level" node as the leaf node, and the association relationship between "personnel information", "rank level", "age", "attendance location" and "overtime location" is used as the dependency relationship between the "personnel information" root node, the "personnel file" branch node and the "rank level" leaf node. It is understandable that other examples can be inferred based on the above examples, which will not be elaborated here.
[0081] 303. According to the dependency relationship between each node, determine the multiple number-taking processes of the target number-taking project, wherein the number-taking process of the root node is the number-taking process of the first number-taking, and the number-taking process of the leaf node is the number-taking process of the last number-taking. If there is a branch node, the number-taking process of the branch node is the number-taking process of the intermediate number-taking. The number-taking process is executed based on the number-taking rule configuration information of the target number-taking project, and when the number-taking process of the previous number-taking is in a completed state, the number-taking process of the next number-taking is executed to perform number-taking of each node corresponding to the target number-taking project to obtain the target data of the target number-taking project.
[0082] After obtaining the number-taking node path of the target number-taking project, the number-taking process of multiple number-taking of the target number-taking project can be determined according to the dependency relationship between each node, wherein the number-taking process of the root node is the number-taking process of the first number-taking, and the number-taking process of the leaf node is the number-taking process of the last number-taking. If there is a branch node, the number-taking process of the branch node is the number-taking process of the intermediate number-taking. The number-taking process is executed based on the number-taking rule configuration information of the target number-taking project, and when the number-taking process of the previous number-taking is in a completed state, the number-taking process of the next number-taking is executed to perform number-taking of each node corresponding to the target number-taking project to obtain the target data of the target number-taking project.
[0083] It can be understood that, based on the acquired business rule condition configuration information of the data acquisition subject, at least one data acquisition node path corresponding to the business rule condition configuration information of the data acquisition subject can be determined, and the complete data acquisition node total path can be obtained by integrating at least one data acquisition node path. The data acquisition items required for the "business rule condition configuration information of the data acquisition subject" are determined by reverse recursive traversal of the data acquisition rule configuration information, and the complete data acquisition node total path can be obtained in one traversal. According to the dependency relationship between the nodes of the data acquisition node total path, the data acquisition process of multiple data acquisitions of the target data acquisition project can be determined, and the data acquisition rule configuration information of the data acquisition process can be queried and acquired in an orderly manner based on the data acquisition node total path. The data acquisition process of the next data acquisition is executed only when the data acquisition process of the previous data acquisition is in a completed state. This method does not require multiple traversals and multiple queries of the data acquisition rule configuration information of the data acquisition project, thereby reducing the number of traversals and queries, improving the data acquisition efficiency of the business rule conditions, and thus improving the processing efficiency of the business rule conditions.
[0084] Among them, according to the dependency relationship between each node, the multiple data acquisition processes of the target data acquisition project are determined, the data acquisition process is executed based on the data acquisition rule configuration information of the target data acquisition project, and when the data acquisition process of the previous data acquisition is in a completed state, the data acquisition process of the next data acquisition is executed to acquire data from each node corresponding to the target data acquisition project. The method for obtaining the target data of the target data acquisition project can be, first, according to the dependency relationship between the root node and the leaf node, the data acquisition process of the root node is used as the first data acquisition process of the target data acquisition project, and the data acquisition process of the leaf node is used as the second data acquisition process of the target data acquisition project, and then the first data acquisition process is executed based on the data acquisition rule configuration information of the target data acquisition project, and when the first data acquisition process is in a completed state, the second data acquisition process is executed. A process is used to perform data acquisition on each node corresponding to the target data acquisition project to obtain the target data of the target data acquisition project; or first, according to the dependency relationship among the root node, the branch node and the leaf node, the process of performing the data acquisition on the root node is used as the first data acquisition process of the target data acquisition project, the process of performing the data acquisition on the branch node is used as the second data acquisition process of the target data acquisition project, and the process of performing the data acquisition on the leaf node is used as the third data acquisition process of the target data acquisition project, and then the first data acquisition process is executed based on the data acquisition rule configuration information of the target data acquisition project, and when the first data acquisition process is in a completed state, the second data acquisition process is executed, and when the second data acquisition process is in a completed state, the third data acquisition process is executed to perform data acquisition on each node corresponding to the target data acquisition project to obtain the target data of the target data acquisition project.
[0085] The data acquisition method for each node corresponding to the target data acquisition project can be performed through the data acquisition service. Specifically, the data acquisition service can be used to acquire data based on Unicode and data acquisition dimensions. For details, please refer to Figure 6, Figure 6 A flowchart of a method for acquiring data based on a data acquisition service disclosed in an embodiment of the present application is shown in FIG. Figure 6 It can be seen that the data acquisition process can include the following steps:
[0086] Step 1: Query the data acquisition item through Unicode, and search for the associated data acquisition configuration through the data acquisition item, that is, reversely search for the associated data acquisition configuration and data acquisition item;
[0087] Step 2: Traverse the data acquisition configuration. If the data acquisition configuration related information entry has a comparison value of the data acquisition item, find the data acquisition configuration associated with the data acquisition item and repeat step 2 until all nodes refer to the root node with fixed values, personnel parameters, and attribution date. For the reverse recursive logic, please continue to refer to Figure 5 .
[0088] Step 3: Please continue to Figure 5 , traverse all the data acquisition configurations that have not completed data acquisition from top to bottom. If the data acquisition item values required for the associated information have been queried, or are fixed values, personnel parameters, and attribution dates, it means that the associated information conditions of the data acquisition configuration have been met. You can query data according to the data acquisition configuration and put the queried data into the data acquisition dimension.
[0089] More specifically, please continue to refer to the example of the application request corresponding to "Zhang San's overtime transfer to adjusted leave on October 1" cited in steps 301, 302 and 303. If the business rule condition configuration information is "age is over 18 years old, attendance location is in Shenzhen, overtime location is in Shenzhen and job grade is level three", the data acquisition process of the "personnel information" root node can be used as the first data acquisition process of the "job grade" target data acquisition project, and the data acquisition process of the "personnel file" branch node can be used as the second data acquisition process of the "job grade" target data acquisition project. The data collection process of the point is used as the third data collection process of the "rank and grade" target data collection project, and then the first data collection process is executed based on the data collection rule configuration information of the "rank and grade" target data collection project. When the first data collection process is in a completed state, the second data collection process is executed, and when the second data collection process is in a completed state, the third data collection process is executed to collect data from each node corresponding to the "rank and grade" target data collection project to obtain the target data of the "rank and grade" target data collection project. It can be understood that other examples can be inferred based on the above examples, and will not be repeated here.
[0090] It is worth mentioning that when the data acquisition process of the last data acquisition is completed, a mark can be made, and the mark is used to indicate that the data acquisition process of the last data acquisition is in a completed state. At this time, the data acquisition process of the next data acquisition can be executed based on the mark of the data acquisition process of the last data acquisition. Marking the completed data acquisition process can ensure the accuracy of data acquisition of each node corresponding to the target data acquisition project based on the data acquisition rule configuration information of the target data acquisition project.
[0091] 304. Calculate the target data of each target data acquisition item based on the business rule condition configuration information of each target data acquisition item, so as to obtain the calculation result of the business rule condition based on the calculation result of the business rule condition configuration information of each target data acquisition item.
[0092] Step 304 in this embodiment is similar to the above Figure 2 Step 204 in the illustrated embodiment is similar and will not be described in detail here.
[0093] Specifically, the steps for the rule engine to perform conditional logic calculations can be found as follows:
[0094] Step 1: Get the JSON data of the document rule engine condition configuration, and parse out Unicode, condition symbol, and configured value. The definition of JSON format can be: {T1: [Unicode][Condition symbol][Assigned value]; T2: [Unicode][Condition symbol][Assigned value]; T3: [Unicode][Condition symbol][Assigned value]; ...; Tn: [Unicode][Condition symbol][Assigned value]; RESULT: (T1 OR T2) AND T3 ... AND Tn}, where Tn is the condition configuration and RESULT is the calculation result of each condition. The condition symbol supports "greater than", "less than", "equal to", "not equal to", "empty", "not empty", "greater than or equal to", and "less than or equal to".
[0095] Step 2: First traverse all condition configurations, parse out Unicode for each condition configuration, extract data from the data extraction dimension according to Unicode, and then parse out the condition symbol and the assigned value. According to the extracted data, condition symbol and assigned value, calculate the result value of a single condition configuration, which is 0 or 1.
[0096] Step 3: First, use the calculated single condition configuration result value 0 or 1 to replace all T1, T2, …, Tn in RESULT and convert it into a condition string of '(1OR 0)AND 1…AND 1'. Then continue to convert the OR and AND in the condition string, which correspond to the symbols '|' and '&' respectively. The converted condition string is '(1|0)&1…&1'.
[0097] Step 4: Perform bitwise operation on the conditional string to obtain the final RESULT value of 0 or 1.
[0098] It is important to understand that scenarios such as document data verification can follow different processes based on the calculated RESULT result value.
[0099] In the embodiment of the present application, a data acquisition project mapping table and business rule conditions can be obtained, the key of the data acquisition project mapping table is used to represent the identifier of each data acquisition project, the value corresponding to the key is used to represent the data acquisition rule configuration information of each data acquisition project, the business rule conditions include the identifier of each target data acquisition project and the business rule condition configuration information of each target data acquisition project, the business rule condition configuration requirements can be completed in the runtime state zero code configuration, and there is no need to upgrade and complex maintenance in the existing business rule condition processing method, the business rule condition configuration efficiency is high, so the data acquisition and calculation efficiency of the business rule condition is high, therefore, the processing efficiency of the business rule condition is high. Further, the data acquisition node path of the target data acquisition project can be determined from the preset node relationship diagram based on the data acquisition rule configuration information of the target data acquisition project, and the data is acquired according to the dependency relationship between the nodes of the data acquisition node path, which can improve the feasibility, completeness and accuracy of data acquisition, and can improve the efficiency of determining the data acquisition order, therefore, the processing efficiency and accuracy of the business rule condition are high. Secondly, after obtaining the data acquisition rule configuration information of each data acquisition project and generating the data acquisition project mapping table based on the data acquisition rule configuration information of each data acquisition project, the data acquisition projects can be configured with rules in the business rule configuration environment, and a reuse scenario can be provided, without the need for multiple upgrades and complex maintenance in the processing method of the existing business rule conditions, the configuration efficiency of the business rule conditions is high, and thus the processing efficiency of the business rule conditions is high. Then, based on the data acquisition subject, the data acquisition dimension is constructed to ensure that in complex business scenarios, the data can be accurately associated with the corresponding data acquisition subject (such as attendance and attribution date), and the corresponding data acquisition rules, query results and calculation rule conditions can be quickly and accurately found according to the data acquisition subject, which is convenient for management, search and calculation, and can realize dynamic adaptation to changes in business rules, and improve the flexibility and performance of the system. Finally, based on the mark of the data acquisition process of the last data acquisition, the data acquisition process of the next data acquisition is executed, which can ensure the accuracy of the data acquisition of each node corresponding to the target data acquisition project based on the data acquisition rule configuration information of the target data acquisition project.
[0100] based on Figure 2In the described embodiment, during the process of processing business rule conditions, although the business rule condition configuration requirements can be completed in the runtime state with zero-code configuration, there is no need to upgrade and complex maintenance in the existing business rule condition processing method, and the business rule condition processing efficiency is high, but when it is necessary to process multiple data acquisition entities, it is still necessary to involve more complex and repetitive traversal processes, resulting in low efficiency in traversal, data acquisition, and calculation. Therefore, the overall business rule condition processing efficiency under multiple tasks is low. In order to solve the above problems, the following provides a detailed embodiment that can be optionally executed during the implementation of this solution. Please refer to Figure 7 , Figure 7 This is a flow chart of another processing of a business rule condition disclosed in an embodiment of the present application. A method of another embodiment of a processing method of a business rule condition of the present application includes:
[0101] 701. Obtain data acquisition rule configuration information of each data acquisition item, and generate a data acquisition item mapping table based on the data acquisition rule configuration information of each data acquisition item. The data acquisition item mapping table includes an identifier of each data acquisition item and the data acquisition rule configuration information of each data acquisition item.
[0102] Step 701 in this embodiment is similar to the aforementioned Figure 2 The related steps of step 201 in the illustrated embodiment are similar and will not be described again here.
[0103] 702. Obtain business rule condition configuration information of multiple data acquisition subjects, and generate a business rule condition set based on the business rule condition configuration information of the multiple data acquisition subjects, wherein the business rule condition set includes multiple business rule conditions, and the multiple business rule conditions include identifiers of multiple data acquisition subjects, identifiers of each target data acquisition item corresponding to each of the multiple data acquisition subjects, and rule condition configuration information of each target data acquisition item.
[0104] After obtaining the data acquisition rule configuration information of each data acquisition project and generating a data acquisition project mapping table based on the data acquisition rule configuration information of each data acquisition project, the business rule condition configuration information of multiple data acquisition subjects can be obtained, and a business rule condition set can be generated based on the business rule condition configuration information of multiple data acquisition subjects. The business rule condition set includes multiple business rule conditions, and the multiple business rule conditions include the identifiers of multiple data acquisition subjects, as well as the identifiers of each target data acquisition project corresponding to each of the multiple data acquisition subjects and the rule condition configuration information of each target data acquisition project.
[0105] Step 702 in this embodiment is similar to the aforementioned Figure 2 The related steps of step 202 in the illustrated embodiment are similar and will not be described again here.
[0106] Specifically, for example, multiple data acquisition subjects include <Zhang San, October 1st> and <Li Si, October 1st>. After obtaining the business rule condition configuration information of <Zhang San, October 1st> and <Li Si, October 1st>, a business rule condition set can be generated based on the business rule condition configuration information of these two data acquisition subjects. The business rule condition set includes the identifier 100 of <Zhang San, October 1st> and the identifier 200 of <Li Si, October 1st>, the identifiers of the two data acquisition items corresponding to <Zhang San, October 1st> (data acquisition item 101 and data acquisition item 102), the identifiers of the two data acquisition items corresponding to <Li Si, October 1st> (data acquisition item 201 and data acquisition item 202), and the rule condition configuration information of these four data acquisition items.
[0107] 703. For each target data acquisition project, based on the identifier of the target data acquisition project, determine the data acquisition rule configuration information of the target data acquisition project from the data acquisition project mapping table, and based on the data acquisition rule configuration information of the target data acquisition project, determine the data acquisition node path of the target data acquisition project from the preset node relationship diagram. The data acquisition node path of the target data acquisition project includes each node corresponding to the target data acquisition project and the dependency relationship between each node.
[0108] Step 703 in this embodiment is similar to the above Figure 2 Step 202 in the illustrated embodiment is similar and will not be described in detail here.
[0109] Specifically, a target data acquisition node path corresponding to the business rule condition set may be determined in a preset node relationship diagram, and the target data acquisition node path includes data acquisition node paths of each target data acquisition item of multiple data acquisition entities.
[0110] 704. According to the dependency relationship between the nodes, data are collected from the nodes corresponding to the target data collection project based on the data collection rule configuration information of the target data collection project in turn to obtain target data of the target data collection project.
[0111] Step 704 in this embodiment is similar to the above Figure 2 Step 204 in the illustrated embodiment is similar and will not be described in detail here.
[0112] After determining the target data acquisition project's data acquisition node path from the preset node relationship diagram based on the data acquisition rule configuration information of the target data acquisition project, data acquisition can be performed on each node corresponding to the target data acquisition project in turn based on the data acquisition rule configuration information of the target data acquisition project according to the dependency relationship between the nodes to obtain the target data of the target data acquisition project.
[0113] 705. Determine the target data of each target data acquisition item corresponding to each of the multiple data acquisition entities based on the identifiers of the multiple data acquisition entities, and for each data acquisition entity, calculate the target data of each target data acquisition item corresponding to the data acquisition entity based on the business rule condition configuration information of each target data acquisition item corresponding to the data acquisition entity, so as to obtain the calculation result of the business rule condition corresponding to the data acquisition entity based on the calculation result of the business rule condition configuration information of each target data acquisition item corresponding to the data acquisition entity.
[0114] After obtaining the target data of the target data acquisition item, the target data of each target data acquisition item corresponding to each of the multiple data acquisition subjects can be determined based on the identifications of the multiple data acquisition subjects, and for each data acquisition subject, based on the business rule condition configuration information of each target data acquisition item corresponding to the data acquisition subject, the target data of each target data acquisition item corresponding to the data acquisition subject can be calculated, so as to obtain the calculation result of the business rule condition corresponding to the data acquisition subject based on the calculation result of the business rule condition configuration information of each target data acquisition item corresponding to the data acquisition subject.
[0115] Specifically, continuing with the above example, the target data corresponding to data acquisition items 101 and 102 can be determined based on the identifier 100 of <Zhang San, October 1st>, and the target data corresponding to data acquisition items 201 and 202 can be determined based on the identifier 200 of <Li Si, October 1st>, and the target data of the data acquisition items of the two data acquisition subjects can be calculated respectively, and the calculation results of the business rule condition configuration information of each target data acquisition item of the data acquisition subject can be calculated by conditional logic (and, or, etc.), and the results of the conditional logic calculation can be used as the calculation results of the business rule conditions, and finally the calculation results corresponding to each data acquisition subject can be sent to the corresponding client.
[0116] Specifically, when the business rule conditions of multiple data acquisition entities need to be processed, and these multiple data acquisition entities are similar, the query range can be expanded. For example, by changing "=" to "in" query, taking the maximum or minimum date range, etc., the SQL query corresponding to multiple data acquisition entities can be completed with only one traversal, reducing the number of traversals. After a complete traversal query, the corresponding data acquisition dimension is matched based on the identifier of each data acquisition entity. The loss of identifier matching is much smaller than the loss of traversal. Therefore, the data acquisition efficiency of the business rule conditions of multiple data acquisition entities can be improved, thereby improving the data acquisition efficiency of the business rule conditions of multiple data acquisition entities.
[0117] In the embodiment of the present application, a data acquisition project mapping table and business rule conditions can be obtained, the key of the data acquisition project mapping table is used to represent the identifier of each data acquisition project, the value corresponding to the key is used to represent the data acquisition rule configuration information of each data acquisition project, the business rule conditions include the identifier of each target data acquisition project and the business rule condition configuration information of each target data acquisition project, the business rule condition configuration requirements can be completed in the runtime state zero code configuration, and there is no need to upgrade and complex maintenance in the existing business rule condition processing method, the business rule condition configuration efficiency is high, so the data acquisition and calculation efficiency of the business rule condition is high, therefore, the processing efficiency of the business rule condition is high. Further, the data acquisition node path of the target data acquisition project can be determined from the preset node relationship diagram based on the data acquisition rule configuration information of the target data acquisition project, and the data is acquired according to the dependency relationship between the nodes of the data acquisition node path, which can improve the feasibility, completeness and accuracy of data acquisition, and can improve the efficiency of determining the data acquisition order, therefore, the processing efficiency and accuracy of the business rule condition are high. Secondly, after obtaining the data acquisition rule configuration information of each data acquisition item and generating the data acquisition item mapping table based on the data acquisition rule configuration information of each data acquisition item, the rules of these data acquisition items can be configured in the business rule configuration environment, and a reuse scenario can be provided, which does not require multiple upgrades and complex maintenance in the existing business rule condition processing method. The configuration efficiency of the business rule condition is high, and thus the processing efficiency of the business rule condition is high. Then, by expanding the query range, the SQL query corresponding to multiple data acquisition subjects can be completed with only one traversal, which reduces the number of traversals. After a complete traversal query, the corresponding data acquisition dimension is matched based on the identifier of each data acquisition subject. The loss of identifier matching is much less than the loss of traversal. Therefore, the data acquisition efficiency of the business rule conditions of multiple data acquisition subjects can be improved, thereby improving the data acquisition efficiency of the business rule conditions of multiple data acquisition subjects.
[0118] based on Figure 2 , Figure 3 and Figure 7 On the basis of the corresponding embodiment, in order to improve the convenience of the user to configure the data acquisition rules and business rule conditions, the user can configure the data acquisition rules and business rule conditions in the interface to obtain the data acquisition rule configuration information of each data acquisition project and the business rule condition configuration information of the data acquisition subject. Secondly, in order to adapt to the complex data environment, the data acquisition of each node corresponding to the target data acquisition project can be performed through the different data acquisition source methods corresponding to the data acquisition rule configuration information. For specific implementation methods, please refer to the following descriptions:
[0119] The method for obtaining the data acquisition rule configuration information of each data acquisition item may be to display the data acquisition rule configuration interface, and obtain the data acquisition rule configuration information of each data acquisition item obtained after the user configures the data acquisition rule in the data acquisition rule configuration interface. Before obtaining the business rule condition configuration information of the data acquisition subject, a business rule condition configuration interface may be generated based on the business rule condition configuration information of the data acquisition subject, and the method for obtaining the business rule condition configuration information of the data acquisition subject may be to display the business rule condition configuration interface, and obtain the business rule condition configuration information of the data acquisition subject obtained after the user configures the business rule condition in the business rule condition configuration interface.
[0120] Specifically, you can configure new models, new model fields, and new model field data sources through the "Data Acquisition Application Scenario", "Data Acquisition Item", and "Data Acquisition Configuration" interfaces. Figure 8 , Figure 8 A schematic diagram showing the difference between the processing flow of a business rule condition of an existing application and the application disclosed in the embodiment of the application, comprising Figure 8 It can be seen that the existing business rule condition processing flow includes four stages. The first stage involves the second opening of the prefabricated model and the newly added field conditions. The second stage involves the configuration of the rule engine control and the newly added field conditions. The third stage involves the data acquisition of the newly added fields of the prefabricated model. The fourth stage involves the rule engine calculation. The business rule condition processing flow of the present application includes five stages. The first stage involves the data acquisition application scenario, the assembly of data acquisition items, and the associated data acquisition configuration. The second stage involves the rule engine control and the configuration of the new model field conditions. The third stage involves parsing the new model field corresponding to the data acquisition item unicode and constructing the data acquisition dimension. The fourth stage involves recursively searching for the associated data acquisition configuration and acquiring data. The fifth stage involves the rule engine calculation. Compared with the prior art, the present application has made improvements and innovations in the first, third and fourth stages, so that the standard model fields can be flexibly assembled in the software running state to form a virtual new model, and applied to the rule engine control configuration and calculation. Scenarios such as document data verification will be executed as follows. Figure 3 In the process shown, stages 3, 4, and 5 are about fetching data through data fetching configuration, and stage 5 is about performing rule engine calculations based on the fetched data. For example, when an administrator (user) wants to configure a new rule to verify an employee's overtime application, they can select the "Overtime Approval" control in the "Data Fetching Application Scenario" interface, and then add a new fetching item in the "Data Fetching Items", name it "Overtime Location", and associate it with the overtime location field in the actual database. Then, in the "Data Fetching Configuration" interface, you can select the database as the data source, set query conditions (such as fetching the last updated overtime record), and make sure the result is output as a single overtime location name, so that when calculating overtime applications, you can dynamically obtain the employee's overtime location information based on this configuration. For more details, for the "Data Fetching Items" interface, please refer to Fig. 9 , Fig. 9 This is a schematic diagram of a data acquisition project interface disclosed in an embodiment of the present application, comprising Fig. 9 As you can see, the "Data Acquisition Item" interface, as a new model field carrier, supports data types such as "numeric", "string", "Boolean", "array", "enumeration", and "ID". The "Data Acquisition Item" can be associated with the standard model field of the corresponding data type. When the "Data Acquisition Item" is saved, a unique identification code Unicode will be generated in the encoding + random string method. For the "Data Acquisition Configuration" interface, please refer to Fig.10 , Fig.10 This is a schematic diagram of a data acquisition configuration interface disclosed in an embodiment of the present application, comprising Fig.10 It can be seen that the "Data Acquisition Configuration" interface configures the data acquisition entity, data acquisition source, and result output method. When the data source is context data acquisition, data acquisition sorting is not supported; when the data source is database data acquisition, data acquisition sorting is supported. The result output method is to take the first one. No matter how many data are queried by SQL, only the first one will be returned; if the result output method is to return multiple records, the data acquisition field entry can only select a data acquisition item with an array data type, and the acquired data will be returned in the format of <array<mapping table>>. The "Data Acquisition Configuration" associated information entry selects the data acquisition entity field, where the comparison value type is divided into personnel parameters, fixed values, attribution date, and data acquisition items. Among them, personnel parameters and attribution date are abstracted according to the data management according to the <person-day> dimension. If the comparison value type is personnel parameters, the entry comparison value can select "attendance file", "natural person" and other personnel attribute values; if the comparison value type is attribution date, the entry comparison value can only select attribution date; if the comparison value type is fixed value, the entry comparison value can only select or data fixed value; when the comparison value type is data acquisition item, the entry comparison value selects a data acquisition item. For the "Data Acquisition Application Scenario" interface, see Fig.11 , Fig.11 This is a schematic diagram of an interface for a data acquisition application scenario disclosed in an embodiment of the present application, comprising Fig.11 It can be seen that the "Data Acquisition Application Scenario" interface aggregates "Data Acquisition Item" as a new model and applies it to the corresponding page condition rule control. When configuring the corresponding business scenario, you can use the "Data Acquisition Item" to configure the rule conditions, and read the corresponding "Data Acquisition Configuration" to acquire data during calculation. For the generated business rule condition configuration interface, please refer to Fig.12 , Fig.12 A schematic diagram of a business rule condition configuration interface disclosed in an embodiment of the present application, comprising Fig.12 It can be seen that the configuration information will be collected in this interface, that is, the "overtime location" can be displayed in this interface for users to select configuration rules.
[0121] It is worth mentioning that through the "Data Acquisition Application Scenario", "Data Acquisition Project", and "Data Acquisition Configuration" interfaces, new models can be flexibly configured and assembled in the software running state, which can cleverly resolve the problem of adding fields to the conditional configuration of the rule engine control.
[0122] Among them, according to the dependency relationship between each node, data acquisition is performed on each node corresponding to the target data acquisition project based on the data acquisition rule configuration information of the target data acquisition project in turn, and the method for obtaining the target data of the target data acquisition project can be, according to the dependency relationship between each node, data acquisition is performed on each node corresponding to the target data acquisition project from the database and / or context document data set in turn based on the data acquisition rule configuration information of the target data acquisition project to obtain the target data of the target data acquisition project.
[0123] Specifically, if the data acquisition configuration is context data acquisition, data can be read from the submitted document according to the data acquisition configuration data acquisition field information. If the data acquisition configuration is database data acquisition, the data acquisition configuration can be parsed to construct SQL query data and read data from the database based on the SQL query data.
[0124] It is worth mentioning that in addition to reading data from the database, the required data can also be read directly from the context document data set before the document is stored in the warehouse, which reduces the feasibility, flexibility and configurability of document verification when the document is not stored in the warehouse, thereby improving the timeliness, efficiency and accuracy of the processing of business rule conditions.
[0125] The above describes the method for processing the business rule conditions in the embodiment of the present application. The following describes the device for processing the business rule conditions in the embodiment of the present application. Fig.13 , an embodiment of a processing device for business rule conditions in an embodiment of the present application includes:
[0126] An acquisition unit is used to acquire a data acquisition item mapping table and business rule conditions of a data acquisition subject, wherein the key of the data acquisition item mapping table is used to represent the identifier of each data acquisition item, and the value corresponding to the key is used to represent the data acquisition rule configuration information of each of the data acquisition items, and the business rule conditions include the identifier of each target data acquisition item and the business rule condition configuration information of each of the target data acquisition items;
[0127] A determination unit is used to determine, for each target data acquisition item, data acquisition rule configuration information of the target data acquisition item from the data acquisition item mapping table based on the identifier of the target data acquisition item, and determine a data acquisition node path of the target data acquisition item from a preset node relationship diagram based on the data acquisition rule configuration information of the target data acquisition item, wherein the data acquisition node path of the target data acquisition item includes each node corresponding to the target data acquisition item and a dependency relationship between each node;
[0128] A data acquisition unit, configured to acquire data from each node corresponding to the target data acquisition project in sequence based on the data acquisition rule configuration information of the target data acquisition project according to the dependency relationship between the nodes, so as to obtain target data of the target data acquisition project;
[0129] The calculation unit is used to calculate the target data of each target data acquisition item based on the business rule condition configuration information of each target data acquisition item, so as to obtain the calculation result of the business rule condition based on the calculation result of the business rule condition configuration information of each target data acquisition item.
[0130] The determination unit is specifically used to determine the root node, leaf node and the dependency relationship between the root node and the leaf node, or the root node, branch node, leaf node and the dependency relationship between the root node, the branch node and the leaf node from a preset node relationship diagram based on the number acquisition rule configuration information of the target number acquisition project, and obtain the number acquisition node path of the target number acquisition project based on the root node, the leaf node and the dependency relationship between the root node and the leaf node, or based on the root node, the branch node, the leaf node and the dependency relationship between the root node, the branch node and the leaf node.
[0131] The determining unit is specifically used to, if it is determined that the associated information of the data acquisition rule configuration information of the target data acquisition item exists a first data acquisition item, and the associated information of the data acquisition rule configuration information of the first data acquisition item does not exist a second data acquisition item, then use the node corresponding to the first data acquisition item as the root node, the node corresponding to the target data acquisition item as the leaf node, and use the association relationship between the target data acquisition item and the first data acquisition item as the dependency relationship between the root node and the leaf node; if it is determined that the associated information of the data acquisition rule configuration information of the target data acquisition item exists a first data acquisition item, and the associated information of the data acquisition rule configuration information of the first data acquisition item exists a second data acquisition item, and the associated information of the data acquisition rule configuration information of the first data acquisition item does not exist If there is no third data acquisition item in the association information of the data acquisition rule configuration information of the second data acquisition item, the node corresponding to the second data acquisition item is used as the root node, the node corresponding to the first data acquisition item is used as the branch node, and the node corresponding to the target data acquisition item is used as the leaf node. The association relationship between the target data acquisition item, the first data acquisition item and the second data acquisition item is used as the dependency relationship between the root node, the branch node and the leaf node. The data acquisition rule configuration information of the target data acquisition item includes association information, and the association information is used to characterize the association relationship between the target data acquisition item and the data acquisition entity. The data acquisition entity is used to characterize the data acquisition item and / or the fixed value.
[0132] The data acquisition unit is specifically used to, according to the dependency relationship between the root node and the leaf node, use the data acquisition process of the root node as the first data acquisition process of the target data acquisition project, use the data acquisition process of the leaf node as the second data acquisition process of the target data acquisition project, execute the first data acquisition process based on the data acquisition rule configuration information of the target data acquisition project, and when the first data acquisition process is in a completed state, execute the second data acquisition process to acquire data from each node corresponding to the target data acquisition project to obtain the target data of the target data acquisition project, or according to the dependency relationship between the root node, the branch node and the leaf node, The root node acquisition process is performed as the first acquisition process of the target acquisition project, the branch node acquisition process is performed as the second acquisition process of the target acquisition project, and the leaf node acquisition process is performed as the third acquisition process of the target acquisition project. The first acquisition process is executed based on the acquisition rule configuration information of the target acquisition project. When the first acquisition process is in a completed state, the second acquisition process is executed, and when the second acquisition process is in a completed state, the third acquisition process is executed to acquire data from each node corresponding to the target acquisition project to obtain target data of the target acquisition project.
[0133] The acquisition unit is specifically used to acquire the data acquisition rule configuration information of each of the data acquisition items, and generate the data acquisition item mapping table based on the data acquisition rule configuration information of each of the data acquisition items, the data acquisition item mapping table includes the identification of each of the data acquisition items and the data acquisition rule configuration information of each of the data acquisition items, acquire the business rule condition configuration information of the data acquisition subject, and generate the business rule condition based on the business rule condition configuration information of the data acquisition subject, the business rule condition includes the identification of each target data acquisition item and the business rule condition configuration information of each of the target data acquisition items.
[0134] The acquisition unit is specifically used to display the data acquisition rule configuration interface, and obtain the data acquisition rule configuration information of each of the data acquisition items obtained after the user configures the data acquisition rules in the data acquisition rule configuration interface. Before obtaining the business rule condition configuration information of the data acquisition subject, the method also includes generating a business rule condition configuration interface based on the data acquisition rule configuration information of each of the data acquisition items, displaying the business rule condition configuration interface, and obtaining the business rule condition configuration information of the data acquisition subject obtained after the user configures the business rule conditions in the business rule condition configuration interface.
[0135] The acquisition unit is specifically used to acquire business rule condition configuration information of multiple data acquisition subjects, and generate a business rule condition set based on the business rule condition configuration information of the multiple data acquisition subjects, wherein the business rule condition set includes multiple business rule conditions, and the multiple business rule conditions include identifiers of multiple data acquisition subjects, identifiers of target data acquisition items corresponding to the multiple data acquisition subjects, and rule condition configuration information of each target data acquisition item;
[0136] The calculation unit is specifically used to determine the target data of each of the target data acquisition items corresponding to each of the multiple data acquisition subjects based on the identifications of the multiple data acquisition subjects, and for each data acquisition subject, based on the business rule condition configuration information of each of the target data acquisition items corresponding to the data acquisition subject, calculate the target data of each of the target data acquisition items corresponding to the data acquisition subject, so as to obtain the calculation result of the business rule condition corresponding to the data acquisition subject based on the calculation result of the business rule condition configuration information of each of the target data acquisition items corresponding to the data acquisition subject.
[0137] The data acquisition unit is specifically used to acquire data from each node corresponding to the target data acquisition project from the database and / or the context document data set in sequence according to the dependency relationship between the various nodes and based on the data acquisition rule configuration information of the target data acquisition project to obtain the target data of the target data acquisition project, wherein the data acquisition rule configuration information includes a data acquisition source method, and the data acquisition source method includes a database and / or a context document data set.
[0138] In the embodiment of the present application, a data acquisition project mapping table and business rule conditions can be obtained, the key of the data acquisition project mapping table is used to represent the identifier of each data acquisition project, the value corresponding to the key is used to represent the data acquisition rule configuration information of each data acquisition project, the business rule conditions include the identifier of each target data acquisition project and the business rule condition configuration information of each target data acquisition project, the business rule condition configuration requirements can be completed in the runtime state zero code configuration, and there is no need to upgrade and complex maintenance in the existing business rule condition processing method, the business rule condition configuration efficiency is high, so the data acquisition and calculation efficiency of the business rule condition is high, therefore, the processing efficiency of the business rule condition is high. Further, the data acquisition node path of the target data acquisition project can be determined from the preset node relationship diagram based on the data acquisition rule configuration information of the target data acquisition project, and the data is acquired according to the dependency relationship between the nodes of the data acquisition node path, which can improve the feasibility, completeness and accuracy of data acquisition, and can improve the efficiency of determining the data acquisition order, therefore, the processing efficiency and accuracy of the business rule condition are high.
[0139] See below Fig.14 In the embodiment of the present application, an embodiment of the computer device 1400 includes:
[0140] CPU 1401, memory 1405, input / output interface 1404, wired or wireless network interface 1403 and power supply 1402;
[0141] The memory 1405 is a temporary storage memory or a permanent storage memory;
[0142] The CPU 1401 is configured to communicate with the memory 1405 and execute the instructions in the memory 1405 to perform the aforementioned Figure 2 , Figure 3 and Figure 7 The method in the illustrated embodiment.
[0143] The embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium includes instructions, when the instructions are executed on a computer, the computer executes the aforementioned Figure 2 , Figure 3 and Figure 7 The method in the illustrated embodiment.
[0144] The present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the aforementioned Figure 2 , Figure 3 and Figure 7 The method in the illustrated embodiment.
[0145] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0146] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0147] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0148] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0149] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0150] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A method for processing business rule conditions, characterized in that: include: Obtain a data acquisition item mapping table and business rule conditions of the data acquisition subject, wherein the key of the data acquisition item mapping table is used to represent the identifier of each data acquisition item, and the value corresponding to the key is used to represent the data acquisition rule configuration information of each of the data acquisition items, and the business rule conditions include the identifier of each target data acquisition item and the business rule condition configuration information of each of the target data acquisition items; For each target data acquisition project, based on the identifier of the target data acquisition project, determine the data acquisition rule configuration information of the target data acquisition project from the data acquisition project mapping table, and determine the data acquisition node path of the target data acquisition project from a preset node relationship diagram based on the data acquisition rule configuration information of the target data acquisition project, wherein the data acquisition node path of the target data acquisition project includes each node corresponding to the target data acquisition project and the dependency relationship between each node; According to the dependency relationship between the nodes, data of each node corresponding to the target data acquisition project is acquired based on the data acquisition rule configuration information of the target data acquisition project in turn to obtain the target data of the target data acquisition project; The target data of each target data acquisition item is calculated based on the business rule condition configuration information of each target data acquisition item, so as to obtain the calculation result of the business rule condition based on the calculation result of the business rule condition configuration information of each target data acquisition item.
2. The method according to claim 1, characterized in that The method of determining a node path for obtaining data of the target data obtaining project from a preset node relationship graph based on the data obtaining rule configuration information of the target data obtaining project, wherein the node path for obtaining data of the target data obtaining project includes each node corresponding to the target data obtaining project and the dependency relationship between each node, including: Determine a root node, a leaf node, and a dependency relationship between the root node and the leaf node, or a root node, a branch node, a leaf node, and a dependency relationship between the root node, the branch node, and the leaf node from a preset node relationship graph based on the data acquisition rule configuration information of the target data acquisition item; Based on the root node, the leaf nodes and the dependency relationship between the root node and the leaf nodes, or based on the root node, the branch nodes, the leaf nodes and the dependency relationship between the root node, the branch nodes and the leaf nodes, the data acquisition node path of the target data acquisition item is obtained.
3. The method according to claim 2, characterized in that The data acquisition rule configuration information of the target data acquisition item includes association information, wherein the association information is used to characterize the association relationship between the target data acquisition item and the data acquisition entity, and the data acquisition entity is used to characterize the data acquisition item and / or the fixed value; The step of determining a root node, a leaf node, and a dependency relationship between the root node and the leaf node from a preset node relationship graph based on the data acquisition rule configuration information of the target data acquisition item includes: If it is determined that the associated information of the data acquisition rule configuration information of the target data acquisition item has a first data acquisition item, and the associated information of the data acquisition rule configuration information of the first data acquisition item does not have a second data acquisition item, then the node corresponding to the first data acquisition item is used as the root node, and the node corresponding to the target data acquisition item is used as the leaf node; Using the association relationship between the target data acquisition item and the first data acquisition item as the dependency relationship between the root node and the leaf node; The step of determining a root node, a branch node, a leaf node, and a dependency relationship between the root node, the branch node, and the leaf node from a preset node relationship graph based on the data acquisition rule configuration information of the target data acquisition item includes: If it is determined that the associated information of the data acquisition rule configuration information of the target data acquisition item contains a first data acquisition item, the associated information of the data acquisition rule configuration information of the first data acquisition item contains a second data acquisition item, and the associated information of the data acquisition rule configuration information of the second data acquisition item does not contain a third data acquisition item, then the node corresponding to the second data acquisition item is used as the root node, the node corresponding to the first data acquisition item is used as the branch node, and the node corresponding to the target data acquisition item is used as the leaf node; The association relationship between the target data acquisition item, the first data acquisition item and the second data acquisition item is used as the dependency relationship between the root node, the branch node and the leaf node.
4. The method according to claim 2, characterized in that: The method of acquiring data from each node corresponding to the target data acquisition project according to the dependency relationship between the nodes and based on the data acquisition rule configuration information of the target data acquisition project in turn to obtain target data of the target data acquisition project includes: According to the dependency relationship between the root node and the leaf node, the root node data acquisition process is used as the first data acquisition process of the target data acquisition project, and the leaf node data acquisition process is used as the second data acquisition process of the target data acquisition project; Execute the first data acquisition process based on the data acquisition rule configuration information of the target data acquisition project, and when the first data acquisition process is in a completed state, execute the second data acquisition process to acquire data from each node corresponding to the target data acquisition project to obtain target data of the target data acquisition project; or According to the dependency relationship among the root node, the branch node and the leaf node, the root node data acquisition process is used as the first data acquisition process of the target data acquisition project, the branch node data acquisition process is used as the second data acquisition process of the target data acquisition project, and the leaf node data acquisition process is used as the third data acquisition process of the target data acquisition project; The first data acquisition process is executed based on the data acquisition rule configuration information of the target data acquisition project. When the first data acquisition process is in a completed state, the second data acquisition process is executed. When the second data acquisition process is in a completed state, the third data acquisition process is executed to acquire data from each node corresponding to the target data acquisition project to obtain the target data of the target data acquisition project.
5. The method according to claim 1, characterized in that The acquisition of the data acquisition item mapping table and the business rule conditions of the data acquisition subject include: Acquire the data acquisition rule configuration information of each of the data acquisition items, and generate the data acquisition item mapping table based on the data acquisition rule configuration information of each of the data acquisition items, wherein the data acquisition item mapping table includes the identifier of each of the data acquisition items and the data acquisition rule configuration information of each of the data acquisition items; The business rule condition configuration information of the data acquisition subject is obtained, and the business rule condition is generated based on the business rule condition configuration information of the data acquisition subject, wherein the business rule condition includes the identification of each target data acquisition item and the business rule condition configuration information of each target data acquisition item.
6. The method according to claim 5, characterized in that The step of obtaining the data acquisition rule configuration information of each data acquisition item includes: Displaying a data acquisition rule configuration interface, and obtaining data acquisition rule configuration information of each data acquisition item obtained after the user configures the data acquisition rule in the data acquisition rule configuration interface; Before obtaining the business rule condition configuration information of the data acquisition subject, the method further includes: Generate a business rule condition configuration interface based on the data acquisition rule configuration information of each of the data acquisition items; The step of obtaining the business rule condition configuration information of the data acquisition subject includes: The business rule condition configuration interface is displayed, and the business rule condition configuration information of the data acquisition subject obtained after the user configures the business rule condition in the business rule condition configuration interface is obtained.
7. The method according to claim 5, characterized in that The business rule condition configuration information of the data acquisition subject is obtained, and the business rule condition is generated based on the business rule condition configuration information of the data acquisition subject, wherein the business rule condition includes the identifier of each target data acquisition item and the business rule condition configuration information of each target data acquisition item, including: Acquire business rule condition configuration information of multiple data acquisition subjects, and generate a business rule condition set based on the business rule condition configuration information of the multiple data acquisition subjects, wherein the business rule condition set includes multiple business rule conditions, and the multiple business rule conditions include identifiers of multiple data acquisition subjects, identifiers of target data acquisition items corresponding to the multiple data acquisition subjects, and rule condition configuration information of each target data acquisition item; The target data of each target data acquisition item is calculated based on the business rule condition configuration information of each target data acquisition item, so as to obtain the calculation result of the business rule condition based on the calculation result of the business rule condition configuration information of each target data acquisition item, including: Determine the target data of each of the target data acquisition items corresponding to each of the multiple data acquisition subjects based on the identifiers of the multiple data acquisition subjects; For each data acquisition subject, based on the business rule condition configuration information of each target data acquisition item corresponding to the data acquisition subject, the target data of each target data acquisition item corresponding to the data acquisition subject is calculated, so as to obtain the calculation result of the business rule condition corresponding to the data acquisition subject based on the calculation result of the business rule condition configuration information of each target data acquisition item corresponding to the data acquisition subject.
8. The method according to any one of claims 1 to 7, characterized in that: The data acquisition rule configuration information includes a data acquisition source method, and the data acquisition source method includes a database and / or a context document data set; The method of acquiring data from each node corresponding to the target data acquisition project according to the dependency relationship between the nodes and based on the data acquisition rule configuration information of the target data acquisition project in turn to obtain target data of the target data acquisition project includes: According to the dependency relationship between the nodes, based on the data acquisition rule configuration information of the target data acquisition project, data is acquired from the database and / or the context document data set for each node corresponding to the target data acquisition project to obtain the target data of the target data acquisition project.
9. A device for processing business rule conditions, characterized in that: include: An acquisition unit is used to acquire a data acquisition item mapping table and business rule conditions of a data acquisition subject, wherein the key of the data acquisition item mapping table is used to represent the identifier of each data acquisition item, and the value corresponding to the key is used to represent the data acquisition rule configuration information of each of the data acquisition items, and the business rule conditions include the identifier of each target data acquisition item and the business rule condition configuration information of each of the target data acquisition items; A determination unit is used to determine, for each target data acquisition item, data acquisition rule configuration information of the target data acquisition item from the data acquisition item mapping table based on the identifier of the target data acquisition item, and determine a data acquisition node path of the target data acquisition item from a preset node relationship diagram based on the data acquisition rule configuration information of the target data acquisition item, wherein the data acquisition node path of the target data acquisition item includes each node corresponding to the target data acquisition item and a dependency relationship between each node; A data acquisition unit, configured to acquire data from each node corresponding to the target data acquisition project in sequence based on the data acquisition rule configuration information of the target data acquisition project according to the dependency relationship between the nodes, so as to obtain target data of the target data acquisition project; The calculation unit is used to calculate the target data of each target data acquisition item based on the business rule condition configuration information of each target data acquisition item, so as to obtain the calculation result of the business rule condition based on the calculation result of the business rule condition configuration information of each target data acquisition item.
10. A computer device, characterized in that: include: CPU and memory; The memory is a short-term storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises instructions, and when the instructions are executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 8.
12. A computer program product comprising instructions or a computer program, characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 8.
Citation Information
Cited By
Insurance industry data processing method and device and electronic equipment
CN120912346A