Operation test method, device and equipment, storage medium and product

By performing business scenario-based traffic splitting and instantiation processing on the source posting job, combined with dynamic business dates and real-time monitoring, efficient and accurate source posting job testing was achieved, solving the problem of low testing efficiency in existing technologies.

CN121807718APending Publication Date: 2026-04-07CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In existing technologies, the testing efficiency of source patching operations is relatively low, especially when the number of samples increases, the testing efficiency and accuracy are difficult to meet the requirements.

Method used

Synchronous testing of source pasting jobs with the same business scenario is carried out in the form of job flow, and repeated testing is achieved through instantiation. The target business date is dynamically determined in combination with business load, the execution status of job flow is monitored in real time, and test results are generated.

Benefits of technology

It improves the testing efficiency and accuracy of source-attachment jobs, simplifies testing steps, reduces manual intervention, and enhances the accuracy and efficiency of job workflow instantiation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121807718A_ABST
    Figure CN121807718A_ABST
Patent Text Reader

Abstract

The invention discloses a job test method and device, equipment, a storage medium and a product, and is applied to the field of data processing, the method comprises the following steps: obtaining a plurality of to-be-tested job flows and a service load corresponding to a current test period, the to-be-tested job flows comprising source pasting jobs with the same service scene; determining a target service date corresponding to the to-be-tested job flow based on the service load; performing instantiation processing on the service dates corresponding to the plurality of to-be-tested job streams by adopting the target service date to obtain a plurality of instance job streams; for each instance job flow, synchronously executing a source sticking job in each instance job flow under the business date, and obtaining a job execution log corresponding to each instance job flow; and analyzing the job execution log, and determining a test result of the source pasting job. According to the scheme provided by the embodiment of the invention, the test efficiency and precision of the source pasting operation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of data processing, and particularly relates to a job testing method and device, equipment, storage medium and product. BACKGROUND

[0002] Source-adhering job refers to importing original data from a business system to a data warehouse to maintain the original format and structure of the data and reduce the complexity of data preprocessing and conversion.

[0003] In related technologies, the execution efficiency of source-adhering jobs is usually tested in a separate testing manner. When the number of source-adhering jobs increases, the testing efficiency of source-adhering jobs is low in this manner. SUMMARY

[0004] Embodiments of the present application provide a job testing method and device, equipment, storage medium and product, which can improve the testing efficiency and accuracy of source-adhering jobs.

[0005] In a first aspect, the embodiments of the present application provide a job testing method, which comprises: obtaining a plurality of to-be-tested job flows and a business load corresponding to a current testing period, wherein the to-be-tested job flow comprises source-adhering jobs with the same business scenario; determining a target business date corresponding to the to-be-tested job flow based on the business load; performing instantiation processing on the business dates corresponding to the plurality of to-be-tested job flows by using the target business date to obtain a plurality of instance job flows; for each instance job flow, synchronously executing the source-adhering jobs in each instance job flow at the business date, and obtaining a job execution log corresponding to each instance job flow; and analyzing the job execution log to determine a testing result of the source-adhering jobs.

[0006] In some possible implementation manners, obtaining the plurality of to-be-tested job flows comprises: obtaining a plurality of source-adhering jobs and a business scenario corresponding to each source-adhering job; and dividing the source-adhering jobs with the same business scenario in the plurality of source-adhering jobs into one to-be-tested job flow.

[0007] In some possible implementation manners, dividing the source-adhering jobs with the same business scenario in the plurality of source-adhering jobs into one to-be-tested job flow comprises: dividing the plurality of source-adhering jobs into a plurality of initial job flows according to the business scenario corresponding to each source-adhering job; obtaining a first job quantity of the source-adhering jobs in each initial job flow; in a case where the first job quantity is greater than a job quantity threshold, determining a second job quantity of the source-adhering jobs contained in the to-be-tested job flow according to a relative quantity between the first job quantity and the job quantity threshold, wherein the job quantity threshold is a quantity threshold corresponding to the business scenario of the initial job flow; and performing division processing on the initial job flow according to the second job quantity to obtain the plurality of to-be-tested job flows.

[0008] In some possible implementation manners, the target business date corresponding to each to-be-tested job flow is determined based on the business load, including: obtaining historical business loads corresponding to a plurality of historical business dates; determining, from the plurality of historical business dates, a target historical business date with a load similarity between the historical business load and the business load greater than a similarity threshold; and determining the target historical business date as the target business date.

[0009] In some possible implementation manners, the business dates corresponding to the plurality of to-be-tested job flows are instantiated to obtain a plurality of instance job flows, including: updating the business dates corresponding to the plurality of to-be-tested job flows to the target business date to obtain the plurality of instance job flows.

[0010] In some possible implementation manners, the job execution log at least includes: a job start time, a job end time, a job execution state of the instance job flow, and resource usage data corresponding to the source-dependent job. The test result of the source-dependent job is determined by analyzing the job execution log, including: determining a job execution duration corresponding to the first job flow according to the job start time and the job end time, the first job flow being any one of the plurality of to-be-tested job flows; determining a job execution efficiency corresponding to the first job flow according to a ratio between a total number of jobs of the first job flow and the job execution duration; obtaining a third number of jobs of the source-dependent job with an execution success state in the first job flow; determining a job success rate corresponding to the first job flow according to the third number of jobs and the total number of jobs; and generating the test result of the source-dependent job according to the job execution efficiency, the job success rate, and the resource usage data.

