Execution sequence determination method and device, computer device and storage medium

CN116401035BActive Publication Date: 2026-09-22INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310391576.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-13
Publication Date
2026-09-22
Estimated Expiration
2043-04-13

AI Technical Summary

Technical Problem

[0003]传统技术通常是通过人工确定运行文件的执行顺序,但是对于运行文件数量众多的情况时,人工处理的耗时长,所以通过该方式进行执行顺序确定的效率较低

Benefits of technology

[0042]上述执行顺序确定方法、装置、计算机设备、存储介质和计算机程序产品,识别出待处理任务的多个运行文件中的数据资源操作信息;所述数据资源操作信息用于表示对数据库中的数据资源的操作信息,所述数据资源操作信息中包括目标数据操作类型的操作信息;所述待处理任务为金融系统中的业务任务;根据各个运行文件中的目标数据操作类型的操作信息,确定所述各个运行文件涉及的目标数据操作类型,以及与所述目标数据操作类型对应的目标数据资源;根据所述各个运行文件涉及的目标数据操作类型,查询预设的数据操作类型顺序表,得到所述各个运行文件的第一执行优先级;根据所述各个运行文件涉及的目标数据资源,查询预设的依赖关系表,得到所述各个运行文件的第二执行优先级;所述依赖关系表根据所述多个运行文件中的数据资源操作信息确定;根据所述第一执行优先级和所述第二执行优先级,确定所述各个运行文件的执行顺序;所述各个运行文件用于按照所述执行顺序处理所述待处理任务。该方案通过根据多个运行文件中的对数据资源的操作信息,从而准确地确定出各数据资源之间的依赖关系表;根据各个运行文件中的目标数据操作类型的操作信息,确定各个运行文件涉及的目标数据操作类型和对应的目标数据资源,结合预设的数据操作类型顺序表和依赖关系表,确定各个运行文件的第一执行优先级和第二执行优先级,从而快速和准确地确定出各运行文件的执行顺序的依据;根据第一执行优先级和第二执行优先级,能够快速和准确地确定出各个运行文件的执行顺序,从而提高执行顺序确定的效率和准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116401035B_ABST
    Figure CN116401035B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of big data, and provides an execution sequence determination method and device, computer equipment, a storage medium and a computer program product, which can be specifically applied to the financial field or other related fields. The application can improve the efficiency and accuracy of execution sequence determination. The method comprises the following steps: identifying data resource operation information in a plurality of running files of a to-be-processed task; determining target data operation types and corresponding target data resources involved in each running file according to operation information of a target data operation type in each running file; querying a data operation type sequence table according to the target data operation types involved in each running file to obtain a first execution priority of each running file; querying a dependency relationship table according to the target data resources involved in each running file to obtain a second execution priority of each running file; and determining an execution sequence of each running file according to the first execution priority and the second execution priority.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of big data technology, and in particular to a method, apparatus, computer device, storage medium, and computer program product for determining execution order. Background Technology

[0002] With the development of computer technology, batch execution of multiple executable files (such as scripts) is a common and efficient way to utilize computer resources. When executing multiple executable files, the execution order of the files must first be determined so that they are executed in batches according to the execution order. When adding or modifying executable files, the execution order of all executable files must be determined.

[0003] Traditional techniques typically involve manually determining the execution order of files. However, when dealing with a large number of files, manual processing is time-consuming, making this method of determining the execution order inefficient. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for determining the execution order in order to address the above-mentioned technical problems.

[0005] Firstly, this application provides a method for determining the execution order. The method includes:

[0006] The system identifies data resource operation information in multiple running files of the task to be processed; the data resource operation information represents operation information on data resources in the database, and includes operation information on the target data operation type; the task to be processed is a business task in a financial system.

[0007] Based on the operation information of the target data operation type in each running file, determine the target data operation type involved in each running file, and the target data resource corresponding to the target data operation type;

[0008] Based on the target data operation type involved in each running file, a preset data operation type order table is queried to obtain the first execution priority of each running file;

[0009] Based on the target data resources involved in each of the running files, a preset dependency table is queried to obtain the second execution priority of each running file; the dependency table is determined based on the data resource operation information of the multiple running files.

[0010] The execution order of each running file is determined based on the first execution priority and the second execution priority; each running file is used to process the task to be processed in the order of execution.

[0011] In one embodiment, the first execution priority has a higher priority than the second execution priority;

[0012] Determining the execution order of each running file based on the first execution priority and the second execution priority includes:

[0013] Based on the first execution priority of each running file, the running files are sorted to obtain the initial execution order of the running files;

[0014] The initial execution order is updated according to the second execution priority of each running file to obtain the execution order of each running file.

[0015] In one embodiment, before querying a preset dependency table based on the target data resources involved in each executable file to obtain the second execution priority of each executable file, the method further includes:

[0016] The data resource operation information in each of the running files is parsed to obtain the dependency relationships between the data resources involved in each running file.

[0017] The dependencies between the data resources involved in each of the running files are combined to obtain the dependency table.

[0018] In one embodiment, the step of querying a preset data operation type order table based on the target data operation types involved in each running file to obtain the first execution priority of each running file includes:

[0019] The priority of the target data operation type involved in each running file is determined according to its position in the preset data operation type sequence table.

[0020] The first execution priority of each running file is determined based on the priority of the target data operation types involved in each running file.

[0021] In one embodiment, the step of querying a preset dependency table based on the target data resources involved in each executable file to obtain the second execution priority of each executable file includes:

[0022] The priority of the target data resources involved in each running file is determined according to their arrangement position in a preset dependency table.

