Task processing system and method, continuous integration system, execution machine, storage device
By using storage devices to store and pass task execution data in the Jenkins series construction system, the data acquisition problem caused by sequential execution between tasks is solved, and the flexibility and adaptability of task execution is achieved, and the needs of various actual scenarios are adapted.
Patent Information
- Application Number
- CN202010486653.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-01
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2040-06-01
AI Technical Summary
In the existing Jenkins series construction system, the sequential execution between tasks causes the previous task to fail to obtain the execution data of subsequent tasks. Users need to view it in the corresponding task, which lacks flexibility and adaptability.
Design a task processing system, which uses storage devices to store data generated by multiple executors that cooperate to process the same task to perform corresponding subtasks, and uses storage devices as data delivery tools, allowing any executor to obtain other subtasks after multiple subtasks are completed. The execution data of the executor enables more flexible task execution and data viewing.
It realizes the flexibility and adaptability of task execution, which facilitates users to view the execution data of any task, and is easy to expand and maintain, adapting to the needs of a variety of actual scenarios.
Smart Images

Figure CN113760471B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a task processing system and method, a continuous integration system, an execution machine, and a storage device. Background Art
[0002] Currently, in many application scenarios, there is a need to execute multiple subtasks in sequence, such as the tasks (jobs) that need to be executed sequentially in the Jenkins serial build scenario. Among them, Jenkins is an open source software project, a continuous integration tool developed based on JAVA, used to monitor continuous and repetitive work, aiming to provide an easy-to-use software platform to make continuous integration of software possible.
[0003] In the existing system using Jenkins serial build, the serial build of tasks (jobs) provided by Jenkins is executed sequentially. For example, job A, job B and job C are executed sequentially; job A is executed first, and job B will be executed only after job A is completely executed, and job C will be executed only after job B is completely executed. Therefore, job A cannot obtain the content of job B or job C. If users want to view the execution data of a task, they need to view it in the corresponding task. Summary of the invention
[0004] In view of the above problems, the present application is proposed to provide a task processing system and method, a continuous integration system, an execution machine, and a storage device that solve the above problems or at least partially solve the above problems.
[0005] In one embodiment of the present application, a task processing system is provided. The task processing system includes:
[0006] At least two execution machines are used to collaboratively process a task; wherein the task includes at least two subtasks, and the at least two subtasks are executed by different execution machines; the at least two execution machines are executed sequentially, and the execution of the corresponding subtask by the latter execution machine needs to be triggered by the former execution machine;
[0007] A storage device, connected to the at least two execution machines in communication, and configured to receive and store data generated when any execution machine executes a corresponding subtask;
[0008] The first execution machine among the at least two execution machines is used to execute a first subtask. When the first subtask is executed to a set stage, the first subtask is in a waiting state, waiting for at least one subsequent execution machine to execute the execution data of the corresponding subtask, so as to continue to execute the first subtask according to the execution data.
[0009] In another embodiment of the present application, a continuous integration system is provided. The continuous integration system includes:
[0010] At least two execution machines are used to collaboratively process a continuous integration task; wherein the continuous integration task includes at least two subtasks, and the at least two subtasks are executed by different execution machines; the at least two execution machines are executed sequentially, and the execution of the corresponding subtask by the latter execution machine needs to be triggered by the former execution machine;
[0011] A storage device, connected to the at least two execution machines in communication, and configured to receive and store data generated when any execution machine executes a corresponding subtask;
[0012] The first execution machine among the at least two execution machines is used to execute a first subtask. When the first subtask is executed to a set stage, the first subtask is in a waiting state, waiting for the execution data generated by the execution of the corresponding subtask by at least one subsequent execution machine, so as to continue to execute the first subtask according to the execution data.
[0013] In another embodiment of the present application, a task processing method is provided. The task processing method includes:
[0014] The first execution subtask obtains the first subtask in the task to be collaboratively processed; wherein the task to be collaboratively processed includes the first subtask and the second subtask;
[0015] The first execution machine executes the first subtask;
[0016] The first execution machine sends the first data generated by executing the first subtask to the storage device;
[0017] When the first subtask is executed to a set stage, the first execution machine puts the first subtask into a waiting state and triggers the second execution machine to execute the second subtask;
[0018] When the target data is obtained, the first execution machine continues to execute the first subtask according to the target data;
[0019] The target data is execution data generated when any execution machine whose execution order is subsequent to the first execution machine executes the corresponding subtask.
[0020] In another embodiment of the present application, a task processing method is provided. The task processing method includes:
[0021] The second execution machine executes the second subtask when receiving a trigger signal for the second subtask;
[0022] The second execution machine sends the second data generated by executing the second subtask to the storage device;
[0023] The second execution machine triggers the third execution machine to execute a third subtask; wherein the third subtask has a sequential dependency relationship with the second subtask.
[0024] In another embodiment of the present application, a task processing method is provided. The task processing method includes:
[0025] Acquire first data generated by the first execution machine executing the first subtask;
[0026] storing the first data so that at least one collaborative execution machine can obtain it; wherein the at least one collaborative execution machine and the first execution machine cooperate to process a task; the task includes at least two subtasks, and the at least two subtasks include the first subtask;
[0027] Sending target data to the first execution machine, wherein the target data is execution data generated by any execution machine whose execution order is subsequent to the first execution machine when executing a corresponding subtask.
[0028] In another embodiment of the present application, a task processing system is provided. The system includes:
[0029] At least two execution machines, for collaboratively processing a task; wherein the task includes at least two subtasks, and the at least two subtasks are executed by different execution machines;
[0030] The storage device is communicatively connected with the at least two execution machines, and is used to trigger any one of the at least two execution machines to execute a corresponding subtask; and receives and stores data generated when any one of the execution machines executes a corresponding subtask.
[0031] In another embodiment of the present application, a task processing method is provided. The method comprises:
[0032] triggering a first execution machine of at least two execution machines so that the first execution machine executes a first subtask;
[0033] Acquire and store first data generated by the first execution machine executing the first subtask;
[0034] When the first subtask is executed to a set stage, the second execution machine among the at least two execution machines is triggered so that the second execution machine executes the second subtask; wherein the first execution machine and the second execution machine jointly process a task, and the task includes the first subtask and the second subtask.
[0035] In another embodiment of the present application, an execution machine is provided. The execution machine includes: a memory and a processor, wherein:
[0036] The memory is used to store programs;
[0037] The processor is coupled to the memory and is configured to execute the program stored in the memory to:
[0038] Acquire a first subtask in the task to be collaboratively processed; wherein the task to be collaboratively processed includes the first subtask and the second subtask;
[0039] Execute the first subtask;
[0040] Sending first data generated by executing the first subtask to a storage device;
[0041] When the first subtask is executed to a set stage, the first subtask is put into a waiting state, and a second execution machine is triggered to execute the second subtask;
[0042] When the target data is obtained, continuing to execute the first subtask according to the target data;
[0043] The target data is execution data generated when any execution machine whose execution order is subsequent to the first execution machine executes the corresponding subtask.
[0044] In another embodiment of the present application, an execution machine is provided. The execution machine includes: a memory and a processor, wherein:
[0045] The memory is used to store programs;
[0046] The processor is coupled to the memory and is configured to execute the program stored in the memory to:
[0047] When receiving a trigger signal for the second subtask, executing the second subtask;
[0048] Sending second data generated by executing the second subtask to a storage device;
[0049] A third execution engine is triggered to execute a third subtask; wherein the third subtask has a sequential dependency relationship with the second subtask.
[0050] In another embodiment of the present application, a storage device is provided. The storage device includes: a memory, a processor, and a communication component, wherein:
[0051] The memory is used to store programs;
[0052] The processor is coupled to the memory and is configured to execute the program stored in the memory to:
[0053] Acquire first data generated by the first execution machine executing the first subtask;
[0054] storing the first data so that at least one collaborative execution machine can obtain it; wherein the at least one collaborative execution machine and the first execution machine cooperate to process a task; the task includes at least two subtasks, and the at least two subtasks include the first subtask;
[0055] Control the communication component to send target data to the first execution machine, wherein the target data is execution data generated by any collaborative execution machine whose execution order is after the first execution machine when executing a corresponding subtask.
[0056] In another embodiment of the present application, a storage device is provided. The storage device includes: a memory and a processor; wherein:
[0057] The memory is used to store programs;
[0058] The processor is coupled to the memory and is configured to execute the program stored in the memory to:
[0059] triggering a first execution machine of at least two execution machines so that the first execution machine executes a first subtask;
[0060] Acquire and store first data generated by the first execution machine executing the first subtask;
[0061] When the first subtask is executed to a set stage, the second execution machine among the at least two execution machines is triggered so that the second execution machine executes the second subtask; wherein the first execution machine and the second execution machine jointly process a task, and the task includes the first subtask and the second subtask.
[0062] In the technical solution provided by the embodiment of the present application, a storage device is used to store the data generated by the execution of corresponding subtasks by multiple execution machines that collaboratively process the same task, and the storage device is used as a data transmission tool; after multiple subtasks are successively completed, any execution machine can obtain the execution data of other execution machines from the storage device. The solution is easy to use, easy to expand, and easy to maintain; and it is convenient for users to view the execution data of any task. In addition, when executing its corresponding subtask, the execution machine among the multiple execution machines can interrupt the execution of the subtask and wait for the execution data of other execution machines, rather than strictly triggering the execution of the execution machine corresponding to the next subtask after the execution of the previous subtask is completed. The execution is more flexible and changeable; making the technical solution provided by this solution more adaptable, thereby meeting various needs in actual scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0064] Figure 1 A schematic diagram of the structure of a task processing system provided in one embodiment of the present application;
[0065] Figure 2 A schematic diagram of another implementation structure of a task processing system provided in one embodiment of the present application;
[0066] Figure 3 A schematic diagram of another implementation structure of a task processing system provided in an embodiment of the present application;
[0067] Figure 4 A schematic diagram of the structure of a continuous integration system provided in one embodiment of the present application;
[0068] Figure 5 This is a schematic diagram of the execution steps of each execution machine and the data interaction with the cloud storage device shown in combination with a specific application example of the present application;
[0069] Figure 6 A flowchart of a task processing method provided in one embodiment of the present application;
[0070] Figure 7 A flowchart of a task processing method provided by another embodiment of the present application;
[0071] Figure 8 A flowchart of a task processing method provided in yet another embodiment of the present application;
[0072] Fig. 9 A schematic diagram of the structure of a task processing device provided in one embodiment of the present application;
[0073] Fig.10 A schematic diagram of the structure of a task processing device provided in another embodiment of the present application;
[0074] Fig.11 A structural block diagram of an execution machine provided in an embodiment of the present application;
[0075] Fig.12 A structural diagram of a task processing system provided in yet another embodiment of the present application;
[0076] Fig.13 A flowchart of a task processing method provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0077] There is a solution in the prior art: create a new job X; execute each subtask in job X. For example, three subtasks need to be built in series, namely job A, job B and job C. Create a new job X, and execute job A, job B and job C in job X. The disadvantage of this solution is that it requires an additional new job X, which does not conform to the design concept of high code cohesion and low coupling.
[0078] To this end, the present application provides the following embodiments to solve or improve the problems existing in the prior art. In order to enable people in the technical field to better understand the present application scheme, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application.
[0079] In some processes described in the specification, claims and the above-mentioned figures of this application, multiple operations appearing in a specific order are included, and these operations may not be executed in the order in which they appear in this article or in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit "first" and "second" to different types; in addition, the following embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application.
[0080] Figure 1 The structure diagram of the task processing system provided by an embodiment of the present application is shown. As shown in the figure, the task processing system includes: at least two execution machines 101 and a storage device 102. Among them,
[0081] At least two execution machines 101 are used to collaboratively process a task; wherein the task includes at least two subtasks, and the at least two subtasks are executed by different execution machines; the at least two execution machines 101 are executed sequentially, and the execution of the corresponding subtask by the latter execution machine needs to be triggered by the former execution machine.
[0082] The storage device 102 is communicatively connected to the at least two execution machines 101, and is used to receive and store data generated when any execution machine executes a corresponding subtask.
[0083] The first execution machine among the at least two execution machines is used to execute a first subtask. When the first subtask is executed to a set stage, the first subtask is in a waiting state, waiting for the execution data generated by the execution of the corresponding subtask by at least one subsequent execution machine, so as to continue to execute the first subtask according to the execution data.
[0084] like Figure 1 In the example shown, the first execution machine may be the device labeled 1011 in the figure.
[0085] In specific implementation, the storage device 102 can also provide any execution machine with a download service for the execution data generated by any execution machine when executing a corresponding task; in addition, it can also provide any execution machine with the data required to execute its corresponding subtask.
[0086] In the technical solution provided by this embodiment, a storage device is used to store the data generated by the execution of corresponding subtasks by multiple execution machines that collaboratively process the same task, and the storage device is used as a data transmission tool; after multiple subtasks are successively completed, any execution machine can obtain the execution data of other execution machines from the storage device. The solution is easy to use, easy to expand, and easy to maintain; and it is convenient for users to view the execution data of any task. In addition, when executing its corresponding subtask, the execution machine among the multiple execution machines can interrupt the execution of the subtask and wait for the execution data of other execution machines, rather than strictly triggering the execution of the execution machine corresponding to the next subtask after the execution of the previous subtask is completed. The execution is more flexible and changeable; making the technical solution provided by this solution more adaptable, thereby meeting various needs in actual scenarios.
[0087] by Figure 2 In the example shown, the at least two execution machines 101 include: a first execution machine 1011 and a second execution machine 1012. Accordingly, the first execution machine 1011 is used to execute the first subtask in the task; send the first data generated by executing the first subtask to the storage device 102; when the first subtask is executed to the set stage, the first subtask is in a waiting state and triggers the second execution machine 1012 to execute the second subtask in the task. The second execution machine 1012 is used to execute the second subtask upon receiving a trigger signal for the second subtask; send the second data generated in the execution of the second subtask to the storage device 102. The first execution machine 1011 is also used to end the waiting state when the target data is obtained from the storage device 102, and continue to execute the first subtask according to the target data; wherein the target data is the execution data generated by any execution machine after the first execution machine in the execution order when executing the corresponding subtask.
[0088] In a specific achievable technical solution, the first execution engine 1011 is further used to obtain the target data based on the subtask execution chain corresponding to the task. The subtask execution chain includes the execution order information of at least two subtasks in the task; and the target data is the execution data of the subtask with the last execution order.
[0089] Assume that a task contains three subtasks, namely jobA, jobB and jobC. The subtask execution chain corresponding to this task is: jobA—>jobB—>jobC; that is, jobA is executed, triggering jobB to execute; after jobB is executed, jobC is triggered to execute. Correspondingly, the target data is the execution data of jobC, which ranks last in the execution order.
[0090] Of course, the target data may also be the execution data of any subtask in the subtask execution chain except the first subtask and the last subtask, which is not specifically limited in this embodiment.
[0091] In addition, the storage device 102 in this embodiment can be a storage server, a virtual storage server, or a cloud storage device. Among them, the cloud storage device is an independent computing device or a virtual machine (VM) image used to move data from a local site to a remote cloud storage service provider. The execution machine in this embodiment can be any form of device with data processing capabilities, such as: a computer host, a desktop computer, a laptop computer, a smart phone, a smart wearable device, etc. The operating system of the execution machine may include: Windows operating system, Unix operating system, Linux operating system, Mac operating system, etc.
[0092] Further, such as Figure 2 As shown, the task processing system provided in this embodiment may further include a management server 103. The management server 103 is used to determine the at least two subtasks with execution order requirements according to the task; and assign the at least two subtasks to the at least two execution machines for execution respectively.
[0093] Furthermore, the task processing system provided in this embodiment may also include a client device 104. Specifically, the client device 104 is connected to the management server 103, and is used to obtain the data to be processed submitted by the user through the interactive device. Correspondingly, the management server 103 is also used to obtain the data to be processed, and construct the task based on the data to be processed. Among them, the data to be processed submitted by the user through the interactive device can be a program code to be tested, or a learning task that requires machine learning, etc. For example, in the field of ensemble learning, ensemble learning is conceptually not a single machine learning algorithm, but completes the learning task by constructing and combining multiple machine learning. That is often said to be "learning from the strengths of many", ensemble learning can be used for classification problem integration, regression problem integration, feature selection integration, outlier detection integration, etc., to make machine learning more effective.
[0094] In specific implementation, the client device 104 may be a desktop computer, a laptop computer, a tablet computer, a smart phone or a smart wearable device, etc. The interaction device may be a touch screen, a voice recognition module, a mouse, a keyboard, etc. of the client device.
[0095] In another feasible solution, the management server may be one of at least two execution machines, for example Figure 3 The first execution machine 1011 shown in FIG. After receiving the data to be processed submitted by the user through the client device 104, the first execution machine 1011 constructs a task based on the data to be processed; determines that there are at least two subtasks with execution order requirements in the task; and assigns the remaining subtasks of the at least two subtasks except the first subtask to corresponding execution machines for execution.
[0096] The execution machine that serves as the management server can also be called the master execution machine. To ensure that the master execution machine is stable and does not crash, the operating system of the master execution machine can be a Linux system. In addition to the execution machine that serves as the management server, the remaining execution machines serve as slave execution machines.
[0097] The task processing system provided in the above embodiment can be applied to a continuous integration system. Among them, continuous integration is a software development practice, that is, team development members often integrate their work, and each member integrates at least once a day, which means that multiple integrations may occur every day. Each integration is verified by automated construction (including compilation, release, and automated testing) to find integration errors as soon as possible. Continuous integration requires developers to integrate the code into the trunk several times a day and perform automated compilation, testing and other operations. Due to this frequent integration and the compilation and testing that start in time after integration, errors caused by not performing necessary checks when submitting code, as well as some changes that exceed expected effects, can be effectively avoided, thereby ensuring the quality of the code. Due to this timeliness, if the project integration fails after a submission, the problem can be quickly found in this submission, which narrows the scope of finding problems, thereby reducing some error-checking time. The automated construction process can help developers save a lot of time. After completing the automation of this process, in the subsequent development process, all developers need to do is submit code to the version library, and the construction is automatically completed, and basically no longer requires manual intervention. The continuous integration tools are as follows: Hudson, CruiseControl, Continuum, QuickBuild, Bamboo, Jenkins, TeamCity, CI-Eye, etc. Among them, Hudson is an extensible continuous integration engine, which is mainly used to continuously and automatically build / test software projects, monitor some scheduled tasks, etc. CruiseControl is a framework for continuous build programs (project continuous integration). Apache Continuum is a continuous integration server. QuickBuild is a server software for continuous integration and release management, which provides a unified console to manage these release information. Jenkins' predecessor is Hudson, which is an extensible continuous integration engine, which is also used to continuously and automatically build / test software projects, monitor some scheduled tasks, etc. TeamCity is a continuous integration tool that supports the development of Java and .net projects. CI-Eye is also a continuous integration tool that can interact with many different continuous integration servers, such as Hudson server, Jenkins, server and TeamCity server.
[0098] The technical solution provided in this application can be applied to various continuous integration platforms, such as algorithm continuous integration test platform, software continuous integration test platform, etc., where tasks need to be built in series. That is, one embodiment of this application also provides a continuous integration system. Figure 4 As shown, the continuous integration system includes:
[0099] At least two execution machines 201 are used to collaboratively process a continuous integration task; wherein the continuous integration task includes at least two subtasks, and the at least two subtasks are executed by different execution machines; the at least two execution machines are executed sequentially, and the execution of the corresponding subtask by the latter execution machine needs to be triggered by the former execution machine;
[0100] A storage device 202, which is in communication with the at least two execution machines 201, and is used to receive and store data generated when any execution machine executes a corresponding subtask;
[0101] The first execution machine among the at least two execution machines is used to execute a first subtask. When the first subtask is executed to a set stage, the first subtask is in a waiting state, waiting for the execution data generated by the execution of the corresponding subtask by at least one subsequent execution machine, so as to continue to execute the first subtask according to the execution data.
[0102] The system architecture of the continuous integration system provided in this embodiment is structurally the same as the task processing system of the above embodiment. The difference is that the task in this embodiment is a continuous integration task. Similarly, the storage device in this embodiment can be a cloud storage device.
[0103] The storage device 202 can also provide any execution machine with a download service for the execution data generated by any execution machine when executing a corresponding task; in addition, it can also provide any execution machine with the data required to execute its corresponding subtask.
[0104] Furthermore, the continuous integration system provided in this embodiment also includes the management server. The management server is used to determine the at least two subtasks with execution order requirements according to the continuous integration task; and assign the at least two subtasks to the at least two execution machines for execution respectively. Figure 4 In the example shown, the management server is one of the at least two execution machines 2, such as Figure 4 Of course, in a specific implementation, the management server may also be an independent device other than the at least two execution machines.
[0105] Furthermore, the continuous integration system provided in this embodiment may also include a client device 204 and a version control library 203. The version control library 203 is used to obtain the code submitted by the user through the client device, and based on the code, change the version number corresponding to the corresponding software. The management server is also used to construct the continuous integration task for the software with the changed version number after checking that the version number of the software in the version control library has been changed.
[0106] like Figure 4As shown, the management server (or the first execution machine 2011) can check the version control library at regular intervals. There are three ways to trigger the management server to build a continuous integration task: the first is that the management server mentioned above checks the software version number in the version control library and changes it; the second is a timed trigger, such as triggering the construction of a continuous integration task once every 1 hour or 2 hours; the third is a manual trigger, such as a user performing an operation to trigger the construction of a continuous integration task through an interactive device.
[0107] According to the definition of continuous integration, building includes compilation, release, and automated testing. One build completes one continuous integration (CI) task. Assuming that the continuous integration tool used in this system is Jenkins, in this system, the build configuration is organized according to the Jenkins structure, and multiple jobs (i.e., subtasks) can form a test flow, which is Pipeline. The Pipeline can be understood as the continuous integration task in this embodiment.
[0108] Pipeline is actually a test pipeline, or pipeline. The jobs (i.e. subtasks) configured in a Pipeline have upstream and downstream relationships. In this way, when the first job of a Pipeline is triggered, the subsequent jobs will be automatically triggered. The output of the jobs in the same Pipeline can be passed to the downstream for use. For example, if the first job is compilation, the compilation result may be taken to the downstream and used as input for static code scanning. A Pipeline can only have one starting job; that is, in a Pipeline, only one job can choose non-upstream triggering (such as manual triggering, checking that the version number of the software in the version control library has changed, and timed triggering). Other jobs must choose upstream triggering to become a Pipeline.
[0109] In an achievable technical solution, the method provided in this embodiment can be implemented in a corresponding working mode (such as the first mode); after the working mode is switched, the task processing process of each execution machine can be restored to the solution in the prior art. For example, a user can configure the working mode for multiple execution machines participating in the collaborative processing task through a client device. Specifically, a corresponding client application is installed on the client device, and the user can trigger the configuration of the working mode of each execution machine through a switch control on the client application. For example, the user operates the switch control to turn it on, indicating that the working mode of each execution machine is the first mode. The user operates the switch control to turn it off, indicating that the working mode of each execution machine is restored to the initial mode (such as the mode corresponding to the existing solution). After obtaining the user configuration mode, each execution machine switches the current working mode to the first mode to work using the method steps in the above embodiment, that is, when executing the first subtask, the first subtask is in a waiting state after executing to the setting stage, waiting for the execution data generated by the subsequent execution of the corresponding subtask by at least one execution machine, so as to continue to execute the first subtask according to the execution data. When the working mode of each execution machine is in the first mode, it can be connected to the storage device for communication, so as to send the execution data generated by the execution of the corresponding subtask to the storage device, so as to be stored in the storage device.
[0110] Specifically, in the system provided by this embodiment, the client device is further used to send working mode configuration information to the management server in response to a working mode configuration operation triggered by a user through an interactive device. The management server is used to receive the working mode configuration information and send configuration instructions to the at least two execution machines according to the working mode configuration information, so that the execution machines that receive the instructions switch their own working modes.
[0111] The following is a specific example to illustrate the working principle of the system provided by each embodiment of the present application. Take a cloud storage device as an example, the cloud storage device provides a corresponding cloud storage service (Object Storage Service, OSS). Specifically, the three subtasks that need to be triggered serially in this embodiment are: jobA—>jobB—>jobC. Figure 5 The system provided in this embodiment includes: a first execution machine 301, a second execution machine 302, a third execution machine 303 and a cloud storage device 304. Specifically, the subtask execution process of each execution machine and the data interaction process with the cloud storage device are as follows:
[0112] Step 1: The first execution machine 301 executes jobA:
[0113] Step 1.1. Execute jobA.
[0114] Step 1.2: If data needs to be stored, the execution data A of jobA is sent to the cloud storage device 304 for storage in the cloud storage device.
[0115] In specific implementation, it can be based on actual needs, such as whether the execution of jobB or jobC needs to use the execution data A of jobA. If the execution of jobB or jobC needs to use the execution data A, the result A needs to be sent to the cloud storage device for storage, so that the second execution machine 302 and the third execution machine 303 corresponding to jobB or jobC can download it.
[0116] Step 1.3, trigger jobB to execute.
[0117] In specific implementation, Jenkins remote triggering API (Application Programming Interface) can be used to trigger jobB.
[0118] JobA executed by the first executor starts waiting, and jobB starts executing.
[0119] Step 2: The second execution machine 302 executes jobB:
[0120] Step 2.1: If there are external dependent files (such as execution data A of jobA or other data), download the required data from the cloud storage device 304.
[0121] Step 2.2: Execute jobB.
[0122] Step 2.3: If data needs to be stored, the execution data B of jobB is sent to the cloud storage device 304 so as to be stored in the cloud storage device 304.
[0123] Step 2.4: Trigger jobC to execute.
[0124] Similarly, the second execution machine 302 can use the Jenkins remote trigger API to trigger jobC.
[0125] At this point, jobB finishes executing and jobC starts executing.
[0126] Step 3: The third execution machine 303 executes jobC:
[0127] Step 3.1: If there are external dependent files (such as execution data A of jobA, execution data B of jobB or other data), the required data is obtained from the cloud storage device 304.
[0128] Step 3.2: Execute jobC.
[0129] Step 3.3: Send the execution data C of jobC to the cloud storage device 304.
[0130] After jobC is finished, jobA continues to be executed.
[0131] Step 4: The first execution machine 301 executes jobA:
[0132] Step 1.4: Search for required data from the cloud storage device, such as the execution data C of jobC.
[0133] Step 1.5: Processing result C; after completing the processing, jobA execution ends.
[0134] The technical solution provided in this embodiment uses cloud storage devices to store and transmit information while maintaining the original three jobs A, B and C without creating new jobs. The cloud storage device stores the necessary data generated by job A, B and C, and uses it as an information transmission tool. After job A executes its content and triggers job B to run, job A does not end the operation and return success, but continues to wait and uses the cloud storage service to poll the specified file. After job B and job C are executed sequentially, the polling program of job A can successfully query the result C of job C, then end the polling, continue to process subsequent tasks, and return to a successful state after the sequential execution ends. It can be seen that the technical solution provided in this embodiment proposes a new Jenkins serial construction method, using cloud storage devices as data transmission media and task serialization tools. Compared with the existing methods, it is easy to use, easy to expand, easy to maintain and stable. Users can view the execution data of the corresponding subtasks executed by each execution machine in the same subtask without having to view them in the corresponding subtasks separately.
[0135] The following embodiments will further illustrate the execution process of each component unit in the above system embodiments, such as the execution machine and the storage device.
[0136] Figure 6 The flowchart of the task processing method provided by an embodiment of the present application is shown. The execution subject provided by this embodiment can be any execution machine in the above-mentioned system embodiments, or the main execution machine among at least two execution machines, such as the above-mentioned Figure 2 The first execution machine 1011 or Figure 4 The first execution machine 2011 in . Specifically, Figure 6 As shown, the task processing method includes:
[0137] 401. A first execution subtask obtains a first subtask in a task to be collaboratively processed; wherein the task to be collaboratively processed includes the first subtask and the second subtask;
[0138] 402. The first execution machine executes the first subtask;
[0139] 403. The first execution machine sends the first data generated by executing the first subtask to a storage device;
[0140] 404. When the first subtask is executed to a set stage, the first execution machine puts the first subtask into a waiting state and triggers the second execution machine to execute the second subtask;
[0141] 405. When the target data is obtained, the first execution machine continues to execute the first subtask according to the target data; wherein the target data is the execution data generated by any execution machine after the first execution machine in the execution order when executing the corresponding subtask.
[0142] In the above 401, the task to be collaboratively processed may be a task constructed based on the data to be processed mentioned by the user; specifically, in a continuous integration application scenario, the task to be collaboratively processed may be a continuous integration task constructed for the software with a changed version number after a user submits the code of a certain software and the software version number is changed.
[0143] In a specific implementation, the “first execution machine executes the first subtask” in 402 may specifically include the following steps:
[0144] 4011. In the case where external dependency data exists, the first execution machine obtains the external dependency data from the storage device;
[0145] 4012. Based on the external dependency data, the first execution machine executes the first subtask.
[0146] The present embodiment does not specifically limit the external dependent data, which may be any data as long as it is data required to execute the first subtask.
[0147] In a specific achievable technical solution, in the above 404, “the first execution machine triggers the second execution machine to execute the second subtask” includes:
[0148] 4041. The first execution machine obtains relevant information of the second execution machine; wherein the second subtask executed by the second execution machine has a sequential execution dependency relationship with the first subtask;
[0149] 4042. The first executor sends trigger information to the second executor through a trigger API according to the relevant information of the second executor.
[0150] The relevant information of the second execution machine may be: identification information, network address information, etc. of the second execution machine, which is not specifically limited in this embodiment.
[0151] In the above 404, the setting stage can be any stage in the middle of the execution of the first subtask. For example, the first subtask is executed to the corresponding stage when the target data is required. In this article, the setting stage is not specifically limited.
[0152] In the above 405, assuming that the task to be collaboratively processed only includes the first subtask and the second subtask to be executed sequentially, the target data may be the execution data of the second subtask. If the task to be collaboratively processed includes not only the first subtask and the second subtask but also the third, fourth, etc. subtasks, the target data may be the execution data of the third, fourth or subsequent subtasks.
[0153] In a specific implementation, the target data may be the execution data of the last-ranked subtask among all subtasks that are executed sequentially. That is, the method provided in this embodiment may further include the following steps:
[0154] 406. The first execution machine obtains a subtask execution chain of the task to be collaboratively processed, wherein the task to be collaboratively processed includes at least two subtasks, and the subtask execution chain includes execution sequence information of the at least two subtasks;
[0155] 407. The first execution machine determines the execution data of the subtask ranked last in the execution order as the target data based on the subtask execution chain.
[0156] Assume that a task contains three subtasks, namely jobA, jobB and jobC. The subtask execution chain corresponding to this task is: jobA—>jobB—>jobC; that is, jobA is executed, triggering jobB to execute; after jobB is executed, jobC is triggered to execute. Correspondingly, the target data is the execution data of jobC, which ranks last in the execution order.
[0157] Furthermore, the method provided in this embodiment may also include:
[0158] 408. The first execution machine periodically sends a target data acquisition request to the storage device, so that the storage device feeds back the execution data after receiving the execution data of the subtask ranked last in the execution order.
[0159] Furthermore, the above 405 "the first execution machine continues to execute the first subtask according to the target data" can be specifically: processing the target data so that the first subtask is completed. The above processing of the target data is not specifically limited in this embodiment. In fact, after the target data is obtained from the storage device, the target data may not be processed in any way, just for the convenience of user viewing.
[0160] Figure 7 A flowchart of a task processing method provided by another embodiment of the present application is shown. The execution subject of the method provided by this embodiment can be one of the at least two execution machines in the above system embodiment. The execution of the corresponding subtask by the execution machine needs to be triggered by the upstream execution machine, such as the second execution machine in the above embodiment. Specifically, Figure 7 As shown, the method includes:
[0161] 501. When receiving a trigger signal for a second subtask, the second execution machine executes the second subtask;
[0162] 502. The second execution machine sends the second data generated during the execution of the second subtask to the storage device;
[0163] 503. The second execution machine triggers the third execution machine to execute the third subtask; wherein the third subtask has a sequential dependency relationship with the second subtask.
[0164] Figure 8 FIG. 1 is a flow chart of a task processing method provided by another embodiment of the present application. The execution subject of the method provided by this embodiment may be the storage device in the above system embodiment. Specifically, Figure 8 As shown, the method includes:
[0165] 601. Acquire first data generated by a first execution machine executing a first subtask;
[0166] 602. Store the first data so that at least one collaborative execution machine can obtain it; wherein the at least one collaborative execution machine and the first execution machine jointly process a task; the task includes at least two subtasks, and the at least two subtasks include the first subtask;
[0167] 603. Send target data to the first execution machine, wherein the target data is execution data generated when any collaborative execution machine whose execution order is after the first execution machine executes the corresponding subtask.
[0168] In the above 601, the first data may be the execution data of the first subtask, or may be the intermediate data generated during the execution of the first subtask.
[0169] In the above 602, at least one collaborative execution machine may be the second execution machine, the third execution machine, etc. mentioned in the above embodiments that collaborate with the first execution machine to process the same task.
[0170] In an implementable technical solution, the above 603 “sending target data to the first execution machine” may specifically include:
[0171] 6031. Receive inquiry information from the first execution machine regarding the target data;
[0172] 6032. Detect whether execution data sent by a cooperative execution machine after executing a corresponding subtask is received;
[0173] 6033. When the execution data is detected, the execution data is fed back to the first execution engine as the target data.
[0174] It should be noted here that: for the contents not fully described in the steps of the task processing method provided in the embodiment of the present application, please refer to the corresponding contents in the above embodiments, which will not be repeated here. In addition, in addition to the above steps, the method provided in the embodiment of the present application may also include other parts or all of the steps in the above embodiments, which can be specifically referred to the corresponding contents in the above embodiments, which will not be repeated here.
[0175] It should be added here that: when describing each embodiment above, the Jenkins serial construction scenario is used as an example. In essence, this embodiment is applicable to most scenarios that require collaborative processing of tasks. For example, in the scenario where the same text file (word) or table file (excel) needs to be collaboratively processed, multiple collaborative execution machines can respectively process a part of the text file or table file (i.e., subtasks), and the split parts can be executed in sequence. The storage device connected to each collaborative execution machine stores the processing data generated by each execution machine processing its corresponding part; the user can obtain the processing data of any or all execution machines for their respective corresponding parts from the storage device in real time through a certain execution machine. Among them, the processing of the corresponding parts by each of the above-mentioned execution machines can be text operations, for example, different users use different execution machines to perform text operations on the corresponding parts, such as text format operations, text information input operations, etc.
[0176] For another example, in some application scenarios, it is necessary to write multiple programs and place them in multiple Java files respectively, which need to be executed in sequence to obtain the final result. In this case, the technical solution provided by this embodiment can be used to assign multiple Java files that need to be executed in sequence to different execution machines for execution. Multiple execution machines need to execute in the execution order of each corresponding Java file. For example, the first execution machine of the Java file ranked first executes the Java file, and sends the data generated during the execution to the storage device so that the execution machine in the next execution order can obtain it. When the execution machine at the bottom of the ranking completes the execution of the last Java file, the execution result is sent to the storage device. The first execution machine can obtain the execution result of the last Java file from the storage device and display it, so that the user can view the final execution result without sending a network request to the last execution machine to obtain the execution result.
[0177] Fig. 9 The structural schematic diagram of the task processing device provided by an embodiment of the present application is shown. As shown in the figure, the task processing device includes: an acquisition module 10, an execution module 11, a sending module 12 and a trigger module 13. Among them, the acquisition module 10 is used to acquire the first subtask in the task to be collaboratively processed; wherein, the task to be collaboratively processed includes the first subtask and the second subtask. The execution module 11 is used to execute the first subtask; the sending module 12 is used to send the first data generated by the execution of the first subtask to the storage device; the trigger module 13 is used to put the first subtask in a waiting state when the first subtask is executed to the set stage, and trigger the second execution machine to execute the second subtask; the execution module 11 is used for the first execution machine to continue to execute the first subtask according to the target data when the target data is acquired; wherein, the target data is the execution data generated by any execution machine whose execution order is after the first execution machine when executing the corresponding subtask.
[0178] In the technical solution provided by this embodiment, a storage device is used to store the data generated by the execution of corresponding subtasks by multiple execution machines that collaboratively process the same task, and the storage device is used as a data transmission tool; after multiple subtasks are successively completed, any execution machine can obtain the execution data of other execution machines from the storage device. The solution is easy to use, expand, and maintain; and it is convenient for users to view the execution data of any task.
[0179] Furthermore, when triggering the second executor to execute the second subtask, the trigger module 13 is specifically used to: obtain relevant information of the second executor; wherein the second subtask executed by the second executor has a sequential execution dependency relationship with the first subtask; and send trigger information to the second executor through a trigger API based on the relevant information of the second executor.
[0180] Furthermore, the acquisition module 10 is also used to acquire the subtask execution chain of the task to be collaboratively processed, wherein the task to be collaboratively processed includes at least two subtasks, and the subtask execution chain includes the execution order information of the at least two subtasks. Accordingly, the device provided in this embodiment may also include a determination module, which is used to determine the execution data of the subtask with the lowest execution order as the target data based on the subtask execution chain.
[0181] Furthermore, the sending module 12 is further configured to periodically send a target data acquisition request to the storage device, so that the storage device feeds back the execution data after receiving the execution data of the subtask ranked last in the execution order.
[0182] Furthermore, when executing the first subtask, the execution module 11 is specifically used to: obtain the external dependency data from the storage device when there is external dependency data; and execute the first subtask based on the external dependency data.
[0183] It should be noted here that the task processing device provided in this embodiment can implement the technical solution described in the above management method embodiment. The specific implementation principles of the above modules or units can refer to the corresponding contents in the above task processing method embodiment, which will not be repeated here.
[0184] Another embodiment of the present application provides a task processing device. The structure of the task processing device is similar to the above Fig. 9 The task processing device shown is similar. Specifically, the task processing device includes: an execution module, a sending module and a trigger module. The execution module is used to execute the second subtask when a trigger signal for the second subtask is received. The sending module is used to send the second data generated during the execution of the second subtask to the storage device. The trigger module is used to trigger the third execution machine to execute the third subtask when there is a third subtask; wherein the third subtask and the second subtask have a sequential dependency relationship.
[0185] In the technical solution provided by this embodiment, a storage device is used to store the data generated by the execution of corresponding subtasks by multiple execution machines that collaboratively process the same task, and the storage device is used as a data transmission tool; after multiple subtasks are successively completed, any execution machine can obtain the execution data of other execution machines from the storage device. The solution is easy to use, expand, and maintain; and it is convenient for users to view the execution data of any task.
[0186] Fig.10 A structural schematic diagram of a task processing device provided by another embodiment of the present application is shown. As shown in the figure, the task processing device includes: an acquisition module 21, a storage module 22 and a sending module 23. Among them, the acquisition module 21 is used to acquire the first data generated by the first execution machine when executing the first subtask. The storage module 22 is used to store the first data so that at least one collaborative execution machine can acquire it; wherein, the at least one collaborative execution machine and the first execution machine collaborate to process a task; the task includes at least two subtasks, and the at least two subtasks include the first subtask. The sending module 23 is used to send target data to the first execution machine, wherein the target data is the execution data generated by any collaborative execution machine whose execution order is after the first execution machine when executing the corresponding subtask.
[0187] In the technical solution provided by this embodiment, a storage device is used to store the data generated by the execution of corresponding subtasks by multiple execution machines that collaboratively process the same task, and the storage device is used as a data transmission tool; after multiple subtasks are successively completed, any execution machine can obtain the execution data of other execution machines from the storage device. The solution is easy to use, expand, and maintain; and it is convenient for users to view the execution data of any task.
[0188] Furthermore, when sending target data to the first executor, the sending module 23 is specifically used to receive inquiry information from the first executor regarding the target data; detect whether execution data sent by a collaborative executor after executing a corresponding subtask is received; and when the execution data is detected, feed the execution data back to the first executor as the target data.
[0189] It should be noted here that the task processing device provided in this embodiment can implement the technical solution described in the above management method embodiment. The specific implementation principles of the above modules or units can refer to the corresponding contents in the above task processing method embodiment, which will not be repeated here.
[0190] Fig.11 FIG. 1 shows a schematic diagram of the structure of an execution machine provided by an embodiment of the present application. Fig.11 As shown, the execution machine includes: a memory 31 and a processor 32. The memory 31 can be configured to store various other data to support operations on the sensor. Examples of these data include instructions for any application or method for operating on the sensor. The memory 31 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk or an optical disk.
[0191] The processor 32 is coupled to the memory 31 and is configured to execute the program stored in the memory 31 to:
[0192] Acquire a first subtask in the task to be collaboratively processed; wherein the task to be collaboratively processed includes the first subtask and the second subtask;
[0193] Execute the first subtask;
[0194] Sending first data generated by executing the first subtask to a storage device;
[0195] When the first subtask is executed to a set stage, the first subtask is put into a waiting state, and a second execution machine is triggered to execute the second subtask;
[0196] When the target data is obtained, continuing to execute the first subtask according to the target data;
[0197] The target data is execution data generated when any execution machine whose execution order is subsequent to the first execution machine executes the corresponding subtask.
[0198] Furthermore, when the processor 32 executes the program in the memory 31, in addition to the above functions, it can also realize other functions, and the details can be referred to the description of the previous embodiments.
[0199] Further, if Fig.11 As shown, the client device also includes: a display 33, a communication component 34, a power supply component 35 and other components. Fig.11 Only some components are shown schematically, which does not mean that the sensor only includes Fig.11 Components shown.
[0200] Another embodiment of the present application provides an execution machine, the structure of which is similar to the above-mentioned Fig.11 Specifically, the execution machine includes a memory and a processor, wherein:
[0201] The memory is used to store programs;
[0202] The processor is coupled to the memory and is configured to execute the program stored in the memory to:
[0203] When receiving a trigger signal for the second subtask, executing the second subtask;
[0204] Sending second data generated by executing the second subtask to a storage device;
[0205] A third execution engine is triggered to execute a third subtask; wherein the third subtask has a sequential dependency relationship with the second subtask.
[0206] In particular, when the processor executes the program in the memory, in addition to the above functions, other functions may also be implemented, for details, please refer to the description of the previous embodiments.
[0207] Another embodiment of the present application provides a storage device. The structure of the storage device is similar to the above Fig.11 Specifically, the storage device includes a memory, a processor, and a communication component, wherein:
[0208] The memory is used to store programs;
[0209] The processor is coupled to the memory and is configured to execute the program stored in the memory to:
[0210] Acquire first data generated by the first execution machine executing the first subtask;
[0211] storing the first data so that at least one collaborative execution machine can obtain it; wherein the at least one collaborative execution machine and the first execution machine cooperate to process a task; the task includes at least two subtasks, and the at least two subtasks include the first subtask;
[0212] Control the communication component to send target data to the first execution machine, wherein the target data is execution data generated by any collaborative execution machine whose execution order is after the first execution machine when executing a corresponding subtask.
[0213] In particular, when the processor executes the program in the memory, in addition to the above functions, other functions may also be implemented, for details, please refer to the description of the previous embodiments.
[0214] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a computer, the task processing method steps or functions provided in the above embodiments can be implemented.
[0215] In the technical solutions provided by the above embodiments, the execution of the corresponding subtask by the latter of at least two execution machines executed sequentially is triggered by the previous execution machine. In fact, in the specific implementation, the device that triggers the execution machine to execute the corresponding subtask can also be a storage device. For example, a task processing system provided by another embodiment of the present application, such as Fig.12 As shown, including:
[0216] At least two execution machines 701, used to collaboratively process a task; wherein the task includes at least two subtasks, and the at least two subtasks are executed by different execution machines;
[0217] The storage device 702 is communicatively connected to the at least two execution machines, and is used to trigger any one of the at least two execution machines to execute a corresponding subtask; and receive and store data generated when any one of the execution machines executes a corresponding subtask.
[0218] Furthermore, the first execution machine 7011 among the at least two execution machines is used to execute a first subtask. When the first subtask is executed to a set stage, the first subtask is in a waiting state, waiting for the execution data generated by the subsequent at least one execution machine executing the corresponding subtask, so as to continue to execute the first subtask according to the execution data.
[0219] It should be noted here that: since the function of triggering the execution machine in this embodiment is realized by the storage device, in this embodiment, in addition to the function of the first execution machine triggering the second execution machine, other functions of the first execution machine in this embodiment can be referred to the corresponding contents in the above embodiments, and will not be repeated here.
[0220] Fig.13 A flowchart of a task processing method provided by another embodiment of the present application is shown. The execution subject of the method described in this embodiment may be a storage device. Specifically, the method includes:
[0221] 801. Trigger a first execution machine among at least two execution machines, so that the first execution machine executes a first subtask;
[0222] 802. Acquire and store first data generated by the first execution machine executing the first subtask;
[0223] 803. When the first subtask is executed to a set stage, trigger the second executor among the at least two executors so that the second executor executes the second subtask; wherein the first executor and the second executor jointly process a task, and the task includes the first subtask and the second subtask.
[0224] In the above 801, the trigger information is sent to the first execution machine by triggering the corresponding API.
[0225] In the above 803, the first execution machine may send corresponding information when executing the first subtask to the setting stage; after receiving the information, the execution subject of the method described in this embodiment obtains the relevant information of the second execution machine, and sends trigger information to the second execution machine by triggering the corresponding API based on the relevant information of the second execution machine.
[0226] Furthermore, the method provided in this embodiment may also include the following steps:
[0227] 804. Send target data to the first execution machine, wherein the target data is execution data generated by any collaborative execution machine whose execution order is after the first execution machine when executing a corresponding subtask.
[0228] Furthermore, the method provided in this embodiment may also include the following steps:
[0229] 805. Receive the working mode set by the user through the client device;
[0230] 806. When the working mode is the second mode, turn off the function of triggering the execution machine.
[0231] After the function of triggering the execution machine is turned off, the working mode may be switched to the working mode described in the above embodiments in which the latter of at least two execution machines executing in sequence executes the corresponding subtask triggered by the former execution machine.
[0232] An embodiment of the present application also provides a storage device, the structure of which is similar to the above Fig.11 Specifically, the execution machine includes a memory and a processor, wherein:
[0233] The memory is used to store programs;
[0234] The processor is coupled to the memory and is configured to execute the program stored in the memory to:
[0235] triggering a first execution machine of at least two execution machines so that the first execution machine executes a first subtask;
[0236] Acquire and store first data generated by the first execution machine executing the first subtask;
[0237] When the first subtask is executed to a set stage, the second execution machine among the at least two execution machines is triggered so that the second execution machine executes the second subtask; wherein the first execution machine and the second execution machine jointly process a task, and the task includes the first subtask and the second subtask.
[0238] In particular, when the processor executes the program in the memory, in addition to the above functions, other functions may also be implemented, for details, please refer to the description of the previous embodiments.
[0239] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a computer, the task processing method steps or functions provided in the above embodiments can be implemented.
[0240] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0241] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0242] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A task processing system, characterized in that: include: At least two execution machines are used to collaboratively process a task; wherein the task includes at least two subtasks, and the at least two subtasks are executed by different execution machines; the at least two execution machines are executed sequentially, and the execution of the corresponding subtask by the latter execution machine needs to be triggered by the former execution machine; A storage device, communicatively connected to the at least two execution machines, for receiving and storing data generated when any execution machine executes a corresponding subtask; The first execution machine among the at least two execution machines is used to obtain the current working mode, and execute the first subtask when the working mode is the first mode. When the first subtask is executed to the set stage, the first subtask is in a waiting state, waiting for the execution data generated by the execution of the corresponding subtask by at least one subsequent execution machine, so as to continue to execute the first subtask according to the execution data.
2. The system according to claim 1, characterized in that: The storage device is also used to provide downloading of the data to any execution machine.
3. The system according to claim 2, characterized in that: The at least two execution machines include: a first execution machine and a second execution machine; and The first execution machine is used to execute a first subtask in the task; and send first data generated by executing the first subtask to the storage device; When the first subtask is executed to the setting stage, the first subtask is in a waiting state and triggers the second execution machine to execute the second subtask in the task; The second execution machine is used to execute the second subtask when receiving a trigger signal for the second subtask; and send the second data generated during the execution of the second subtask to the storage device; The first execution machine is further configured to end the waiting state and continue to execute the first subtask according to the target data when the target data is obtained from the storage device; The target data is execution data generated when any execution machine whose execution order is subsequent to the first execution machine executes the corresponding subtask.
4. The system according to claim 3, characterized in that The first execution machine is further used to obtain the target data based on the subtask execution chain corresponding to the task; The subtask execution chain includes execution order information of at least two subtasks in the task; and the target data is execution data of the subtask ranked last in the execution order.
5. The system according to any one of claims 1 to 4, characterized in that The storage device is a cloud storage device.
6. The system according to any one of claims 1 to 4, characterized in that Also includes: The management server is used to determine, according to the task, the at least two subtasks having execution order requirements; The at least two subtasks are correspondingly assigned to the at least two execution machines for execution respectively.
7. The system according to claim 6, characterized in that Also includes: A client device connected to the management server and used to obtain the data to be processed submitted by the user through the interactive device; The management server is further used to obtain the data to be processed and construct the task based on the data to be processed.
8. The system according to claim 7, characterized in that The client device is further configured to send working mode configuration information to the management server in response to a working mode configuration operation triggered by a user through an interactive device; The management server is used to receive the working mode configuration information, and send configuration instructions to the at least two execution machines according to the working mode configuration information, so that the execution machines receiving the instructions switch their own working modes.
9. A continuous integration system, characterized in that: include: At least two execution machines are used to collaboratively process a continuous integration task; wherein the continuous integration task includes at least two subtasks, and the at least two subtasks are executed by different execution machines; the at least two execution machines are executed sequentially, and the execution of the corresponding subtask by the latter execution machine needs to be triggered by the former execution machine; A storage device, communicatively connected to the at least two execution machines, for receiving and storing data generated when any execution machine executes a corresponding subtask; The first execution machine among the at least two execution machines is used to obtain the current working mode, and execute the first subtask when the working mode is the first mode. When the first subtask is executed to the set stage, the first subtask is in a waiting state, waiting for the execution data generated by the execution of the corresponding subtask by at least one subsequent execution machine, so as to continue to execute the first subtask according to the execution data.
10. The system according to claim 9, characterized in that The storage device is a cloud storage device.
11. The system according to claim 9 or 10, characterized in that: Also includes: A management server is used to determine, according to the continuous integration task, the at least two subtasks having execution order requirements; The at least two subtasks are correspondingly assigned to the at least two execution machines for execution respectively.
12. The system according to claim 11, characterized in that Also includes: Client devices; A version control library, used to obtain the code submitted by the user through the client device, and based on the code, change the version number corresponding to the corresponding software; The management server is further configured to construct the continuous integration task for the software with the changed version number after checking that the version number of the software in the version control library has been changed.
13. A task processing method, characterized in that: include: The first execution machine obtains a first subtask in the task to be collaboratively processed; wherein the task to be collaboratively processed includes the first subtask and the second subtask; The first execution machine executes the first subtask; The first execution machine sends the first data generated by executing the first subtask to a storage device, and the storage device is used to receive and store the data generated when any execution machine executes the corresponding subtask; The first execution machine obtains the current working mode, and when the working mode is the first mode, when the first subtask is executed to a set stage, the first subtask is put into a waiting state, and the second execution machine is triggered to execute the second subtask; In case the target data is acquired from the storage device, the first execution machine continues to execute the first subtask according to the target data; The target data is execution data generated when any execution machine whose execution order is subsequent to the first execution machine executes the corresponding subtask.
14. The method according to claim 13, characterized in that The first execution machine triggers the second execution machine to execute the second subtask, including: The first execution machine obtains relevant information of the second execution machine; wherein the second subtask executed by the second execution machine has a sequential execution dependency relationship with the first subtask; The first execution machine sends trigger information to the second execution machine through a trigger API according to the relevant information of the second execution machine.
15. The method according to claim 13 or 14, characterized in that Also includes: The first execution machine obtains a subtask execution chain of the task to be collaboratively processed, wherein the task to be collaboratively processed includes at least two subtasks, and the subtask execution chain includes execution order information of the at least two subtasks; The first execution engine determines the execution data of the subtask ranked last in the execution order as the target data based on the subtask execution chain.
16. The method according to claim 15, characterized in that Also includes: The first execution machine periodically sends a target data acquisition request to the storage device, so that the storage device feeds back the execution data after receiving the execution data of the subtask ranked last in the execution order.
17. The method according to claim 13 or 14, characterized in that The first execution machine executes the first subtask, including: In the case where the external dependency data exists, the first execution machine obtains the external dependency data from the storage device; The first execution machine executes the first subtask based on the external dependency data.
18. A task processing method, characterized in that: include: The second execution machine executes the second subtask when receiving a trigger signal for the second subtask in the task to be collaboratively processed; The task to be collaboratively processed includes a first subtask, a second subtask and a third subtask, wherein the first subtask is executed by a first execution machine, the first execution machine obtains a current working mode, and when the working mode is the first mode, when the first subtask in the task is executed to a set stage, the first subtask is put into a waiting state, waiting for execution data generated by executing the corresponding subtask by at least one subsequent execution machine, and triggering the second execution machine to execute the second subtask; The second execution machine sends the second data generated by executing the second subtask to a storage device, and the storage device is used to receive and store the data generated when any execution machine executes the corresponding subtask, so that when the first execution machine obtains the target data from the storage device, the first execution machine continues to execute the first subtask according to the target data, and the target data is the execution data generated by any execution machine after the first execution machine in the execution order executing the corresponding subtask; The second execution machine triggers the third execution machine to execute the third subtask; wherein the third subtask has a sequential dependency relationship with the second subtask.
19. A task processing method, characterized in that: include: Acquire first data generated by a first execution machine executing a first subtask, where the first subtask is executed by the first execution machine; The first data is stored so as to be acquired by at least one collaborative execution machine; wherein the at least one collaborative execution machine and the first execution machine jointly process a task; the task includes at least two subtasks, the at least two subtasks include the first subtask and the second subtask, and the at least one collaborative execution machine includes a second execution machine; the first execution machine acquires the current working mode, and when the working mode is the first mode, when the first subtask is executed to a set stage, the first subtask is placed in a waiting state, waiting for the execution data generated by the subsequent at least one execution machine executing the corresponding subtask, and triggering the second execution machine to execute the second subtask; Acquire second data generated by the second execution machine executing the second subtask and store the second data; Send target data to the first execution machine, wherein the target data is execution data generated by any collaborative execution machine whose execution order is after the first execution machine when executing the corresponding subtask, so that the first execution machine continues to execute the first subtask according to the target data.
20. The method according to claim 19, characterized in that Sending target data to the first execution machine includes: receiving inquiry information of the first execution machine regarding the target data; Detecting whether execution data sent by a collaborative execution machine after executing a corresponding subtask is received; When the execution data is detected, the execution data is fed back to the first execution engine as the target data.
21. A task processing system, characterized in that: include: At least two execution machines, for collaboratively processing a task; wherein the task includes at least two subtasks, and the at least two subtasks are executed by different execution machines; A storage device, connected to the at least two execution machines in communication, used to trigger any one of the at least two execution machines to execute a corresponding subtask; receive and store data generated when any one of the execution machines executes a corresponding subtask; The first execution machine among the at least two execution machines is used to obtain the current working mode, and execute the first subtask when the working mode is the first mode. When the first subtask is executed to the set stage, the first subtask is in a waiting state, waiting for the execution data generated by the execution of the corresponding subtask by at least one subsequent execution machine, so as to continue to execute the first subtask according to the execution data.
22. A task processing method, characterized in that: include: triggering a first execution machine among at least two execution machines so that the first execution machine acquires a current working mode, executes a first subtask in the task to be collaboratively processed when the working mode is the first mode, and puts the first subtask in a waiting state when the first subtask is executed to a set stage, waiting for execution data generated by the subsequent execution of the corresponding subtask by at least one execution machine, so as to continue to execute the first subtask according to the execution data; the task to be collaboratively processed includes the first subtask and the second subtask; Acquire and store first data generated by the first execution machine executing the first subtask; When the first subtask is executed to a set stage, triggering a second execution machine among the at least two execution machines, so that the second execution machine executes the second subtask; Acquire second data generated by the second execution machine executing the second subtask and store the second data; Send target data to the first execution machine, wherein the target data is execution data generated by any collaborative execution machine whose execution order is after the first execution machine when executing the corresponding subtask, so that the first execution machine continues to execute the first subtask according to the target data.
23. The method according to claim 22, characterized in that Also includes: Send target data to the first execution machine, wherein the target data is execution data generated by any collaborative execution machine whose execution order is after the first execution machine when executing a corresponding subtask.
24. The method according to claim 22, characterized in that Also includes: Receive the working mode set by the user through the client device; When the working mode is the second mode, the function of triggering the execution machine is turned off.
25. An execution machine, characterized in that: The execution machine is specifically a first execution machine, including: a memory and a processor, wherein: The memory is used to store programs; The processor is coupled to the memory and is configured to execute the program stored in the memory to: Acquire a first subtask in the task to be collaboratively processed; wherein the task to be collaboratively processed includes the first subtask and the second subtask; Performing the first subtask; Sending first data generated by executing the first subtask to a storage device, wherein the storage device is used to receive and store data generated when any execution machine executes a corresponding subtask; Obtaining the current working mode, and when the working mode is the first mode, when the first subtask is executed to a set stage, putting the first subtask in a waiting state, and triggering the second execution machine to execute the second subtask; In case the target data is acquired from the storage device, continuing to execute the first subtask according to the target data; The target data is the execution data generated by any execution machine after the first execution machine in the execution order executing the corresponding subtask.
26. An execution machine, characterized in that: The execution machine is specifically a second execution machine, including: a memory and a processor, wherein: The memory is used to store programs; The processor is coupled to the memory and is configured to execute the program stored in the memory to: Upon receiving a trigger signal for a second subtask in a task to be collaboratively processed, the second subtask is executed; the task to be collaboratively processed includes a first subtask, the second subtask and a third subtask, the first subtask is executed by a first execution machine, the first execution machine obtains a current working mode, and when the working mode is the first mode, when the first subtask in the task is executed to a set stage, the first subtask is placed in a waiting state, waiting for execution data generated by the execution of the corresponding subtask by at least one subsequent execution machine, and triggering the second execution machine to execute the second subtask; sending the second data generated by executing the second subtask to a storage device, the storage device being used to receive and store the data generated when any execution machine executes the corresponding subtask, so that when the first execution machine obtains the target data from the storage device, the first execution machine continues to execute the first subtask according to the target data, the target data being the execution data generated when any execution machine whose execution order is after the first execution machine executes the corresponding subtask; A third execution engine is triggered to execute the third subtask; wherein the third subtask has a sequential dependency relationship with the second subtask.
27. A storage device, characterized in that: include: Memory, processor and communication components, wherein: The memory is used to store programs; The processor is coupled to the memory and is configured to execute the program stored in the memory to: Acquire first data generated by a first execution machine executing a first subtask, where the first subtask is executed by the first execution machine; The first data is stored so as to be acquired by at least one collaborative execution machine; wherein the at least one collaborative execution machine and the first execution machine jointly process a task; the task includes at least two subtasks, the at least two subtasks include the first subtask and the second subtask, and the at least one collaborative execution machine includes a second execution machine; the first execution machine acquires the current working mode, and when the working mode is the first mode, when the first subtask is executed to a set stage, the first subtask is placed in a waiting state, waiting for the execution data generated by the subsequent at least one execution machine executing the corresponding subtask, and triggering the second execution machine to execute the second subtask; Acquire second data generated by the second execution machine executing the second subtask and store the second data; Control the communication component to send target data to the first execution machine, wherein the target data is the execution data generated by any collaborative execution machine whose execution order is after the first execution machine when executing the corresponding subtask, so that the first execution machine continues to execute the first subtask according to the target data.
28. A storage device, characterized in that: include: Memory and processor, wherein: The memory is used to store programs; The processor is coupled to the memory and is configured to execute the program stored in the memory to: triggering a first execution machine among at least two execution machines, so that the first execution machine acquires a current working mode, executes a first subtask in the task to be collaboratively processed when the working mode is the first mode, and puts the first subtask in a waiting state when the first subtask is executed to a set stage, waiting for execution data generated by the subsequent execution of the corresponding subtask by at least one execution machine, so as to continue to execute the first subtask according to the execution data; the task to be collaboratively processed includes the first subtask and the second subtask; Acquire and store first data generated by the first execution machine executing the first subtask; When the first subtask is executed to a set stage, triggering a second execution machine among the at least two execution machines, so that the second execution machine executes the second subtask; Acquire second data generated by the second execution machine executing the second subtask and store the second data; Send target data to the first execution machine, wherein the target data is execution data generated by any collaborative execution machine whose execution order is after the first execution machine when executing the corresponding subtask, so that the first execution machine continues to execute the first subtask according to the target data.
Citation Information
Patent Citations
Task scheduling management method, apparatus and system
CN107016479A
