Real-time data product scheduling method, device and equipment based on node routing
Through the real-time data product scheduling method based on node routing, data products are configured and dynamic calling links are generated, which solves the problems of traditional risk control product code redundancy and high maintenance costs, and achieves improved flexibility and scalability.
Patent Information
- Application Number
- CN202410827920.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-06-25
AI Technical Summary
Traditional risk control products have problems such as high code redundancy, high development and maintenance costs, poor scalability, and poor flexibility in realizing the real-time computing functions of data products.
Adopt a real-time data product scheduling method based on node routing, configure data products through the management platform, generate unique product codes, establish a mapping relationship between nodes and codes, parse routing expressions to determine the order of node execution, and realize dynamic calling links for data products Generate and execute.
It improves development efficiency and maintenance convenience, improves the flexibility and scalability of data products, and reduces code redundancy and maintenance costs.
Smart Images

Figure CN118612063A
Abstract
Description
Technical Field
[0001] The present application relates to a method, device and equipment for scheduling real-time data products based on node routing, and belongs to the field of computer technology. Background Art
[0002] With the rapid development of the Internet financial industry, risk management and control have become the key to ensuring stable business operations. However, the performance of traditional risk control products can no longer meet the needs of a complex and changing financial environment.
[0003] In the implementation of real-time computing functions of data products, multi-threaded parallel calls to multiple data sources have become a common strategy. First, data is obtained from different environments or databases through multi-threading, and then after all data is returned, risk control-related logic is executed, such as executing a credit scoring model to issue a score, or calculating a large number of feature variables, and finally returning them to the customer.
[0004] However, most of the above strategies are implemented in a hard-coded manner. This technical solution has many significant disadvantages, such as high code redundancy, high development and maintenance costs, poor scalability, poor flexibility, etc. Summary of the invention
[0005] The present application provides a real-time data product scheduling method, device and equipment based on node routing to solve the problems of high code redundancy, high development and maintenance costs, poor scalability and poor flexibility in the existing technical solutions.
[0006] In a first aspect, an embodiment of the present application provides a real-time data product scheduling method based on node routing, including:
[0007] Based on the configuration operation of the user on the management platform, the data product is configured, and the configured data product is stored in the database; the management platform displays multiple optional configuration items, and the data product includes multiple nodes of the same or different types, the routing configuration of the nodes, and the dependency relationship between the nodes. The node is used to execute the corresponding processing process, the routing configuration of the node is the routing expression configured on the node, which is used to determine the next node pointed to by the node, and the dependency relationship between the nodes is the execution order between the connected nodes;
[0008] Determine a target data product to be executed based on a user operation, and call the target data product from the database;
[0009] The target data product is parsed, and an execution flow of the target data product is generated and executed.
[0010] Based on the above method, optionally, storing the configured data product in a database includes:
[0011] Generate a unique product code for the configured data product;
[0012] Establishing a mapping relationship between all nodes included in the data product and the product code;
[0013] The mapping relationship is stored in a database.
[0014] Based on the above method, optionally, parsing the target data product, generating and executing the execution process of the target data product, includes:
[0015] Determine all starting nodes from the node set included in the target data product; the starting node is a node that does not depend on any other node;
[0016] Execute all start nodes in parallel according to the node type;
[0017] Execute the node processing flow in a loop until all nodes are executed, and use the output of the last executed node as the output of the target data product;
[0018] The node processing flow includes:
[0019] After any node is executed, determine whether the node is configured with a routing expression. If so, parse the routing expression and determine the next node to be executed according to the parsing result. If not, determine the next node connected to the node as the next node to be executed.
[0020] Determine whether all dependent nodes of the next node to be executed have been executed. If so, execute the next node. If not, wait until all dependent nodes of the next node to be executed have been executed before executing the next node.
[0021] Based on the above method, optionally, the types of nodes include data acquisition nodes and data processing nodes; the data acquisition node is used to acquire metadata through network calls, and the data processing node is used to calculate and process the metadata acquired by the data acquisition node based on a pre-configured algorithm or model.
[0022] Based on the above method, optionally, parsing the routing expression and determining the next node to be executed according to the parsing result includes:
[0023] Extract the conditional expression from the routing expression;
[0024] Parse the conditional expression, determine whether there is data in the data layer of the conditional expression, and determine the next node to be executed according to the determination result.
[0025] Based on the above method, optionally, it also includes:
[0026] The target data product is visualized.
[0027] In a second aspect, an embodiment of the present application further provides a real-time data product scheduling device based on node routing, which includes:
[0028] A configuration module is used to configure data products based on the configuration operations of the user on the management platform, and store the configured data products in the database; the management platform displays multiple optional configuration items, the data product includes multiple nodes of the same or different types, the routing configuration of the nodes, and the dependency relationship between the nodes, the nodes are used to execute the corresponding processing process, the routing configuration of the node is the routing expression configured on the node, which is used to determine the next node pointed to by the node, and the dependency relationship between the nodes is the execution order between the connected nodes;
[0029] A calling module, used to determine a target data product to be executed based on a user operation, and call the target data product from the database;
[0030] The execution module is used to parse the target data product, generate an execution flow of the target data product and execute it.
[0031] In a third aspect, an embodiment of the present application further provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor calls and executes the computer program, the real-time data product scheduling method based on node routing as described in any one of the first aspects is implemented.
[0032] The above technical solution provided by this application has at least the following beneficial effects:
[0033] The present application provides a real-time data product scheduling method, device and equipment based on node routing. Data products can be pre-visually configured through a management platform, and the configured data products are stored in a database for subsequent user use; thereafter, the target data product to be executed can be determined according to the user operation and called from the database, and then the target data product is parsed, and the execution process of the target data product is generated and executed. With such a setting, firstly, the data product does not need to be implemented in a hard-coded manner, but only needs to be visually configured for each node of the data product in the management system, and it will take effect immediately after the configuration is completed, which greatly improves the efficiency of development and online launch, and also facilitates maintenance; secondly, all data product configurations can flexibly configure the call link of the data product through custom routing expressions, which improves the flexibility and scalability of the data product. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. In addition, these drawings and text descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application for those skilled in the art by referring to specific embodiments.
[0035] Figure 1 A flowchart of a method for scheduling real-time data products based on node routing provided in one embodiment of the present application;
[0036] Figure 2 A dependency graph of nodes of a data product provided by an embodiment of the present application;
[0037] Figure 3 for Figure 2 The corresponding execution flow chart;
[0038] Figure 4 A schematic diagram of the structure of a real-time data product scheduling device based on node routing is provided for one embodiment of the present application;
[0039] Figure 5 A schematic diagram of the structure of an electronic device provided for one embodiment of the present application. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0041] In the existing report formula calculation methods, whether users manually edit the calculation logic or use third-party report components, there are many problems.
[0042] The existing technical solutions for implementing real-time computing functions of data products have many problems, such as high code redundancy, high development and maintenance costs, poor scalability, poor flexibility, etc. Specifically, they are:
[0043] 1. High development and maintenance costs: Each product needs to be added or modified based on the source code, which will generate a large amount of duplicate and non-reusable code, making subsequent maintenance difficult. This approach will also lead to longer development and testing time, increasing time and labor costs.
[0044] 2. Poor scalability and flexibility: When business rules change or new data sources are added, the entire system may need to be modified a lot, generating a lot of redundant code, leading to increased system complexity.
[0045] In order to solve the above problems, the present application provides a real-time data product scheduling solution based on node routing, which can meet the needs of most data products through a set of codes based on a node configuration strategy. The following non-limiting description of the specific implementation scheme is given through several examples or embodiments.
[0046] Some embodiments of the present application provide a real-time data product scheduling method based on node routing, referring to Figure 1 , Figure 1 A flowchart of a real-time data product scheduling method based on node routing is provided for one embodiment of the present application.
[0047] like Figure 1 As shown, the real-time data product scheduling method based on node routing of this embodiment includes the following steps:
[0048] Step S101: Based on the configuration operation of the user on the management platform, configure the data product, and store the configured data product in the database.
[0049] Among them, the management platform displays multiple optional configuration items. The data products include multiple nodes of the same or different types, the routing configuration of the nodes, and the dependencies between the nodes. The nodes are used to execute the corresponding processing procedures. The routing configuration of the node is the routing expression configured on the node, which is used to determine the next node pointed to by the node. The dependency between the nodes is the execution order between the connected nodes.
[0050] Specifically, the management platform DPM is a background operation platform, which provides a series of functions required for the configuration of data products (referred to as products), including but not limited to product management, node management, routing configuration and other necessary functions.
[0051] The management platform can provide a visual configuration interface, which can display various optional configuration items, including different types of nodes and routing expressions, etc. Through the management platform, users can perform operations such as clicking, dragging, and manual input to complete the configuration, modification, and storage of data products.
[0052] A configured product is a collection of one or more nodes from a static perspective, and a call chain from a dynamic perspective. Through the node dependencies and routing configuration, a dynamic call chain is generated during the execution process. The combination of static configuration and dynamic call forms a complete data product.
[0053] After the configuration is completed, the data product is stored in the database for subsequent use. In this way, when using the same data product, the user does not need to reconfigure it every time, but only needs to select the configured data product from the database, which greatly reduces user operations and improves convenience.
[0054] In some embodiments, the step of storing the configured data product in a database may specifically include:
[0055] Generate a unique product code for the configured data product;
[0056] Establish a mapping relationship between all nodes included in the data product and the product code;
[0057] The mapping relationship is stored in the database.
[0058] Specifically, in this embodiment, after the data product is configured, the management platform will generate a product code prod_code for it. As the unique identifier of a product, all nodes under the product will establish a mapping relationship with prod_code and then store it in the database to ensure that all nodes under the product can be found through the product code prod_code in the future. The specific form of the product code is not limited, for example, it can be a string formed by multiple numbers, letters, and symbols alone or in combination.
[0059] like Figure 2 As shown in the figure, after the product configuration is completed, you can see the dependency diagram of all nodes of a product on the DPM platform. Among them, nodes can be divided into multiple types, including but not limited to: data acquisition nodes (std nodes) and data processing nodes (mode l nodes). Data acquisition nodes are used to obtain metadata through network calls, and data processing nodes are used to calculate and process the metadata obtained by data acquisition nodes based on pre-configured algorithms or models.
[0060] In addition, a node allows configuration of one or more dependent nodes (i.e., dependencies between nodes), and the dependent nodes are executed before the current node, such as Figure 2 The std2 node in depends on the std1 node, the mode l node depends on three nodes, std1, std2 and std3. The nodes that do not depend on any other nodes are marked as start nodes, such as std1 and std3. When executing data products, the start node is executed first.
[0061] In addition, routing expressions can be configured on nodes, which can determine which node to execute next based on whether there is data on the node, such as Figure 2 The std1 node in the , when hit (data exists), executes the mode l node, and when not hit, executes the std2 node.
[0062] Step S102: determining a target data product to be executed based on a user operation, and calling the target data product from a database.
[0063] Specifically, the user can select the data product that he wants to execute, that is, the target data product, in the operation interface. Figure 2 Multiple data products are displayed in the form of, and the user can select the data product he wants to execute; or the user can directly enter the product code prod_code of the data product, so as to automatically determine the corresponding data product as the target data product.
[0064] The system will load all nodes and dependency information of the product from the DPM platform into its own memory for logical processing based on the product code prod_code.
[0065] In some embodiments, the above method may further include: visually displaying the target data product.
[0066] That is, after the target data product is determined, it can be visualized to facilitate users to check whether it meets the requirements. In addition, users can also be allowed to further modify and adjust the target data product.
[0067] Step S103: parse the target data product, generate an execution flow of the target data product and execute it.
[0068] Specifically, after the system obtains the target data product to be executed from the database, it will parse it, determine the execution process and then execute it.
[0069] The parsing process is to determine all the nodes, node types, node dependencies, routing configurations and other parameters included in the data product, and then determine the corresponding execution process.
[0070] In some embodiments, the specific implementation process of step S103 may include:
[0071] Determine all start nodes from the set of nodes included in the target data product;
[0072] Execute all start nodes in parallel according to the node type;
[0073] The node processing flow is executed cyclically until all nodes are executed, and the output of the last executed node is used as the output of the target data product;
[0074] The node processing flow includes:
[0075] After any node is executed, determine whether the node is configured with a routing expression. If so, parse the routing expression and determine the next node to be executed according to the parsing result. If not, determine the next node connected to the node as the next node to be executed.
[0076] Determine whether all dependent nodes of the next node to be executed have been executed. If so, execute the next node. If not, wait until all dependent nodes of the next node to be executed have been executed before executing the next node.
[0077] Among them, all the start nodes are executed in parallel, that is, multiple start nodes are executed without interfering with each other, so that the processing speed can be improved.
[0078] In some embodiments, in the above process, the specific process of parsing the routing expression and determining the next node to be executed based on the parsing result may include: extracting the conditional expression from the routing expression; parsing the conditional expression, determining whether there is data in the data layer of the conditional expression, and determining the next node to be executed based on the judgment result.
[0079] For a better understanding, the configuration and parsing of routing expressions are described in the following example. In this example, the routing expression is configured as follows:
[0080] if(${data.0|data.0|model_id}!=isNu ll)#shuchu1 el se#shuchu2==shuchu1, the routing expression parsing rules are as follows:
[0081] a) Take out the conditional expression (${data.0|data.0|model_id}!=isNul l) from the if expression;
[0082] b) Parse the conditional expression, take the first piece of data from the data layer (data.0) in the data returned by the current node, and then take the first piece of data from the data layer (data.0) in this piece of data, and determine whether the mode l_id value is empty;
[0083] c) If it is not empty, the next node is the shuchu1 after the first #, where the shuchu1 after == is used to identify the post-node;
[0084] d) If it is empty, the next node is the shuchu2 node after the second # in else.
[0085] In addition, according to Figure 2 The node dependency diagram of the product is shown in the following figure. Figure 3 shown.
[0086] from Figure 3 It can be seen that:
[0087] 1. The std1 and std3 nodes do not depend on any node, which means they are the start nodes and will be executed first.
[0088] 2. After the std1 node is executed, the execution of subsequent nodes will be determined based on whether the result of the std1 node is hit (i.e., the routing expression).
[0089] a) If the result of std1 is a hit, then the std2 node will be ignored and the mode l node will be executed. At the same time, since the mode l node depends on the std1 and std3 nodes, before executing the mode l node, it will first determine whether the two predecessor nodes std1 and std3 of the mode l node have been executed. After both std1 and std3 nodes have been executed, the model node will be executed;
[0090] b) If the result of std1 is a miss, then ignore the mode l node and execute the std2 node, and finally return to the mode l node again. When executing the mode l node here, it is also necessary to wait for the std3 node to be executed.
[0091] 3. Finally, the mode 1 node is used as the end node, and the execution result of the mode 1 node is the output result of the product.
[0092] In order to better understand the whole scheme, Figure 2 Based on this, a typical product application scenario is as follows:
[0093] 1. The customer calls a product with product code 10001 and passes business data: ID number, name, etc.
[0094] 2. Use product code 10001 to find the payment data node std1 and consumption data node std3 used by the product;
[0095] 3. Pass the ID number, name and other information to two std nodes (std1 and std3) to query payment, consumption and other transaction data;
[0096] 4. If there is any missed data, then the backup node std2 is selected as a further supplement through the routing expression;
[0097] 5. Pass the pipeline data to the big data model node mode l to calculate the model score;
[0098] 6. Return the model to the customer.
[0099] Therefore, based on the solutions of the above-mentioned embodiments, data products can be pre-visually configured through the management platform, and the configured data products can be stored in the database for subsequent user use; afterwards, the target data product to be executed can be determined according to the user operation and called from the database, and then the target data product is parsed, and the execution process of the target data product is generated and executed. With such a setting, firstly, the data product does not need to be implemented in a hard-coded manner, but only needs to be visually configured for each node of the data product in the management system, and it will take effect immediately after the configuration is completed, which greatly improves the efficiency of development and online release, and also facilitates maintenance; secondly, all data product configurations can flexibly configure the call link of the data product through custom routing expressions, which improves the flexibility and scalability of the data product.
[0100] In addition, the embodiment of the present application provides a real-time data product scheduling device based on node routing, referring to Figure 4 , the real-time data product scheduling device based on node routing includes:
[0101] Configuration module 41, configured to configure data products based on the configuration operation of the user on the management platform, and store the configured data products in the database; the management platform displays multiple optional configuration items, and the data products include multiple nodes of the same or different types, node routing configurations, and dependencies between nodes. The nodes are used to execute corresponding processing procedures, and the node routing configuration is a routing expression configured on the node, which is used to determine the next node pointed to by the node. The dependency between nodes is the execution order between connected nodes;
[0102] A calling module 42, configured to determine a target data product to be executed based on a user operation, and call the target data product from a database;
[0103] The execution module 43 is used to parse the target data product, generate an execution flow of the target data product and execute it.
[0104] Among them, regarding the specific implementation method of each module of the above-mentioned real-time data product scheduling device based on node routing, reference can be made to the corresponding content in the aforementioned method embodiment, and no further details will be given here.
[0105] In addition, the present application also provides an electronic device, such as Figure 5 As shown, the electronic device includes a memory 51 and a processor 52; wherein the memory 51 stores a computer program, and when the processor 52 calls and executes the computer program, the real-time data product scheduling method based on node routing in any of the above embodiments is implemented.
[0106] The electronic device may be a desktop computer, a notebook computer or a server.
[0107] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.
[0108] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "plurality" refers to at least two.
[0109] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.
[0110] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0111] A person of ordinary skill in the art may understand that all or part of the steps of the method for implementing the above-mentioned embodiment may be completed by instructing the relevant hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one of the steps of the method embodiment or a combination thereof.
[0112] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0113] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0114] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A real-time data product scheduling method based on node routing, characterized in that: The method comprises: Based on the configuration operation of the user on the management platform, the data product is configured, and the configured data product is stored in the database; the management platform displays multiple optional configuration items, and the data product includes multiple nodes of the same or different types, the routing configuration of the nodes, and the dependency relationship between the nodes. The node is used to execute the corresponding processing process, the routing configuration of the node is the routing expression configured on the node, which is used to determine the next node pointed to by the node, and the dependency relationship between the nodes is the execution order between the connected nodes; Determine a target data product to be executed based on a user operation, and call the target data product from the database; The target data product is parsed, and an execution flow of the target data product is generated and executed.
2. The method according to claim 1, characterized in that The step of storing the configured data product in a database includes: Generate a unique product code for the configured data product; Establishing a mapping relationship between all nodes included in the data product and the product code; The mapping relationship is stored in a database.
3. The method according to claim 1, characterized in that The step of parsing the target data product, generating and executing an execution flow of the target data product includes: Determine all starting nodes from the node set included in the target data product; the starting node is a node that does not depend on any other node; Execute all start nodes in parallel according to the node type; Execute the node processing flow in a loop until all nodes are executed, and use the output of the last executed node as the output of the target data product; The node processing flow includes: After any node is executed, determine whether the node is configured with a routing expression. If so, parse the routing expression and determine the next node to be executed according to the parsing result. If not, determine the next node connected to the node as the next node to be executed. Determine whether all dependent nodes of the next node to be executed have been executed. If so, execute the next node. If not, wait until all dependent nodes of the next node to be executed have been executed before executing the next node.
4. The method according to claim 3, characterized in that The types of nodes include data acquisition nodes and data processing nodes; the data acquisition nodes are used to acquire metadata through network calls, and the data processing nodes are used to calculate and process the metadata acquired by the data acquisition nodes based on a pre-configured algorithm or model.
5. The method according to claim 3, characterized in that: The parsing of the routing expression and determining the next node to be executed according to the parsing result includes: Extract the conditional expression from the routing expression; Parse the conditional expression, determine whether there is data in the data layer of the conditional expression, and determine the next node to be executed according to the determination result.
6. The method according to claim 1, characterized in that Also includes: The target data product is visualized.
7. A real-time data product scheduling device based on node routing, characterized in that: include: A configuration module is used to configure data products based on the configuration operations of the user on the management platform, and store the configured data products in the database; the management platform displays multiple optional configuration items, the data product includes multiple nodes of the same or different types, the routing configuration of the nodes, and the dependency relationship between the nodes, the nodes are used to execute the corresponding processing process, the routing configuration of the node is the routing expression configured on the node, which is used to determine the next node pointed to by the node, and the dependency relationship between the nodes is the execution order between the connected nodes; A calling module, used to determine a target data product to be executed based on a user operation, and call the target data product from the database; The execution module is used to parse the target data product, generate an execution flow of the target data product and execute it.
8. An electronic device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and when the processor calls and executes the computer program, the real-time data product scheduling method based on node routing as claimed in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Task scheduling method, system and device and storage medium
CN112035235A
Data access method and device, scheduling equipment and storage medium
CN113282565A
Task arrangement method, equipment, device and system and computer readable storage medium
CN113296902A
Data processing method and device, equipment and storage medium
CN117609304A
Trusted data analysis cluster scheduling method and system based on TEE and medium
CN117931394A
