Method and device for determining batch operation dependency relationship

By establishing communication connections with multiple scheduling platforms, analyzing job information and target characteristics, and using predictive models to determine batch job dependencies, we solve the problem of sorting out dependencies in cross-scheduling platforms and achieve accurate tracing and scheduling of the impact of batch jobs. accuracy.

CN118760503APending Publication Date: 2024-10-11CHINA GUANGFA BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410880777.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

Existing technology makes it difficult to accurately sort out the dependencies of batch jobs across cross-scheduling platforms, resulting in the inability to effectively trace upstream or downstream impacts when problems occur in batch jobs.

Method used

By establishing communication connections with multiple scheduling platforms, determine whether to record target data files according to preset specifications, obtain and analyze job information for each platform, build a candidate set of dependencies, and use pre-trained prediction models to analyze target characteristics to determine batches Dependencies between jobs.

Benefits of technology

Accurately discover the dependencies between batch jobs across scheduling platforms under different conditions, solving the problem of difficulty in sorting out dependencies in cross-scheduling platform scheduling, and improving the accuracy of problem tracing and scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118760503A_ABST
    Figure CN118760503A_ABST
Patent Text Reader

Abstract

The invention discloses a batch operation dependency relationship determination method and device. The method comprises the following steps: establishing communication connection with a plurality of scheduling platforms, and determining whether each scheduling platform records a target data file transmitted between batch jobs according to a preset specification or not; if the target data file is recorded according to a preset specification, obtaining first file information recorded by each scheduling platform, and determining a dependency relationship among the batch jobs under each scheduling platform according to the information; if the target data file is not recorded according to the preset specification, obtaining job information of each batch job under each scheduling platform, and constructing a dependency relationship candidate set according to the job information; and analyzing the target characteristics related to the dependency relationship of the two batch jobs in each batch job combination by using the prediction model, and determining whether the dependency relationship exists between the two batch jobs. According to the method and the device, the technical problem that the dependency relationship among the batch jobs is difficult to sort accurately in the batch job scheduling of the cross-scheduling platform is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and device for determining batch job dependencies. Background Art

[0002] Batch jobs are tasks that are processed according to a set plan. Usually, there are multiple tasks that need to be executed in sequence, that is, there are dependencies between batch jobs. In this case, a scheduling platform is generally used to record the dependencies of batch jobs and call up the corresponding batch jobs on time.

[0003] As the business develops, more and more application systems are generated within the company. The final completion of a task may involve multiple application systems, and the operations between different application systems form complex dependencies. At the same time, there are large differences in the technical architectures adopted by different application systems, which put forward different scheduling requirements. Therefore, there may be multiple scheduling platforms within the company, and the data within different scheduling platforms cannot be connected, which leads to the lack of dependencies across scheduling platforms. In daily operation and maintenance work, it is impossible to obtain the dependencies of the complete link. When a problem occurs in a batch job, it is impossible to determine which batch jobs downstream will be affected, and it is also difficult to trace whether it is caused by errors in certain batch jobs upstream.

[0004] Most of the existing technical solutions are based on the same scheduling platform to discover the dependencies of batch jobs, or to process the dependencies of intermediate temporary tables and fields, or to the extraction, conversion, and loading process of data warehouses, or to the parsing and visualization of dependencies. However, for batch job scheduling across scheduling platforms, the focus of the existing technical solutions is to achieve cross-platform scheduling rather than to sort out and discover the dependencies of cross-platform batch jobs.

[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0006] The embodiments of the present application provide a method and device for determining dependencies between batch jobs, so as to at least solve the technical problem that it is difficult to accurately sort out the dependencies between batch jobs in batch job scheduling across scheduling platforms.

[0007] According to one aspect of an embodiment of the present application, a method for determining batch job dependencies is provided, including: establishing a communication connection with multiple scheduling platforms, and determining whether each scheduling platform records a target data file transmitted between batch jobs according to a preset specification, wherein a downstream batch job starts the job in response to a target data file issued by an upstream batch job; if each scheduling platform records the target data file according to the preset specification, obtaining first file information of the target data file recorded by each scheduling platform, and determining the dependency between each batch job under each scheduling platform based on the first file information; if each scheduling platform does not record the target data file according to the preset specification, obtaining job information of each batch job under each scheduling platform, and constructing a dependency candidate set based on the job information, wherein the dependency candidate set includes all batch job combinations that may have dependencies; for each batch job combination, respectively determining the dependency-related target features of two batch jobs in the batch job combination, and using a pre-trained prediction model to analyze the target features of the two batch jobs to determine whether there is a dependency between the two batch jobs.

