Task migration method and device, equipment, storage medium and computer program product

Through task splitting, mapping and encapsulation methods, the problem of low task migration efficiency between different scheduling systems is solved, and the consistency of task configuration and migration efficiency are improved.

CN119248442APending Publication Date: 2025-01-03CHINA TOWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411255296.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

When migrating tasks between different scheduling systems, the existing technology is inefficient, which is prone to inaccurate configuration and repeated migration problems, resulting in low migration efficiency.

Method used

Automatic task migration is achieved by splitting the task into subtasks, obtaining the information and dependencies of the subtasks, and mapping and encapsulating the task mapping rules between different scheduling systems.

Benefits of technology

Ensure consistency of task configuration, reduce configuration errors, and improve migration efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248442A_ABST
    Figure CN119248442A_ABST
Patent Text Reader

Abstract

The invention discloses a task migration method and device, equipment, a storage medium and a computer program product, and belongs to the technical field of computers. The method comprises the steps of receiving a migration request of a first task, splitting the first task running in a first scheduling system into at least one first sub-task, and obtaining task information of the at least one first sub-task and a dependency relationship between the first sub-tasks; mapping the task information of the at least one first subtask into the task information of the at least one second subtask according to a task mapping rule between the first scheduling system and the second scheduling system; and packaging the task information of the at least one second sub-task according to the dependency relationship among the first sub-tasks to obtain a second task running in the second scheduling system. Through the mode, the consistency of task configuration in different scheduling systems can be ensured, and the task migration efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular, to a task migration method, apparatus, device, storage medium, and computer program product. Background Art

[0002] In actual business scenarios, multiple task scheduling systems are usually used to manage and execute data processing, analysis, and other scheduled tasks. Oozie and DolphinScheduler are two common task scheduling systems. In some specific scenarios, users need to migrate tasks in the Oozie system to the DolphinScheduler system.

[0003] Due to the differences in configuration and task management between different scheduling systems, when migrating tasks from the Oozie system to the DolphinScheduler system, it is often necessary to manually generate new tasks based on the configuration of the old tasks. This not only consumes a lot of manpower and time, but also easily leads to inaccurate configuration of migration tasks and repeated migration, resulting in low migration efficiency. Summary of the invention

[0004] The embodiments of the present application provide a task migration method, apparatus, device, storage medium and computer program product to at least solve the problem of low migration efficiency of tasks in different scheduling systems in the related art.

[0005] In order to solve the above technical problems, this application is implemented as follows:

[0006] In the first aspect, an embodiment of the present application provides a task migration method, including: receiving a migration request for a first task, splitting the first task running in a first scheduling system into at least one first subtask, obtaining task information of the at least one first subtask and the dependency relationship between each of the first subtasks; mapping the task information of the at least one first subtask into task information of at least one second subtask according to a task mapping rule between the first scheduling system and the second scheduling system; and encapsulating the task information of the at least one second subtask according to the dependency relationship between each of the first subtasks to obtain a second task running in the second scheduling system.

[0007] In the second aspect, an embodiment of the present application provides a task migration device, including: a task splitting module, used to receive a migration request for a first task, split the first task running in a first scheduling system into at least one first subtask, and obtain task information of the at least one first subtask and the dependency relationship between each of the first subtasks; a task mapping module, used to map the task information of the at least one first subtask into task information of at least one second subtask according to the task mapping rules between the first scheduling system and the second scheduling system; an information encapsulation module, used to encapsulate the task information of the at least one second subtask according to the dependency relationship between each of the first subtasks, to obtain a second task running in the second scheduling system.

[0008] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect above are implemented.

[0009] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect above are implemented.

[0010] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the steps of the method described in the first aspect above.

[0011] In an embodiment of the present application, a migration request of a first task is received, the first task running in the first scheduling system is split into at least one first subtask, and the task information of at least one first subtask and the dependency relationship between each first subtask are obtained; according to the task mapping rule between the first scheduling system and the second scheduling system, the task information of at least one first subtask is mapped into the task information of at least one second subtask; according to the dependency relationship between each first subtask, the task information of at least one second subtask is encapsulated to obtain the second task running in the second scheduling system. In this way, by splitting, mapping and encapsulating tasks to realize automatic migration of tasks in different scheduling systems, the consistency of task configuration in different scheduling systems can be ensured, the possibility of configuration errors or inconsistencies during task migration can be reduced, and the efficiency and accuracy of task migration can be improved.

