Task running method and device, program product, storage medium and electronic equipment
By obtaining and analyzing the task list in the product package, automatically determining and stopping unnecessary tasks, and submitting target tasks to the operation and maintenance module to achieve automatic scheduling, the problem of not being able to automatically schedule and run tasks in traditional deployment methods is solved, and operation and maintenance efficiency and stability are improved.
Patent Information
- Application Number
- CN202411805414.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-04-22
AI Technical Summary
The traditional software product package deployment methods have problems such as inefficiency, data security, product stability, deployment timeliness and operation and maintenance labor costs, especially in terms of automated operation and maintenance, which cannot achieve automatic scheduling and operation tasks.
By obtaining the task list in the product package, based on the target identification information of the target task, the task that needs to be stopped is determined from the tasks currently running by the operation and maintenance module, and the target task is submitted to the operation and maintenance module to indicate its operation.
It realizes the effect of automatically scheduling and running tasks, improves the efficiency of deployment and operation and maintenance, and reduces human errors and operation and maintenance costs.
Smart Images

Figure CN119862005A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and more specifically, to a method and device for executing a task, a program product, a storage medium, and an electronic device. Background Art
[0002] In the context of the rapid development of the current industrial Internet and the Internet of Things, the deployment and upgrade of software system products has become a crucial part of the software delivery process. However, the traditional deployment method of software product packages has obvious limitations, especially in terms of automated operation and maintenance. Specifically, after these product packages are installed and imported into the data middle-end system, they often require manual configuration of processing conditions and operation modes to achieve task scheduling, offline batch processing, or real-time computing stream processing operations. This method is not only inefficient, but also faces challenges in data security, product stability, deployment timeliness, and deployment and operation labor costs. Summary of the invention
[0003] The embodiments of the present application provide a method and device for executing a task, a program product, a storage medium, and an electronic device, so as to at least solve the problem in the related art that tasks cannot be automatically scheduled for execution.
[0004] According to one embodiment of the present application, a method for running a task is provided, comprising: obtaining a task list included in a product package, wherein the task list records a plurality of target tasks for realizing a target function; determining a second task from a plurality of first tasks currently run by an operation and maintenance module based on target identification information of the plurality of target tasks, wherein the target identification information includes an identification of the second task, and the operation and maintenance module is used to run the task submitted to the operation and maintenance module; stopping running the second task, and submitting the plurality of target tasks to the operation and maintenance module to instruct the operation and maintenance module to run each of the target tasks.
[0005] In an exemplary embodiment, the task list includes at least one of the following lists: a real-time task list, wherein the real-time task list records real-time tasks for realizing a first target function; an offline task list, wherein the offline task list records offline tasks for realizing a second target function; when the task list includes the real-time task list, after determining the second task from the multiple first tasks currently running by the operation and maintenance module based on the target identification information of the multiple target tasks, it also includes: recording the information of the second task to generate a list to be stopped.
[0006] In an exemplary embodiment, when the task list includes the real-time task list, the second task is stopped, and the plurality of target tasks are submitted to the operation and maintenance module to instruct the operation and maintenance module to run each of the target tasks, including: stopping the second task in a predetermined stop order, and deleting the information of the second task that has been stopped from the list to be stopped; when it is determined that the information of the second task does not exist in the list to be stopped, the plurality of real-time tasks recorded in the real-time task list are submitted to the operation and maintenance module to instruct the operation and maintenance module to perform the following operations: recording the first real-time task that meets the target running state included in the plurality of real-time tasks into the list to be started; starting and running the first real-time task based on the startup information of the first real-time task recorded in the list to be started and the running configuration of the first real-time task included in the product package, wherein the startup information is used to describe the startup position of the first real-time task, the startup information is correspondingly recorded in the first real-time task, and the running configuration of the first real-time task is used to describe the abnormal retry mechanism of the real-time task.
[0007] In an exemplary embodiment, when the task list includes the offline task list, submitting the multiple target tasks to the operation and maintenance module to instruct the operation and maintenance module to run each target task includes: when the task type of the offline task is other types except the target task type, and the second task exists among the multiple first tasks currently run by the operation and maintenance module, submitting the dependency data of the offline task included in the product package to the storage module for storage, wherein the dependency data includes data for implementing the running of the offline task, and the first dependency data of the second task is stored in the storage module; submitting the offline task in the offline task list to the operation and maintenance module to instruct the operation and maintenance module to perform the following operations: obtaining the dependency data of the offline task from the storage module, and starting and running the offline task based on the dependency data and the running configuration of the offline task included in the product package, wherein the running configuration of the offline task is used to describe the scheduling configuration of the offline task.
[0008] In an exemplary embodiment, when the task list includes the offline task list, submitting the plurality of target tasks to the operation and maintenance module to instruct the operation and maintenance module to run each of the target tasks includes: when the task type of the offline task is the target task type, recording the offline task in a first dependency list, wherein the target task type is a task type that runs after other tasks are completed; obtaining a second dependency list of the offline tasks in the first dependency list from a product package, wherein the second dependency list records dependent tasks, and the offline tasks are run after the dependent tasks are completed; when the dependent tasks exist in the plurality of first tasks currently run by the operation and maintenance module, submitting the dependency data of the offline tasks included in the product package to a storage module for storage, wherein the dependency data includes data for implementing the running of the offline tasks; submitting the offline tasks in the first dependency list to the operation and maintenance module to instruct the operation and maintenance module to perform the following operations: obtaining the dependency data of the offline tasks from the storage module, and starting and running the offline tasks based on the dependency data and the running configuration of the offline tasks included in the product package, wherein the running configuration of the offline tasks is used to describe the scheduling configuration of the offline tasks.
[0009] In an exemplary embodiment, the storage module stores the first dependency data of the second task, and the method further includes: the operation and maintenance module uses the first dependency data to run the second task; when the operation and maintenance module receives the offline task in the submitted offline task list, the operation and maintenance module stops running the second task, and runs the offline task based on the dependency data of the offline task stored in the storage module.
[0010] According to one embodiment of the present application, a task running device is provided, including: a first acquisition module, used to acquire a task list included in a product package, wherein the task list records a plurality of target tasks for realizing a target function; a first determination module, used to determine a second task from a plurality of first tasks currently running by an operation and maintenance module based on target identification information of the plurality of target tasks, wherein the target identification information includes an identification of the second task, and the operation and maintenance module is used to run the task submitted to the operation and maintenance module; a first running module, used to stop running the second task, and submit the plurality of target tasks to the operation and maintenance module to instruct the operation and maintenance module to run each of the target tasks.
[0011] In an exemplary embodiment, the task list includes at least one of the following lists: a real-time task list, wherein the real-time task list records real-time tasks for realizing a first target function; an offline task list, wherein the offline task list records offline tasks for realizing a second target function; the device further includes: a first recording module, which is used to, when the task list includes the real-time task list, record information of the second task after determining the second task from the multiple first tasks currently running by the operation and maintenance module based on the target identification information of the multiple target tasks, so as to generate a list to be stopped.
[0012] In an exemplary embodiment, the first running module includes: a first stop submodule, used to stop the second task in a predetermined stop order, and delete the information of the second task that has stopped running from the to-be-stopped list; a first submission submodule, used to submit the multiple real-time tasks recorded in the real-time task list to the operation and maintenance module when it is determined that the information of the second task does not exist in the to-be-stopped list, so as to instruct the operation and maintenance module to perform the following operations: record the first real-time task that meets the target running state included in the multiple real-time tasks into the to-be-started list; start and run the first real-time task based on the startup information of the first real-time task recorded in the to-be-started list and the running configuration of the first real-time task included in the product package, wherein the startup information is used to describe the startup position of the first real-time task, the startup information is correspondingly recorded in the first real-time task, and the running configuration of the first real-time task is used to describe the abnormal retry mechanism of the real-time task.
[0013] In an exemplary embodiment, the first running module includes: a first storage submodule, which is used to submit the dependency data of the offline task included in the product package to the storage module for storage when the task type of the offline task is other types except the target task type and the second task exists among the multiple first tasks currently running by the operation and maintenance module, wherein the dependency data includes data for realizing the operation of the offline task, and the first dependency data of the second task is stored in the storage module; a second submission submodule, which is used to submit the offline task in the offline task list to the operation and maintenance module to instruct the operation and maintenance module to perform the following operations: obtain the dependency data of the offline task from the storage module, and start and run the offline task based on the dependency data and the running configuration of the offline task included in the product package, wherein the running configuration of the offline task is used to describe the scheduling configuration of the offline task.
[0014] In an exemplary embodiment, the first running module includes: a first recording submodule, which is used to record the offline task in a first dependency list when the task type of the offline task is a target task type, wherein the target task type is a task type that is run after other tasks are completed; a first obtaining submodule, which is used to obtain a second dependency list of the offline task in the first dependency list from a product package, wherein the second dependency list records dependent tasks, and the offline task is run after the dependent tasks are completed; a second storage submodule, which is used to submit the dependency data of the offline task included in the product package to the storage module for storage when the dependent task exists in multiple first tasks currently run by the operation and maintenance module, wherein the dependency data includes data for implementing the operation of the offline task; a third submitting submodule, which is used to submit the offline task in the first dependency list to the operation and maintenance module to instruct the operation and maintenance module to perform the following operations: obtaining the dependency data of the offline task from the storage module, and starting and running the offline task based on the dependency data and the running configuration of the offline task included in the product package, wherein the running configuration of the offline task is used to describe the scheduling configuration of the offline task.
[0015] In an exemplary embodiment, the storage module stores the first dependency data of the second task, and the device further includes: the operation and maintenance module uses the first dependency data to run the second task; when the operation and maintenance module receives the offline task in the submitted offline task list, the operation and maintenance module stops running the second task, and runs the offline task based on the dependency data of the offline task stored in the storage module.
[0016] According to another embodiment of the present application, a computer program product is provided, including a computer program, wherein the computer program is configured for a processor to execute the steps of any of the above method embodiments.
[0017] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to enable a processor to execute the steps in any of the above method embodiments.
[0018] According to another embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor is configured to execute the computer program to perform the steps in any one of the method embodiments.
[0019] Through the present application, based on the target identification information of multiple target tasks in the task list of the product package, the second task is determined from the multiple first tasks currently running in the operation and maintenance module, wherein the target identification information includes the identification of the second task, and the operation and maintenance module is used to run the task submitted to the operation and maintenance module; stop running the second task, and submit multiple target tasks to the operation and maintenance module to instruct the operation and maintenance module to run each target task. When running the target task, it is determined that there is no second task running in the operation and maintenance module through the target identification information of the multiple target tasks in the task list. Therefore, the problem that the running task cannot be automatically scheduled in the related art is solved, and the effect of automatically scheduling the running task is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a hardware structure block diagram of a mobile terminal of a method for executing a task in an embodiment of the present application;
[0021] Figure 2 is a flowchart of a method for executing a task according to an embodiment of the present application;
[0022] Figure 3 It is a schematic diagram of a method for running a task in a specific embodiment of the present application;
[0023] Figure 4 It is a flowchart of a method for running a task in a specific embodiment of the present application;
[0024] Figure 5 is a flowchart of a method for running a real-time task according to a specific embodiment of the present application;
[0025] Figure 6 This is the process of the offline task operation method according to the specific embodiment of the present application. Figure 1 ;
[0026] Figure 7 This is the process of the offline task operation method according to the specific embodiment of the present application. Figure 2 ;
[0027] Figure 8 It is a structural block diagram of a device for running a task according to an embodiment of the present application. DETAILED DESCRIPTION
[0028] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[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. Taking running on a mobile terminal as an example, Figure 1 1 is a hardware structure block diagram of a mobile terminal for executing a task in an embodiment of the present application. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 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) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. 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 mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0031] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a method for running a task in an embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. 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 instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal 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.
[0032] 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 mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as 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.
[0033] In this embodiment, a method for executing a task is provided. Figure 2 is a flowchart of a method for executing a task according to an embodiment of the present application, such as Figure 2As shown, the process includes the following steps:
[0034] Step S202, obtaining a task list included in the product package, wherein the task list records a plurality of target tasks for achieving target functions;
[0035] Optionally, the product package is a compressed package generated by packaging business data in a development and operation platform, where the development and operation platform includes but is not limited to a big data middle-end system.
[0036] Optionally, the target task includes but is not limited to a real-time task and an offline task.
[0037] Optionally, the target functions include but are not limited to data integration, data standards, data organization, data governance, data development and scheduling, data services, and data operations.
[0038] Step S204, determining a second task from a plurality of first tasks currently being run by the operation and maintenance module based on target identification information of the plurality of target tasks, wherein the target identification information includes an identification of the second task, and the operation and maintenance module is used to run the task submitted to the operation and maintenance module;
[0039] Optionally, the identifier of the second task is used to uniquely identify the second task, and the identifier of the second task may be a name of the second task. The second task may be a task in the operation and maintenance module that has the same identifier, the same name, but a different version or a different level as the target task.
[0040] Step S206, stopping the second task, and submitting the plurality of target tasks to the operation and maintenance module to instruct the operation and maintenance module to run each of the target tasks.
[0041] Optionally, the operation and maintenance module runs the target task based on dependency data, startup information, and running configuration of the target task in the product package.
[0042] Optionally, the big data middle-office system has a data development module and an operation and maintenance module. The target task is developed and debugged in the data development module. After the target task is submitted, a corresponding operation and maintenance task will be generated in the operation and maintenance module to complete the operation and maintenance of the target task.
[0043] Optionally, for example, a big data middle platform system is responsible for managing the company's database backup function, and database backup needs to be performed regularly to ensure data security. With the development of the business, the original backup strategy needs to be updated to improve efficiency and security. First, the data development module obtains the task list in the product package when the developer develops the database backup function. This task list records all target tasks for implementing the database backup function. Then, based on the target identification information in the task list, the data development module determines the second task that needs to be updated from the multiple first tasks (i.e., the current database backup task) currently running in the operation and maintenance module. The identification information of this second task is included in the target identification information, indicating that it is a task that needs to be updated. After determining that the second task needs to be updated, the data development module stops the operation of the task to ensure that the ongoing backup task will not be interfered with during the update process. Then, the data development module retrieves the updated database backup task (i.e., the target task) from the task list and submits it to the operation and maintenance module. This new task includes an optimized backup strategy, such as increasing the backup frequency, improving the data encryption method, etc.
[0044] The executor of the above steps in this embodiment may be a terminal, a server, a specific processor provided in the terminal or the server, or a processor or processing device provided relatively independently from the terminal or the server, but is not limited thereto, for example, a data development module in a big data middleware system.
[0045] Through the above steps, based on the target identification information of multiple target tasks in the task list of the product package, the second task is determined from the multiple first tasks currently running in the operation and maintenance module, wherein the target identification information includes the identification of the second task, and the operation and maintenance module is used to run the task submitted to the operation and maintenance module; stop running the second task, and submit multiple target tasks to the operation and maintenance module to instruct the operation and maintenance module to run each target task. When running the target task, it is determined that there is no second task running in the operation and maintenance module through the target identification information of the multiple target tasks in the task list. Therefore, the problem that the running task cannot be automatically scheduled in the related art is solved, and the effect of automatically scheduling the running task is achieved.
[0046] In an exemplary embodiment, the task list includes at least one of the following lists: a real-time task list, wherein the real-time task list records real-time tasks for realizing a first target function; an offline task list, wherein the offline task list records offline tasks for realizing a second target function; when the task list includes the real-time task list, after determining the second task from the multiple first tasks currently running by the operation and maintenance module based on the target identification information of the multiple target tasks, it also includes: recording the information of the second task to generate a list to be stopped.
[0047] Optionally, the target function includes but is not limited to the first target function and the second target function. A real-time task is a computing mode for processing real-time data streams, which is used to efficiently calculate and analyze real-time data. It usually involves extracting, converting and calculating data from data streams, and outputting results immediately. Offline tasks are submitted for execution using offline scheduling, and are usually used for data processing tasks such as large-scale data cleaning, extraction, conversion, and loading.
[0048] Optionally, the information of the second task includes but is not limited to an identifier of the second task.
[0049] This embodiment identifies and records the tasks that need to be stopped and generates a list to be stopped, so as to achieve the purpose of quickly responding to and stopping the tasks that conflict with the target task based on the list, and releasing resources for other tasks to use. At the same time, the generation of the task list and the list to be stopped is automatically processed, which reduces manual intervention, improves the level of automation, and reduces the possibility of human error.
[0050] In an exemplary embodiment, when the task list includes the real-time task list, the second task is stopped, and the plurality of target tasks are submitted to the operation and maintenance module to instruct the operation and maintenance module to run each of the target tasks, including: stopping the second task in a predetermined stop order, and deleting the information of the second task that has been stopped from the list to be stopped; when it is determined that the information of the second task does not exist in the list to be stopped, the plurality of real-time tasks recorded in the real-time task list are submitted to the operation and maintenance module to instruct the operation and maintenance module to perform the following operations: recording the first real-time task that meets the target running state included in the plurality of real-time tasks into the list to be started; starting and running the first real-time task based on the startup information of the first real-time task recorded in the list to be started and the running configuration of the first real-time task included in the product package, wherein the startup information is used to describe the startup position of the first real-time task, the startup information is correspondingly recorded in the first real-time task, and the running configuration of the first real-time task is used to describe the abnormal retry mechanism of the real-time task.
[0051] Optionally, the startup position includes but is not limited to restarting, starting from the most recent save point, and starting from the most recent checkpoint. The abnormal retry mechanism includes but is not limited to the number of retries, the retry interval, the startup timeout, etc. The predetermined stop order includes but is not limited to the order of the second task in the list to be stopped and the priority of the second task. The running state of the real-time task includes but is not limited to not started, starting, running, stopping, stopped, and failed. The target running state includes but is not limited to starting, running, and failed.
[0052] Optionally, for example, the real-time task list includes three real-time tasks: real-time task 1-2.0, real-time task 2-2.0, and real-time task 3-1.0. The list to be stopped includes two second tasks: second task 1-1.0 and second task 2-1.0. The list to be stopped is looped, and the second task is stopped in a manner of generating a save point, wherein the stop operation is an asynchronous operation. The list to be stopped is looped, and the running status of the second task in the operation and maintenance module is checked, and the second task that has stopped running is deleted from the list to be stopped. When the list to be stopped is empty, the list of tasks to be submitted is looped, and real-time task 1-2.0, real-time task 2-2.0, and real-time task 3-1.0 are submitted to the operation and maintenance module. After being submitted to the operation and maintenance module, the operation and maintenance module queries the running status of the three real-time tasks from the product package when the operation and maintenance module is running, and records the real-time tasks 1-2.0 and 2-2.0 (i.e., the first real-time tasks) that are starting and running into the list to be started. Loop through the list to be started, and check whether there are save points for real-time tasks 1-2.0 and 2-2.0 in the product package. If so, run them according to the abnormal retry mechanism of the task in the product package and the startup method of starting from the most recent save point. If not, run them according to the abnormal retry mechanism of the task in the product package and the startup method of restarting.
[0053] This embodiment ensures smooth transition of task operation and avoids system instability caused by sudden stop or start of tasks by managing the list to be stopped and the list to be started. At the same time, by flexibly starting and stopping tasks according to the running status and configuration of tasks, it ensures the continuity of tasks and the consistency of data and reduces the loss or inconsistency of data caused by task failure.
[0054] In an exemplary embodiment, when the task list includes the offline task list, submitting the multiple target tasks to the operation and maintenance module to instruct the operation and maintenance module to run each target task includes: when the task type of the offline task is other types except the target task type, and the second task exists among the multiple first tasks currently run by the operation and maintenance module, submitting the dependency data of the offline task included in the product package to the storage module for storage, wherein the dependency data includes data for implementing the running of the offline task, and the first dependency data of the second task is stored in the storage module; submitting the offline task in the offline task list to the operation and maintenance module to instruct the operation and maintenance module to perform the following operations: obtaining the dependency data of the offline task from the storage module, and starting and running the offline task based on the dependency data and the running configuration of the offline task included in the product package, wherein the running configuration of the offline task is used to describe the scheduling configuration of the offline task.
[0055] Optionally, the dependency data of the offline task obtained by the operation and maintenance module from the storage module is obtained by copying the dependency data submitted by the data development module to the storage module for storage, such as Figure 3 shown.
[0056] Optionally, the operation and maintenance module generates a run record based on the number of times the offline task is run, and marks the version of the dependent data based on the number of submissions of the offline task. The operation and maintenance module clears the runs that have exceeded their life cycle. For example, the offline task 4-1.0 is submitted for the first time, the dependent file is obtained and marked as A, the run trigger is executed twice, and run records 1 and run records 2 are generated. Both run records 1 and run records 2 are bound to dependent file A. The offline task 4-2.0 is submitted again, the dependent file is generated and marked as B, the run trigger is executed once, and run record 3 is generated and bound to dependent file B. Run records 1 and 2 will be cleared by the operation and maintenance module when they exceed their life cycle. Run records that are no longer bound to dependent file A will also be cleared by the operation and maintenance module.
[0057] Optionally, dependent data and first dependent data include but are not limited to HIVE tables, HIVE functions, KAFKA events, files (jar, txt, py, csv and other formats). Scheduling configuration includes but is not limited to scheduling mode, blocking strategy (wait, overwrite current, discard current), retry configuration (number of failed retries) and run timeout (task running time limit) configuration, wherein the scheduling mode includes but is not limited to automatic scheduling, manual scheduling, dependent scheduling, event scheduling. The task type of offline tasks includes but is not limited to automatic scheduling type, manual scheduling type, dependent scheduling type, event scheduling type. The target task type can be a dependent scheduling type. The storage module can be a Hadoop Distributed File System (Hadoop Distributed File System, referred to as HDFS).
[0058] Optionally, for example, the offline task list includes two offline tasks of the automatic scheduling type: offline task 4-2.0 and offline task 5-2.0. The operation and maintenance module currently runs the first task including two second tasks: second task 4-1.0 and second task 5-1.0. The data development module submits the dependency data of offline task 4-2.0 and offline task 5-2.0 in the product package to HDFS for storage. At this time, HDFS stores the first dependency data of the second task 4-1.0 and second task 5-1.0 currently run by the operation and maintenance module. The operation and maintenance module runs the second task by calling the first dependency data in HDFS. The storage action of the data development module does not affect the current operation of the operation and maintenance module. The data development module submits offline task 4-2.0 and offline task 5-2.0 in the offline task list to the operation and maintenance module. The operation and maintenance module copies the dependency data of offline tasks 4-2.0 and 5-2.0 in HDFS, and starts and runs the offline tasks based on the copied dependency data and the running configuration of the offline tasks in the product package. At this time, the second tasks 4-1.0 and 5-1.0 in the operation and maintenance module have stopped.
[0059] This embodiment distinguishes the dependent data of the offline task and the first task to avoid the update operation of the dependent data by the data development module affecting the operation of the offline task in the operation and maintenance module, thereby achieving the purpose of updating the offline task without stopping the offline task.
[0060] Optionally, in the case that the above-mentioned task list includes the above-mentioned offline task list, after obtaining the task list included in the product package, the above-mentioned method also includes: in the case that the task type of the above-mentioned offline task is other types except the target task type, and the above-mentioned second task does not exist among the multiple first tasks currently running by the above-mentioned operation and maintenance module, submitting the dependency data of the above-mentioned offline task included in the above-mentioned product package to the storage module for storage, wherein the above-mentioned dependency data includes data for realizing the operation of the above-mentioned offline task; submitting the above-mentioned offline task to the above-mentioned operation and maintenance module to instruct the above-mentioned operation and maintenance module to perform the following operations: obtaining the dependency data of the above-mentioned offline task from the above-mentioned storage module, and starting and running the above-mentioned offline task based on the above-mentioned dependency data and the running configuration of the above-mentioned offline task included in the above-mentioned product package, wherein the running configuration of the above-mentioned offline task is used to describe the scheduling configuration of the above-mentioned offline task.
[0061] Optionally, for example, the offline task list includes one offline task of the automatic scheduling type: offline task 6-1.0. The operation and maintenance module currently runs the first task that does not include offline task 6-1.0. The data development module submits the dependency data of offline task 6-1.0 in the product package to HDFS for storage. At this time, the first dependency data stored in HDFS does not include the first dependency data of offline task 6-1.0. The data development module submits offline task 6-1.0 in the offline task list to the operation and maintenance module. The operation and maintenance module copies a copy of the dependency data of offline task 6-1.0 in HDFS, and starts and runs the offline task based on the copied dependency data and the running configuration of the offline task in the product package.
[0062] In an exemplary embodiment, when the task list includes the offline task list, submitting the plurality of target tasks to the operation and maintenance module to instruct the operation and maintenance module to run each of the target tasks includes: when the task type of the offline task is the target task type, recording the offline task in a first dependency list, wherein the target task type is a task type that runs after other tasks are completed; obtaining a second dependency list of the offline tasks in the first dependency list from a product package, wherein the second dependency list records dependent tasks, and the offline tasks are run after the dependent tasks are completed; when the dependent tasks exist in the plurality of first tasks currently run by the operation and maintenance module, submitting the dependency data of the offline tasks included in the product package to a storage module for storage, wherein the dependency data includes data for implementing the running of the offline tasks; submitting the offline tasks in the first dependency list to the operation and maintenance module to instruct the operation and maintenance module to perform the following operations: obtaining the dependency data of the offline tasks from the storage module, and starting and running the offline tasks based on the dependency data and the running configuration of the offline tasks included in the product package, wherein the running configuration of the offline tasks is used to describe the scheduling configuration of the offline tasks.
[0063] Optionally, the data development module determines whether there are dependent tasks among the multiple first tasks currently run by the operation and maintenance module by executing the following steps: when the above-mentioned dependent tasks are not included in the first dependency list, directly determine whether there are dependent tasks among the multiple first tasks currently run by the operation and maintenance module. When the above-mentioned dependent tasks are included in the first dependency list, obtain a third dependency list of dependent tasks, wherein the third dependency list includes the first dependent task of the dependent task, and the above-mentioned dependent task is run after the above-mentioned first dependent task is completed, and use a recursive algorithm to sort out the task dependency relationship, and determine whether there are dependent tasks among the multiple first tasks currently run by the operation and maintenance module in turn according to the task dependency hierarchy.
[0064] Optionally, the target task type can be a dependent scheduling type: after the offline task is submitted for operation and maintenance, the scheduling is automatically triggered after the dependent task is completed. In the offline task dependency graph composed of the current offline task and dependent tasks, the head dependent task can only be of the automatic scheduling type, and there can be only one head offline task.
[0065] Optionally, for example, the offline task list includes 5 offline tasks of dependent scheduling type: offline task A-1.0, offline task B-1.0, offline task C-1.0, offline task D-1.0, and offline task E-1.0. The data development module records offline task A-1.0, offline task B-1.0, offline task C-1.0, offline task D-1.0, and offline task E-1.0 in the first dependency list. The data development module obtains the second dependency list of the above offline tasks in the first dependency list from the product package: the dependent tasks recorded in the second dependency lists of offline tasks B-1.0, offline task C-1.0, and offline task D-1.0 are all offline task A-1.0, and the dependent tasks recorded in the second dependency list of offline task E-1.0 are offline task B-1.0, offline task C-1.0, offline task D-1.0, and offline task F-1.0, among which the head dependent task offline task A-1.0 is of automatic scheduling type. First, the data development module determines that offline task A-1.0 is in the first dependency list and offline task A-1.0 is of the automatic scheduling type, submits the dependency data of offline task A-1.0 in the product package to the storage module for storage, and submits offline task A-1.0 to the operation and maintenance module. The operation and maintenance module obtains the dependency data of offline task A-1.0 from the storage module, starts and runs offline task A-1.0 based on the dependency data of offline task A-1.0 and the running configuration of offline task A-1.0 included in the product package, and deletes offline task A-1.0 from the first dependency list. Then, the data development module determines that offline task B-1.0 is in the first dependency list and the dependent task A-1.0 is running in the operation and maintenance module. The operation and maintenance module obtains the dependency data of offline task B-1.0 from the storage module, starts and runs offline task B-1.0 based on the dependency data of offline task B-1.0 and the running configuration of offline task B-1.0 included in the product package, and deletes offline task B-1.0 from the first dependency list. Then, the data development module determines that the offline task C-1.0 is in the first dependency list and the dependent task A-1.0 is running in the operation and maintenance module. The operation and maintenance module obtains the dependency data of the offline task C-1.0 from the storage module, and based on the dependency data of the offline task C-1.0 and the running configuration of the offline task C-1.0 included in the product package, starts and runs the offline task C-1.0, and deletes the offline task C-1.0 from the first dependency list. Then, the data development module determines that the offline task D-1.0 is in the first dependency list and the dependent task A-1.0 is running in the operation and maintenance module. The operation and maintenance module obtains the dependency data of the offline task D-1.0 from the storage module, and based on the dependency data of the offline task D-1.0 and the running configuration of the offline task D-1.0 included in the product package, starts and runs the offline task D-1.0, and deletes the offline task D-1.0 from the first dependency list.Finally, the data development module determines that the offline task E-1.0 is in the first dependency list and the dependent tasks B-1.0, offline task C-1.0, offline task D-1.0, and offline task F-1.0 are running in the operation and maintenance module. The operation and maintenance module obtains the dependency data of the offline tasks B-1.0, offline task C-1.0, offline task D-1.0, and offline task F-1.0 from the storage module, and starts and runs the offline task E-1.0 based on the dependency data of the offline task E-1.0 and the running configuration of the offline task E-1.0 included in the product package, and deletes the offline task E-1.0 from the first dependency list.
[0066] This embodiment ensures that tasks are executed in the correct order by clarifying the dependencies between tasks, avoiding operation errors or failures caused by unfinished dependent tasks. At the same time, automated task scheduling and dependency management reduce the possibility of human operation errors, thereby improving operation stability and reliability.
[0067] In an exemplary embodiment, the storage module stores the first dependency data of the second task, and the method further includes: the operation and maintenance module uses the first dependency data to run the second task; when the operation and maintenance module receives the offline task in the submitted offline task list, the operation and maintenance module stops running the second task, and runs the offline task based on the dependency data of the offline task stored in the storage module.
[0068] The present invention will be described below in conjunction with specific embodiments:
[0069] like Figure 4 As shown, Figure 4 This is a flowchart of a method for running a task in a specific embodiment of the present application:
[0070] S402, when the product package that realizes the target function is exported from the developer's big data middle platform system, the startup information, dependency data, and running configuration of the real-time task, and the dependency data and running configuration of the offline task are recorded in the product package.
[0071] S404, when the product package is installed into the customer's big data middle platform system to achieve the target function, the dependent data of offline tasks and real-time tasks are installed, such as HIVE tables, HIVE functions, KAFKA events, files (jar, txt, py, csv, etc. formats), etc. Install offline tasks and real-time tasks: if there is no task with the same name in the current project in the data development module, add a new task; if there is a task with the same name, update the task.
[0072] S406, automatically submit the real-time task to the operation and maintenance module, and start the operation according to the startup information, dependency data, and operation configuration of the real-time task in the product package, such as Figure 5 As shown, Figure 5 This is a flowchart of a method for running a real-time task according to a specific embodiment of the present application:
[0073] S502, start.
[0074] S504, the data development module obtains a real-time task list from the product package.
[0075] S506, judging whether to traverse the real-time tasks in the real-time task list, if yes, go to S526, otherwise go to S508.
[0076] S508: Obtain the real-time tasks in the real-time task list.
[0077] S510, determine whether there is a second task with the same name in the operation and maintenance mode, if yes, go to S512, otherwise go to S506.
[0078] S512, whether the status of the second task is running, if yes, go to S514, otherwise go to S506.
[0079] S514: Record the running second task into a to-be-stopped list.
[0080] S516, recording information of a second task with the same name as the real-time task in the real-time task list among the tasks running in the operation and maintenance module, generating a to-be-stopped list, and completing the statistics of the to-be-stopped list.
[0081] S518, looping through the list to be stopped, and stopping the second task in a manner of generating a save point, wherein the stop operation is an asynchronous operation.
[0082] S520, whether the to-be-stopped list is empty, if so, go to S528, otherwise go to S522.
[0083] S522: Obtain a second task in the to-be-stopped list.
[0084] S524, check whether the running status of the second task in the operation and maintenance module is stopped, if yes, go to S526, otherwise go to S520.
[0085] S526: Delete the stopped second task from the to-be-stopped list.
[0086] S528, the list to be stopped is empty, and the stop operation is completed.
[0087] S530, check whether the traversal of the real-time task list is completed, if yes, go to S540, otherwise go to S532.
[0088] S532, obtaining real-time tasks and submitting them to the operation and maintenance module;
[0089] S534, the operation and maintenance module obtains the running status of the real-time task from the product package when the operation and maintenance module is running.
[0090] S536, determine whether the running state is the target running state, if yes, go to S538.
[0091] S538, recording the real-time tasks whose running status is the target running status: starting, running, or failed into a to-be-started list.
[0092] S540, the real-time task list is traversed and all real-time tasks have been submitted to the operation and maintenance module.
[0093] S542, the operation and maintenance module checks whether the list to be started is completed. If yes, go to S552, otherwise go to S544.
[0094] S544, obtaining the first real-time task in the to-be-started list.
[0095] S546, querying from the product package whether there is a save point for the first real-time task.
[0096] S548, if it exists, run according to the abnormal retry mechanism of the task in the product package and the startup method of starting from the most recent save point; if it does not exist, run according to the abnormal retry mechanism of the task in the product package and the startup method of restarting.
[0097] S550, the first task is started and completed.
[0098] S552: The list to be started is traversed and all first tasks are started.
[0099] S554, end.
[0100] S408, according to the dependency data and operation configuration of the offline task in the product package, automatically submit the offline task to the operation and maintenance management module and schedule it for operation, such as Figure 6 As shown, Figure 6 This is the process of the offline task operation method according to the specific embodiment of the present application. Figure 1 :
[0101] S602, start.
[0102] S604, the data development module obtains an offline task list from the product package.
[0103] S606, determine whether the traversal of the offline task list is completed, if yes, go to S616, otherwise go to S608.
[0104] S608: The offline task list is not traversed yet, and offline tasks in the offline task list are obtained.
[0105] S610, determine whether the type of the offline task is a scheduling-dependent type, if yes, go to S612, otherwise go to S614.
[0106] S612: The data development module puts the offline task into the first dependency list.
[0107] S614: Submit the offline task to the operation and maintenance module.
[0108] S616, the offline task list is traversed and the first dependency list statistics are completed.
[0109] S618, determine whether the first dependency list is empty, if so, go to S638, otherwise go to S620.
[0110] S620, obtaining the first offline task in the first dependency list;
[0111] S622, obtaining a second dependency list of the offline task from the product package, wherein the second dependency list records the dependent tasks that the offline task depends on, and the offline task is automatically triggered to run after the dependent tasks are completed.
[0112] S624, check whether the traversal of the second dependency list is completed, if yes, go to S626, otherwise go to S630.
[0113] S626, traversing the second dependency list is completed, the data development module submits the dependency data of the offline task in the product package to the storage module for storage, and submits the offline task to the operation and maintenance module. The operation and maintenance module obtains the dependency data of the offline task from the storage module, and starts and runs the offline task based on the offline task dependency data and the running configuration of the offline task included in the product package.
[0114] S628: Delete the offline task from the first dependency list.
[0115] S630: Traversing the second dependency list is not completed, and obtaining dependent tasks in the second dependency list.
[0116] S632, determine whether the dependent task exists in the first dependency list, that is, whether the dependent task is an offline task in the first dependency list. If so, repeat and start executing S622 to determine whether the dependent task on which the dependent task depends exists in the operation and maintenance module. Otherwise, go to S634.
[0117] S634, determine whether the dependent task exists in the operation and maintenance module, if yes, go to S624 to traverse the next dependent task in the second dependency list, otherwise go to S636.
[0118] S636, error printing log, the offline task cannot be submitted.
[0119] S638: The first dependency list is empty and the task submission is completed.
[0120] S640, end.
[0121] Among them, it is determined that the type of offline task is not dependent on the scheduling type, and the offline task is submitted to the operation and maintenance module. The specific steps are as follows: Figure 7 As shown, Figure 7 This is the process of the offline task operation method according to the specific embodiment of the present application. Figure 2 :
[0122] S702, start;
[0123] S704, obtaining an offline task list;
[0124] S706, check whether the offline task list is completed, if yes, go to S714, otherwise go to S708;
[0125] S708, the data development module queries the operation and maintenance module to see if there is a second task with the same name;
[0126] S710, if it exists, the data development module submits the dependency data of the offline tasks in the product package to HDFS for storage. At this time, the first dependency data of the second task currently run by the operation and maintenance module is stored in HDFS. The operation and maintenance module runs the second task by calling the first dependency data in HDFS. The storage action of the data development module does not affect the current operation of the operation and maintenance module. The data development module submits the offline tasks in the offline task list to the operation and maintenance module. If it does not exist, the data development module submits the dependency data of the offline tasks in the product package to HDFS for storage, and submits the offline tasks in the offline task list to the operation and maintenance module.
[0127] The dependency data of offline tasks obtained by the operation and maintenance module from the storage module is obtained by copying the dependency data in the data development file submitted by the data development module to the storage module. The operation and maintenance module generates operation records based on the number of offline task runs, and marks the version of the dependency data based on the number of offline task submissions. The operation and maintenance module clears the runs that have exceeded their life cycle, such as Figure 3 shown.
[0128] S712, the operation and maintenance module copies a copy of the dependency data of the offline task in HDFS, and starts and runs the offline task based on the copied dependency data and the running configuration of the offline task in the product package. At this time, the second task in the operation and maintenance module has stopped running.
[0129] S714, task submission scheduling is completed.
[0130] S716, end.
[0131] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0132] In the present embodiment, a task operation device is also provided, and the device is used to implement the above-mentioned embodiment and preferred implementation mode, and the description has been made no further. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.
[0133] Figure 8 is a structural block diagram of a task running device according to an embodiment of the present application, such as Figure 8 As shown, the device comprises:
[0134] A first acquisition module 802 is used to acquire a task list included in the product package, wherein the task list records a plurality of target tasks for achieving a target function;
[0135] A first determination module 804 is used to determine a second task from a plurality of first tasks currently being run by the operation and maintenance module based on target identification information of the plurality of target tasks, wherein the target identification information includes an identification of the second task, and the operation and maintenance module is used to run the task submitted to the operation and maintenance module;
[0136] The first running module 806 is used to stop running the second task, and submit the plurality of target tasks to the operation and maintenance module to instruct the operation and maintenance module to run each of the target tasks.
[0137] In an exemplary embodiment, the task list includes at least one of the following lists: a real-time task list, wherein the real-time task list records real-time tasks for realizing a first target function; an offline task list, wherein the offline task list records offline tasks for realizing a second target function; the device further includes: a first recording module, which is used to, when the task list includes the real-time task list, record information of the second task after determining the second task from the multiple first tasks currently running by the operation and maintenance module based on the target identification information of the multiple target tasks, so as to generate a list to be stopped.
[0138] In an exemplary embodiment, the first running module 806 includes: a first stop submodule, used to stop the second task in a predetermined stop order, and delete the information of the second task that has stopped running from the to-be-stopped list; a first submission submodule, used to submit the multiple real-time tasks recorded in the real-time task list to the operation and maintenance module when it is determined that the information of the second task does not exist in the to-be-stopped list, so as to instruct the operation and maintenance module to perform the following operations: record the first real-time task that meets the target running state included in the multiple real-time tasks into the to-be-started list; start and run the first real-time task based on the startup information of the first real-time task recorded in the to-be-started list and the running configuration of the first real-time task included in the product package, wherein the startup information is used to describe the startup position of the first real-time task, the startup information is correspondingly recorded in the first real-time task, and the running configuration of the first real-time task is used to describe the abnormal retry mechanism of the real-time task.
[0139] In an exemplary embodiment, the first running module 806 includes: a first storage submodule, which is used to submit the dependency data of the offline task included in the product package to the storage module for storage when the task type of the offline task is other types except the target task type and the second task exists among the multiple first tasks currently running by the operation and maintenance module, wherein the dependency data includes data for realizing the operation of the offline task, and the first dependency data of the second task is stored in the storage module; a second submission submodule, which is used to submit the offline task in the offline task list to the operation and maintenance module to instruct the operation and maintenance module to perform the following operations: obtain the dependency data of the offline task from the storage module, and start and run the offline task based on the dependency data and the running configuration of the offline task included in the product package, wherein the running configuration of the offline task is used to describe the scheduling configuration of the offline task.
[0140] In an exemplary embodiment, the first running module 806 includes: a first recording submodule, which is used to record the offline task in a first dependency list when the task type of the offline task is a target task type, wherein the target task type is a task type that is run after other tasks are completed; a first obtaining submodule, which is used to obtain a second dependency list of the offline task in the first dependency list from a product package, wherein the second dependency list records dependent tasks, and the offline task is run after the dependent tasks are completed; a third storage submodule, which is used to submit the dependency data of the offline task included in the product package to the storage module for storage when the dependent task exists in multiple first tasks currently run by the operation and maintenance module, wherein the dependency data includes data for implementing the running of the offline task; a fourth submitting submodule, which is used to submit the offline task in the first dependency list to the operation and maintenance module to instruct the operation and maintenance module to perform the following operations: obtaining the dependency data of the offline task from the storage module, and starting and running the offline task based on the dependency data and the running configuration of the offline task included in the product package, wherein the running configuration of the offline task is used to describe the scheduling configuration of the offline task.
[0141] In an exemplary embodiment, the storage module stores the first dependency data of the second task, and the device further includes: the operation and maintenance module uses the first dependency data to run the second task; when the operation and maintenance module receives the offline task in the submitted offline task list, the operation and maintenance module stops running the second task, and runs the offline task based on the dependency data of the offline task stored in the storage module.
[0142] An embodiment of the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0143] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0144] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0145] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0146] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0147] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0148] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0149] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A task running method, characterized in that: include: Acquire a task list included in the product package, wherein the task list records a plurality of target tasks for achieving target functions; Determining a second task from a plurality of first tasks currently being run by an operation and maintenance module based on target identification information of the plurality of target tasks, wherein the target identification information includes an identification of the second task, and the operation and maintenance module is used to run the task submitted to the operation and maintenance module; Stop running the second task, and submit the plurality of target tasks to the operation and maintenance module to instruct the operation and maintenance module to run each of the target tasks.
2. The method according to claim 1, characterized in that The task list includes at least one of the following lists: a real-time task list, wherein the real-time task list records the real-time tasks for realizing the first target function; an offline task list, wherein the offline task list records the offline tasks for realizing the second target function; In the case where the task list includes the real-time task list, after determining the second task from the plurality of first tasks currently being run by the operation and maintenance module based on the target identification information of the plurality of target tasks, the method further includes: The information of the second task is recorded to generate a to-be-stopped list.
3. The method according to claim 2, characterized in that In a case where the task list includes the real-time task list, stopping the second task, and submitting the plurality of target tasks to the operation and maintenance module to instruct the operation and maintenance module to run each of the target tasks, comprising: Stop the second task according to a predetermined stop order, and delete the information of the stopped second task from the to-be-stopped list; When it is determined that the information of the second task does not exist in the to-be-stopped list, the multiple real-time tasks recorded in the real-time task list are submitted to the operation and maintenance module to instruct the operation and maintenance module to perform the following operations: recording a first real-time task that meets the target operating state and is included in the multiple real-time tasks into a to-be-started list; starting and running the first real-time task based on the startup information of the first real-time task recorded in the to-be-started list and the running configuration of the first real-time task included in the product package, wherein the startup information is used to describe the startup position of the first real-time task, the startup information is correspondingly recorded in the first real-time task, and the running configuration of the first real-time task is used to describe the abnormal retry mechanism of the real-time task.
4. The method according to claim 2, characterized in that: In a case where the task list includes the offline task list, submitting the plurality of target tasks to the operation and maintenance module to instruct the operation and maintenance module to run each of the target tasks includes: When the task type of the offline task is other than the target task type, and the second task exists among the multiple first tasks currently run by the operation and maintenance module, the dependency data of the offline task included in the product package is submitted to the storage module for storage, wherein the dependency data includes data for implementing the running of the offline task, and the first dependency data of the second task is stored in the storage module; Submit the offline task in the offline task list to the operation and maintenance module to instruct the operation and maintenance module to perform the following operations: obtain dependency data of the offline task from the storage module, and start and run the offline task based on the dependency data and the running configuration of the offline task included in the product package, wherein the running configuration of the offline task is used to describe the scheduling configuration of the offline task.
5. The method according to claim 2, characterized in that: In a case where the task list includes the offline task list, submitting the plurality of target tasks to the operation and maintenance module to instruct the operation and maintenance module to run each of the target tasks includes: In the case where the task type of the offline task is a target task type, recording the offline task into a first dependency list, wherein the target task type is a task type that is executed after other tasks are completed; Acquire a second dependency list of the offline task in the first dependency list from the product package, wherein the second dependency list records dependent tasks, and the offline task runs after the dependent tasks are completed; In the case where the dependent task exists in the multiple first tasks currently being run by the operation and maintenance module, submitting the dependent data of the offline task included in the product package to the storage module for storage, wherein the dependent data includes data for implementing the running of the offline task; Submit the offline task in the first dependency list to the operation and maintenance module to instruct the operation and maintenance module to perform the following operations: obtain the dependency data of the offline task from the storage module, and start and run the offline task based on the dependency data and the running configuration of the offline task included in the product package, wherein the running configuration of the offline task is used to describe the scheduling configuration of the offline task.
6. The method according to claim 4, characterized in that The storage module stores first dependency data of the second task, and the method further includes: The operation and maintenance module uses the first dependency data to run the second task; When receiving the offline task in the submitted offline task list, the operation and maintenance module stops running the second task, and runs the offline task based on the dependency data of the offline task stored in the storage module.
7. A task running device, characterized in that: include: A first acquisition module is used to acquire a task list included in the product package, wherein the task list records a plurality of target tasks for achieving target functions; a first determination module, configured to determine a second task from a plurality of first tasks currently being run by an operation and maintenance module based on target identification information of the plurality of target tasks, wherein the target identification information includes an identification of the second task, and the operation and maintenance module is configured to run the task submitted to the operation and maintenance module; The first running module is used to stop running the second task, and submit a plurality of the target tasks to the operation and maintenance module to instruct the operation and maintenance module to run each of the target tasks.
8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 6 when executed by a processor.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 6 are implemented.