[0008] Optionally, the first file information includes first sub-file information and second sub-file information, and obtaining the first file information of the target data file recorded by each scheduling platform includes: obtaining the first sub-file information of the target data file received by each batch job recorded by each scheduling platform to form a first sub-file information set; obtaining the second sub-file information of the target data file issued by each batch job recorded by each scheduling platform to form a second sub-file information set; wherein the first sub-file information and the second sub-file information are of the same type, and both include at least one of the following: the file name and file path of the target data file.

[0009] Optionally, determining the dependency relationship between each batch job under each scheduling platform based on the first file information includes: preprocessing the first sub-file information set and the second sub-file information set, wherein the preprocessing includes: unifying the time format in the file information; comparing the first sub-file information in the preprocessed first sub-file information set with the second sub-file information in the preprocessed second sub-file information set in pairs; for each pair of the first sub-file information and the second sub-file information, if the first sub-file information is the same as the second sub-file information, determining that the first batch of jobs corresponding to the first sub-file information and the second batch of jobs corresponding to the second sub-file information have a dependency relationship.

[0010] Optionally, before determining that the first batch of jobs corresponding to the first sub-file information and the second batch of jobs corresponding to the second sub-file information have a dependency relationship, the method also includes: verifying the dependency relationship between the first batch of jobs and the second batch of jobs based on the data lineage relationship between the applications recorded on the data asset management platform; if it is detected that there is a data lineage relationship between the first application to which the first batch of jobs belongs and the second application to which the second batch of jobs belongs, determining that there is a dependency relationship between the first batch of jobs and the second batch of jobs; if no data lineage relationship is detected between the first application and the second application, determining that there is no dependency relationship between the first batch of jobs and the second batch of jobs.

[0011] Optionally, job information of each batch job under each scheduling platform is obtained, and a dependency candidate set is constructed based on the job information, including: obtaining job information of each batch job under each scheduling platform, wherein the type of job information includes at least one of the following: basic job information, program script information, historical operation record information, and historical alarm information, and the basic job information includes at least: batch job name; pairing all batch jobs under each scheduling platform in pairs to obtain multiple batch job combinations; eliminating batch job combinations that are unlikely to have dependencies from the multiple batch job combinations based on the job information of each batch job, and forming the remaining batch job combinations into a dependency candidate set, wherein the condition that there is no dependency includes: the running end time of the upstream batch job is later than the running end time of the downstream batch job.

[0012] Optionally, target features related to the dependency relationship of two batch jobs in the batch job combination are determined separately, including: for each batch job in the batch job combination, determining a first target feature and a second target feature of the batch job by keyword matching, wherein the first target feature is used to reflect whether the batch job is a batch job that receives a target data file, and the second target feature is used to reflect whether the batch job is a batch job that sends a target data file; identifying a third target feature of the batch job by the name of the batch job, or a program script corresponding to the batch job, or a program script path corresponding to the batch job, wherein the third target feature is used to reflect a keyword of an application program corresponding to the batch job and / or a keyword of a corresponding target data file; determining a fourth target feature of the batch job by historical operation record information, wherein the fourth target feature is used to reflect whether a delay occurs in the same time period between the batch job and another batch job in the same combination; determining a fifth target feature of the batch job by historical alarm information, wherein the fifth target feature is used to reflect whether an alarm is generated in the same time period between the batch job and another batch job in the same combination.

[0013] Optionally, the training process of the prediction model includes: constructing an initial model based on a supervised learning algorithm; obtaining target features of multiple groups of batch jobs that have been determined to have dependencies as a positive sample set; obtaining target features of multiple groups of batch jobs that have been determined not to have dependencies as a negative sample set; and iteratively training the initial model using the positive sample set and the negative sample set until a prediction model is obtained in which multiple evaluation indicators meet preset requirements, wherein the evaluation indicators include at least one of the following: accuracy, precision, and recall.

[0014] According to another aspect of an embodiment of the present application, a device for determining a dependency relationship of batch jobs is also provided, including: a judgment module, used to establish a communication connection with multiple scheduling platforms, and determine whether each scheduling platform records the target data file transmitted between batch jobs according to a preset specification, wherein the downstream batch job starts the job in response to the target data file issued by the upstream batch job; a first determination module, used to obtain the first file information of the target data file recorded by each scheduling platform if each scheduling platform records the target data file according to the preset specification, and determine the dependency relationship between each batch job under each scheduling platform based on the first file information; a construction module, used to obtain the job information of each batch job under each scheduling platform if each scheduling platform does not record the target data file according to the preset specification, and construct a dependency candidate set based on the job information, wherein the dependency candidate set includes all batch job combinations that may have dependencies; a second determination module, used to determine, for each batch job combination, the target features related to the dependency relationship of two batch jobs in the batch job combination, respectively, and analyze the target features of the two batch jobs using a pre-trained prediction model to determine whether there is a dependency relationship between the two batch jobs.