[0012] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0014] Figure 1 A schematic diagram of a process flow of a task migration method provided in an embodiment of the present application is shown;

[0015] Figure 2 Another flowchart of the task migration method provided in the embodiment of the present application is shown;

[0016] Figure 3 A schematic diagram of the structure of a task migration system provided in an embodiment of the present application is shown;

[0017] Figure 4 Shows Figure 3 The architecture diagram of the task migration system in the task migration system;

[0018] Figure 5 A schematic diagram of the structure of a task migration device provided in an embodiment of the present application is shown;

[0019] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0020] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0021] In this field, there are differences in configuration and task management between different scheduling systems. For example, migrating tasks from Oozie to DolphinScheduler involves differences in configuration, task definition, and scheduling mechanisms. Currently, scheduling task migration is often performed manually by comparing the original task configuration. This method has at least the following problems:

[0022] (1) The efficiency of scheduling task migration is low;

[0023] (2) Scheduling task migration is not accurate enough. When migrating scheduling tasks, people need to constantly check the task configuration information, which can easily lead to inaccurate migration task configuration and repeated migration.

[0024] (3) The scheduling task migration process is cumbersome. During the manual migration process, the configuration files in Oozie and DolphinScheduler need to be manually mapped, which is a cumbersome process.

[0025] In response to the above-mentioned problems existing in the process of task migration between different scheduling systems, an embodiment of the present application provides a task migration method, which realizes automatic migration of tasks in different scheduling systems by splitting, mapping and encapsulating tasks, so as to ensure the consistency of task configuration in different scheduling systems and improve the efficiency and accuracy of task migration.

[0026] Figure 1 A flow chart of a task migration method provided in an embodiment of the present application is shown. The execution subject of the method may be a terminal device or a server, wherein the terminal device may be a device such as a personal computer, or a mobile terminal device such as a mobile phone or a tablet computer, and the terminal device may be a terminal device used by a user. The server may be an independent server, or a server cluster composed of multiple servers, and the server may be a background server of a certain business, or a background server of a certain platform or application (for example, a task scheduling system, a task management platform, etc.). In the embodiment of the present application, the execution subject is taken as an example to illustrate. For the case of a terminal device, it can be processed according to the following related content, which will not be repeated here. As shown in the figure, the method 100 may include the following steps:

[0027] Step 101: receiving a migration request of a first task, splitting the first task running in a first scheduling system into at least one first subtask, and acquiring task information of the at least one first subtask and dependencies between the first subtasks.

[0028] The first scheduling system is an Oozie system for scheduling the first task.

[0029] In an exemplary embodiment, when it is necessary to migrate the first task, the user terminal sends a migration request for the first task to the server; the server receives the migration request for the first task, splits the first task running in the Oozie system into at least one first subtask, obtains task information such as the task type and task parameters of at least one first subtask and the dependency relationship between each first subtask, so as to perform subsequent task migration.

[0030] Step 102: Mapping the task information of the at least one first subtask into the task information of at least one second subtask according to the task mapping rule between the first scheduling system and the second scheduling system.

[0031] The second scheduling system is a DolphinScheduler system for scheduling the second task.

[0032] In an exemplary embodiment, the server may obtain the task mapping rule between the Oozie system and the DolphinScheduler system from a pre-stored mapping rule configuration file, and map the task information of at least one first subtask into the task information of at least one second subtask according to the task mapping rule.

[0033] Step 103: Encapsulate the task information of the at least one second subtask according to the dependency relationship between the first subtasks to obtain a second task running in the second scheduling system.

[0034] In an exemplary embodiment, after mapping the task information of at least one first subtask into the task information of at least one second subtask, the server encapsulates the task information of at least one second subtask according to the dependency relationship between the first subtasks in the Oozie system to obtain a second task, so as to ensure that the second task can be correctly executed in the DolphinScheduler system.