[0023] The second execution priority of each running file is determined based on the priority of the target data resources involved in each running file.

[0024] In one embodiment, identifying data resource operation information in multiple runtime files of the task to be processed includes:

[0025] Identify operation information in multiple running files of the task to be processed;

[0026] Operation information belonging to the data resource operation type is identified from the operation information in the multiple running files and used as the data resource operation information in the multiple running files.

[0027] In one embodiment, after determining the execution order of the various running files based on the first execution priority and the second execution priority, the method further includes:

[0028] According to the execution order, the path information corresponding to each running file is added to the configuration file corresponding to the task to be processed;

[0029] In response to the execution instruction for the task to be processed, the running files corresponding to each path information in the configuration file are executed sequentially to obtain the execution result of the task to be processed.

[0030] Secondly, this application also provides an execution order determination apparatus. The apparatus includes:

[0031] The information recognition module is used to identify data resource operation information in multiple running files of the task to be processed; the data resource operation information is used to represent operation information on data resources in the database, and the data resource operation information includes operation information of the target data operation type; the task to be processed is a business task in the financial system.

[0032] The information determination module is used to determine the target data operation type involved in each running file and the target data resource corresponding to the target data operation type based on the operation information of the target data operation type in each running file.

[0033] The first query module is used to query a preset data operation type order table based on the target data operation types involved in each running file, and obtain the first execution priority of each running file.

[0034] The second query module is used to query a preset dependency table based on the target data resources involved in each of the running files to obtain the second execution priority of each running file; the dependency table is determined based on the data resource operation information of the multiple running files.

[0035] The sequence determination module is used to determine the execution order of each running file according to the first execution priority and the second execution priority; the running files are used to process the task to be processed according to the execution order.

[0036] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0037] The system identifies data resource operation information in multiple running files of a task to be processed. This data resource operation information represents operations on data resources in a database, including operation information for target data operation types. The task to be processed is a business task within a financial system. Based on the operation information for target data operation types in each running file, the system determines the target data operation types involved in each running file, as well as the target data resources corresponding to those types. Based on the target data operation types involved in each running file, a preset data operation type order table is queried to obtain a first execution priority for each running file. Based on the target data resources involved in each running file, a preset dependency table is queried to obtain a second execution priority for each running file. The dependency table is determined based on the data resource operation information in the multiple running files. Based on the first and second execution priorities, the execution order of each running file is determined. Each running file is used to process the task to be processed according to the execution order.

[0038] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0039] The system identifies data resource operation information in multiple running files of a task to be processed. This data resource operation information represents operations on data resources in a database, including operation information for target data operation types. The task to be processed is a business task within a financial system. Based on the operation information for target data operation types in each running file, the system determines the target data operation types involved in each running file, as well as the target data resources corresponding to those types. Based on the target data operation types involved in each running file, a preset data operation type order table is queried to obtain a first execution priority for each running file. Based on the target data resources involved in each running file, a preset dependency table is queried to obtain a second execution priority for each running file. The dependency table is determined based on the data resource operation information in the multiple running files. Based on the first and second execution priorities, the execution order of each running file is determined. Each running file is used to process the task to be processed according to the execution order.

[0040] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0041] The system identifies data resource operation information in multiple running files of a task to be processed. This data resource operation information represents operations on data resources in a database, including operation information for target data operation types. The task to be processed is a business task within a financial system. Based on the operation information for target data operation types in each running file, the system determines the target data operation types involved in each running file, as well as the target data resources corresponding to those types. Based on the target data operation types involved in each running file, a preset data operation type order table is queried to obtain a first execution priority for each running file. Based on the target data resources involved in each running file, a preset dependency table is queried to obtain a second execution priority for each running file. The dependency table is determined based on the data resource operation information in the multiple running files. Based on the first and second execution priorities, the execution order of each running file is determined. Each running file is used to process the task to be processed according to the execution order.

[0042] The aforementioned execution order determination method, apparatus, computer equipment, storage medium, and computer program product identify data resource operation information in multiple running files of a task to be processed. The data resource operation information represents operation information on data resources in a database, including operation information for target data operation types. The task to be processed is a business task in a financial system. Based on the operation information of the target data operation types in each running file, the target data operation types involved in each running file and the target data resources corresponding to those target data operation types are determined. Based on the target data operation types involved in each running file, a preset data operation type order table is queried to obtain a first execution priority for each running file. Based on the target data resources involved in each running file, a preset dependency table is queried to obtain a second execution priority for each running file. The dependency table is determined based on the data resource operation information in the multiple running files. Based on the first execution priority and the second execution priority, the execution order of each running file is determined. Each running file is used to process the task to be processed according to the execution order. This scheme accurately determines the dependency table between data resources by analyzing the operation information of data resources in multiple runtime files. Based on the operation information of the target data operation types in each runtime file, it identifies the target data operation types and corresponding target data resources involved in each runtime file. Combining this with a pre-defined data operation type sequence table and dependency table, it determines the first and second execution priorities of each runtime file, thus quickly and accurately determining the execution order of each runtime file. By using the first and second execution priorities, the execution order of each runtime file can be determined quickly and accurately, thereby improving the efficiency and accuracy of execution order determination. Attached Figure Description

[0043] Figure 1 This is a flowchart illustrating the execution order determination method in one embodiment;

[0044] Figure 2 This is a flowchart illustrating the steps for determining the execution order of various executable files in one embodiment;

[0045] Figure 3 This is a flowchart illustrating the steps for obtaining the dependency table in one embodiment;