[0015] According to another aspect of an embodiment of the present application, a computer program product is further provided, the computer program product comprising: a computer program, wherein when the computer program is executed by a processor, the above-mentioned method for determining the dependency of batch jobs is implemented.

[0016] According to another aspect of an embodiment of the present application, an electronic device is further provided, comprising: a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the above-mentioned method for determining batch job dependencies through the computer program.

[0017] In an embodiment of the present application, a communication connection is established with multiple scheduling platforms, and it is determined whether each scheduling platform records the target data file transmitted between batch jobs according to preset specifications, wherein the downstream batch job starts the job in response to the target data file issued by the upstream batch job; if each scheduling platform records the target data file according to the preset specifications, the first file information of the target data file recorded by each scheduling platform is obtained, and the dependency relationship between each batch job under each scheduling platform is determined based on the first file information; if each scheduling platform does not record the target data file according to the preset specifications, the job information of each batch job under each scheduling platform is obtained, and a dependency candidate set is constructed based on the job information, wherein the dependency candidate set includes all batch job combinations that may have dependencies; for each batch job combination, the target features related to the dependency of the two batch jobs in the batch job combination are determined respectively, and the target features of the two batch jobs are analyzed using a pre-trained prediction model to determine whether there is a dependency relationship between the two batch jobs. Among them, when the input and output information of the target data file called by the scheduling platform meets the preset specifications, the preset rules can be used directly to discover the dependency relationship; when the input and output information of the target data file called by the scheduling platform does not meet the preset specifications, the prediction model is used to analyze and judge the dependency relationship, and the dependency relationship between batch jobs across scheduling platforms can be accurately discovered under different conditions, which effectively solves the technical problem that it is difficult to accurately sort out the dependency relationships between batch jobs in batch job scheduling across scheduling platforms. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0019] Figure 1 is a schematic diagram of the structure of an optional computer terminal according to an embodiment of the present application;

[0020] Figure 2 is a flowchart of an optional method for determining batch job dependencies according to an embodiment of the present application;

[0021] Figure 3 is a schematic diagram of an optional dependency candidate set according to an embodiment of the present application;

[0022] Figure 4 It is a structural diagram of an optional device for determining batch job dependencies according to an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0024] It should be noted that the terms "first", "second", etc. in the specification, claims and drawings of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] Example 1

[0026] The role of the scheduling platform is to record the dependencies of batch jobs within the scheduling platform, and to call up the corresponding batch jobs on time according to the set start time and the dependencies of batch jobs, so as to ensure that the batch jobs are executed in sequence. For batch jobs across scheduling platforms, since the downstream scheduling platform cannot obtain the job dependencies and running status of the upstream scheduling platform, the dependencies of the batch jobs will be missing.

[0027] In general, the dependency of batch jobs across scheduling platforms is that after the job on the upstream scheduling platform is completed, a data file is generated and sent to the downstream application system. After the batch job on the downstream scheduling platform is started on time, it will continue to poll, and after the data file required for polling is ready, the subsequent processing job will be started. For example, after the batch job 1 on the scheduling platform A is completed, a data file will be generated and sent to the downstream application system. After the batch job 2 on the downstream scheduling platform B detects the generation of the data file, it will start the subsequent processing work.

[0028] In this case, if the data files sent by the upstream job and the data files that the downstream job depends on can be obtained, the dependency relationship between the upstream and downstream batch jobs across the scheduling platform can be established.

[0029] According to an embodiment of the present application, a method for determining batch job dependencies is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0030] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 The hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for determining a batch job dependency is shown. Figure 1 As shown, the computer terminal 10 (or mobile device 10) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0031] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As involved in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0032] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method for determining the dependency relationship of batch jobs in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, to implement the vulnerability detection method of the above-mentioned application program. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0033] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0034] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0035] In the above operating environment, the present application embodiment provides a method for determining batch job dependencies, such as Figure 2 As shown, the method comprises the following steps:

[0036] Step S202, establishing communication connections with multiple scheduling platforms, and determining whether each scheduling platform records the target data files transmitted between batch jobs according to a preset specification, wherein the downstream batch job starts the job in response to the target data files issued by the upstream batch job;

[0037] Step S204, if each scheduling platform records the target data file according to the preset specification, obtain the first file information of the target data file recorded by each scheduling platform, and determine the dependency relationship between each batch job under each scheduling platform according to the first file information;

[0038] Step S206: if each scheduling platform does not record the target data file according to the preset specification, obtain the job information of each batch job under each scheduling platform, and construct a dependency candidate set based on the job information, wherein the dependency candidate set includes all batch job combinations that may have dependencies;

[0039] Step S208, for each batch job combination, respectively determine the target features related to the dependency relationship of the two batch jobs in the batch job combination, and use the pre-trained prediction model to analyze the target features of the two batch jobs to determine whether there is a dependency relationship between the two batch jobs.