[0035] In this way, by splitting, mapping and encapsulating tasks to achieve automatic migration of tasks in different scheduling systems, the consistency of task configuration in different scheduling systems can be ensured, the possibility of configuration errors or inconsistencies during task migration can be reduced, and the efficiency and accuracy of task migration can be improved.

[0036] In a possible implementation, in the above step 101, before splitting the first task running in the first scheduling system into at least one first subtask, the step further includes:

[0037] By parsing the task configuration file of the first scheduling system, a first task running in the first scheduling system is obtained.

[0038] In an exemplary embodiment, in the Oozie system, the task configuration file is usually stored in XML format, and contains detailed information of the task, such as task name, type, scheduling period, and dependencies, etc. By parsing the task configuration file of the Oozie system, basic information of the first task can be obtained, including information such as task name, scheduling period, dependencies, task type, and task parameters.

[0039] Since the task configuration file of the Oozie system is in XML format, you can choose a suitable XML parsing tool, such as DOM (Document Object Model) parsing, which loads the entire XML document into memory and is suitable for processing small XML files; SAX (Simple API for XML) parsing, which reads XML files line by line and is suitable for processing large XML files.

[0040] In a possible implementation, the task information of the first subtask includes a task type of the first subtask and a task parameter of the first subtask;

[0041] In the above step 102, according to the task mapping rule between the first scheduling system and the second scheduling system, mapping the task information of the at least one first subtask into the task information of the at least one second subtask includes:

[0042] For each first subtask, determining a task type mapping relationship between the first subtask and a second subtask according to the task type of the first subtask;

[0043] A task parameter conversion rule corresponding to the task type mapping relationship is obtained from the task mapping rule between the first scheduling system and the second scheduling system, and the task parameters of the first subtask are converted into the task parameters of the second subtask according to the task parameter conversion rule.

[0044] In an exemplary embodiment, in order to realize the automatic migration of tasks from the Oozie system to the DolphinScheduler system, a task type mapping relationship between the two can be established, which specifically includes the following steps:

[0045] Step 1021: Analyze task types: obtain the task types supported by the Oozie system and the DolphinScheduler system, such as Shell, Hive, Spark, MapReduce, etc.;

[0046] Step 1022: define mapping rules: map the task type of the Oozie system to the corresponding DolphinScheduler task type, for example, the Shell task of Oozie is mapped to the Shell task of DolphinScheduler, and determine the task parameter conversion rules corresponding to the task type mapping relationship;

[0047] Optionally, after defining the mapping rules, you can also include:

[0048] Step 1023: Create a task type mapping table to map Oozie task types to DolphinScheduler task types. In this way, it can be ensured that each Oozie task type can find the corresponding DolphinScheduler task type.

[0049] After establishing the task type mapping relationship and its corresponding task parameter conversion rule, converting the parsed first task into the second task specifically includes the following steps:

[0050] Step 1024: read the first task from the configuration file of the Oozie system, and split the first task into at least one first subtask; parse each first subtask to identify its task type, task parameters, and dependency relationship between the first subtasks;

[0051] Step 1025: According to the above task type mapping table, convert each first subtask into a corresponding second subtask in sequence;

[0052] Specifically, according to the task type of the first subtask, determine the task type mapping relationship between the first subtask and the second subtask, for example, map Oozie's Shell task to DolphinScheduler's Shell task, and map Oozie's Hive task to DolphinScheduler's Hive task; each task type mapping relationship corresponds to a task parameter conversion rule, and the task parameters of the first subtask are converted one by one into the corresponding task parameters of the second subtask according to the task parameter conversion rule. For each second subtask, create the task definition required by DolphinScheduler.

[0053] In a possible implementation, in the above step 103, according to the dependency relationship between the first subtasks, the task information of the at least one second subtask is encapsulated to obtain the second task running in the second scheduling system, including:

[0054] According to the dependency relationship between each of the first subtasks, determine the target dependency relationship of at least one second subtask; generate a task definition file according to the second scheduling system configuration template and the target dependency relationship; import the task definition file into the second scheduling system to obtain a second task running in the second scheduling system.

[0055] In an exemplary embodiment, in the process of migrating tasks from the Oozie system to the DolphinScheduler system, it is necessary to generate the DolphinScheduler task node definition based on the parsed and mapped task information, and the dependency between task nodes is the key to ensure that tasks are executed in the correct order. Therefore, the dependency between each first subtask in Oozie is converted into the target dependency between each second subtask in the DolphinScheduler system; and the task definition file is generated according to the DolphinScheduler system configuration template and the target dependency. For example, extract the task node definition and dependency from the parsed Oozie task information, use the DolphinScheduler configuration template to convert the task node definition and dependency into a task definition file in JSON or YAML format, use Python's requests library through the Application Program Interface (API) provided by the DolphinScheduler system, import the task definition file into the DolphinScheduler system, and obtain the second task running in the DolphinScheduler system, wherein the task node definition file includes the DolphinScheduler task node definition, the dependency between task nodes, and the scheduling strategy, etc. In this way, it can be ensured that the second task can be executed in the DolphinScheduler system in the expected order and conditions.

[0056] In a possible implementation, after importing the task definition file into the second scheduling system to obtain the second task running in the second scheduling system, the method further includes:

[0057] Obtaining a task execution log of the second task during the execution of the second scheduling system;

[0058] The task execution status of the second task is verified according to the task execution log to obtain a verification result of the second task.

[0059] In an exemplary embodiment, after generating the task definition file of the DolphinScheduler system, it is imported into the DolphinScheduler system so that the system can identify and execute the second task. After importing the task definition file, the task execution status of the second task can also be verified according to the task execution log to obtain the verification result of the second task to ensure that the task can be executed normally in the DolphinScheduler system. For example, manually triggering a task: select a task in the Web interface, click the "Manual Run" button, and observe the execution of the task; while the second task is running in the DolphinScheduler system, obtain the task execution log, and verify the task execution status of the second task according to the task execution log, for example, check whether the script is executed normally and whether there are any errors; confirm that the tasks are executed in the correct order and whether the dependency configuration is incorrect; confirm that the task runs automatically within the predetermined time or period and whether the scheduling strategy is configured correctly, thereby obtaining the verification result of the second task.

[0060] Figure 2 Another flow chart of the task migration method provided in an embodiment of the present application is shown. Taking the first scheduling system as the Oozie system and the second scheduling system as the DolphinScheduler system, the first task in the Oozie system is migrated to the DolphinScheduler system as an example. As shown in the figure, the task migration method may include the following steps:

[0061] Step 201: Obtain a first task running in the first scheduling system by parsing a task configuration file of the first scheduling system. For example, the task configuration file of the Oozie system is parsed to obtain basic information of the first task, including task name, scheduling period, dependency, task type, task parameters, etc.;

[0062] Step 202: Establish a task type mapping relationship between the Oozie system and the DolphinScheduler system;

[0063] Step 203: according to the task type mapping relationship, the task parameters of each first subtask split from the Oozie task are converted into the task parameters of the second subtask in sequence; according to the dependency relationship between each first subtask, the task information of at least one second subtask is encapsulated to obtain the DolphinScheduler task;

[0064] Step 204: Generate a task definition file according to the task information of the DolphinScheduler task, wherein the task definition file includes a task node definition, dependencies between task nodes, a scheduling strategy, etc.;

[0065] Step 205: Import the task definition file into the DolphinScheduler system so that the DolphinScheduler system can recognize and execute the DolphinScheduler task;

[0066] Step 206: Obtain the task execution log of the DolphinScheduler task during its operation, and verify the task execution status of the second task based on the task execution log to obtain the verification result of the second task, for example, verify the correctness of the task configuration, track the task operation, handle log errors and debug to ensure that the task can be executed normally in the DolphinScheduler system.

[0067] In a possible implementation, the above task migration method further includes:

[0068] Obtain log information from receiving a migration request of the first task to obtaining a second task running in the second scheduling system; and generate task migration information during the execution of the task migration method according to the log information.