[0011] In some possible implementation manners, the job test method further includes: determining, from the first job flow, a failed job with an execution failure state according to the job execution log; obtaining resource usage data corresponding to the failed job and resource allocation data corresponding to the failed job; performing resource expansion processing on the failed job to obtain an expanded failed job in a case where the resource usage data is greater than the resource allocation data; and performing retesting operation on the expanded failed job.

[0012] In some possible implementation manners, the job execution log further includes a job execution duration corresponding to the source-dependent job. After the test result of the source-dependent job is generated according to the job execution efficiency, the job success rate, and the resource usage data, in a case where the source-dependent job is in an execution success state and the job execution duration of the source-dependent job is greater than a duration threshold, the resource usage data corresponding to the source-dependent job is obtained; in a case where the resource usage data is greater than resource allocation data corresponding to the source-dependent job, resource expansion processing is performed on the source-dependent job; and in a case where the resource usage data is less than or equal to the resource allocation data corresponding to the source-dependent job, job processing logic of the source-dependent job is analyzed to generate a logic optimization strategy.

[0013] In a second aspect, an embodiment of the present application provides a job testing device, which comprises: a job obtaining module, configured to obtain a plurality of to-be-tested job flows and a business load corresponding to a current test period, wherein the to-be-tested job flow comprises a source-attached job having a same business scenario; a date determining module, configured to determine a target business date corresponding to the to-be-tested job flow based on the business load; an instantiation module, configured to perform instantiation processing on business dates corresponding to the plurality of to-be-tested job flows by using the target business date, to obtain a plurality of instance job flows; a job executing module, configured to, for each instance job flow, synchronously execute the source-attached jobs in each instance job flow at the business date, and obtain a job execution log corresponding to each instance job flow; and a job testing module, configured to analyze the job execution log, and determine a test result of the source-attached job.

[0014] In a third aspect, an embodiment of the present application provides an electronic device, which comprises a processor and a memory storing computer program instructions; and the processor implements the job testing method of any one of the above aspects when executing the computer program instructions.

[0015] In a fourth aspect, an embodiment of the present application provides a computer storage medium, which stores computer program instructions, and the computer program instructions are executed by a processor to implement the job testing method of any one of the above aspects.

[0016] In a fifth aspect, an embodiment of the present application provides a computer program product, and instructions in the computer program product are executed by a processor of an electronic device to enable the electronic device to perform the job testing method of any one of the above aspects.

[0017] As can be seen from the above, in the embodiment of the present application, the source-attached jobs are processed according to the business scenarios, and the source-attached jobs having the same business scenario are synchronously tested in the form of job flows, which improves the job testing efficiency compared with the separate testing of the source-attached jobs. In addition, in the embodiment of the present application, the job flows are instantiated, so that the repeated testing of the job flows is realized, and it is not necessary to configure the jobs each time, which simplifies the testing steps of the source-attached jobs and improves the testing efficiency. Moreover, in the embodiment of the present application, the business date for instantiating the job flows is dynamically determined according to the business load in the test period, without manual operation of the user, which improves the accuracy and efficiency of the instantiation of the job flows. Furthermore, in the embodiment of the present application, the execution state of the job flows can be monitored in real time, so as to obtain the job execution log, and then the test result of the source-attached job can be generated by automatically analyzing the job execution log, which reduces the participation of the human and improves the testing efficiency and accuracy of the source-attached job. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly introduced. Those drawings can help the ordinary skilled in the art to obtain other drawings without any creative effort.

[0019] Figure 1 is a structural schematic diagram of a job test system provided by an embodiment of the present application; Figure 2 is a flow schematic diagram of a job test method provided by an embodiment of the present application; Figure 3 is a flow schematic diagram of a job test method provided by an embodiment of the present application; Figure 4 is a structural schematic diagram of a job test device provided by another embodiment of the present application; Figure 5 is a structural schematic diagram of an electronic device provided by yet another embodiment of the present application. DETAILED DESCRIPTION

[0020] The features and exemplary embodiments of various aspects of the present application will be described in detail below, in order to make the purposes, technical solutions and advantages of the present application more clear and apparent, the present application will be further described in detail below with reference to the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, but not to limit the present application. The present application can be implemented without some of these specific details by those skilled in the art. The following description of the embodiments is only to provide a better understanding of the present application by showing examples of the present application.

[0021] It should be noted that, in this paper, relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the elements defined by the statement "include" do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0022] It should be noted that the acquisition, storage, use and processing of data in the embodiments of the present application all comply with the relevant provisions of national laws and regulations.

[0023] In addition, it should be noted that in the embodiments of the present application, some industry existing solutions of software, components, models, etc. can be mentioned, which should be considered as exemplary, and the purpose is only to illustrate the feasibility of the implementation of the technical solutions of the present application, but does not mean that the applicant has or will necessarily use the solution.