[0046] Figure 4 This is a schematic diagram of a graph structure representing data lineage in one embodiment;

[0047] Figure 5 This is a flowchart illustrating the execution order determination method in another embodiment;

[0048] Figure 6 This is a structural block diagram of an execution order determination device in one embodiment;

[0049] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0051] In one embodiment, such as Figure 1 As shown, a method for determining the execution order is provided. This embodiment illustrates the method by applying it to a terminal (or a server), and includes the following steps:

[0052] Step S101: Identify data resource operation information in multiple running files of the task to be processed; the data resource operation information is used to represent the operation information on data resources in the database, and the data resource operation information includes the operation information of the target data operation type; the task to be processed is a business task in the financial system.

[0053] In this step, the task to be processed can be a task used to implement a certain function, such as a program; the executable file can be a script, such as a Java (a computer programming language) script file; the data resource operation information can be information on operations on tables (data tables) in the database, such as database table-level operation statements; the data resources in the database can refer to tables (data tables) in the database; the target data operation type can be a specific data operation type, such as insert, update / modify, select, and delete.

[0054] Specifically, the terminal identifies multiple executable files corresponding to the task to be processed, reads these multiple executable files, and traverses each executable file one by one starting from the main entry point of the program. When a method is called, the current position of the executable file is recorded and temporarily stored in a stack. After the method iteration is completed, the previously recorded file position is popped from the stack, and the iteration continues from the previously stored position. When a decision branch is encountered, all branches are entered to ensure that all possible methods called in the executable files are traversed, thereby obtaining all operation information in the multiple executable files. From all operation information, the operation information that operates on data resources is identified and used as the data resource operation information in the multiple executable files of the task to be processed.

[0055] Step S102: Based on the operation information of the target data operation type in each running file, determine the target data operation type involved in each running file, as well as the target data resource corresponding to the target data operation type.

[0056] In this step, the operation information of the target data operation type in each run file can refer to the information of the operation of the target data operation type on the data resource in each run file, such as the information of the operation of adding, updating, querying or deleting the data resource in each run file; the target data resource corresponding to the target data operation type can refer to the data resource corresponding to the information of the operation of the target data operation type on the data resource, such as the data resource targeted by the operation of adding, updating, querying or deleting.

[0057] Specifically, the terminal selects the operation information of the target data operation type from the data resource operation information of multiple running files, and determines the target data operation type involved in each running file and the target data resource corresponding to the target data operation type based on the operation information of the target data operation type in each running file.

[0058] Step S103: Based on the target data operation types involved in each running file, query the preset data operation type sequence table to obtain the first execution priority of each running file.

[0059] In this step, the preset data operation type sequence table can be a pre-set priority order of data operation types, such as a pre-set priority order of target data operation types; the first execution priority of each running file can be the priority of the first execution order of each running file, which can be expressed in numerical form. For example, the first execution priority of each running file can be obtained as follows: the first execution priority of running file A is 1, the first execution priority of running file B is 2, the first execution priority of running file C is 1, and the first execution priority of running file D is 3. Then it can be understood that the first execution priority of running file A = the first execution priority of running file C > the first execution priority of running file B > the first execution priority of running file D.

[0060] Specifically, after the terminal determines the target data operation types involved in each running file, it queries a preset data operation type sequence table based on the target data operation types involved in each running file, determines the priority of the target data operation types involved in each running file in the data operation type sequence table, and uses it as the first execution priority of each running file.

[0061] For example, for each executable file, if the terminal determines that there are multiple target data operation types involved in a certain executable file, it will query the preset data operation type order table to obtain multiple priorities for the executable file, and select the highest priority as the first execution priority of the executable file.

[0062] Step S104: Based on the target data resources involved in each running file, query the preset dependency table to obtain the second execution priority of each running file; the dependency table is determined based on the data resource operation information of multiple running files.

[0063] In this step, the preset dependency table can be the dependency relationship between multiple executable files, such as the data lineage relationship between multiple executable files.

[0064] Specifically, the terminal performs dependency identification on the data resource operation information of multiple running files, determines the dependency relationship between each data resource, and uses it as a dependency relationship table; based on the target data resources involved in each running file, it queries the preset dependency relationship table to determine the priority of the target data resources involved in each running file in the dependency relationship table, which is used as the second execution priority of each running file.

[0065] For example, for each executable file, when the terminal determines that there are multiple target data resources involved in a certain executable file, it queries the preset dependency table to obtain multiple priorities for that executable file, and selects the highest priority as the second execution priority for that executable file.

[0066] Step S105: Determine the execution order of each running file according to the first execution priority and the second execution priority; each running file is used to process the tasks to be processed in the order of execution.

[0067] Specifically, the terminal determines the initial execution order of each executable file according to its first execution priority; then it determines the execution order of each executable file according to its second execution priority.

[0068] In the above method for determining the execution order, data resource operation information is identified in multiple runtime files of the task to be processed. This data resource operation information represents operations on data resources in the database, including operation information for the target data operation type. The task to be processed is a business task within a financial system. Based on the operation information for the target data operation type in each runtime file, the target data operation type involved in each runtime file and the target data resource corresponding to that type are determined. Based on the target data operation type involved in each runtime file, a preset data operation type order table is queried to obtain the first execution priority of each runtime file. Based on the target data resources involved in each runtime file, a preset dependency table is queried to obtain the second execution priority of each runtime file. The dependency table is determined based on the data resource operation information in multiple runtime files. The execution order of each runtime file is determined based on the first and second execution priorities. Each runtime file is used to process the task to be processed according to the execution order. This scheme accurately determines the dependency table between data resources by analyzing the operation information of data resources in multiple runtime files. Based on the operation information of the target data operation types in each runtime file, it identifies the target data operation types and corresponding target data resources involved in each runtime file. Combining this with a pre-defined data operation type sequence table and dependency table, it determines the first and second execution priorities of each runtime file, thus quickly and accurately determining the execution order of each runtime file. By using the first and second execution priorities, the execution order of each runtime file can be determined quickly and accurately, thereby improving the efficiency and accuracy of execution order determination.