[0040] The following describes the steps of the method for determining batch job dependencies in conjunction with a specific implementation process.

[0041] Optionally, the first file information includes first sub-file information and second sub-file information.

[0042] When each scheduling platform records the target data file according to a preset specification, the first file information of the target data file recorded by each scheduling platform can be obtained in the following manner: obtain the first sub-file information of the target data file received by each batch job recorded by each scheduling platform to form a first sub-file information set; obtain the second sub-file information of the target data file issued by each batch job recorded by each scheduling platform to form a second sub-file information set; wherein the first sub-file information and the second sub-file information are of the same type, and both include at least one of the following: the file name and file path of the target data file.

[0043] The above process can be understood as: obtaining the file name and file path of the target data file received by all batch jobs recorded by each scheduling platform, but not obtaining the target data file that has not been received; obtaining the file name and file path of the target data file issued by all batch jobs recorded by each scheduling platform, but not obtaining the target data file that has not been issued.

[0044] Afterwards, the dependency relationship between each batch job under each scheduling platform can be determined based on the first file information in the following manner: preprocessing the first sub-file information set and the second sub-file information set, wherein the preprocessing includes: unifying the time format in the file information; comparing the first sub-file information in the preprocessed first sub-file information set with the second sub-file information in the preprocessed second sub-file information set in pairs; for each pair of the first sub-file information and the second sub-file information, if the first sub-file information is the same as the second sub-file information, determining that the first batch job corresponding to the first sub-file information and the second batch job corresponding to the second sub-file information have a dependency relationship.

[0045] Specifically, when the file name of the target data file contains date-related information, it is uniformly converted into a fixed format due to the different timeliness of the target data file. For example, assuming dates such as 20230606 or 202306, they are uniformly converted into the form of YYYYMMDD or YYYYMM.

[0046] Before determining that the first batch of jobs corresponding to the first sub-file information and the second batch of jobs corresponding to the second sub-file information have a dependency relationship, the dependency relationship between the first batch of jobs and the second batch of jobs can be verified based on the data lineage relationship between the applications recorded on the data asset management platform; if it is detected that there is a data lineage relationship between the first application to which the first batch of jobs belongs and the second application to which the second batch of jobs belongs, it is determined that there is a dependency relationship between the first batch of jobs and the second batch of jobs; if no data lineage relationship is detected between the first application and the second application, it is determined that there is no dependency relationship between the first batch of jobs and the second batch of jobs.

[0047] For example, assuming that the first batch of jobs sent the data file / path / filenameA.data, and the second batch of jobs received the data file / path / filenameA.data, after processing and comparison, the data file sent by the first batch of jobs is the data file received by the second batch of jobs. Therefore, the second batch of jobs depends on the first batch of jobs. At the same time, using the data lineage relationship between applications recorded by the data asset management platform, we know that: there is a transmission of data file / path / filenameA.data between Application A and Application D, the first batch of jobs belongs to Application A, and the second batch of jobs belongs to Application D. Therefore, it is consistent with the job dependency relationship introduced earlier that "the second batch of jobs depends on the first batch of jobs" and the data recorded by the data asset management platform, so it is determined that the above inferred dependency is accurate.

[0048] When each scheduling platform does not have a target data file recorded according to preset specifications, the job information of each batch job under each scheduling platform can be obtained in the following manner, and a dependency candidate set can be constructed based on the job information: obtain the job information of each batch job under each scheduling platform, wherein the type of job information includes at least one of the following: basic job information, program script information, historical operation record information, and historical alarm information, and the basic job information includes at least: batch job name; pair all batch jobs under each scheduling platform in pairs to obtain multiple batch job combinations; eliminate batch job combinations that are unlikely to have dependencies from multiple batch job combinations based on the job information of each batch job, and form the remaining batch job combinations into a dependency candidate set, wherein the conditions for the impossible existence of dependencies include: the running end time of the upstream batch job is later than the running end time of the downstream batch job.

[0049] Figure 3 A schematic diagram of an optional dependency candidate set is shown, such as Figure 3 As shown, when constructing the relationship candidate set, all possible dependency relationships of batch jobs are established to form the relationship candidate set, and the dependency relationships in the relationship candidate set are pruned to remove some dependency relationships that are obviously impossible to exist.

[0050] Afterwards, the target features related to the dependency relationship of the two batch jobs in the batch job combination can be determined separately in the following manner: for each batch job in the batch job combination, the first target feature and the second target feature of the batch job are determined by keyword matching, wherein the first target feature is used to reflect whether the batch job is a batch job that receives a target data file, and the second target feature is used to reflect whether the batch job is a batch job that sends a target data file; the third target feature of the batch job is identified by the name of the batch job, or the program script corresponding to the batch job, or the program script path corresponding to the batch job, wherein the third target feature is used to reflect the keywords of the application program corresponding to the batch job and / or the keywords of the corresponding target data file; the fourth target feature of the batch job is determined by historical operation record information, wherein the fourth target feature is used to reflect whether the batch job and another batch job in the same combination are delayed in the same time period; the fifth target feature of the batch job is determined by historical alarm information, wherein the fifth target feature is used to reflect whether the batch job and another batch job in the same combination generate alarms in the same time period.