[0024] The source operation is to execute the batch running action on the data in the supply file according to the supply file provided by the upstream system, so as to realize the task or program of analyzing and processing the upstream data. The source operation usually only loads data, for example, loads data from a source system to a data warehouse, without complex preprocessing or conversion operation on the data, so as to maintain the originality and traceability of the data.

[0025] In order to improve the operation efficiency of the source operation, the source operation needs to be tested. In the related art, the source operation is usually tested one by one. When the number of source operations to be tested is large, the testing time will also increase, and the testing result corresponding to the testing of the source operation does not conform to the actual production situation.

[0026] In order to solve the problems in the prior art, the embodiments of the present application provide a job testing method, device, equipment, storage medium and product.

[0027] In the embodiments of the present application, the source operation is batch processed, so that the one-time business processing of a large amount of data is realized, the testing time is reduced, and the testing efficiency of the source operation is improved. In addition, in the embodiments of the present application, according to the business scenarios of different source operations, data of multiple source operations is shunted, a job flow is flexibly constructed, and the source operations with the same business scenario are tested synchronously in the form of the job flow. Compared with the separate testing of the source operation, the testing efficiency of the job is improved. Moreover, in the embodiments of the present application, the job flow is also instantiated, so that the repeated testing of the job flow is realized, the testing steps of the source operation are simplified, and the testing efficiency is improved. Finally, in the embodiments of the present application, the execution state of the job flow can be monitored in real time, so that the job execution log is obtained, and then the tester can dynamically adjust the state of the job flow, obtain the related testing index, and automatically analyze the job execution log to generate the testing result of the source operation. This way reduces the participation of manual work and improves the testing efficiency and accuracy of the source operation.

[0028] In the embodiments of the present application, the job testing system can be used as the execution subject of the method provided in the embodiments of the present application. In some embodiments, Figure 1 The structure of the job testing system is shown in the schematic diagram, as shown in Figure 1 The job testing system includes a job management and control platform 10 and a job scheduling platform 20.

[0029] The job management platform is used to manage jobs, for example, dividing the source pasting job into multiple job flows. The job scheduling platform, such as the Luban job scheduling platform, is used to execute source pasting jobs. Both the job scheduling platform and the job management platform can consist of multiple servers. For the job scheduling platform, it can include AP (Access Point) servers and DB (Database) servers. The DB server can store data; it can act as a data source, providing data files, or as a data storage medium. The AP server is used to connect to the DB server.

[0030] The following is Figure 1 The job testing system shown is used to introduce the job testing method provided in the embodiments of this application.

[0031] Figure 2 A flowchart illustrating a job testing method according to an embodiment of the present invention is shown. Figure 2 As shown, the method may include the following steps S201 to S204: Step S201: Obtain multiple job flows to be tested and the business load corresponding to the current test cycle.

[0032] In step S201, the job flow to be tested includes source-attaching jobs with the same business scenario. For example, the business scenario can be determined according to the job function corresponding to the source-attaching job. For example, the business scenario can include scenarios such as data merging, data detection, data organization, and raw data. Based on this, thousands of source-attaching jobs can be divided into MERGE data flow, CHECK job flow, STAGE job flow, and BASE job flow.

[0033] In step S201, the workload corresponding to the current test period refers to the workload of the production environment within the current test period. For example, in this embodiment, historical job dates, resource utilization (e.g., CPU, memory, etc.), business calendars (e.g., holidays, special settlement days, etc.), and time zone information of global branches can be collected in real-time or periodically from the production environment. Then, based on time series analysis models, such as LSTM (Long Short-Term Memory) models, Prophet models, etc., historical data is analyzed to predict the workload trend and resource idle window corresponding to the production environment within the current test period.

[0034] Step S202: Determine the target business date corresponding to the job flow to be tested based on the business load.

[0035] In the embodiment of the present application, the target business date can be determined in combination with the knowledge graph. For example, according to the knowledge graph, the historical business dates with the same business load can be taken as the target business date.

[0036] It is worth noting that in the embodiment of the present application, the target business date is not a fixed value, but is determined by the business load in the current test period, that is, in the embodiment of the present application, the target business date is dynamically changed according to the business load, which can realize dynamic instantiation of the job flow and improve the efficiency and accuracy of the job flow instantiation.

[0037] In step S203, the target business date is used to instantiate the business dates corresponding to the plurality of test job flows to obtain a plurality of instance job flows.

[0038] In actual application, the test job flow needs to be tested repeatedly, and the upstream system needs to provide the supply number file for each test. However, in the test scenario, the acquisition step of the supply number file is complex, and data application needs to be performed. If the supply number file is applied in each test period, the test period will undoubtedly be increased. To this end, in the embodiment of the present application, the test job flow is instantiated, and by updating the business date corresponding to the test job flow, a plurality of instance job flows can be obtained, and the data application process is simplified, and the test efficiency is improved.

[0039] In step S204, for each instance job flow, the source-attached job in each instance job flow is executed synchronously under the business date, and the job execution log corresponding to each instance job flow is obtained.

