Data processing method and device, electronic device and computer readable storage medium
By obtaining the data to be processed and the workflow description file in the distributed system, determining the sub-task execution order and equipment of the task, and using the directed acyclic graph data structure to control the execution equipment, the problem of low task scheduling efficiency in the distributed system is solved. , achieving efficient task processing and execution environment development.
Patent Information
- Application Number
- CN202111087466.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-16
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2041-09-16
AI Technical Summary
Existing distributed workflow description files do not describe task logic accurately enough, resulting in low efficiency of task scheduling in a distributed system environment.
By obtaining the data to be processed and the workflow description file in the server, the sub-task execution order and equipment of the task are determined, and the directed acyclic graph data structure is used to control the execution equipment to execute the task in a breadth-first search manner to improve task processing efficiency.
It improves task processing efficiency and execution success rate, simplifies the process of developing execution environment, reduces communication costs, and enhances the task scheduling capability of distributed systems.
Smart Images

Figure CN113805976B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data processing method and device, an electronic device, and a computer-readable storage medium. Background Art
[0002] In recent years, with the development of distributed computing technologies such as grid and cloud computing workflow, the scheduling of task workflows in distributed system environments has attracted more and more attention. However, in current technologies, the task definition information carried by the description file of distributed workflows does not accurately describe the task logic. Summary of the invention
[0003] The present application provides a data processing method and device, an electronic device, and a computer-readable storage medium.
[0004] In a first aspect, a data processing method is provided, the method being applied to a server, the server belonging to a distributed system, the distributed system further comprising at least two execution devices, the method comprising:
[0005] The server obtains data to be processed, a first description file of a first workflow, and a first execution environment of the first workflow, wherein the first workflow is a workflow of a task to be processed, input data of the task to be processed includes the data to be processed, the first description file carries definition information of the first workflow and definition information of a second workflow, and the second workflow is a workflow of a subtask of the task to be processed;
[0006] The server controls the at least two execution devices to execute the tasks to be processed through the first execution environment according to the first description file, and obtains a first processing result.
[0007] In combination with any implementation manner of the present application, the server controls the at least two execution devices to execute the to-be-processed tasks through the first execution environment according to the first description file, and obtains a first processing result, including:
[0008] When it is determined that the data structure of the first workflow is a directed acyclic graph, the server controls the at least two execution devices to execute the tasks to be processed through the first execution environment according to the first description file to obtain a first processing result.
[0009] In combination with any implementation manner of the present application, when it is determined that the data structure of the first workflow is a directed acyclic graph, the server controls the at least two execution devices to execute the to-be-processed tasks through the first execution environment according to the first description file to obtain a first processing result, including:
[0010] When it is determined that the data structure of the first workflow is a directed acyclic graph and the tasks in the second workflow do not contain subtasks of the task to be processed, the server controls the at least two execution devices to execute the task to be processed through the first execution environment according to the first description file to obtain a first processing result.
[0011] In combination with any implementation manner of the present application, the server controls the at least two execution devices to execute the to-be-processed tasks through the first execution environment according to the first description file, and obtains a first processing result, including:
[0012] The server determines the execution order of at least two subtasks of the task to be processed according to the first description file;
[0013] The server determines, according to the first description file, execution devices of at least two subtasks of the task to be processed, and obtains a device result;
[0014] The server controls the at least two execution devices to execute the to-be-processed tasks through the first execution environment according to the execution order and the device result, and obtains the first processing result.
[0015] In combination with any embodiment of the present application, the server controls the at least two execution devices to execute the to-be-processed tasks through the first execution environment according to the execution order and the device result, and obtains a first processing result, including:
[0016] The server sends the data to be processed, a second execution environment for executing a first task, and a first instruction for executing the first task to a first execution device; the second execution environment belongs to the first execution environment, the first task is the first subtask executed in the execution sequence, and the first execution device is the execution device of the first task determined according to the device result;
[0017] When the server receives the second processing result of the first task returned by the first execution device in response to the first instruction and the second instruction that the first task has been executed, the server sends the second processing result and the third instruction to execute the second task to the second execution device, where the second task is a subtask that is executed after the first task in the execution sequence, and the second execution device is an execution device of the second task determined according to the device result;
[0018] When the server receives the third processing result of the third task returned by the third execution device, it determines that the third processing result is the first processing result, the third task is the last subtask executed in the execution order, and the third execution device is the execution device of the third task determined based on the device result.
[0019] In combination with any implementation manner of the present application, the data structure of the second workflow is a directed acyclic graph.
[0020] In combination with any implementation manner of the present application, the server determines the execution order of at least two subtasks of the to-be-processed task according to the first description file, including:
[0021] The server determines the dependency relationship between at least two subtasks of the task to be processed according to the first description file;
[0022] The server searches the at least two subtasks in a breadth-first search manner according to the dependency relationship between the at least two subtasks to determine the execution order of the at least two subtasks.
[0023] In a second aspect, a server is provided, the server belonging to a distributed system, the distributed system further comprising at least two execution devices, the server comprising:
[0024] an acquisition unit, configured to acquire data to be processed, a first description file of a first workflow, and a first execution environment of the first workflow, wherein the first workflow is a workflow of a task to be processed, input data of the task to be processed includes the data to be processed, the first description file carries definition information of the first workflow and definition information of a second workflow, and the second workflow is a workflow of a subtask of the task to be processed;
[0025] A processing unit is used to control the at least two execution devices to execute the tasks to be processed through the first execution environment according to the first description file to obtain a first processing result.
[0026] In combination with any embodiment of the present application, the processing unit is used to:
[0027] When it is determined that the data structure of the first workflow is a directed acyclic graph, the server controls the at least two execution devices to execute the tasks to be processed through the first execution environment according to the first description file to obtain a first processing result.
[0028] In combination with any embodiment of the present application, the processing unit is used to:
[0029] When it is determined that the data structure of the first workflow is a directed acyclic graph and the tasks in the second workflow do not contain subtasks of the task to be processed, the server controls the at least two execution devices to execute the task to be processed through the first execution environment according to the first description file to obtain a first processing result.
[0030] In combination with any embodiment of the present application, the processing unit is used to:
[0031] The server determines the execution order of at least two subtasks of the task to be processed according to the first description file;
[0032] The server determines, according to the first description file, execution devices of at least two subtasks of the task to be processed, and obtains a device result;
[0033] The server controls the at least two execution devices to execute the to-be-processed tasks through the first execution environment according to the execution order and the device result, and obtains the first processing result.
[0034] In combination with any embodiment of the present application, the processing unit is used to:
[0035] The server sends the data to be processed, a second execution environment for executing a first task, and a first instruction for executing the first task to a first execution device; the second execution environment belongs to the first execution environment, the first task is the first subtask executed in the execution sequence, and the first execution device is the execution device of the first task determined according to the device result;
[0036] When the server receives the second processing result of the first task returned by the first execution device in response to the first instruction and the second instruction that the first task has been executed, the server sends the second processing result and the third instruction to execute the second task to the second execution device, where the second task is a subtask that is executed after the first task in the execution sequence, and the second execution device is an execution device of the second task determined according to the device result;
[0037] When the server receives the third processing result of the third task returned by the third execution device, it determines that the third processing result is the first processing result, the third task is the last subtask executed in the execution order, and the third execution device is the execution device of the third task determined based on the device result.
[0038] In combination with any implementation manner of the present application, the data structure of the second workflow is a directed acyclic graph.
[0039] In combination with any embodiment of the present application, the processing unit is used to:
[0040] The server determines the dependency relationship between at least two subtasks of the task to be processed according to the first description file;
[0041] The server searches the at least two subtasks in a breadth-first search manner according to the dependency relationship between the at least two subtasks to determine the execution order of the at least two subtasks.
[0042] According to a third aspect, an electronic device is provided, comprising: a processor and a memory, wherein the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor executes the computer instructions, the electronic device executes the method according to the first aspect and any possible implementation thereof.
[0043] In a fourth aspect, another electronic device is provided, comprising: a processor, a sending device, an input device, an output device and a memory, wherein the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes the method as described in the first aspect above and any possible implementation method thereof.
[0044] In a fifth aspect, a computer-readable storage medium is provided, in which a computer program is stored. The computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to execute the method as described in the first aspect above and any possible implementation method thereof.
[0045] In a sixth aspect, a computer program product is provided, which includes a computer program or instructions, and when the computer program or instructions are run on a computer, the computer is enabled to execute the method of the above-mentioned first aspect and any possible implementation thereof.
[0046] It is to 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.
[0047] In the present application, the first description file includes the second workflow, and the task corresponding to the second workflow includes at least two subtasks. Therefore, subtask A and subtask B can be merged into one subtask, and subtask C, subtask D and subtask E can be merged into one subtask. As a result, the division of subtasks of the task to be processed in the first description file can be more in line with the processing logic of the task to be processed, so that the first description file can better describe the first workflow and improve the efficiency of relevant personnel in developing the first execution environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.
[0049] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.
[0050] Figure 1 A schematic diagram of a distributed system architecture provided in an embodiment of the present application;
[0051] Figure 2 A flowchart of a data processing method provided in an embodiment of the present application;
[0052] Figure 3 A schematic diagram of a data structure of a first workflow provided in an embodiment of the present application;
[0053] Figure 4 A schematic diagram of a description file of a first workflow provided in an embodiment of the present application;
[0054] Figure 5 A schematic diagram of definition information of a second subtask provided in an embodiment of the present application;
[0055] Figure 6 A schematic diagram of a description file of a second workflow provided in an embodiment of the present application;
[0056] Figure 7 A schematic diagram of the structure of a server provided in an embodiment of the present application;
[0057] Figure 8 A schematic diagram of the hardware structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0059] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0060] It should be understood that in the present application, "at least one (item)" means one or more, "more than one" means two or more, "at least two (items)" means two or three and more than three, and "and / or" is used to describe the association relationship of associated objects, indicating that there may be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " can indicate that the objects before and after the association are in an "or" relationship, which means any combination of these items, including any combination of single items (items) or plural items (items). For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple. The character " / " can also represent the division sign in mathematical operations, for example, a / b = a divided by b; 6 / 3 = 2. "At least one of the following" or similar expressions.
[0061] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0062] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application.
[0063] See also Figure 1 , Figure 1 1 is a schematic diagram of the architecture of a distributed system 1000 provided by the present application. Figure 1In the embodiment of the present application, there is a communication connection between the server 1001 and at least two execution devices 1002. In the embodiment of the present application, the execution device can be any electronic device. Optionally, the execution device is one of the following: a computer, a server, a workstation, a tablet computer, and a mobile phone. The server 1001 can send instructions and data to any one of the at least two execution devices 1002 through a communication connection to control the execution device to execute tasks in the workflow, thereby completing the workflow. Optionally, the workflow in the embodiment of the present application is a distributed workflow.
[0064] See also Figure 2 , Figure 2 The technical solution provided in the embodiment of the present application is applied to the server 1001 in the distributed system 1000.
[0065] 201. The server obtains data to be processed, a first description file of a first workflow, and a first execution environment of the first workflow.
[0066] In the embodiment of the present application, the first workflow is a workflow of tasks to be processed, wherein the tasks to be processed can be any tasks. For example, the tasks to be processed are to train a neural network. For another example, the tasks to be processed are to search a database. For another example, the tasks to be processed are to dispatch vehicles based on road condition information.
[0067] In an embodiment of the present application, the input data of the task to be processed includes the data to be processed. For example, when the task to be processed is to train a neural network, the input data of the task to be processed includes the training data required for training the neural network. For another example, when the task to be processed is to search a database, the input data of the task to be processed includes the search information and the database to be searched. For another example, when the task to be processed is to dispatch a vehicle based on road condition information, the input data of the task to be processed includes road condition information.
[0068] In the embodiment of the present application, the execution environment includes files for executing corresponding tasks. For example, the task to be processed is to train a neural network, and the file for executing the task to be processed is a computer program for training the neural network. For another example, the task to be processed is to search a database, and the file for executing the task to be processed is a computer program code for searching the database.
[0069] In the embodiment of the present application, the execution environment (compnoent) of the first workflow is the first execution environment, that is, the first execution environment includes files for executing the tasks to be processed.
[0070] It should be understood that, in the case where the task to be processed includes at least two subtasks, the first execution environment includes the execution environment of each subtask. For example, the process of training a neural network includes using the neural network to process the training data to obtain a training result, and updating the parameters of the neural network based on the training result and the annotation information. In the case where the task to be processed is to train the neural network, the task to be processed includes a first subtask and a second subtask, wherein the first subtask is to process the training data using the neural network to obtain a training result, and the second subtask is to update the parameters of the neural network based on the training result and the annotation information. At this time, the first execution environment includes the execution environment of the first subtask and the execution environment of the second subtask.
[0071] In an embodiment of the present application, the definition information of a workflow (including the above-mentioned first workflow and second workflow) includes the definition information of the subtasks of the task corresponding to the workflow. For example, the task corresponding to the first workflow is a pending task, and the subtasks of the pending task include a first subtask and a second subtask, then the definition information of the first workflow includes the definition information of the first subtask and the definition information of the second subtask. For another example, the task corresponding to the second workflow is a target task, and the subtasks of the target task include a third subtask and a fourth subtask, then the definition information of the second workflow includes the definition information of the third subtask and the definition information of the fourth subtask.
[0072] In an embodiment of the present application, the definition information of the subtask of the task corresponding to the workflow includes at least one of the following: an execution environment for executing the subtask, a starting instruction for executing the subtask, a dependency relationship between the subtask and other subtasks in the task corresponding to the workflow, input data of the subtask, and output data of the subtask.
[0073] For example, the task to be processed includes a first subtask and a second subtask. The definition information of the first workflow includes a storage path of a first execution environment (hereinafter referred to as the first storage path). The definition information of the first subtask includes that the execution environment for executing the first subtask is stored in a folder named "ABC" under the first storage path. Then, the server can obtain the execution environment for executing the first subtask according to the first storage path.
[0074] In the definition information of the first subtask, the starting instruction for executing the first subtask is "bash start.sh", so the device executing the first subtask executes the first subtask when detecting "bash start.sh".
[0075] The definition information of the first subtask also includes the dependency relationship between the first subtask and the second subtask, where the output of the first subtask is used as the input of the second subtask. Then, when the server determines that the first subtask has been completed, the output of the first subtask is used as the input of the second subtask and executes the second subtask.
[0076] The definition information of the first subtask also includes the input data of the first subtask and the output data of the first subtask. The input data of the first subtask can be a parameter, or the input data of the first subtask can also be the storage path of the input data of the first subtask. The output data of the first subtask can be a parameter, or the output data of the first subtask can also be the storage path of the input data of the first subtask. For example,
[0077] In the embodiment of the present application, the description file of the first workflow is a first description file, wherein the first description file carries definition information of the first workflow and definition information of the second workflow.
[0078] Optionally, the workflow definition information also includes the data structure of the workflow. For example, the first workflow definition information also includes that the data structure of the first workflow is a directed acyclic graph (DAG). The second workflow definition information also includes that the data structure of the second workflow is a directed acyclic graph (DAG).
[0079] In the embodiment of the present application, the second workflow is a workflow of a subtask of the task to be processed, that is, the task corresponding to the second workflow is a subtask of the task to be processed. For example, the subtask of the task to be processed includes a first subtask and a second subtask. In this case, the second workflow is the workflow of the first subtask, and the second workflow is the workflow of the second subtask.
[0080] 202. The server controls the at least two execution devices to execute the tasks to be processed through the first execution environment according to the first description file, and obtains a first processing result.
[0081] In the embodiment of the present application, the first processing result is the result obtained after executing the task to be processed.
[0082] In a possible implementation, the server determines the execution order of at least two subtasks of the task to be processed according to the first description file. The server determines the execution devices of at least two subtasks of the task to be processed and obtains the device results. The server controls at least two execution devices to execute the task to be processed through the first execution environment according to the execution order and the device results, and obtains the first processing result.
[0083] In this implementation, the task to be processed includes at least two subtasks. Since the first description file carries the definition information of each subtask, and the definition information of the subtask carries the dependency relationship between the subtasks, the server can determine the execution order of the at least two subtasks according to the first description file.
[0084] For example, the task to be processed includes a first subtask and a second subtask. The definition information of the first subtask includes that the dependency relationship between the first subtask and the second subtask is that the output of the first subtask is used as the input of the second subtask. At this time, the server can determine the execution order of the first subtask and the second subtask as follows: the first subtask is executed first, and the second subtask is executed after the first subtask is executed.
[0085] As an optional implementation, before the server controls at least two execution devices to execute the task to be processed, each of the at least two execution devices has been registered on the server, that is, the server stores the registration information of each execution device, wherein the registration information of the execution device includes the subtasks executed by the execution device.
[0086] For example, the task to be processed includes a first subtask and a second subtask, and the at least two execution devices include the first execution device and the second execution device. In the server, the registration information of the first execution device includes that the first execution device is an execution device of the first subtask, and the registration information of the second execution device includes that the second execution device is an execution device of the second subtask.
[0087] In this implementation, the server obtains the device execution result based on the registration information of at least two execution devices. For example, the task to be processed includes a first subtask and a second subtask, and the at least two execution devices include a first execution device and a second execution device. The server determines that the first subtask is executed by the first execution device and the second subtask is executed by the second execution device based on the registration information. Therefore, in the device result obtained by the server, the first subtask is executed by the first execution device and the second subtask is executed by the second execution device.
[0088] As another optional implementation, the first description file carries execution device information of subtasks of the task to be processed. The server can determine execution devices of at least two subtasks of the task to be processed based on the first description file to obtain device results.
[0089] For example, the task to be processed includes a first subtask and a second subtask, and the at least two execution devices include a first execution device and a second execution device. The server determines, based on the first description file, that the first subtask is executed by the first execution device, and the second subtask is executed by the second execution device. Therefore, in the device result obtained by the server, the first subtask is executed by the first execution device, and the second subtask is executed by the second execution device.
[0090] After obtaining the execution sequence and the device result, the server controls at least two executions to execute the pending tasks through the first execution environment according to the execution sequence and the device result, and obtains the processing results of the pending tasks.
[0091] For example, the task to be processed includes a first subtask and a second subtask, and the at least two execution devices include the first execution device and the second execution device. In the execution order, the execution order of the first subtask is executed before the second subtask. In the device result, the first execution device is the execution device of the first subtask, and the second execution device is the execution device of the second subtask.
[0092] The server determines an execution environment for executing the first subtask (hereinafter referred to as the first subtask execution environment) from the first execution environment according to the first description file, and sends the first subtask execution environment, the data to be processed, and the start instruction for executing the first subtask to the first execution device.
[0093] When the first execution device receives the first subtask execution environment, the data to be processed, and the start instruction for executing the first subtask, the first execution device processes the data to be processed through the first subtask execution environment, completes the execution of the first subtask, and obtains the execution result of the first subtask. The first execution device sends the instruction that the first subtask has been executed and the execution result of the first subtask to the server.
[0094] When the server receives the instruction to complete the execution of the first subtask and the execution result of the first subtask, it determines the execution environment for executing the second subtask (hereinafter referred to as the second subtask execution environment) from the first execution environment based on the first description file, and sends the second subtask execution environment, the execution result of the first subtask and the starting instruction for executing the second subtask to the second execution device.
[0095] It should be understood that the second workflow is a workflow of a subtask of the task to be processed, and the task corresponding to the workflow includes at least two subtasks, that is, at least one subtask in the task to be processed includes two subtasks. For example, the task to be processed includes a first subtask and a second subtask. If the task corresponding to the second workflow is the first subtask, then the first subtask includes at least two subtasks.
[0096] If a subtask including at least two subtasks in the task to be processed is called a nested subtask, then the number of execution devices of the nested subtask is greater than 1. Specifically, the execution device of the nested subtask includes the execution devices of the subtasks included in the nested subtask.
[0097] For example, the task to be processed includes a first subtask and a second subtask. If the task corresponding to the second workflow is the first subtask, then the first subtask includes at least two subtasks, that is, the first subtask is a nested subtask. If the subtasks of the first subtask include a third subtask and a fourth subtask, wherein the execution device of the third subtask is the first execution device and the execution device of the fourth subtask is the second execution device, then the execution device of the first subtask includes the first execution device and the second execution device.
[0098] In the embodiment of the present application, the distributed system controls at least two execution devices to execute the tasks to be processed according to the first description file, which can realize parallel processing when the data processing volume is large, thereby improving the processing speed.
[0099] In addition, since the first description file in the embodiment of the present application includes the second workflow, and the task corresponding to the second workflow includes at least two subtasks, the first description file can better describe the first workflow and improve the efficiency of relevant personnel in developing the first execution environment.
[0100] For example, the training process of a neural network includes the following steps: preprocessing the training image, using the neural network to process the preprocessed training image to obtain a training result, and updating the parameters of the neural network based on the training result and the annotation information of the training data. Preprocessing the training image includes: first adjusting the size of the training image and then adjusting the resolution of the training image, so that the size of the training image is a preset size and the resolution of the training image is a preset resolution, and obtaining the preprocessed training image. Using the neural network to process the preprocessed training image to obtain a training result includes: sequentially performing convolution processing, pooling processing, and nonlinear transformation on the preprocessed training image.
[0101] When the task to be processed is to train a neural network, the task to be processed includes the following steps: adjusting the size of the training image, adjusting the resolution of the first intermediate image (the image obtained by adjusting the size of the training image), performing convolution processing on the preprocessed training image (i.e., the image obtained by adjusting the resolution of the first intermediate image), performing pooling processing on the second intermediate image (the image obtained by performing convolution processing on the preprocessed training image), performing nonlinear transformation on the third intermediate image (the image obtained by performing pooling processing on the second intermediate image), and updating the parameters of the neural network according to the training results (i.e., the results obtained by performing nonlinear transformation on the third intermediate image) and the annotation information of the training data.
[0102] If each step in the task to be processed is regarded as a subtask, then the task to be processed includes the following subtasks: subtask A, subtask B, subtask C, subtask D, subtask E, and subtask F. Subtask A is to adjust the size of the training image, subtask B is to adjust the resolution of the first intermediate image, subtask C is to perform convolution processing on the preprocessed training image, subtask D is to perform pooling processing on the second intermediate image, subtask E is to perform nonlinear transformation on the third intermediate image, and subtask F is to update the parameters of the neural network based on the training results and the annotation information of the training data.
[0103] Obviously, in the task to be processed, subtask A and subtask B both belong to the process of preprocessing the training image. If subtask A and subtask B are combined into one subtask, it is more in line with the processing logic of the task to be processed. Similarly, subtask C, subtask D, and subtask E all belong to the process of processing the preprocessed training image to obtain the training result. If subtask C, subtask D, and subtask E are combined into one subtask, it is also more in line with the processing logic of the task to be processed.
[0104] In addition, if subtask A and subtask B are combined into subtask F, relevant personnel can better understand the role of subtask F in the tasks to be processed during the process of developing the first execution environment, which is helpful for relevant personnel to develop the first execution environment.
[0105] Furthermore, if subtask A and subtask B are not merged, then in the process of developing the first execution environment, different personnel may be required to develop the execution environment for executing subtask A and the execution environment for executing task B respectively, and the input data of subtask B is the output data of subtask A. In this way, the personnel who develop the execution environment for executing subtask A (hereinafter referred to as the developer of subtask A) and the personnel who develop the execution environment for executing task B (hereinafter referred to as the developer of subtask B) need to communicate to determine the data transmission between subtask A and subtask B during the development process. For example, if subtask A can process three images in one processing cycle, the developer of subtask A and the developer of subtask B need to determine what the relationship is between the order of the three images output by subtask A and the order of the three images input to subtask A.
[0106] This will obviously increase the communication cost of the relevant personnel in developing the first execution environment and reduce the development efficiency of the first execution environment. Similarly, if subtask C, subtask D and subtask E are not merged into one subtask, the communication cost of the relevant personnel in developing the first execution environment will also increase and reduce the development efficiency of the first execution environment.
[0107] In an embodiment of the present application, the first description file includes a second workflow, and the task corresponding to the second workflow includes at least two subtasks. Therefore, subtask A and subtask B can be merged into one subtask, and subtask C, subtask D and subtask E can be merged into one subtask. As a result, the division of subtasks of the task to be processed in the first description file can be more in line with the processing logic of the task to be processed, so that the first description file can better describe the first workflow and improve the efficiency of relevant personnel in developing the first execution environment.
[0108] As an optional implementation, when the server determines that the data structure of the first workflow is a directed acyclic graph, the server executes step 202. Since the directed acyclic graph can better describe the data structure of the workflow, when the server determines that the data structure of the first workflow is a directed acyclic graph, the server controls at least two execution devices to execute the tasks to be processed, which can improve the processing efficiency of the tasks to be processed.
[0109] As an optional implementation, when the server determines that the data structure of the first workflow is a directed acyclic graph and the tasks in the second workflow do not contain subtasks of the tasks to be processed, the server controls at least two execution devices to execute the tasks to be processed through the first execution environment based on the first description file to obtain a first processing result.
[0110] In this implementation, the tasks in the second workflow are subtasks included in the tasks corresponding to the second workflow. For example, the task corresponding to the second workflow is the first subtask of the task to be processed, and the subtasks of the first subtask include the second subtask and the third subtask. In this case, the tasks in the second workflow include the second subtask and the third subtask.
[0111] If the tasks in the second workflow include subtasks of the tasks to be processed, it means that the processing logic of the first workflow may be wrong. Therefore, when the server determines that the tasks in the second workflow do not include subtasks of the tasks to be processed, it controls at least two execution devices to execute the tasks to be processed according to the first description file, which can improve the execution success rate of the tasks to be processed and thus improve the processing efficiency of the tasks to be processed.
[0112] As an optional implementation, the server controls at least two execution devices to execute the to-be-processed tasks through the first execution environment according to the execution order and the device result to obtain the first processing result, which specifically includes the following steps:
[0113] 1. The server sends to-be-processed data, a second execution environment for executing a first task, and a first instruction for executing the first task to a first execution device.
[0114] In the embodiment of the present application, the second execution environment is used to execute the first task, the second execution environment belongs to the first execution environment, the first task is the subtask executed first in the execution order, and the first execution device is the execution device of the first task determined based on the device result.
[0115] 2. When the server receives the second processing result of the first task returned by the first execution device in response to the first instruction and the second instruction that the first task has been executed, the server sends the second processing result and the third instruction to execute the second task to the second execution device, where the second task is a subtask that follows the first task in the execution order, and the second execution device is the execution device of the second task determined based on the device result.
[0116] 3. When the server receives the third processing result of the third task returned by the third execution device, it determines that the third processing result is the first processing result, the third task is the last subtask executed in the execution order, and the third execution device is the execution device of the third task determined based on the device result.
[0117] In the embodiment of the present application, the second task is a subtask that is executed after the first task in the execution order, that is, the second task is executed when the first task is completed. In the case where the task to be processed includes two subtasks, the second task in step 2 is the same as the third task in step 3. At this time, when the server receives the third processing result of the second task returned by the second execution device, it determines that the third processing result is the first processing result.
[0118] When the number of subtasks of the task to be processed is 3, the first task, the second task, and the third task are three different subtasks included in the task to be processed, and in the execution order, the first task is the first subtask executed, the second task is the second subtask executed, and the third task is the last subtask executed.
[0119] When the number of subtasks of the task to be processed is greater than 3, the second task indicates a task whose execution order is after the execution order of the first task and before the execution order of the third task.
[0120] For example, the task to be processed includes four subtasks, which are subtask A, subtask B, subtask C and subtask D. If in the execution order, subtask A is the first subtask to be executed, subtask B is the second subtask to be executed, subtask C is the third subtask to be executed, and subtask D is the last subtask to be executed. In this case, the second task can be subtask C, and the second task can also be task D.
[0121] If the execution device of subtask A is execution device a, the execution device of subtask B is execution device b, the execution device of subtask C is execution device c, and the execution device of subtask D is execution device d. The server first sends the data to be processed, the execution environment for executing subtask A, and the instruction to execute subtask A to execute device a, so that execution device a executes subtask A.
[0122] When the server receives the execution result of subtask A returned by execution device a and the instruction that subtask A has been executed, it sends the execution result of subtask A, the execution environment for executing subtask B and the instruction to execute subtask B to execution device b, so that execution device b executes subtask B.
[0123] When the server receives the execution result of subtask B returned by execution device b and the instruction that subtask B has been executed, it sends the execution result of subtask B, the execution environment for executing subtask C and the instruction to execute subtask C to execution device c, so that execution device c executes subtask C.
[0124] When the server receives the execution result of subtask C returned by execution device c and the instruction that subtask C has been executed, it sends the execution result of subtask D, the execution environment for executing subtask D and the instruction to execute subtask D to execution device d, so that execution device d executes subtask D.
[0125] When receiving the processing result of subtask D returned by execution device d, the server determines that the execution result of subtask D is the first processing result.
[0126] As an optional implementation, the data structure of the second workflow is a directed acyclic graph. As described above, since a directed acyclic graph can better describe the data structure of a workflow, when the data structure of the second workflow is a directed acyclic graph, the data structure of the second workflow can be better described, thereby improving the processing efficiency of the task corresponding to the second workflow.
[0127] As an optional implementation manner, the server determines the execution order of at least two subtasks of the task to be processed according to the first description file, specifically including the following steps:
[0128] 4. The server determines the dependency relationship between at least two subtasks of the task to be processed according to the first description file.
[0129] In the embodiment of the present application, the dependency relationship includes at least one of the following: data transmission between subtasks, and the execution order of subtasks. For example, the data transmission between subtask A and subtask B is that the output data of subtask A is used as the input data of subtask B. For another example, the task to be processed includes subtask A and subtask B, and the dependency relationship between subtask A and subtask B includes: subtask A is executed first, and then subtask B is executed.
[0130] 5. The server searches the at least two subtasks in a breadth-first search manner according to the dependency relationship between the at least two subtasks to determine the execution order of the at least two subtasks.
[0131] Optionally, the description file of the first workflow is written in another markup language (YAML Ain't Markup Language, YAML).
[0132] Optionally, the syntax format of the description file of the first workflow is a preset syntax format. The preset syntax format can be any custom syntax format. For example, the preset syntax format includes: the first line of the description file is the version of the description file, and the second line of the description file is the data structure of the workflow.
[0133] Optionally, the description file of the first workflow is written in YAML language, and the syntax format of the description file of the first workflow is a preset syntax format.
[0134] Based on the technical solution provided in the embodiments of the present application, the present application also provides a possible application scenario.
[0135] As the performance of neural networks becomes more and more powerful, the application of neural networks is becoming more and more extensive. Before using neural networks to perform related tasks (such as image classification), it is necessary to train the neural network. Since the amount of data required to be processed by the neural network is very large during the training process of the neural network, the training of the neural network is usually implemented based on a distributed system to shorten the training time. Before training the neural network based on a distributed system, relevant personnel need to build a workflow for training the neural network and develop an execution environment for training the neural network. Based on the technical solution provided in the embodiment of the present application, a workflow for training the neural network is constructed, which can not only improve the efficiency of the relevant personnel in building the workflow, but also improve the efficiency of the relevant personnel in developing an execution environment for training the neural network.
[0136] Specifically, relevant personnel split the task of training the neural network into multiple subtasks, and construct a workflow for the task of training the neural network based on the multiple subtasks as the first workflow, wherein the first workflow includes at least two subtasks, and the first workflow includes at least one nested subtask.
[0137] For example, relevant personnel split the task of training a neural network into a first subtask, a second subtask, a third subtask, a fourth subtask, a fifth subtask, a sixth subtask, a seventh subtask, and an eighth subtask, and construct the first workflow for the task of training a neural network. Figure 3 The data structure of the first workflow is shown, where A represents the first subtask, B represents the second subtask, C represents the third subtask, D represents the fourth subtask, E represents the fifth subtask, F represents the sixth subtask, G represents the seventh subtask, and H represents the eighth subtask. Figure 3 In the first workflow shown, the second subtask includes a fifth subtask, a sixth subtask, a seventh subtask, and an eighth subtask, that is, the second subtask is a nested subtask.
[0138] After constructing the data structure of the first workflow, the relevant personnel write a description file of the first workflow based on the first workflow. Figure 3 The data structure shown is written Figure 4 Description file shown. Figure 4 In the description file shown, it is defined that the version of the description file is the first version and the data structure of the first workflow is a directed acyclic graph. It is also defined that the first execution device is used to execute the first subtask, the second execution device is used to execute the second subtask, the third execution device is used to execute the third subtask, and the fourth execution device is used to execute the fourth subtask.
[0139] Figure 4 The description file shown also includes definition information of the first subtask, definition information of the second subtask, definition information of the third subtask, and definition information of the fourth subtask.
[0140] Figure 5 The definition information of the second subtask is shown, wherein the definition information of the second subtask includes that the storage path of the execution environment for executing the second subtask is storage path 1 (the execution environment for executing the second subtask can be downloaded according to storage path 1), the starting instruction of the second subtask is bash start.sh, the dependency relationship between the second subtask and the first subtask is that the input data of the second subtask includes the output data of the first subtask, the storage path of the data in the input data of the second subtask except the output data of the first subtask is storage path 2 (the data in the input data except the output data of the first subtask can be downloaded according to storage path 2), the storage path of the output data of the second subtask is storage path 3 (the second execution device stores the output data of the second subtask under storage path 3), and the description file of the workflow of the second subtask is the description file of the second workflow.
[0141] Figure 6Shown is a description file of the second workflow, which includes definition information of the second workflow, wherein the definition information of the second workflow includes that the version of the description file is the first version and the data structure of the second workflow is a directed acyclic graph, the fifth execution device is used to execute the fifth subtask, the sixth execution device is used to execute the sixth subtask, the seventh execution device is used to execute the seventh subtask, and the eighth execution device is used to execute the eighth subtask.
[0142] In this way, the task of training the neural network can be split into multiple subtasks according to the logical relationship between the steps in the process of executing the task of training the neural network. Therefore, constructing the first workflow based on multiple subtasks can improve the efficiency of constructing the first workflow, and can improve the efficiency of relevant personnel in developing the execution environment for executing each subtask, thereby improving the efficiency of developing the execution environment for training the neural network.
[0143] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0144] The method of the embodiment of the present application is described in detail above, and the device of the embodiment of the present application is provided below.
[0145] See also Figure 7 , Figure 7 A schematic diagram of the structure of a server provided in an embodiment of the present application, wherein the server 1 belongs to a distributed system, the distributed system further includes at least two execution devices, the server 1 includes an acquisition unit 11 and a processing unit 12, wherein:
[0146] An acquisition unit 11 is used to acquire data to be processed, a first description file of a first workflow, and a first execution environment of the first workflow, wherein the first workflow is a workflow of a task to be processed, input data of the task to be processed includes the data to be processed, the first description file carries definition information of the first workflow and definition information of a second workflow, and the second workflow is a workflow of a subtask of the task to be processed;
[0147] The processing unit 12 is used to control the at least two execution devices to execute the to-be-processed tasks through the first execution environment according to the first description file, so as to obtain a first processing result.
[0148] In combination with any embodiment of the present application, the processing unit 12 is used to:
[0149] When it is determined that the data structure of the first workflow is a directed acyclic graph, the server controls the at least two execution devices to execute the tasks to be processed through the first execution environment according to the first description file to obtain a first processing result.
[0150] In combination with any embodiment of the present application, the processing unit 12 is used to:
[0151] When it is determined that the data structure of the first workflow is a directed acyclic graph and the tasks in the second workflow do not contain subtasks of the task to be processed, the server controls the at least two execution devices to execute the task to be processed through the first execution environment according to the first description file to obtain a first processing result.
[0152] In combination with any embodiment of the present application, the processing unit 12 is used to:
[0153] The server determines the execution order of at least two subtasks of the task to be processed according to the first description file;
[0154] The server determines, according to the first description file, execution devices of at least two subtasks of the task to be processed, and obtains a device result;
[0155] The server controls the at least two execution devices to execute the to-be-processed tasks through the first execution environment according to the execution order and the device result, and obtains the first processing result.
[0156] In combination with any embodiment of the present application, the processing unit 12 is used to:
[0157] The server sends the data to be processed, a second execution environment for executing a first task, and a first instruction for executing the first task to a first execution device; the second execution environment belongs to the first execution environment, the first task is the first subtask executed in the execution sequence, and the first execution device is the execution device of the first task determined according to the device result;
[0158] When the server receives the second processing result of the first task returned by the first execution device in response to the first instruction and the second instruction that the first task has been executed, the server sends the second processing result and the third instruction to execute the second task to the second execution device, where the second task is a subtask that is executed after the first task in the execution sequence, and the second execution device is an execution device of the second task determined according to the device result;
[0159] When the server receives the third processing result of the third task returned by the third execution device, it determines that the third processing result is the first processing result, the third task is the last subtask executed in the execution order, and the third execution device is the execution device of the third task determined based on the device result.
[0160] In combination with any implementation manner of the present application, the data structure of the second workflow is a directed acyclic graph.
[0161] In combination with any embodiment of the present application, the processing unit 12 is used to:
[0162] The server determines the dependency relationship between at least two subtasks of the task to be processed according to the first description file;
[0163] The server searches the at least two subtasks in a breadth-first search manner according to the dependency relationship between the at least two subtasks to determine the execution order of the at least two subtasks.
[0164] In some embodiments, the functions or modules included in the device provided in the embodiments of the present application can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.
[0165] Figure 8 A schematic diagram of the hardware structure of a server provided in an embodiment of the present application. The server 2 includes a processor 21, a memory 22, an input device 23, and an output device 24. The processor 21, the memory 22, the input device 23, and the output device 24 are coupled via a connector, and the connector includes various interfaces, transmission lines, or buses, etc., which are not limited in the embodiments of the present application. It should be understood that in each embodiment of the present application, coupling refers to mutual connection in a specific manner, including direct connection or indirect connection through other devices, for example, it can be connected through various interfaces, transmission lines, buses, etc.
[0166] The processor 21 may be one or more graphics processing units (GPUs). When the processor 21 is a GPU, the GPU may be a single-core GPU or a multi-core GPU. Optionally, the processor 21 may be a processor group consisting of multiple GPUs, and the multiple processors are coupled to each other via one or more buses. Optionally, the processor may also be other types of processors, etc., which are not limited in the embodiments of the present application.
[0167] The memory 22 can be used to store computer program instructions and various computer program codes including the program code for executing the program code of the present application. Optionally, the memory includes but is not limited to random access memory (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM), or portable read only memory (CD-ROM), which is used for related instructions and data.
[0168] The input device 23 is used to input data and / or signals, and the output device 24 is used to output data and / or signals. The input device 23 and the output device 24 can be independent devices or an integrated device.
[0169] It can be understood that in the embodiment of the present application, the memory 22 can be used not only to store relevant instructions, but also to store relevant data, or the memory 22 can also be used to store data passed by the processor 21, etc. The embodiment of the present application does not limit the specific data stored in the memory.
[0170] Understandably, Figure 8 Only a simplified design of a server is shown. In practical applications, the server may also include other necessary components, including but not limited to any number of input / output devices, processors, memories, etc., and all servers that can implement the embodiments of the present application are within the protection scope of the present application.
[0171] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0172] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. Those skilled in the art can also clearly understand that the descriptions of the various embodiments of the present application have different focuses. For the convenience and brevity of description, the same or similar parts may not be repeated in different embodiments. Therefore, for parts not described or not described in detail in a certain embodiment, refer to the records of other embodiments.
[0173] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0174] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0175] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0176] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).
[0177] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by a computer program to instruct the relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned method embodiments. The aforementioned storage medium includes: a read-only memory (ROM) or a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
Claims
1. A data processing method, characterized in that: The method is applied to a server, the server belongs to a distributed system, the distributed system further includes at least two execution devices, and the method includes: The server obtains data to be processed, a first description file of a first workflow, and a first execution environment of the first workflow, wherein the first workflow is a workflow of a task to be processed, input data of the task to be processed includes the data to be processed, the first description file carries definition information of the first workflow and definition information of a second workflow, and the second workflow is a workflow of a subtask of the task to be processed; The server controls the at least two execution devices to execute the task to be processed through the first execution environment according to the first description file to obtain a first processing result; the server controls the at least two execution devices to execute the task to be processed through the first execution environment according to the first description file to obtain a first processing result, including: the server determines the execution order of at least two subtasks of the task to be processed according to the first description file; the server determines the execution devices of at least two subtasks of the task to be processed according to the first description file to obtain a device result; the server controls the at least two execution devices to execute the task to be processed through the first execution environment according to the execution order and the device result to obtain the first processing result; The server controls the at least two execution devices to execute the to-be-processed task through the first execution environment according to the execution sequence and the device result to obtain a first processing result, including: the server sends the to-be-processed data, the second execution environment for executing the first task, and the first instruction for executing the first task to the first execution device; the second execution environment belongs to the first execution environment, the first task is the subtask executed first in the execution sequence, and the first execution device is the execution device of the first task determined according to the device result; when the server receives the second processing result of the first task returned by the first execution device for the first instruction and the second instruction that the first task has been executed, the server sends the second processing result and the third instruction for executing the second task to the second execution device, the second task is the subtask that is executed after the first task in the execution sequence, and the second execution device is the execution device of the second task determined according to the device result; when the server receives the third processing result of the third task returned by the third execution device, the server determines that the third processing result is the first processing result, the third task is the subtask executed last in the execution sequence, and the third execution device is the execution device of the third task determined according to the device result; The server controls the at least two execution devices to execute the to-be-processed tasks through the first execution environment according to the first description file, and obtains a first processing result, including: When it is determined that the data structure of the first workflow is a directed acyclic graph, the server controls the at least two execution devices to execute the tasks to be processed through the first execution environment according to the first description file to obtain a first processing result; When it is determined that the data structure of the first workflow is a directed acyclic graph, the server controls the at least two execution devices to execute the to-be-processed tasks through the first execution environment according to the first description file to obtain a first processing result, including: When it is determined that the data structure of the first workflow is a directed acyclic graph and the tasks in the second workflow do not contain subtasks of the task to be processed, the server controls the at least two execution devices to execute the task to be processed through the first execution environment according to the first description file to obtain a first processing result.
2. The method according to claim 1, characterized in that The data structure of the second workflow is a directed acyclic graph.
3. The method according to claim 1, characterized in that The server determines, according to the first description file, an execution order of at least two subtasks of the task to be processed, including: The server determines the dependency relationship between at least two subtasks of the task to be processed according to the first description file; The server searches the at least two subtasks in a breadth-first search manner according to the dependency relationship between the at least two subtasks to determine the execution order of the at least two subtasks.
4. A server, characterized in that: The server belongs to a distributed system, the distributed system further includes at least two execution devices, and the server includes: an acquisition unit, configured to acquire data to be processed, a first description file of a first workflow, and a first execution environment of the first workflow, wherein the first workflow is a workflow of a task to be processed, input data of the task to be processed includes the data to be processed, the first description file carries definition information of the first workflow and definition information of a second workflow, and the second workflow is a workflow of a subtask of the task to be processed; A processing unit, used to control the at least two execution devices to execute the task to be processed through the first execution environment according to the first description file to obtain a first processing result; the processing unit controls the at least two execution devices to execute the task to be processed through the first execution environment according to the first description file to obtain a first processing result, including: the server determines the execution order of at least two subtasks of the task to be processed according to the first description file; the server determines the execution devices of the at least two subtasks of the task to be processed according to the first description file to obtain a device result; the server controls the at least two execution devices to execute the task to be processed through the first execution environment according to the execution order and the device result to obtain the first processing result; The server controls the at least two execution devices to execute the to-be-processed task through the first execution environment according to the execution sequence and the device result to obtain a first processing result, including: the server sends the to-be-processed data, the second execution environment for executing the first task, and the first instruction for executing the first task to the first execution device; the second execution environment belongs to the first execution environment, the first task is the subtask executed first in the execution sequence, and the first execution device is the execution device of the first task determined according to the device result; when the server receives the second processing result of the first task returned by the first execution device for the first instruction and the second instruction that the first task has been executed, the server sends the second processing result and the third instruction for executing the second task to the second execution device, the second task is the subtask that is executed after the first task in the execution sequence, and the second execution device is the execution device of the second task determined according to the device result; when the server receives the third processing result of the third task returned by the third execution device, the server determines that the third processing result is the first processing result, the third task is the subtask executed last in the execution sequence, and the third execution device is the execution device of the third task determined according to the device result; The processing unit controls the at least two execution devices to execute the to-be-processed tasks through the first execution environment according to the first description file, and obtains a first processing result, including: When it is determined that the data structure of the first workflow is a directed acyclic graph, the processing unit controls the at least two execution devices to execute the to-be-processed tasks through the first execution environment according to the first description file to obtain a first processing result; In the case where it is determined that the data structure of the first workflow is a directed acyclic graph, the processing unit controls the at least two execution devices to execute the to-be-processed tasks through the first execution environment according to the first description file to obtain a first processing result, including: When it is determined that the data structure of the first workflow is a directed acyclic graph and the tasks in the second workflow do not contain subtasks of the task to be processed, the processing unit controls the at least two execution devices to execute the task to be processed through the first execution environment according to the first description file to obtain a first processing result.
5. An electronic device, characterized in that: include: A processor and a memory, wherein the memory is used to store computer program codes, wherein the computer program codes include computer instructions, and when the processor executes the computer instructions, the electronic device executes the method according to any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor is caused to execute the method according to any one of claims 1 to 3.