[0051] Optionally, the training process of the prediction model is: constructing an initial model based on a supervised learning algorithm; obtaining target features of multiple groups of batch jobs that have been determined to have dependencies as a positive sample set; obtaining target features of multiple groups of batch jobs that have been determined not to have dependencies as a negative sample set; using the positive sample set and the negative sample set to iteratively train the initial model until a prediction model is obtained in which multiple evaluation indicators meet preset requirements, wherein the evaluation indicators include at least one of the following: accuracy, precision, and recall.

[0052] It should be noted that the target features of multiple groups of batch jobs that have been determined to have dependencies can be collected through manual investigation as a positive sample set, and the target features of multiple groups of batch jobs that have been determined not to have dependencies can be collected as a negative sample set. Then, a supervised machine learning algorithm such as logistic regression, random forest, XGBoost (distributed gradient boosting library), LightGBM, SVM (Support Vector Machine) is selected, and the initial model is iteratively trained using the positive sample set and the negative sample set to obtain a prediction model. The prediction model is used to estimate the data that is not in the sample set to determine whether the batch jobs have dependencies, and then the model evaluation results are verified using indicators such as accuracy, recall, and precision until a prediction model is obtained in which multiple evaluation indicators meet the preset requirements. The preset requirements can be set according to actual needs.

[0053] In an embodiment of the present application, a communication connection is established with multiple scheduling platforms, and it is determined whether each scheduling platform records the target data file transmitted between batch jobs according to preset specifications, wherein the downstream batch job starts the job in response to the target data file issued by the upstream batch job; if each scheduling platform records the target data file according to the preset specifications, the first file information of the target data file recorded by each scheduling platform is obtained, and the dependency relationship between each batch job under each scheduling platform is determined based on the first file information; if each scheduling platform does not record the target data file according to the preset specifications, the job information of each batch job under each scheduling platform is obtained, and a dependency candidate set is constructed based on the job information, wherein the dependency candidate set includes all batch job combinations that may have dependencies; for each batch job combination, the target features related to the dependency of the two batch jobs in the batch job combination are determined respectively, and the target features of the two batch jobs are analyzed using a pre-trained prediction model to determine whether there is a dependency relationship between the two batch jobs. Among them, when the input and output information of the target data file called by the scheduling platform meets the preset specifications, the preset rules can be used directly to discover the dependency relationship; when the input and output information of the target data file called by the scheduling platform does not meet the preset specifications, the prediction model is used to analyze and judge the dependency relationship, and the dependency relationship between batch jobs across scheduling platforms can be accurately discovered under different conditions, which effectively solves the technical problem that it is difficult to accurately sort out the dependency relationships between batch jobs in batch job scheduling across scheduling platforms.

[0054] Example 2

[0055] According to an embodiment of the present application, a batch job dependency determination device for implementing the batch job dependency determination method in Embodiment 1 is also provided. Figure 4 As shown, the batch job dependency determination device at least includes: a judgment module 41, a first determination module 42, a construction module 43 and a second determination module 44, wherein:

[0056] The judgment module 41 can establish communication connections with multiple scheduling platforms and determine whether each scheduling platform records the target data files transmitted between batch jobs according to preset specifications, wherein the downstream batch job starts the job in response to the target data files issued by the upstream batch job;

[0057] The first determination module 42 obtains first file information of the target data file recorded by each scheduling platform if each scheduling platform records the target data file according to the preset specification, and determines the dependency relationship between each batch job under each scheduling platform according to the first file information;

[0058] If each scheduling platform fails to record the target data file according to the preset specification, the construction module 43 obtains the job information of each batch job under each scheduling platform, and constructs a dependency candidate set based on the job information, wherein the dependency candidate set includes all batch job combinations that may have dependencies;

[0059] The second determination module 44 can determine, for each batch job combination, target features related to the dependency relationship of two batch jobs in the batch job combination, and analyze the target features of the two batch jobs using a pre-trained prediction model to determine whether there is a dependency relationship between the two batch jobs.

[0060] The functions of each module of the device for determining the dependency of batch operations are described below in conjunction with a specific implementation process.

[0061] Optionally, the first file information includes first sub-file information and second sub-file information.