[0040] In step S204, the job scheduling system detects the business date corresponding to each instance job flow, so that when the current date reaches the business date, the job scheduling system automatically executes the instance job flow, and detects the job state of the source-attached job in each instance job flow in the execution process in real time, generates the job execution log, and facilitates subsequent testing of the source-attached job.

[0041] In step S205, the job execution log is analyzed to determine the test result of the source-attached job.

[0042] In step S205, the job execution log contains a job execution index, which includes but is not limited to the start time, end time, execution duration, batch processing data volume, batch processing time window, batch processing efficiency, success rate and resource usage data of the source-attached job.

[0043] For example, the start time of the source-dependent job is the time when the source-dependent job starts running, the end time of the source-dependent job is the time when the source-dependent job ends running, the execution duration of the source-dependent job is the duration between the end time and the start time of the source-dependent job, the batch data volume of the instance job flow is the data volume that needs to be loaded by the source-dependent job, the batch time window is the duration between the latest end time and the earliest start time of all the source-dependent jobs in the instance job flow, the batch efficiency is the ratio of the batch data volume to the batch time window, the success rate is the ratio of the number of successful job execution to the total number, and the resource usage data includes, but is not limited to, the usage of CPU, memory, input and output ports and other resources.

[0044] Through analysis of the above data, the test result of the source-dependent job can be generated, which can reflect the execution efficiency of the source-dependent job.

[0045] Based on the scheme defined in steps S201 to S205, it can be known that, in the embodiments of the present application, the source-dependent jobs are processed according to business scenarios, and the source-dependent jobs with the same business scenario are tested synchronously in the form of a job flow, which improves the job test efficiency compared with separate testing of the source-dependent jobs. In addition, in the embodiments of the present application, the instance job flow is instantiated, so that repeated testing of the job flow is realized, and the test steps of the source-dependent job are simplified without the need to configure the job each time, thereby improving the test efficiency. Moreover, in the embodiments of the present application, the business date for instantiating the job flow is dynamically determined according to the business load in the test period, without the need for manual operation, thereby improving the accuracy and efficiency of the instantiation of the job flow. Furthermore, in the embodiments of the present application, the execution state of the job flow can be monitored in real time, so that the job execution log is obtained, and the test result of the source-dependent job can be generated by automatically analyzing the job execution log, which reduces the degree of human participation and improves the test efficiency and accuracy of the source-dependent job.

[0046] The implementation process of the method provided in the embodiments of the present application is described below.

[0047] In some embodiments, the job management and control platform first divides the source-dependent jobs into job flows. Specifically, the job management and control platform obtains a plurality of source-dependent jobs and a business scenario corresponding to each source-dependent job, and divides the source-dependent jobs with the same business scenario in the plurality of source-dependent jobs into one to-be-tested job flow.

[0048] In the embodiments of the present application, each source-dependent job has a corresponding business scenario, and the job management and control platform can divide the job flow according to the function implemented by the source-dependent job, for example, divide the source-dependent jobs implementing data merging functions into one job flow, and divide the source-dependent jobs implementing data detection functions into one job flow.

[0049] It should be noted that by dividing the source pasting operation into an operation flow, when testing the source pasting operation subsequently, the source pasting operations with the same business scenario can be tested in batches, thereby improving the test efficiency of the source pasting operation.

[0050] In some embodiments, for the division of the source pasting operation, the operation management platform can divide the plurality of source pasting operations into a plurality of initial operation flows according to the business scenario corresponding to each source pasting operation, and obtain a first operation quantity of the source pasting operation in each initial operation flow; in the case that the first operation quantity is greater than the operation quantity threshold, the second operation quantity of the source pasting operation contained in the to-be-tested operation flow is determined according to the relative quantity between the first operation quantity and the operation quantity threshold; and then the initial operation flow is divided and processed according to the second operation quantity, to obtain a plurality of to-be-tested operation flows.

[0051] For example, after the plurality of source pasting operations are divided into a plurality of operation flows, if the number of source pasting operations in the operation flow is large, the burden of the operation scheduling platform to execute the source pasting operation will be increased, the resource utilization rate will be increased, and even the resources of the operation scheduling platform will be exhausted, resulting in that the operation scheduling platform cannot normally execute the source pasting operation. Therefore, when the number of source pasting operations contained in the operation flow is large, the operation flow can be further divided. For example, for the MERGE operation flow, it can be subdivided into MERGR_01 operation flow and MERGE_02 operation flow.

[0052] It should be noted that the operation quantity threshold for further dividing the operation flow is the quantity threshold corresponding to the business scenario of the initial operation flow, that is, for different business scenarios, the number of source pasting operations contained in the corresponding operation flow is different. The importance of the source pasting operation under different business scenarios is different, and the resources allocated to it are also different. Therefore, using the operation quantity threshold corresponding to the business scenario to further divide the operation flow can reduce the waste or shortage of resources, improve the utilization rate of resources, and at the same time ensure the execution efficiency of the source pasting operation.