[0069] In one embodiment, such as Figure 2 As shown, in step S105, the execution order of each running file is determined according to the first execution priority and the second execution priority, specifically including the following: Step S201, sort each running file according to the first execution priority to obtain the initial execution order of each running file; Step S202, update the initial execution order according to the second execution priority of each running file to obtain the execution order of each running file.

[0070] In this embodiment, the first execution priority has a higher priority than the second execution priority.

[0071] Specifically, the terminal sorts the running files in descending order of their first execution priority to obtain the initial execution order; then, it updates the initial execution order in descending order of their second execution priority to obtain the final execution order.

[0072] For example, the first execution priority of each executable file could be 1 for executable file A, 2 for executable file B, 1 for executable file C, 3 for executable file D, and 3 for executable file E. This can be understood as: the first execution priority of executable file A = the first execution priority of executable file C > the first execution priority of executable file B > the first execution priority of executable file D = the first execution priority of executable file E. Therefore, the initial execution order could be ACBDE. Alternatively, the first execution priority of each executable file could be 2 for executable file A, 3 for executable file B, 1 for executable file C, 3 for executable file D, and 2 for executable file E. In this case, the execution order would be CABED.

[0073] The technical solution of this embodiment first sorts each running file by utilizing its first execution priority, and then sorts it a second time by utilizing its second execution priority. This allows each file to be sorted according to the priority order recorded in the data operation type order table and the dependency relationship table, thereby improving the efficiency and accuracy of execution order determination.

[0074] In one embodiment, such as Figure 3 As shown, in step S104 above, before querying the preset dependency table based on the target data resources involved in each running file to obtain the second execution priority of each running file, the step of obtaining the dependency table is also included. Specifically, it includes the following: Step S301, parsing the data resource operation information of each running file to obtain the dependency relationship between the data resources involved in each running file; Step S302, combining the dependency relationships between the data resources involved in each running file to obtain the dependency table.

[0075] In this embodiment, the dependency relationship can be a data lineage relationship. For example, based on the data resource operation information of a certain running file, it can be identified that data resource table 3 is obtained from data resource table 1. Figure 4 As shown, this is equivalent to Table 1 pointing to Table 3, that is, the dependency relationship between Table 1 and Table 3 is that Table 3 depends on Table 1, which can be understood as Table 1 having a higher priority than Table 3.

[0076] Specifically, the terminal performs data resource association parsing on the data resource operation information of each running file, and obtains the association relationship between each data resource. Based on the order of the association relationship between each data resource, the dependency relationship between the data resources involved in each running file is determined. The dependency relationships between the data resources involved in each running file are combined to form the overall dependency relationship of all data resources involved in each running file, which is used as a dependency relationship table.

[0077] For example, the terminal parses the data resource operation information of each executable file to obtain the dependencies between the data resources involved in each executable file, such as... Figure 4 As shown, the resulting dependencies are: Table 3 depends on Tables 1 and 2, Tables 4 and 5 depend on Table 3, and Table 6 does not depend on any table. Combining the dependencies between the data resources involved in each running file yields the following: Figure 4 The graph structure of the data lineage shown serves as a dependency table. In this case, the priority of each data resource (each table) can be: Table 1, Table 2, and Table 6 have a priority of 1; Table 3 has a priority of 2; and Table 4 and Table 5 have a priority of 3. That is, the priority is Table 1 = Table 2 = Table 6 > Table 3 > Table 4 = Table 5, which corresponds to the second execution priority.

[0078] The technical solution of this embodiment, by parsing all data resource operation information, helps to accurately determine the dependencies between various data resources. Then, the obtained dependencies are combined to obtain the overall dependencies of all data resources, which helps to obtain an accurate dependency table, thereby improving the accuracy of subsequent execution order determination.

[0079] In one embodiment, in step S103, a preset data operation type sequence table is queried according to the target data operation type involved in each running file to obtain the first execution priority of each running file. Specifically, this includes: determining the priority of the target data operation type involved in each running file according to the arrangement position of the target data operation type involved in each running file in the preset data operation type sequence table; and determining the first execution priority of each running file according to the priority of the target data operation type involved in each running file.

[0080] In this embodiment, the arrangement position in the preset data operation type sequence table can refer to the position representing the priority order in the preset data operation type sequence table.

[0081] Specifically, after determining the target data operation types involved in each running file, the terminal determines the arrangement position of the target data operation types involved in each running file in the preset data operation type sequence table, and determines the priority of the target data operation types involved in each running file according to the order of the arrangement positions; for each running file, the highest priority among the priority of the target data operation types involved in the running file is selected as the first execution priority of the running file.

[0082] The technical solution of this embodiment, by determining the target data operation types involved in each running file and their arrangement positions in the data operation type sequence table, facilitates the rapid and accurate determination of the first execution priority of each running file, thereby improving the efficiency and accuracy of subsequent execution order determination.