[0062] When each scheduling platform has target data files recorded according to preset specifications, the first determination module can obtain the first file information of the target data files recorded by each scheduling platform in the following manner: obtain the first sub-file information of the target data files received by each batch job recorded by each scheduling platform to form a first sub-file information set; obtain the second sub-file information of the target data files issued by each batch job recorded by each scheduling platform to form a second sub-file information set; wherein the first sub-file information and the second sub-file information are of the same type, and both include at least one of the following: the file name and file path of the target data file.

[0063] The above process can be understood as: obtaining the file name and file path of the target data file received by all batch jobs recorded by each scheduling platform, but not obtaining the target data file that has not been received; obtaining the file name and file path of the target data file issued by all batch jobs recorded by each scheduling platform, but not obtaining the target data file that has not been issued.

[0064] Afterwards, the first determination module can determine the dependency relationship between each batch job under each scheduling platform based on the first file information in the following manner: preprocess the first sub-file information set and the second sub-file information set, wherein the preprocessing includes: unifying the time format in the file information; comparing the first sub-file information in the preprocessed first sub-file information set with the second sub-file information in the preprocessed second sub-file information set in pairs; for each pair of the first sub-file information and the second sub-file information, if the first sub-file information is the same as the second sub-file information, determining that the first batch of jobs corresponding to the first sub-file information and the second batch of jobs corresponding to the second sub-file information have a dependency relationship.

[0065] Specifically, when the file name of the target data file contains date-related information, it is uniformly converted into a fixed format due to the different timeliness of the target data file. For example, assuming dates such as 20230606 or 202306, they are uniformly converted into the form of YYYYMMDD or YYYYMM.

[0066] Before determining that the first batch of jobs corresponding to the first sub-file information and the second batch of jobs corresponding to the second sub-file information have a dependency relationship, the dependency relationship between the first batch of jobs and the second batch of jobs can be verified based on the data lineage relationship between the applications recorded on the data asset management platform; if it is detected that there is a data lineage relationship between the first application to which the first batch of jobs belongs and the second application to which the second batch of jobs belongs, it is determined that there is a dependency relationship between the first batch of jobs and the second batch of jobs; if no data lineage relationship is detected between the first application and the second application, it is determined that there is no dependency relationship between the first batch of jobs and the second batch of jobs.

[0067] For example, assuming that the first batch of jobs sent the data file / path / filenameA.data, and the second batch of jobs received the data file / path / filenameA.data, after processing and comparison, the data file sent by the first batch of jobs is the data file received by the second batch of jobs. Therefore, the second batch of jobs depends on the first batch of jobs. At the same time, using the data lineage relationship between applications recorded by the data asset management platform, we know that: there is a transmission of data file / path / filenameA.data between Application A and Application D, the first batch of jobs belongs to Application A, and the second batch of jobs belongs to Application D. Therefore, it is consistent with the job dependency relationship introduced earlier that "the second batch of jobs depends on the first batch of jobs" and the data recorded by the data asset management platform, so it is determined that the above inferred dependency is accurate.

[0068] When each scheduling platform does not have a target data file recorded according to preset specifications, the construction module can obtain the job information of each batch job under each scheduling platform in the following manner, and construct a dependency candidate set based on the job information: obtain the job information of each batch job under each scheduling platform, wherein the type of job information includes at least one of the following: basic job information, program script information, historical operation record information, historical alarm information, and the basic job information includes at least: batch job name; pair all batch jobs under each scheduling platform in pairs to obtain multiple batch job combinations; eliminate batch job combinations that are unlikely to have dependencies from multiple batch job combinations based on the job information of each batch job, and form the remaining batch job combinations into a dependency candidate set, wherein the conditions for the impossible existence of dependencies include: the running end time of the upstream batch job is later than the running end time of the downstream batch job.

[0069] Figure 3 A schematic diagram of an optional dependency candidate set is shown, such as Figure 3 As shown, when constructing the relationship candidate set, all possible dependency relationships of batch jobs are established to form the relationship candidate set, and the dependency relationships in the relationship candidate set are pruned to remove some dependency relationships that are obviously impossible to exist.

[0070] Afterwards, the second determination module can respectively determine the target features related to the dependency relationship of the two batch jobs in the batch job combination in the following manner: for each batch job in the batch job combination, determine the first target feature and the second target feature of the batch job by keyword matching, wherein the first target feature is used to reflect whether the batch job is a batch job that receives a target data file, and the second target feature is used to reflect whether the batch job is a batch job that sends a target data file; identify the third target feature of the batch job by the name of the batch job, or the program script corresponding to the batch job, or the program script path corresponding to the batch job, wherein the third target feature is used to reflect the keywords of the application program corresponding to the batch job and / or the keywords of the corresponding target data file; determine the fourth target feature of the batch job by historical operation record information, wherein the fourth target feature is used to reflect whether the batch job and another batch job in the same combination are delayed in the same time period; determine the fifth target feature of the batch job by historical alarm information, wherein the fifth target feature is used to reflect whether the batch job and another batch job in the same combination generate an alarm in the same time period.