[0053] In some embodiments, after the division of the source pasting operation is completed, the operation management platform determines the target business date corresponding to the to-be-tested operation flow based on the business load. Specifically, the operation management platform obtains the historical business load corresponding to a plurality of historical business dates; determines a target historical business date with a load similarity between the historical business load and the business load greater than a similarity threshold from the plurality of historical business dates; and determines the target historical business date as the target business date.

[0054] In the above embodiments, the similarity between the business loads can be determined by the resource occupation, the load quantity and other dimensions between the two business loads.

[0055] It is worth noting that in the historical business date, the operation management platform can obtain the supply file provided by the upstream system, take the historical business date as the target business date, and directly use the supply file corresponding to the historical business date in the current test period without applying to the upstream system, thereby simplifying the test process and improving the test efficiency.

[0056] In some embodiments, after completing the division of the source-adhering job, the operation management platform can also perform instantiation processing on the business dates corresponding to the plurality of test job flows to obtain a plurality of instance job flows. Specifically, the operation management platform obtains the target business dates corresponding to the plurality of test job flows in the current test period, and updates the business dates corresponding to the plurality of test job flows to the target business dates to obtain the plurality of instance job flows.

[0057] It should be noted that in actual application, after dividing the job flow, the operation scheduling platform allocates the divided job flow to the operation scheduling platform, so that the AP server in the operation scheduling platform can execute the job flow in the corresponding business scenario according to the difference of the business scenario, thereby realizing batch execution of the source-adhering job.

[0058] In addition, in the test scenario, it is usually necessary to repeatedly test the source-adhering job. In actual application, the supply file needs to be applied to the upstream system every time, and the application of the supply file also increases the test process of the source-adhering job and reduces the test efficiency of the source-adhering job. In this regard, in the embodiments of the present application, the job flow corresponding to the source-adhering job is instantiated, that is, the data of the supply file used in the last test period is used as the supply file used in the current test period.

[0059] In the embodiments of the present application, after the instantiation processing of the business date of the test job flow, the obtained instance job flow meets the condition of executing the source-adhering job in the current test period of the operation scheduling platform, that is, the operation scheduling platform detects that the business date corresponding to the instance job flow matches the current date, and then the operation scheduling platform executes the instance job flow without applying for the supply file to the upstream system, thereby simplifying the test process of the source-adhering job, realizing the repeated test of the source-adhering job, and improving the test efficiency of the source-adhering job.

[0060] In some embodiments, after obtaining the plurality of instance job flows, the operation scheduling platform executes the instance job flow and generates a job execution log corresponding to the instance job flow to analyze the job execution log, thereby realizing the test of the source-adhering job.

[0061] The job scheduling platform can analyze the content contained in the job execution log. Specifically, the job scheduling platform determines a job execution duration corresponding to the first job flow according to a job start time and a job end time; determines a job execution efficiency corresponding to the first job flow according to a ratio between a total job quantity of the first job flow and the job execution duration; then, acquires a third job quantity of the source-dependent jobs in the first job flow whose job execution state is a successful execution state, and determines a job success rate corresponding to the first job flow according to the third job quantity and the total job quantity; and finally, generates a test result of the source-dependent jobs according to the job execution efficiency, the job success rate, and the resource usage data.

[0062] In the above embodiment, the first job flow is any one of a plurality of to-be-tested job flows, and the job execution log at least includes a job start time, a job end time, a job execution state, and resource usage data corresponding to the source-dependent jobs of an instance job flow. The job start time of the instance job flow is the earliest start time of the source-dependent jobs in the instance job flow, and the job end time of the instance job flow is the completion time of the last source-dependent job in the instance job flow. The job execution state at least includes a successful execution state and a failed execution state. The resource usage data of the source-dependent jobs includes but is not limited to the usage rate (or usage amount) of CPU, the usage rate (or usage amount) of memory, and the usage rate (or usage amount) of an input / output interface.

[0063] For example, the test result of the source-dependent jobs includes the above-mentioned job execution efficiency, job success rate, and resource usage data. The job execution duration of the first job flow can be the duration between the job start time and the job end time of the first job flow. The total job quantity of the first job flow refers to the total data quantity processed by the first job flow. Therefore, the total job quantity and the job execution duration of the first job flow are calculated to determine the job execution efficiency of the first job flow. If the job execution efficiency is low, for example, lower than an efficiency threshold, the job scheduling platform returns the test result to the job management and control platform, so that the job management and control platform can adjust the first job flow, for example, further subdivide the first job flow.

[0064] In the above example, the efficiency threshold in different business scenarios is different. For example, the efficiency threshold corresponding to the MERGE job flow is different from the efficiency threshold corresponding to the STAGE job flow.

[0065] It should be noted that for the source operation, the corresponding operation execution efficiency can also be determined in the above manner, that is, the operation execution efficiency of the source operation is the ratio of the data volume of the data processed by the source operation to the execution time length of the source operation. Similar to the operation flow, when the operation execution efficiency corresponding to the source operation is low, the operation scheduling system can send the operation execution log of the source operation to the operation management and control platform, so that the operation management and control platform analyzes the operation execution log and determines the optimization strategy for optimizing the execution logic of the source operation.