[0083] In one embodiment, in step S104, a preset dependency table is queried based on the target data resources involved in each running file to obtain the second execution priority of each running file. Specifically, this includes: determining the priority of the target data resources involved in each running file based on their arrangement position in the preset dependency table; and determining the second execution priority of each running file based on the priority of the target data resources involved in each running file.

[0084] In this embodiment, the arrangement position in the preset dependency table can refer to the position in the preset dependency table that represents the priority order.

[0085] Specifically, after the terminal determines the target data resources involved in each running file, it determines the arrangement position of the target data resources involved in each running file in the preset dependency table, and determines the priority of the target data resources involved in each running file according to the order of the arrangement position; for each running file, the highest priority among the priority of the target data resources involved in the running file is selected as the second execution priority of the running file.

[0086] The technical solution of this embodiment, by determining the arrangement position of the target data resources involved in each running file in the dependency table, is conducive to quickly and accurately determining the second execution priority of each running file, thereby improving the efficiency and accuracy of subsequent execution order determination.

[0087] In one embodiment, in step S101, identifying data resource operation information in multiple running files of the task to be processed specifically includes the following: identifying operation information in multiple running files of the task to be processed; identifying operation information belonging to the data resource operation type from the operation information in the multiple running files, and using it as the data resource operation information in the multiple running files.

[0088] In this embodiment, the data resource operation type can refer to the type of operation performed on the data resource, such as assignment statement type and target data operation type.

[0089] Specifically, the terminal identifies operation information (such as statements) in multiple running files of the task to be processed; it identifies data operation type operation information from the operation information in the multiple running files; and it identifies information on data resource operations from the data operation type operation information, which is then used as data resource operation information in the multiple running files.

[0090] The technical solution of this embodiment identifies data resource operation information from multiple running files based on the data resource operation type, which helps to obtain more accurate data resource operation information, thereby improving the accuracy of subsequent execution order determination.

[0091] In one embodiment, after determining the execution order of each running file according to the first execution priority and the second execution priority, step S105 above further includes the step of executing the running files, specifically including the following: adding the path information corresponding to each running file to the configuration file corresponding to the task to be processed according to the execution order; in response to the execution instruction for the task to be processed, executing the running files corresponding to each path information in the configuration file in sequence to obtain the execution result of the task to be processed.

[0092] In this embodiment, the path information can be the location of each running file on the terminal (such as a storage address); the configuration file can be used to record the execution order of multiple running files; the execution instruction can be a running instruction; and the execution result can be the execution result obtained by executing the task to be processed or executing the configuration file.

[0093] Specifically, the terminal adds the path information corresponding to each running file to the configuration file corresponding to the task to be processed in sequence according to the execution order; when it receives the execution instruction for the task to be processed, it runs the configuration file in response to the execution instruction for the task to be processed, so that the running files corresponding to each path information in the configuration file are executed in sequence, that is, the task to be processed is executed, and the execution result of the task to be processed is obtained, that is, the task to be processed is completed.

[0094] The technical solution of this embodiment improves the accuracy of completing the task by accurately obtaining the execution order, adding the path information of each running file to the configuration file according to the execution order, and executing the running files in the configuration file in sequence.

[0095] The following example illustrates the execution order determination method provided in this application. This example demonstrates the application of this method to a terminal, and the main steps include:

[0096] The first step is for the terminal to identify the operation information in multiple running files of the task to be processed.

[0097] The second step is for the terminal to identify the operation information belonging to the data resource operation type from the operation information in multiple running files, and use it as the data resource operation information in the multiple running files.

[0098] The third step is for the terminal to determine the target data operation type involved in each running file and the target data resource corresponding to the target data operation type based on the operation information of the target data operation type in each running file.

[0099] The fourth step is for the terminal to determine the priority of the target data operation types involved in each running file based on their position in the preset data operation type sequence table.

[0100] Fifth, the terminal determines the first execution priority of each running file based on the priority of the target data operation types involved in each running file.

[0101] The sixth step involves the terminal parsing the data resource operation information in each running file to obtain the dependencies between the data resources involved in each running file.

[0102] The seventh step is for the terminal to combine the dependencies between the data resources involved in each running file to obtain a dependency table.

[0103] Step 8: The terminal determines the priority of the target data resources involved in each running file according to their arrangement in the preset dependency table.

[0104] The ninth step is for the terminal to determine the second execution priority of each executable file based on the priority of the target data resources involved in each executable file.

[0105] Step 10: The terminal sorts the running files according to their first execution priority to obtain the initial execution order of each running file.

[0106] In the eleventh step, the terminal updates the initial execution order based on the second execution priority of each running file to obtain the execution order of each running file.

[0107] Step 12: The terminal adds the path information of each running file to the configuration file corresponding to the task to be processed, according to the execution order.

[0108] In the thirteenth step, the terminal responds to the execution instructions for the task to be processed by sequentially executing the running files corresponding to each path information in the configuration file, and obtaining the execution results of the task to be processed.

[0109] Among them, data resource operation information is used to represent operation information on data resources in the database. The data resource operation information includes operation information of the target data operation type; the task to be processed is a business task in the financial system; the first execution priority has a higher priority than the second execution priority.

[0110] The technical solution of this embodiment accurately determines the dependency table between data resources based on the operation information of data resources in multiple running files; it determines the target data operation type and corresponding target data resource involved in each running file based on the operation information of the target data operation type in each running file, and determines the first execution priority and second execution priority of each running file by combining the preset data operation type sequence table and dependency table, thereby quickly and accurately determining the basis for the execution order of each running file; based on the first execution priority and second execution priority, the execution order of each running file can be quickly and accurately determined, thereby improving the efficiency and accuracy of the execution order determination.