[0071] Optionally, the training process of the prediction model is: constructing an initial model based on a supervised learning algorithm; obtaining target features of multiple groups of batch jobs that have been determined to have dependencies as a positive sample set; obtaining target features of multiple groups of batch jobs that have been determined not to have dependencies as a negative sample set; using the positive sample set and the negative sample set to iteratively train the initial model until a prediction model is obtained in which multiple evaluation indicators meet preset requirements, wherein the evaluation indicators include at least one of the following: accuracy, precision, and recall.

[0072] It should be noted that the target features of multiple groups of batch jobs that have been determined to have dependencies can be collected through manual investigation as a positive sample set, and the target features of multiple groups of batch jobs that have been determined not to have dependencies can be collected as a negative sample set. Then, a supervised machine learning algorithm such as logistic regression, random forest, XGBoost, LightGBM, and SVM is selected, and the initial model is iteratively trained using the positive sample set and the negative sample set to obtain a prediction model. The prediction model is used to estimate the data that is not in the sample set to determine whether the batch jobs have dependencies, and then the model evaluation results are verified using indicators such as accuracy, recall, and precision until a prediction model is obtained in which multiple evaluation indicators meet the preset requirements. The preset requirements can be set according to actual needs.

[0073] It should be noted that each module in the device for determining the dependency of batch jobs in the embodiment of the present application corresponds one-to-one to each implementation step of the method for determining the dependency of batch jobs in Example 1. Since a detailed description has been given in Example 1, some details not reflected in this embodiment can be referred to Example 1 and will not be repeated here.

[0074] Example 3

[0075] According to an embodiment of the present application, a computer program product is also provided. The computer program product includes a computer program, wherein when the computer program is executed by a processor, the above-mentioned method for determining the dependency of batch jobs is implemented.

[0076] According to an embodiment of the present application, a non-volatile storage medium is also provided, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the method for determining batch job dependencies in Example 1 by running the computer program.

[0077] According to an embodiment of the present application, a processor is further provided, the processor being used to run a computer program, wherein the method for determining the batch job dependency in Embodiment 1 is executed when the computer program is running.

[0078] According to an embodiment of the present application, an electronic device is also provided, which includes: a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the method for determining the batch job dependency in Example 1 through the computer program.

[0079] Specifically, the computer program executes the following steps when it is running: establishing communication connections with multiple scheduling platforms, and determining whether each scheduling platform records the target data files transmitted between batch jobs according to preset specifications, wherein the downstream batch job starts the job in response to the target data files issued by the upstream batch job; if each scheduling platform records the target data files according to the preset specifications, obtaining the first file information of the target data files recorded by each scheduling platform, and determining the dependency relationship between each batch job under each scheduling platform based on the first file information; if each scheduling platform does not record the target data files according to the preset specifications, obtaining the job information of each batch job under each scheduling platform, and constructing a dependency candidate set based on the job information, wherein the dependency candidate set includes all batch job combinations that may have dependencies; for each batch job combination, respectively determining the target features related to the dependency of the two batch jobs in the batch job combination, and using the pre-trained prediction model to analyze the target features of the two batch jobs to determine whether there is a dependency relationship between the two batch jobs.

[0080] The serial numbers of the above embodiments are only for description and do not represent the advantages or disadvantages of the embodiments.

[0081] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0082] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0083] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0084] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0085] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.

[0086] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for determining batch job dependencies, characterized in that: include: Establishing communication connections with multiple scheduling platforms and determining whether each of the scheduling platforms records target data files transmitted between batch jobs according to preset specifications, wherein the downstream batch job starts the job in response to the target data files issued by the upstream batch job; If each of the scheduling platforms records the target data file according to the preset specification, first file information of the target data file recorded by each of the scheduling platforms is obtained, and the dependency relationship between each batch job under each of the scheduling platforms is determined according to the first file information; If each of the scheduling platforms fails to record the target data file according to the preset specification, the job information of each batch job under each of the scheduling platforms is obtained, and a dependency candidate set is constructed according to the job information, wherein the dependency candidate set includes all possible batch job combinations that may have dependencies; For each batch job combination, target features related to the dependency relationship of two batch jobs in the batch job combination are determined respectively, and the target features of the two batch jobs are analyzed using a pre-trained prediction model to determine whether there is a dependency relationship between the two batch jobs.

2. The method according to claim 1, characterized in that The first file information includes first sub-file information and second sub-file information, and obtaining the first file information of the target data file recorded by each scheduling platform includes: Acquire the first subfile information of the target data file received by each batch job recorded by each scheduling platform to form a first subfile information set; Acquire the second sub-file information of the target data file issued by each batch job recorded by each scheduling platform to form a second sub-file information set; The first sub-file information and the second sub-file information are of the same type, and both include at least one of the following: the file name and the file path of the target data file.