[0066] In the above example, when the success rate of the first operation flow is low, the test result can also be returned to the operation management and control platform by the operation scheduling platform, so that the operation management and control platform can adjust the first operation flow, for example, adjust the execution logic of the source operation in the first operation flow, or adjust the memory resource of the source operation in the first operation flow, etc.

[0067] In the above example, when the resource usage data of the first operation flow, the test result can also be returned to the operation management and control platform by the operation scheduling platform, so that the operation management and control platform can adjust the first operation flow, for example, adjust the execution logic of the source operation in the first operation flow, or adjust the memory resource of the source operation in the first operation flow, etc.

[0068] By generating the test result group of the source operation based on the execution efficiency, success rate and resource usage data of the operation flow, comprehensive analysis of the source operation is realized, and the test accuracy of the source operation is improved.

[0069] In some embodiments, the operation test system also determines a failed operation with an execution failure state from the first operation flow according to the operation execution log, and obtains resource usage data corresponding to the failed operation and resource allocation data corresponding to the failed operation; in the case that the resource usage data is greater than the resource allocation data, the failed operation is subjected to resource expansion processing to obtain an expanded failed operation, and the expanded failed operation is subjected to retesting operation.

[0070] In the above embodiment, when the source operation fails to execute, it is highly probable that the resource allocated by the source operation is insufficient, so in the embodiment of the application, after detecting the source operation that fails to execute, the resource usage of the failed operation is detected, and if it is detected that the resource usage of the failed operation exceeds the pre-allocated resource allocation, the failed operation is subjected to expansion processing, and the expanded failed operation is executed again to reduce the failure rate of the source operation and improve the reliability of the execution of the source operation.

[0071] Additionally, if the resource usage data (e.g., resource usage amount) corresponding to the failed job is less than or equal to the resource allocation data (e.g., resource allocation amount), it can be determined that the resources allocated to the failed job are sufficient. The reason for the failure of the source posting job may be that there is a problem with the execution logic (i.e., job processing logic) of the source posting job. In this case, the job management platform analyzes the logs generated during the execution of the failed source posting job to determine whether there is a problem with the execution logic of the failed source posting job. If there is a problem, it generates an adjustment strategy for the execution logic, such as optimizing the loop code or data structure.

[0072] In some embodiments, the job execution log also includes the job execution duration corresponding to the source job. After generating the test results of the source job based on job execution efficiency, job success rate, and resource usage data, if the source job is in a successful execution state and the job execution duration of the source job is greater than the duration threshold, the resource usage data corresponding to the source job is obtained; if the resource usage data is greater than the resource allocation data corresponding to the source job, the resource expansion processing of the source job is performed; if the resource usage data is less than or equal to the resource allocation data corresponding to the source job, the job processing logic of the source job is analyzed and a logic optimization strategy is generated.

[0073] When the source patching job is in a successful execution state, the job testing system can further check whether the resource allocation data of the source patching job is reasonable and whether the job processing logic of the source patching job is reasonable. In order to expand the resources for the source patching job in a timely manner when the resource allocation is insufficient, and to optimize the job execution logic in a timely manner when the job execution logic of the source patching job is unreasonable, thereby improving the execution success rate of the source patching job and thus improving the execution reliability of the source patching job.

[0074] In some embodiments, Figure 3 A flowchart illustrating the overall process of the job testing method provided in this application embodiment is shown, as follows: Figure 3 As shown, the process includes the following steps S301 to S307: Step S301: The job management platform constructs different job workflows; Step S302: The job management platform instantiates the job workflow; Step S303: The job scheduling platform receives the data supply file from the upstream system; Step S304: The job scheduling platform performs batch processing on the instantiated jobs under the data supply file; Step S305: The job scheduling platform monitors the job execution status in real time and generates a job execution log; Step S306: If the job execution fails, adjust the parameters of the job and / or job flow, and rerun the job. Step S307: Analyze the job execution log to determine the job efficiency corresponding to the job.

[0075] This concludes the introduction of the methods provided in the embodiments of this application.

[0076] As described above, in this embodiment, source-pasting jobs are split according to business scenarios, and source-pasting jobs with the same business scenario are tested synchronously using a job flow approach. Compared with individual testing of source-pasting jobs, this improves job testing efficiency. Furthermore, in this embodiment, the job flow is instantiated, enabling repeated testing of the job flow without requiring job configuration each time, simplifying the testing steps for source-pasting jobs and improving testing efficiency. In addition, in this embodiment, the execution status of the job flow can be monitored in real time to obtain job execution logs. By automatically analyzing these logs, test results for source-pasting jobs can be generated. This method reduces manual intervention and improves the testing efficiency and accuracy of source-pasting jobs.

[0077] Based on the job testing method provided in the above embodiments, this application also provides specific implementation methods of the job testing device. Please refer to the following embodiments.

[0078] First see Figure 4 The job testing device 400 provided in this application embodiment includes: a job acquisition module 401, a date determination module 402, an instantiation module 403, a job execution module 404, and a job testing module 405.