[0111] The following application example illustrates the execution order determination method provided in this application. This application example demonstrates the application of this method to a terminal. Figure 5 As shown, the main steps include:

[0112] The first step is for the terminal to read all script code (running files): read all files (running files), and traverse each file one by one starting from the main entry point of the program; when traversing to a method that is called, record the current position of the file and temporarily store it in a stack. After iterating through the method, pop the previously recorded file position from the stack and continue iterating from the original temporary position; when encountering a conditional branch, enter all branches to ensure that all possible methods called in the code file are traversed.

[0113] The second step involves the terminal reading the script line by line and analyzing the data lineage. When parsing the script, the terminal ignores comments (including ① multi-line comments ` / **** / `, ② single-line comments starting with ` / / `). Two lists are used to record the analysis results. One list, `roots`, stores the starting position of the tree structure, i.e., the root node. The other list, `out`, stores the nodes of `executeUpdate`. During parsing, when encountering the following three types of statements: ① assignment statements, ② SQL statements calling `executeQuery`, and ③ SQL statements calling `executeUpdate`, they are structured into three types of nodes for recording. When an assignment statement is encountered, such as `int a = b`, if attribute `b` already exists in the tree's nodes, a node for attribute `a` is generated and added to the `childrenNodes` list of `b`. At this point, in the tree, `b` points to `a` as dependent on `b`. Simultaneously, record the node type of attribute 'a'; when encountering an SQL statement calling `executeQuery`, parse the SQL statement, extract the tables and operations involved in the database. When the operation is `select`, generate a table node, record the operation, set the priority level to 2 - `select`, and record the node type as `in` (input / entry point); also, treat this node as a new root node and record it in the root node list `roots` of the Java code file; when encountering an SQL statement calling `executeUpdate`, parse the SQL statement, extract the tables and operations involved in the database. When the operation is ① `insert`, record the priority level as 1 - `insert`; ② `update`, set the priority level to 2 - `update`; and ② `delete`, set the priority level to 4 - `delete`. Record the node type as `out` (output / exit point) and record it in the `out` list. After storing the node whose node type equals the output node, temporarily store the position for the next traversal on the stack. Simultaneously, backtrack the entire link, tracing back all parent nodes. When a parent node contains a node of type "in", the relationship between the two data sources can be determined, i.e., from the "in" node to the "out" node. Record the file path and filename in both the "in" and "out" nodes, and simultaneously record this relationship "in->out" in the directed data lineage graph structure. When recording relationships, for duplicate "in" and "out" nodes (as shown in the diagram, the relationship between Table 1 and Table 2 has already been recorded, and further analysis of the relationship between Table 1 and Table 2 reveals it), only one relationship record is retained. The filenames recorded in the nodes are integrated, retaining only one filename with the highest priority. Starting from retrieving a single script, the analysis of the data lineage is completed until the last script ends.

[0114] The third step involves the terminal sorting all scripts based on data lineage: following the above process, all Java code files under the specified path are parsed one by one. After parsing, the lineage of data resources involved in all the Java code files is obtained. Based on the lineage, the execution order of the files is sorted and stored in a filesSorted list (which can be represented as a List). <file>In `filesSorted` (i.e., a sorted list of files), the process is as follows: 1. Traverse the graph structure to find the entry point, i.e., all Nodes that do not depend on other data resources, and store them in the entry point node list; 2. Based on four priorities (1-insert, 2-update, 3-select),... The process involves three iterations of the entry node list. First, the highest priority 1-insert is selected. Then, starting from each entry node, a breadth-first traversal is performed to read the file information recorded in the Node. If the priority matches, the file is added to the sorted file list filesSorted. If multiple Nodes contain the same file, it is not added repeatedly. When adding files to the entry node for sorting, since it does not depend on the sorted nodes, the files contained in the entry node are inserted into the filesSorted list in the order of leftmost (highest priority for execution). Finally, all files are traversed, and the files that have been read but not sorted are added to the end of the filesSorted list queue. Unsorted files include two types: those containing only the lowest priority 4-delete and those that may not involve data resources. The execution order of these files does not affect each other, and they can be added to the sorted file list filesSorted in the order of all file lists.

[0115] For example, the data resources involved in the executable file are as follows:

[0116] File1: table1-insert

[0117] File2: table2-select, table4-insert, table3-insert

[0118] File3: table2-select, table6-select, table5-update

[0119] File4: table4-insert, table3-update, table2-select

[0120] File5: table1-select, table3-select, table5-select

[0121] File6: table1-select, table3-delete

[0122] File7: table6-insert

[0123] File8: table2-insert

[0124] File9: table1-delete

[0125] Where File represents the running file, and table represents the table. The graph structure after lineage analysis is as follows: Figure 4 As shown.

[0126] The first traversal yields a list of entry nodes, identifying table1, table2, and table6 as entry nodes. The priority is set to 1 - insert.

[0127] A. Starting from the entry node table1, the file sorting results are as follows:

[0128] table1->List <file>filesSorted={File1}

[0129] table3->List <file>filesSorted={File1、File2}

[0130] table4->List <file>filesSorted={File1、File2、File4}

[0131] table5->List <file>filesSorted={File1, File2, File4}

[0132] B. Starting from the entry node table2, the file sorting results are as follows:

[0133] table2->List <file>filesSorted={File8, File1, File2, File4}

[0134] Starting from table3, all subsequent nodes have been traversed without repeating any nodes.

[0135] C. Starting from the entry node table6, the file sorting results are as follows:

[0136] table6->List <file>filesSorted={File7, File8, File1, File2, File4}