[0069] In an exemplary embodiment, in the process of migrating tasks from the Oozie system to the DolphinScheduler system, detailed log information is recorded, and log information from receiving a migration request of a first task to obtaining a second task running in a second scheduling system is obtained; based on the log information, task migration information of the task migration method during execution is generated. The task migration information is very important for tracking the progress of migration, handling errors, and debugging. By recording detailed logs and generating error reports, the entire migration process is ensured to be transparent and traceable, and problems can be quickly solved, which is conducive to improving the efficiency and accuracy of task migration in the process of migrating tasks from the Oozie system to the DolphinScheduler system.

[0070] In an exemplary embodiment, Figure 3 A schematic diagram of the structure of a task migration system provided in an embodiment of the present application is shown. Figure 4 The architecture diagram of the task migration system is shown. As shown in the figure, the task migration system includes a portal 310, a server 320, an Oozie system 330 and a DolphinScheduler system 340; the server 320 is used to execute the above-mentioned task migration method, wherein the server 320 includes:

[0071] The task configuration parsing module 321 is used to receive the migration request of the Oozie task, and obtain the Oozie task running in the Oozie system 330 by parsing the task configuration file of the Oozie system 330;

[0072] The task configuration information conversion module 322 is used to convert the task configuration information of the Oozie task into the DolphinScheduler task; wherein the task configuration information conversion module includes a task mapping module, a task conversion module and a task configuration generation module;

[0073] The task mapping module is used to analyze the business type, that is, to obtain the task types supported by the Oozie system 330 and the DolphinScheduler system 340, and define mapping rules; and to map the parsed Oozie task type to the DolphinScheduler task type according to the mapping rules;

[0074] A task conversion module, used to map the task information of the first subtask into the task information of the second subtask according to the task mapping rule between the Oozie system 330 and the DolphinScheduler system 340, and process the target dependency relationship between the second subtasks to obtain the DolphinScheduler task;

[0075] A task configuration generation module, used to generate a DolphinScheduler task configuration file and create a specific task definition in the DolphinScheduler system 340;

[0076] The task deployment verification module 323 is used to import the task definition file into the DolphinScheduler system 340 through the API interface.

[0077] Optionally, it also includes:

[0078] The log and error handling module 324 is used to obtain the task execution log of the DolphinScheduler task during its operation in the DolphinScheduler system; verify the task execution status of the DolphinScheduler task according to the task execution log, and perform error handling.

[0079] Optionally, the portal 310 includes:

[0080] Oozie task display module 311, used to display Oozie tasks running in the Oozie system;

[0081] A migration task configuration module 312 is used to configure the migration task initiated by the user, obtain the migration request of the Oozie task, and send the migration request to the server 320;

[0082] The task migration information display module 313 is used to display the task migration information of the task migration method during the task migration process.

[0083] Figure 5 The structure diagram of the task migration device provided by the embodiment of the present application is shown. The task migration device implements the following Figure 1 or Figure 2 All or part of the contents of the illustrated embodiment, as shown in the figure, the task migration device 500 includes:

[0084] The task splitting module 510 is used to receive a migration request of a first task, split the first task running in the first scheduling system into at least one first subtask, and obtain task information of the at least one first subtask and dependencies between the first subtasks;

[0085] A task mapping module 520, configured to map the task information of the at least one first subtask into the task information of at least one second subtask according to a task mapping rule between the first scheduling system and the second scheduling system;

[0086] The information encapsulation module 530 is used to encapsulate the task information of the at least one second subtask according to the dependency relationship between the first subtasks to obtain the second task running in the second scheduling system.

[0087] In a possible implementation, the task splitting module 510, before being used to split the first task running in the first scheduling system into at least one first subtask, is further used to:

[0088] By parsing the task configuration file of the first scheduling system, a first task running in the first scheduling system is obtained.

[0089] In a possible implementation, the task information of the first subtask includes a task type of the first subtask and a task parameter of the first subtask; the task mapping module 520, when used to map the task information of the at least one first subtask into the task information of the at least one second subtask according to the task mapping rule between the first scheduling system and the second scheduling system, is specifically used to:

[0090] For each first subtask, determining a task type mapping relationship between the first subtask and a second subtask according to the task type of the first subtask;

[0091] A task parameter conversion rule corresponding to the task type mapping relationship is obtained from the task mapping rule between the first scheduling system and the second scheduling system, and the task parameters of the first subtask are converted into the task parameters of the second subtask according to the task parameter conversion rule.

[0092] In a possible implementation, the information encapsulation module 530, when used to encapsulate the task information of the at least one second subtask according to the dependency relationship between the first subtasks to obtain the second task running in the second scheduling system, is specifically used to:

[0093] Determining a target dependency relationship of the at least one second subtask according to the dependency relationships between the first subtasks;

[0094] Generate a task definition file according to the second scheduling system configuration template and the target dependency relationship;

[0095] The task definition file is imported into the second scheduling system to obtain a second task running in the second scheduling system.

[0096] In a possible implementation, the information packaging module 530, after being used to import the task definition file into the second scheduling system to obtain the second task running in the second scheduling system, is further used to:

[0097] Obtaining a task execution log of the second task during the execution of the second scheduling system;

[0098] The task execution status of the second task is verified according to the task execution log to obtain a verification result of the second task.

[0099] In a possible implementation, the task migration device 500 further includes:

[0100] The information generation module is used to obtain log information from receiving a migration request of a first task to obtaining a second task running in the second scheduling system; and generate task migration information during the execution of the task migration method according to the log information.

[0101] The embodiment of the present application provides a task migration device, including a task splitting module, a task mapping module and an information encapsulation module; the task splitting module receives a migration request of a first task, splits the first task running in a first scheduling system into at least one first subtask, and obtains the task information of the at least one first subtask and the dependency relationship between each of the first subtasks; the task mapping module maps the task information of the at least one first subtask into the task information of at least one second subtask according to the task mapping rule between the first scheduling system and the second scheduling system; the information encapsulation module encapsulates the task information of the at least one second subtask according to the dependency relationship between each of the first subtasks, and obtains the second task running in the second scheduling system. In this way, by splitting, mapping and encapsulating tasks to realize automatic migration of tasks in different scheduling systems, the consistency of task configuration in different scheduling systems can be ensured, the possibility of configuration errors or inconsistencies during task migration can be reduced, and the efficiency and accuracy of task migration can be improved.

[0102] Figure 6 The hardware structure diagram of the electronic device provided by the embodiment of the present application is shown. Referring to the figure, at the hardware level, the electronic device 600 includes a processor 610, and optionally, an internal bus 620, a network interface 630, and a memory 640. Among them, the memory 640 may include a memory 641, such as a high-speed random access memory (Random-Access Memory, RAM), and may also include a non-volatile memory 642 (non-volatile memory), such as at least one disk storage, etc. Of course, the electronic device 600 may also include hardware required for other services.

[0103] The processor 610, the network interface 630 and the memory may be connected to each other via an internal bus 620, which may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one bidirectional arrow is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0104] The memory 640 stores programs. Specifically, the programs may include program codes, and the program codes include computer operation instructions. The memory 640 may include a memory 641 and a non-volatile memory 642, and provide instructions and data to the processor 610.

[0105] The processor 610 reads the corresponding computer program from the non-volatile memory 642 into the memory and then runs it, forming a device for locating the target user at the logical level. The processor 610 executes the program stored in the memory and specifically performs: Figure 1 or Figure 2 The method disclosed in the illustrated embodiment realizes the functions and beneficial effects of each method described in the foregoing method embodiments, which will not be described in detail here.

[0106] The above application Figure 1 or Figure 2 The method disclosed in the illustrated embodiment can be applied to the processor 610 or implemented by the processor 610. The processor 610 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 610. The above processor 610 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0107] The computer device can also execute the methods described in the foregoing method embodiments, and realize the functions and beneficial effects of the methods described in the foregoing method embodiments, which will not be repeated here.