[0079] The job acquisition module 401 is used to acquire multiple job flows to be tested and the business load corresponding to the current test cycle. The job flows to be tested include source-attached jobs with the same business scenario. Date determination module 402 is used to determine the target business date corresponding to the job flow to be tested based on the business load; The instantiation module 403 is used to instantiate the business dates corresponding to multiple job flows to be tested using the target business date, so as to obtain multiple instance job flows; The job execution module 404 is used to synchronously execute the source-attaching jobs in each instance job flow on the business date, and obtain the job execution logs corresponding to each instance job flow. The job testing module 405 is used to analyze the job execution log and determine the test results of the source pasting job.

[0080] In some embodiments, the job acquisition module includes a scenario acquisition module and a job flow generation module. The scenario acquisition module is used to acquire multiple source jobs and the business scenario corresponding to each source job; the job flow generation module is used to divide source jobs with the same business scenario from the multiple source jobs into a single test job flow.

[0081] In some embodiments, the job flow generation module is specifically used to divide multiple source-posting jobs into multiple initial job flows according to the business scenario corresponding to each source-posting job; obtain the first job quantity of source-posting jobs in each initial job flow; if the first job quantity is greater than the job quantity threshold, determine the second job quantity of source-posting jobs included in the job flow to be tested according to the relative quantity between the first job quantity and the job quantity threshold, wherein the job quantity threshold is the quantity threshold corresponding to the business scenario of the initial job flow; and divide the initial job flow according to the second job quantity to obtain multiple job flows to be tested.

[0082] In some embodiments, the date determination module is used to obtain the historical service load corresponding to multiple historical service dates; determine the target historical service date from the multiple historical service dates whose load similarity with the service load is greater than a similarity threshold; and determine the target historical service date as the target service date.

[0083] In some embodiments, the instantiation module is specifically used to update the business dates corresponding to multiple job flows to be tested to the target business date, thereby obtaining multiple instance job flows.

[0084] In some embodiments, the job execution log includes at least: the job start time, job end time, job execution status, and resource usage data corresponding to the source-attaching job of the instance job flow. The job testing module is specifically used to determine the job execution duration corresponding to the first job flow based on the job start time and job end time, wherein the first job flow is any one of a plurality of job flows to be tested; determine the job execution efficiency corresponding to the first job flow based on the ratio between the total number of jobs in the first job flow and the job execution duration; obtain the number of third source-attaching jobs in the first job flow whose job execution status is in the successful execution state; determine the job success rate corresponding to the first job flow based on the number of third jobs and the total number of jobs; and generate the test results of the source-attaching job based on the job execution efficiency, job success rate, and resource usage data.

[0085] In some embodiments, the job testing apparatus further includes: a rerun module, configured to determine, based on the job execution log, a failed job whose execution status is in the first job flow; obtain resource usage data and resource allocation data corresponding to the failed job; if the resource usage data is greater than the resource allocation data, perform resource expansion processing on the failed job to obtain an expanded failed job; and perform a retest operation on the expanded failed job.

[0086] In some embodiments, the job execution log also includes the job execution duration corresponding to the source-attaching job, and the job testing device further includes: a job optimization module, used to: after generating test results for the source-attaching job based on job execution efficiency, job success rate, and resource usage data; when the source-attaching job is in a successful execution state and the job execution duration of the source-attaching job is greater than the duration threshold; when the resource usage data is greater than the resource allocation data corresponding to the source-attaching job; and when the resource usage data is less than or equal to the resource allocation data corresponding to the source-attaching job; analyze the job processing logic of the source-attaching job and generate a logic optimization strategy.

[0087] The various modules of the job testing device provided in this application embodiment can achieve Figure 2 It provides functions for each step of the job testing method and can achieve the corresponding technical effects. For the sake of brevity, it will not be described in detail here.

[0088] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0089] The electronic device 500 may include a processor 501 and a memory 502 storing computer program instructions.

[0090] Specifically, the processor 501 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0091] Memory 502 may include mass storage for data or instructions. For example, and not limitingly, memory 502 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 502 may include removable or non-removable (or fixed) media. Where appropriate, memory 502 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 502 is non-volatile solid-state memory.

[0092] In certain embodiments, the memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Thus, generally, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of this application.

[0093] The processor 501 reads and executes computer program instructions stored in the memory 502 to implement any of the job testing methods in the above embodiments.

[0094] In some examples, the electronic device 500 may also include a communication interface 503 and a bus 504. For example, Figure 5 As shown, the processor 501, memory 502, and communication interface 503 are connected through bus 504 and complete communication with each other.

[0095] The communication interface 503 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0096] Bus 504 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not as a limitation, bus 504 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 504 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.

[0097] For example, the electronic device 500 can be a mobile phone, tablet computer, laptop computer, handheld computer, in-vehicle electronic device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc.

[0098] The electronic device 500 can execute the job testing method in the embodiments of this application, thereby achieving the combination Figure 2 The described task testing method.

[0099] In addition, in conjunction with the job testing methods in the above embodiments, this application also provides a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the job testing methods in the above embodiments. Examples of computer-readable storage media include non-transitory computer-readable storage media, such as portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, etc.