[0137] 2. Priority is set to 2-update:

[0138] A. Starting from the entry node table1, the file sorting results are as follows:

[0139] table1->List <file>filesSorted={File7、File8、File1、File2、File4}

[0140] table3->List <file>filesSorted={File7、File8、File1、File2、File4}

[0141] table4->List <file>filesSorted={File7、File8、File1、File2、File4}

[0142] table5->List <file>filesSorted={File7, File8, File1, File2, File4, File3}

[0143] B. Starting from the entry node table2, the file sorting results are as follows:

[0144] table2->List <file>filesSorted={File7, File8, File1, File2, File4, File3}

[0145] C. Starting from the entry node table6, the file sorting results are as follows:

[0146] table2->List <file>filesSorted={File7, File8, File1, File2, File4, File3}

[0147] 3. Priority is set to 3-select:

[0148] A. Starting from the entry node table1, the file sorting results are as follows:

[0149] table1->List <file>filesSorted={File7、File8、File1、File2、File4、File3、File5、File6}

[0150] table3->List <file>filesSorted={File7、File8、File1、File2、File4、File3、File5、File6}

[0151] table4->List <file>filesSorted={File7、File8、File1、File2、File4、File3、File5、File6}

[0152] table5->List <file>filesSorted={File7, File8, File1, File2, File4, File3, File5, File6}

[0153] B. Starting from the entry node table2, the file sorting results are as follows:

[0154] table2->List <file>filesSorted={File7, File8, File1, File2, File4, File3, File5, File6}

[0155] C. Starting from the entry node table6, the file sorting results are as follows:

[0156] table6->List <file>filesSorted={File7, File8, File1, File2, File4, File3, File5, File6}

[0157] 4. Iterate through all files in the List <file>(Represents a list of files), add the unsorted files to the sort list to obtain the final sorted result:

[0158] List <file>filesSorted={File7, File8, File1, File2, File4, File3, File5, File6, File9}

[0159] That is, we get the final List. <file>filesSorted indicates the execution order of the various running files.

[0160] The fourth step involves the terminal generating a configuration file based on the script's sorting: obtaining an ordered list of all Java code files, the filesSorted list (i.e., a List). <file>The `filesSorted` function creates a new configuration file and iterates through the `filesSorted` list, generating a configuration line (such as the path) for each file and writing it into the configuration file, ultimately generating a complete configuration file.

[0161] Data lineage analysis is a means to ensure data fusion (aggregation). It enables the traceability of data fusion processing, allowing for comprehensive tracking of the data processing process. This helps identify all relevant metadata objects starting from a specific data object and the relationships between these metadata objects. Through data lineage analysis, data can be traced back to its source, the relationships between data can be analyzed, and the sequential relationships between data can be established. This helps determine the dependencies between scripts, i.e., the order in which scripts are executed. When reading Java code files, the called methods are analyzed iteratively. The called methods may originate from Java code files or from class files within JAR (Java File System) packages. During iteration, the file of the called method is determined; if it's a class file, it's first decompiled into a Java file before further iterative analysis. The Java code file must have a main entry point (main method) and conform to coding standards, with no end-of-line comments. The methods use the built-in `java.sql` package (Java's database library) to connect to and access database data. The `java.sql` statement file provides the `executeUpdate` and `executeQuery` methods. The `executeUpdate` method executes statements including `insert`, `update`, and `delete`, while the `executeQuery` method executes `select` statements that produce a single result set. Both methods have a single input parameter, which is the complete SQL statement. The Java code file only calls the `executeUpdate` and `executeQuery` methods to query and maintain data in the database tables.

[0162] The technical solution in this application example enables efficient management of batch-executed scripts, improves the efficiency and accuracy of script scheduling (determining the execution order), and can achieve automatic script scheduling, which can greatly save the manual maintenance cost of scripts.

[0163] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0164] Based on the same inventive concept, this application also provides an execution order determination apparatus for implementing the execution order determination method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more execution order determination apparatus embodiments provided below can be found in the limitations of the execution order determination method described above, and will not be repeated here.

[0165] In one embodiment, such as Figure 6 As shown, an execution order determination apparatus is provided, the apparatus 600 may include:

[0166] The information recognition module 601 is used to identify data resource operation information in multiple running files of the task to be processed; the data resource operation information is used to represent the operation information on data resources in the database, and the data resource operation information includes the operation information of the target data operation type; the task to be processed is a business task in the financial system.

[0167] The information determination module 602 is used to determine the target data operation type involved in each running file and the target data resource corresponding to the target data operation type based on the operation information of the target data operation type in each running file.

[0168] The first query module 603 is used to query a preset data operation type sequence table based on the target data operation types involved in each running file, and obtain the first execution priority of each running file.

[0169] The second query module 604 is used to query a preset dependency table based on the target data resources involved in each running file to obtain the second execution priority of each running file; the dependency table is determined based on the data resource operation information of multiple running files.

[0170] The sequence determination module 605 is used to determine the execution order of each running file according to the first execution priority and the second execution priority; each running file is used to process the tasks to be processed in the order of execution.

[0171] In one embodiment, the priority of the first execution priority is greater than the priority of the second execution priority; the sequence determination module 605 is further configured to sort the running files according to the first execution priority of each running file to obtain the initial execution order of each running file; and update the initial execution order according to the second execution priority of each running file to obtain the execution order of each running file.

[0172] In one embodiment, the device 600 further includes: an information parsing module, configured to parse the data resource operation information in each running file to obtain the dependency relationships between the data resources involved in each running file; and to combine the dependency relationships between the data resources involved in each running file to obtain a dependency relationship table.