[0108] Of course, in addition to software implementation, the electronic device 600 of the present application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0109] The embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable medium stores one or more programs, and when the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes Figure 1 or Figure 2 The method disclosed in the illustrated embodiment realizes the functions and beneficial effects of each method described in the foregoing method embodiments, which will not be described in detail here.

[0110] The computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0111] Furthermore, an embodiment of the present application also provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, and when the program instructions are executed by a computer, the following process is implemented: Figure 1 or Figure 2 The method disclosed in the illustrated embodiment realizes the functions and beneficial effects of each method described in the foregoing method embodiments, which will not be described in detail here.

[0112] The embodiments of the present application can be applied to various electronic device collaboration or interconnection scenarios, including: collaboration and interconnection between mobile phones and laptops / tablet computers; collaboration and interconnection between mobile terminals and smart TVs / displays; collaboration and interconnection between mobile phones or tablet computers and in-car entertainment systems; collaboration and interconnection between mobile terminals and smart conference systems, etc., so as to meet the needs of users in various scenarios such as smart homes, smart offices, and smart travel.

[0113] In short, the above is only a preferred embodiment of the present application and does not limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

[0114] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0115] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0116] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0117] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

Claims

1. A task migration method, characterized in that: include: receiving a migration request of a first task, splitting the first task running in a first scheduling system into at least one first subtask, and acquiring task information of the at least one first subtask and dependencies between the first subtasks; According to a task mapping rule between the first scheduling system and the second scheduling system, mapping the task information of the at least one first subtask into the task information of the at least one second subtask; According to the dependency relationship between the first subtasks, the task information of the at least one second subtask is encapsulated to obtain a second task running in the second scheduling system.

2. The method according to claim 1, characterized in that Before splitting the first task running in the first scheduling system into at least one first subtask, the method further includes: By parsing the task configuration file of the first scheduling system, a first task running in the first scheduling system is obtained.

3. The method according to claim 1, characterized in that The task information of the first subtask includes the task type of the first subtask and the task parameters of the first subtask; The mapping of the task information of the at least one first subtask into the task information of the at least one second subtask according to the task mapping rule between the first scheduling system and the second scheduling system includes: For each first subtask, determining a task type mapping relationship between the first subtask and a second subtask according to the task type of the first subtask; A task parameter conversion rule corresponding to the task type mapping relationship is obtained from the task mapping rule between the first scheduling system and the second scheduling system, and the task parameters of the first subtask are converted into the task parameters of the second subtask according to the task parameter conversion rule.

4. The method according to claim 1, characterized in that: The step of encapsulating the task information of the at least one second subtask according to the dependency relationship between the first subtasks to obtain the second task running on the second scheduling system includes: Determining a target dependency relationship of the at least one second subtask according to the dependency relationships between the first subtasks; Generate a task definition file according to the second scheduling system configuration template and the target dependency relationship; The task definition file is imported into the second scheduling system to obtain a second task running in the second scheduling system.

5. The method according to claim 4, characterized in that After importing the task definition file into the second scheduling system to obtain the second task running in the second scheduling system, the method further includes: Obtaining a task execution log of the second task during the execution of the second scheduling system; The task execution status of the second task is verified according to the task execution log to obtain a verification result of the second task.

6. The method according to any one of claims 1 to 5, characterized in that: Also includes: Obtaining log information from receiving a migration request of the first task to obtaining a second task running on the second scheduling system; Generate task migration information according to the log information.

7. A task migration device, characterized in that: include: A task splitting module, used to receive a migration request of a first task, split the first task running in a first scheduling system into at least one first subtask, and obtain task information of the at least one first subtask and dependencies between the first subtasks; A task mapping module, configured to map the task information of the at least one first subtask into the task information of the at least one second subtask according to a task mapping rule between the first scheduling system and the second scheduling system; The information encapsulation module is used to encapsulate the task information of the at least one second subtask according to the dependency relationship between the first subtasks to obtain the second task running in the second scheduling system.

8. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method according to 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 program or instruction, and when the program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising a program or instructions, which when executed implement the steps of the method according to any one of claims 1 to 6.