3. The method according to claim 2, characterized in that Determining the dependency relationship between each batch job under each scheduling platform according to the first file information includes: Preprocessing the first sub-file information set and the second sub-file information set, wherein the preprocessing includes: unifying the time format in the file information; Comparing the first subfile information in the preprocessed first subfile information set with the second subfile information in the preprocessed second subfile information set in pairs; For each pair of first subfile information and second subfile information, if the first subfile information is the same as the second subfile information, it is determined that the first batch of jobs corresponding to the first subfile information and the second batch of jobs corresponding to the second subfile information have a dependency relationship.

4. The method according to claim 3, characterized in that Before determining that a first batch of jobs corresponding to the first sub-file information and a second batch of jobs corresponding to the second sub-file information have a dependency relationship, the method further includes: Verifying the dependency relationship between the first batch of jobs and the second batch of jobs based on the data lineage relationship between the application programs recorded on the data asset management platform; If it is detected that there is a data lineage relationship between a first application to which the first batch of jobs belongs and a second application to which the second batch of jobs belongs, it is determined that there is a dependency relationship between the first batch of jobs and the second batch of jobs; If no data lineage relationship is detected between the first application and the second application, it is determined that no dependency relationship exists between the first batch of jobs and the second batch of jobs.

5. The method according to claim 1, characterized in that Obtaining the job information of each batch job under each of the scheduling platforms, and constructing a dependency candidate set based on the job information, including: Obtaining the job information of each batch job under each of the scheduling platforms, wherein the type of the job information includes at least one of the following: basic job information, program script information, historical operation record information, and historical alarm information, and the basic job information includes at least: the batch job name; Pairing all batch jobs under each of the scheduling platforms in pairs to obtain multiple batch job combinations; Batch job combinations that are unlikely to have dependencies are eliminated from the multiple batch job combinations based on the job information of each batch job, and the remaining batch job combinations are combined into the dependency candidate set, wherein the condition that the dependency is unlikely to exist includes: the running end time of the upstream batch job is later than the running end time of the downstream batch job.

6. The method according to claim 5, characterized in that Determining target features related to the dependency relationship of two batch jobs in the batch job combination respectively includes: For each batch job in the batch job combination, determining a first target feature and a second target feature of the batch job by keyword matching, wherein the first target feature is used to reflect whether the batch job is a batch job that receives a target data file, and the second target feature is used to reflect whether the batch job is a batch job that sends a target data file; identifying a third target feature of the batch job by the name of the batch job, or a program script corresponding to the batch job, or a program script path corresponding to the batch job, wherein the third target feature is used to reflect a keyword of an application program corresponding to the batch job and / or a keyword of a corresponding target data file; Determining a fourth target feature of the batch operation through the historical operation record information, wherein the fourth target feature is used to reflect whether the batch operation and another batch operation in the same combination are delayed in the same time period; A fifth target feature of the batch job is determined through the historical alarm information, wherein the fifth target feature is used to reflect whether the batch job and another batch job in the same combination generate an alarm in the same time period.

7. The method according to claim 6, characterized in that The training process of the prediction model includes: Build an initial model based on a supervised learning algorithm; Acquire the target features of multiple groups of batch jobs that have been determined to have dependencies as a positive sample set; Acquire the target features of multiple groups of batch jobs that have been determined to have no dependency as a set of negative samples; The initial model is iteratively trained using the positive sample set and the negative sample set until a prediction model is obtained whose multiple evaluation indicators all meet preset requirements, wherein the evaluation indicators include at least one of the following: accuracy, precision, and recall.

8. A device for determining batch job dependencies, characterized in that: include: A judgment module, used to establish communication connections with multiple scheduling platforms and determine whether each of the scheduling platforms records the target data files transmitted between batch jobs according to preset specifications, wherein the downstream batch job starts the job in response to the target data files issued by the upstream batch job; A first determination module is used to obtain first file information of the target data file recorded by each scheduling platform if each scheduling platform records the target data file according to the preset specification, and determine the dependency relationship between each batch job under each scheduling platform according to the first file information; A construction module, used for obtaining the job information of each batch job under each scheduling platform if each scheduling platform fails to record the target data file according to the preset specification, and constructing a dependency candidate set according to the job information, wherein the dependency candidate set includes all batch job combinations that may have dependencies; The second determination module is used to determine, for each batch job combination, target features related to the dependency relationship of two batch jobs in the batch job combination, and analyze the target features of the two batch jobs using a pre-trained prediction model to determine whether there is a dependency relationship between the two batch jobs.

9. A computer program product, characterized in that include: A computer program, wherein when the computer program is executed by a processor, the method for determining the dependency of batch jobs as claimed in any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the method for determining the dependency of batch jobs according to any one of claims 1 to 7 through the computer program.