[0173] In one embodiment, the first query module 603 is further configured to determine the priority of the target data operation type involved in each running file according to the arrangement position of the target data operation type involved in each running file in a preset data operation type sequence table; and determine the first execution priority of each running file according to the priority of the target data operation type involved in each running file.

[0174] In one embodiment, the second query module 604 is further configured to determine the priority of the target data resources involved in each running file according to their arrangement position in a preset dependency table; and to determine the second execution priority of each running file according to the priority of the target data resources involved in each running file.

[0175] In one embodiment, the information identification module 601 is further configured to identify operation information in multiple running files of the task to be processed; and to identify operation information belonging to the data resource operation type from the operation information in the multiple running files, and to use it as the data resource operation information in the multiple running files.

[0176] In one embodiment, the device 600 further includes: a file execution module, configured to add the path information corresponding to each running file to the configuration file corresponding to the task to be processed in the order of execution; and in response to the execution instruction for the task to be processed, execute the running files corresponding to each path information in the configuration file in sequence to obtain the execution result of the task to be processed.

[0177] The modules in the aforementioned execution sequence determination device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0178] It should be noted that the method and apparatus for determining the execution order provided in this application can be used in the financial field where the execution order is determined, or in any field other than the financial field where the execution order is determined. The application field of the method and apparatus for determining the execution order provided in this application is not limited.

[0179] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements an execution order determination method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0180] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0181] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0182] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0183] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0184] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0185] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0186] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0187] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.< / file> < / file> < / file> < / file> < / file> < / file> < / file> < / file> < / file> < / file> < / file> < / file> < / file> < / file> < / file> < / file> < / file> < / file> < / file> < / file> < / file> < / file> < / file>

Claims

1. A method for determining execution order, characterized in that, The method includes: The system identifies data resource operation information in multiple running files of the task to be processed; the data resource operation information represents operation information on data resources in the database, and includes operation information on the target data operation type; the task to be processed is a business task in a financial system. Based on the operation information of the target data operation type in each running file, determine the target data operation type involved in each running file, and the target data resource corresponding to the target data operation type; Based on the target data operation type involved in each running file, a preset data operation type order table is queried to obtain the first execution priority of each running file; Based on the target data resources involved in each of the running files, a preset dependency table is queried to obtain the second execution priority of each running file; the dependency table is determined based on the data resource operation information of the multiple running files. The execution order of each running file is determined based on the first execution priority and the second execution priority; each running file is used to process the task to be processed in the order of execution.

2. The method according to claim 1, characterized in that, The first execution priority has a higher priority than the second execution priority. Determining the execution order of each running file based on the first execution priority and the second execution priority includes: Based on the first execution priority of each running file, the running files are sorted to obtain the initial execution order of the running files; The initial execution order is updated according to the second execution priority of each running file to obtain the execution order of each running file.

3. The method according to claim 1, characterized in that, Before querying a preset dependency table based on the target data resources involved in each executable file to obtain the second execution priority of each executable file, the process further includes: The data resource operation information in each of the running files is parsed to obtain the dependency relationships between the data resources involved in each running file. The dependencies between the data resources involved in each of the running files are combined to obtain the dependency table.

4. The method according to claim 1, characterized in that, The step of querying a preset data operation type order table based on the target data operation types involved in each running file to obtain the first execution priority of each running file includes: The priority of the target data operation type involved in each running file is determined according to its position in the preset data operation type sequence table. The first execution priority of each running file is determined based on the priority of the target data operation types involved in each running file.

5. The method according to claim 1, characterized in that, The step of querying a preset dependency table based on the target data resources involved in each executable file to obtain the second execution priority of each executable file includes: The priority of the target data resources involved in each running file is determined according to their arrangement position in a preset dependency table. The second execution priority of each running file is determined based on the priority of the target data resources involved in each running file.

6. The method according to any one of claims 1 to 5, characterized in that, The identified data resource operation information in multiple running files of the task to be processed includes: Identify operation information in multiple running files of the task to be processed; Operation information belonging to the data resource operation type is identified from the operation information in the multiple running files and used as the data resource operation information in the multiple running files.

7. The method according to claim 6, characterized in that, After determining the execution order of the various running files based on the first execution priority and the second execution priority, the method further includes: According to the execution order, the path information corresponding to each running file is added to the configuration file corresponding to the task to be processed; In response to the execution instruction for the task to be processed, the running files corresponding to each path information in the configuration file are executed sequentially to obtain the execution result of the task to be processed.

8. An execution order determination device, characterized in that, The device includes: The information recognition module is used to identify data resource operation information in multiple running files of the task to be processed; the data resource operation information is used to represent operation information on data resources in the database, and the data resource operation information includes operation information of the target data operation type; the task to be processed is a business task in the financial system. The information determination module is used to determine the target data operation type involved in each running file and the target data resource corresponding to the target data operation type based on the operation information of the target data operation type in each running file. The first query module is used to query a preset data operation type order table based on the target data operation types involved in each running file, and obtain the first execution priority of each running file. The second query module is used to query a preset dependency table based on the target data resources involved in each of the running files to obtain the second execution priority of each running file; the dependency table is determined based on the data resource operation information of the multiple running files. The sequence determination module is used to determine the execution order of each running file according to the first execution priority and the second execution priority; the running files are used to process the task to be processed according to the execution order.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data stream processing method and related equipment

    CN111090464A

  • Data processing method and device, electronic equipment and computer storage medium

    CN113448989A