[0100] This application also provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, they implement any of the job testing methods described in the above embodiments.

[0101] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0102] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0103] The job testing methods in the above embodiments can be implemented using a computer storage medium provided in this embodiment of the invention. The computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the job testing methods in the above embodiments.

[0104] This application also provides a computer program product, including a computer program, which, when executed, implements any of the job testing methods described in the above embodiments.

[0105] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0106] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.

[0107] The above are merely specific embodiments of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. A method for testing a job, characterized in that, include: Obtain multiple job flows to be tested and the business load corresponding to the current test cycle, wherein the job flows to be tested include source-attaching jobs with the same business scenario; The target business date corresponding to the job flow to be tested is determined based on the business load; The target business date is used to instantiate the business dates corresponding to the multiple job flows to be tested, resulting in multiple instance job flows; For each instance job flow, the source pasting job in each instance job flow is executed synchronously on the business date, and the job execution log corresponding to each instance job flow is obtained; The job execution log is analyzed to determine the test results of the source pasting job.

2. The method according to claim 1, characterized in that, The acquisition of multiple job streams to be tested includes: Obtain multiple source posting jobs and the business scenario corresponding to each source posting job; Multiple source-attaching jobs with the same business scenario are grouped into a single job flow to be tested.

3. The method according to claim 2, characterized in that, The step of grouping multiple source-posting jobs with the same business scenario into a single job flow to be tested includes: Based on the business scenario corresponding to each of the source posting jobs, the multiple source posting jobs are divided into multiple initial job flows; Obtain the first job number of the source-attaching job in each of the initial job flows; If the number of first jobs is greater than the number of jobs threshold, the number of second jobs including source-attaching jobs in the job flow to be tested is determined based on the relative number between the number of first jobs and the number of jobs threshold, wherein the number of jobs threshold is the number threshold corresponding to the business scenario of the initial job flow; The initial job flow is divided according to the second number of jobs to obtain multiple job flows to be tested.

4. The method according to claim 1, characterized in that, Determining the target business date corresponding to each job flow to be tested based on the business load includes: Obtain the historical business load corresponding to multiple historical business dates; From the plurality of historical service dates, determine the target historical service dates whose load similarity to the service load is greater than a similarity threshold; The target historical business date is determined as the target business date.

5. The method according to claim 4, characterized in that, The step of instantiating multiple business dates corresponding to the job flows to be tested using the target business date to obtain multiple instance job flows includes: The business dates corresponding to the multiple job flows to be tested are updated to the target business date to obtain the multiple instance job flows.

6. The method according to claim 1, characterized in that, The job execution log includes at least: the job start time, job end time, job execution status, and resource usage data corresponding to the source pasting job of the instance job flow. Analyzing the job execution log to determine the test results of the source pasting job includes: The execution duration of the first job flow is determined based on the job start time and the job end time, wherein the first job flow is any one of the plurality of job flows to be tested; The job execution efficiency corresponding to the first job flow is determined based on the ratio between the total number of jobs in the first job flow and the job execution time. Obtain the number of third jobs in the first job flow whose job execution status is "execution successful"; The success rate of the job corresponding to the first job flow is determined based on the number of the third job and the total number of jobs. The test results of the source pasting job are generated based on the job execution efficiency, the job success rate, and the resource usage data.

7. The method according to claim 6, characterized in that, The method further includes: Based on the job execution log, the job execution status is determined to be a failed job from the first job flow; Obtain the resource usage data and resource allocation data corresponding to the failed job; If the resource usage data is greater than the resource allocation data, the failed job is subjected to resource expansion processing to obtain the expanded failed job; The failed jobs after the expansion were retested.

8. The method according to claim 6, characterized in that, The job execution log also includes the job execution time corresponding to the source pasting job. After generating the test results of the source pasting job based on the job execution efficiency, the job success rate, and the resource usage data, the method further includes: When the source posting job is in the successful execution state and the execution duration of the source posting job is greater than the duration threshold, obtain the resource usage data corresponding to the source posting job; If the resource usage data is greater than the resource allocation data corresponding to the source posting operation, the resource capacity of the source posting operation will be expanded. If the resource usage data is less than or equal to the resource allocation data corresponding to the source posting job, the job processing logic of the source posting job is analyzed, and a logic optimization strategy is generated.

9. A work testing device, characterized in that, include: The job acquisition module is used to acquire multiple job flows to be tested and the business load corresponding to the current test cycle. The job flows to be tested include source-attaching jobs with the same business scenario. The date determination module is used to determine the target business date corresponding to the job flow to be tested based on the business load; The instantiation module is used to instantiate the business dates corresponding to the multiple job flows to be tested using the target business date, so as to obtain multiple instance job flows; The job execution module is used to synchronously execute the source pasting jobs in each instance job flow on the business date, and obtain the job execution log corresponding to each instance job flow; The job testing module is used to analyze the job execution log and determine the test results of the source pasting job.

10. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; the processor executes the computer program instructions to implement the job testing method as described in any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processor, implement the job testing method as described in any one of claims 1-8.

12. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device is able to perform the job testing method as described in any one of claims 1-8.