Data processing method, device and equipment for pipeline tasks

By responding to intervention requests in pipeline tasks, determining the working status of the target container and writing to the intervention file, the batch management difficulties caused by the large number of pipeline task containers in the prior art are solved, and flexible and accurate processing of pipeline task containers is achieved.

CN114356561BActive Publication Date: 2025-04-25AGRICULTURAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111592598.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-23
Publication Date
2025-04-25
Estimated Expiration
2041-12-23

AI Technical Summary

Technical Problem

In the prior art, after receiving the deletion instruction, the pipeline task deletes all containers in the corresponding process, resulting in a large number of containers and difficulty in batch management, which in turn makes it difficult to interfere with the process.

Method used

Provides a data processing method for pipeline tasks, which determines the working status of the target container in response to an intervention request, and writes the intervention file to the target container according to the preset intervention file to change its working status. This method performs data processing for the smallest management unit, i.e., container, and narrows the scope of data processing.

Benefits of technology

It realizes accurate and flexible processing of containers in pipeline tasks. Compared with the existing technology, it can be more convenient to flexibly intervene in pipeline tasks according to user data needs, and solves the problem of difficult manual intervention in pipelines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114356561B_ABST
    Figure CN114356561B_ABST
Patent Text Reader

Abstract

The present application provides a data processing method, device and equipment for pipeline tasks, which relates to pipeline management technology. The method includes: responding to an intervention request, wherein the intervention request is used to change the working state of a target container in the pipeline task, and the intervention request includes a target process and a target container in the target process, and determining the working state of the target container in the target process; the pipeline task includes multiple processes, and the process is used to indicate at least one container; if the working state of the target container is not completed, then according to the preset intervention file corresponding to the intervention request, the intervention file is written to the target container. The method of the present application can accurately and flexibly process the container in the pipeline task through the target process in the intervention request and the target container in the target process, solving the technical problem that it is difficult to manually intervene in the pipeline.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to pipeline management technology, and in particular to a data processing method, device and equipment for pipeline tasks. Background Art

[0002] At present, in the process of software development, pipeline tasks are used to implement code building, testing, and deployment processes. Among them, pipeline tasks include multiple containers (Pods), and pipeline tasks execute subtasks of containers based on processes. Pipeline tasks need to be processed to complete software development.

[0003] In the prior art, for a cloud-native pipeline task based on K8S, a deletion instruction is sent to the pipeline task according to the command line of K8S. After receiving the deletion instruction, the pipeline task deletes all containers in the corresponding process.

[0004] However, in the prior art, after receiving the deletion instruction, the pipeline task deletes all containers in the corresponding process, and the number of deleted containers is large, resulting in that only the containers in the process can be managed in batches, which makes it difficult to intervene in the process. Summary of the invention

[0005] The present application provides a data processing method, device and equipment for pipeline tasks, which are used to solve the technical problem that manual intervention in the pipeline is difficult.

[0006] In a first aspect, the present application provides a data processing method for a pipeline task, the method comprising:

[0007] In response to an intervention request, wherein the intervention request is used to change the working state of a target container in the pipeline task, and the intervention request includes a target process and a target container in the target process, and determines the working state of the target container in the target process; the pipeline task includes a plurality of processes, and the process is used to indicate at least one container;

[0008] If the working status of the target container is not completed, the intervention file is written into the target container according to the preset intervention file corresponding to the intervention request.

[0009] Further, if the working state of the target container is not completed, writing the intervention file into the target container according to the preset intervention file corresponding to the intervention request includes:

[0010] If the working state of the target container is an unfinished state, determining the type of the intervention request;

[0011] Determine, according to a preset correspondence relationship between the type of intervention request and the intervention file, an intervention file corresponding to the type of intervention request; wherein the intervention file is determined according to an index of the target container;

[0012] The intervention file is written to the target container.

[0013] Further, according to the preset correspondence relationship between the type of intervention request and the intervention file, determining the intervention file corresponding to the type of intervention request includes:

[0014] When it is determined that the type of the intervention request is an end container, according to a preset correspondence relationship between the type of the intervention request and the intervention file, it is determined that the intervention file corresponding to the type of the intervention request is an end container file.

[0015] Further, according to the preset correspondence relationship between the type of intervention request and the intervention file, determining the intervention file corresponding to the type of intervention request includes:

[0016] When it is determined that the type of the intervention request is skip container, according to a preset correspondence relationship between the type of the intervention request and the intervention file, it is determined that the intervention file corresponding to the type of the intervention request is a skip container file.

[0017] Further, when the type of the intervention request is to end a container, writing the intervention file into the target container includes:

[0018] When there are multiple target containers in the target process, determine the order of the target containers in the target process, and determine the target container at the top;

[0019] The intervention file is written to the first target container.

[0020] Furthermore, the intervention request also includes an identity identifier, and the method further includes:

[0021] If it is determined that the identity identifier has operation authority, wherein the operation authority represents the authority to execute the intervention request, a step of determining a working state of a target container in the target process is performed.

[0022] Furthermore, the method further comprises:

[0023] Execution result information corresponding to the target container is obtained according to the intervention request.

[0024] In a second aspect, the present application provides a data processing device for a pipeline task, the device comprising:

[0025] a determining unit, configured to respond to an intervention request, wherein the intervention request is used to change the working state of a target container in the pipeline task, and the intervention request includes a target process and a target container in the target process, and determine the working state of the target container in the target process; the pipeline task includes a plurality of processes, and the process is used to indicate at least one container;

[0026] A writing unit is configured to write the intervention file into the target container according to a preset intervention file corresponding to the intervention request if the working status of the target container is not completed.

[0027] Furthermore, the writing unit comprises:

[0028] A first determination module, configured to determine the type of the intervention request if the working state of the target container is an unfinished state;

[0029] A second determination module, configured to determine an intervention file corresponding to the type of intervention request according to a preset correspondence relationship between the type of intervention request and the intervention file; wherein the intervention file is determined according to an index of a target container;

[0030] A writing module is used to write the intervention file into the target container.

[0031] Furthermore, the second determining module is specifically configured to:

[0032] When it is determined that the type of the intervention request is an end container, according to a preset correspondence relationship between the type of the intervention request and the intervention file, it is determined that the intervention file corresponding to the type of the intervention request is an end container file.

[0033] Furthermore, the second determining module is specifically configured to:

[0034] When it is determined that the type of the intervention request is skip container, according to a preset correspondence relationship between the type of the intervention request and the intervention file, it is determined that the intervention file corresponding to the type of the intervention request is a skip container file.

[0035] Further, when the type of the intervention request is to end the container, the writing module includes:

[0036] a determination submodule, used for determining the order of the target containers in the target process when there are multiple target containers in the target process, and determining the target container at the first position;

[0037] The writing submodule is used to write the intervention file into the target container located at the first position.

[0038] Furthermore, the intervention request also includes an identity identifier, and the device further includes:

[0039] An execution unit is used to, if it is determined that the identity identifier has operation authority, wherein the operation authority represents the authority to execute the intervention request, execute a step of determining a working state of a target container in the target process.

[0040] Furthermore, the device also includes:

[0041] The obtaining unit is used to obtain the execution result information corresponding to the target container according to the intervention request.

[0042] In a third aspect, the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, and when the processor executes the computer program, the method described in the first aspect is implemented.

[0043] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect.

[0044] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the method described in the first aspect when executed by a processor.

[0045] The present application provides a data processing method, device and equipment for a pipeline task, which responds to an intervention request, wherein the intervention request is used to change the working state of a target container in the pipeline task, and the intervention request includes a target process and a target container in the target process, and determines the working state of the target container in the target process; the pipeline task includes multiple processes, and the process is used to indicate at least one container; if the working state of the target container is not completed, then according to the preset intervention file corresponding to the intervention request, the intervention file is written to the target container. In this scheme, when an intervention request issued by a user is received, the working state of the target container in the intervention request can be determined. If the working state of the target container is an uncompleted working state, then according to the correspondence between the preset intervention request and the intervention file, the intervention file corresponding to the target container is determined, and then the intervention file is written to the target container, so that the target container changes its own working state according to the intervention file.

[0046] Therefore, by intervening in the target process in the request and the target container in the target process, the containers in the pipeline task can be processed accurately and flexibly. Compared with the batch processing of containers in the target process in the prior art, the present application can process data for the smallest management unit, namely the container, which greatly reduces the scope of data processing and makes it easier to flexibly intervene in pipeline tasks according to the user's data needs, thus solving the technical problem of the difficulty of manual intervention in the pipeline. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0048] Figure 1 A flowchart of a data processing method for a pipeline task provided in an embodiment of the present application;

[0049] Figure 2 A flowchart of another data processing method for pipeline tasks provided in an embodiment of the present application;

[0050] Figure 3 A schematic diagram of a scenario of a data processing method for a pipeline task provided in an embodiment of the present application;

[0051] Figure 4 A schematic diagram of the structure of a data processing device for a pipeline task provided in an embodiment of the present application;

[0052] Figure 5 A schematic diagram of the structure of another data processing device for pipeline tasks provided in an embodiment of the present application;

[0053] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0054] Figure 7 A block diagram of an electronic device provided in an embodiment of the present application.

[0055] The above drawings show clear embodiments of the present disclosure, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present disclosure to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0056] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure.

[0057] In one example, during the software development process, pipeline tasks are used to implement code building, testing, and deployment processes. Among them, the pipeline task includes multiple containers (Pod), and the pipeline task executes the subtasks of the container based on the process. The pipeline task needs to be processed to complete the software development. In the prior art, for cloud-native pipeline tasks based on K8S, a delete command is sent to the pipeline task according to the K8S command line. After the pipeline task receives the delete command, it deletes all containers in the corresponding process. However, in the prior art, since the pipeline task deletes all containers in the corresponding process after receiving the delete command, the number of deleted containers is large, resulting in that only the containers in the process can be managed in batches, which makes it more difficult to intervene in the process.

[0058] The present application provides a data processing method, device and equipment for pipeline tasks, aiming to solve the above technical problems in the prior art.

[0059] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0060] Figure 1 A flowchart of a data processing method for a pipeline task provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes:

[0061] 101. Respond to an intervention request, wherein the intervention request is used to change a working state of a target container in a pipeline task, and the intervention request includes a target process and a target container in the target process, and determines the working state of the target container in the target process; the pipeline task includes multiple processes, and the process is used to indicate at least one container.

[0062] For example, the execution subject of this embodiment can be an electronic device, or a terminal device, or a data processing device or device of a pipeline task, or other devices or equipment that can execute this embodiment, and there is no limitation on this. In this embodiment, the execution subject is introduced as an electronic device.

[0063] First, the pipeline task includes multiple processes, each process includes at least one container, and when the electronic device executes the pipeline task, it executes multiple containers in the process in turn. When an intervention request from a user is received, the working state of the target process and the working state of the target container in the target process are queried and determined according to the target process included in the intervention request and the target container in the target process.

[0064] 102. If the working status of the target container is not completed, write an intervention file into the target container according to a preset intervention file corresponding to the intervention request.

[0065] Exemplarily, the preset intervention file is determined in advance according to the type of intervention request, and the intervention request includes multiple types such as ending a container and skipping a container. If it is determined that the working state of the target process is an unfinished working state, and it is determined that the working state of the target container in the target process is an unfinished working state, then according to the preset intervention file corresponding to the type of intervention request, the intervention file is written into the target container.

[0066] For example, when the type of intervention request is to end the container, the intervention file corresponding to the type of intervention request is the end container file, if the working state of the target process is determined to be an unfinished working state, and the working state of the target container in the target process is determined to be an unfinished working state, then the end container file is written into the target container according to the end container file corresponding to the end container type of the intervention request. Alternatively, when the type of intervention request is to skip the container, the intervention file corresponding to the type of intervention request is the skip container file, if the working state of the target process is determined to be an unfinished working state, and the working state of the target container in the target process is determined to be an unfinished working state, then the skip container file is written into the target container according to the skip container file corresponding to the skip container type of the intervention request.

[0067] In an embodiment of the present application, in response to an intervention request, wherein the intervention request is used to change the working state of the target container in the pipeline task, and the intervention request includes a target process and a target container in the target process, and determines the working state of the target container in the target process; the pipeline task includes multiple processes, and the process is used to indicate at least one container. If the working state of the target container is not completed, then according to the preset intervention file corresponding to the intervention request, the intervention file is written to the target container. In this scheme, when an intervention request issued by a user is received, the working state of the target container in the intervention request can be determined. If the working state of the target container is an uncompleted working state, then according to the correspondence between the preset intervention request and the intervention file, the intervention file corresponding to the target container is determined, and then the intervention file is written to the target container, so that the target container changes its own working state according to the intervention file. Therefore, by intervening in the target process in the request and the target container in the target process, the containers in the pipeline task can be processed accurately and flexibly. Compared with the batch processing of containers in the target process in the prior art, the present application can process data for the smallest management unit, namely the container, which greatly reduces the scope of data processing and makes it easier to flexibly intervene in pipeline tasks according to the user's data needs, thus solving the technical problem of the difficulty of manual intervention in the pipeline.

[0068] Figure 2 A flowchart of another data processing method for pipeline tasks provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the method includes:

[0069] 201. Respond to an intervention request, wherein the intervention request is used to change the working state of a target container in a pipeline task, and the intervention request includes a target process and a target container in the target process, and the intervention request also includes an identity. If it is determined that the identity has operation authority, wherein the operation authority represents the authority to execute the intervention request, then a step of determining the working state of the target container in the target process is executed; the pipeline task includes multiple processes, and a process is used to indicate at least one container.

[0070] Exemplarily, the pipeline task includes multiple processes, each process includes at least one container. When receiving an intervention request issued by a user, the electronic device first determines whether the user issuing the intervention request has the operation authority to execute the intervention request based on the identity identifier. If it is determined that the user issuing the intervention request has the corresponding operation authority, the next step can be performed.

[0071] 202. Determine a working state of a target container within a target process.

[0072] Exemplarily, when an intervention request from a user is received, the working state of the target process and the working state of the target container in the target process are queried and determined according to the target process and the target container in the target process included in the intervention request.

[0073] 203. If the working state of the target container is an unfinished state, determine the type of intervention request.

[0074] Exemplarily, if it is determined that the working state of the target container is an unfinished state, then the type of intervention request is determined, wherein the type of intervention request includes multiple types such as ending a container and skipping a container.

[0075] 204. Determine the intervention file corresponding to the type of intervention request according to a preset correspondence relationship between the type of intervention request and the intervention file; wherein the intervention file is determined according to the index of the target container.

[0076] In one example, step 204 includes two methods:

[0077] The first way of step 204: when it is determined that the type of the intervention request is to end the container, according to the preset correspondence between the type of the intervention request and the intervention file, the intervention file corresponding to the type of the intervention request is determined to be the end container file.

[0078] The second way of step 204: when it is determined that the type of the intervention request is skip container, according to the preset correspondence between the type of the intervention request and the intervention file, it is determined that the intervention file corresponding to the type of the intervention request is the skip container file.

[0079] Exemplarily, the electronic device stores a preset correspondence between the type of intervention request and the intervention file, and each type of intervention request corresponds to an intervention file, so the electronic device can determine the intervention file corresponding to the type of intervention request according to the preset correspondence between the type of intervention request and the intervention file. The intervention file is determined according to the index of the target container, and the index of the target container can be the serial number of the target container, etc.

[0080] For example, in the first method of step 204, when it is determined that the type of intervention request is an end container, according to the preset correspondence between the type of intervention request and the intervention file, the electronic device can determine that the intervention file corresponding to the type of intervention request is an end container file, and the end container file is determined according to the index of the target container. When the index of the target container is m, the end container file is the m.err file.

[0081] In the second method of step 204, when it is determined that the type of intervention request is a skip container, according to the preset correspondence between the type of intervention request and the intervention file, the electronic device can determine that the intervention file corresponding to the type of intervention request is a skip container file, and the skip container file is determined according to the index of the target container. When the index of the target container is n, the skip container file is n file.

[0082] 205. Write the intervention file to the target container.

[0083] In one example, when the type of intervention request is to end a container, writing an intervention file into a target container includes: when there are multiple target containers in a target process, determining the order of the target containers in the target process, and determining a target container located first; and writing the intervention file into the target container located first.

[0084] Exemplarily, when the electronic device writes an intervention file to a target container, if the type of the intervention request is to end the container, and there are multiple target containers in the target process, then the target containers in the target process that are in an unfinished working state are counted, and the order of the target containers in the target process is determined, and then the target container at the first position is determined, and then the intervention file is written to the target container at the first position. Alternatively, when the electronic device writes an intervention file to a target container, if the type of the intervention request is to skip the container, and there are multiple target containers in the target process, then the intervention file needs to be written to multiple target containers respectively.

[0085] For example, the pipeline task is the control mechanism of Tekton, which is a very powerful and flexible CI / CD open source cloud native framework. In Tekton's control mechanism, the start of container execution depends on the successful execution of the previous container. If the previous container fails, the next container will also exit with failure. In addition, when the intervention request is executed in the pipeline task, there is no intersection with the specific business in the pipeline task. The sign of successful container execution is that a file numbered as the current container index is written in the tekton working directory. The sign of failed container execution is that a file numbered as the current container index with the suffix .err is written in the tekton working directory. For example Figure 3 As shown, Figure 3 A schematic diagram of a data processing method for a pipeline task provided in an embodiment of the present application, according to Figure 3It can be seen that the pipeline task includes container 0, container 1, and container 2. When container 0 is executed successfully, the file "0" is written into container 0 according to the file "0" confirmed by the index "0" of container 0. When container 0 fails to execute, the file "0.err" is written into container 0 according to the file "0.err" confirmed by the index "0" of container 0, and then container 1 and container 2 are executed continuously. The execution logic is the same as that of container 0. When container 0 is executed successfully, if container 1 is executed successfully, the file "1" is written into container 1. If container 1 fails to execute, the file "1.err" is written into container 1. When container 0 fails to execute, container 1 must fail to execute and the file "1.err" is written into container 1.

[0086] Therefore, when the type of intervention request is to end the container, and there are multiple target containers in the target process, the electronic device only needs to write the end container file, that is, the file with the suffix .err, to the target container at the first position. The target container ends its own working state according to the end container file, and the next container of the target container will end its own working state along with the previous target container, thereby ending the pipeline task. Alternatively, if the intervention file is a skip container file, the electronic device can write the skip container file to the target container, and then the pipeline task can skip the target container and continue to run the next container.

[0087] 206. Obtain execution result information corresponding to the target container according to the intervention request.

[0088] Exemplarily, the electronic device can obtain execution result information corresponding to the target container according to the intervention request, and the execution result information records the specific execution status of each target container, thereby facilitating the user to view the execution status of the pipeline task.

[0089] In an embodiment of the present application, in response to an intervention request, wherein the intervention request is used to change the working state of a target container in a pipeline task, and the intervention request includes a target process and a target container in the target process, and the intervention request also includes an identity identifier, and if it is determined that the identity identifier has an operation authority; wherein the operation authority represents the authority to execute the intervention request, then the step of determining the working state of the target container in the target process is executed; the pipeline task includes multiple processes, and the process is used to indicate at least one container. Determine the working state of the target container in the target process. If the working state of the target container is an unfinished state, determine the type of the intervention request. According to the correspondence between the preset type of the intervention request and the intervention file, determine the intervention file corresponding to the type of the intervention request; wherein the intervention file is determined according to the index of the target container. Write the intervention file into the target container. Obtain execution result information corresponding to the target container according to the intervention request. Therefore, by intervening in the target process in the request and the target container in the target process, the containers in the pipeline task can be processed accurately and flexibly. Compared with the batch processing of containers in the target process in the prior art, the present application can process data for the smallest management unit, namely the container, which greatly reduces the scope of data processing and makes it easier to flexibly intervene in pipeline tasks according to the user's data needs, thus solving the technical problem of the difficulty of manual intervention in the pipeline.

[0090] Figure 4 A schematic diagram of a data processing device for a pipeline task provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, the device comprises:

[0091] A determination unit 31 is used to respond to an intervention request, wherein the intervention request is used to change the working state of a target container in a pipeline task, and the intervention request includes a target process and a target container in the target process, and determines the working state of the target container in the target process; the pipeline task includes multiple processes, and a process is used to indicate at least one container.

[0092] The writing unit 32 is configured to write an intervention file into the target container according to a preset intervention file corresponding to the intervention request if the working status of the target container is not completed.

[0093] The device of this embodiment can execute the technical solution in the above method. Its specific implementation process and technical principles are the same and will not be repeated here.

[0094] Figure 5 A schematic diagram of the structure of another data processing device for pipeline tasks provided in an embodiment of the present application, in Figure 4 Based on the embodiment shown, Figure 5 As shown, the writing unit 32 includes:

[0095] The first determination module 321 is configured to determine the type of the intervention request if the working state of the target container is an unfinished state.

[0096] The second determination module 322 is used to determine the intervention file corresponding to the type of intervention request according to the preset correspondence relationship between the type of intervention request and the intervention file; wherein the intervention file is determined according to the index of the target container.

[0097] The writing module 323 is used to write the intervention file into the target container.

[0098] In one example, the second determining module 322 is specifically configured to:

[0099] When it is determined that the type of the intervention request is the end container, according to a preset correspondence relationship between the type of the intervention request and the intervention file, it is determined that the intervention file corresponding to the type of the intervention request is the end container file.

[0100] In one example, the second determining module 322 is specifically configured to:

[0101] When it is determined that the type of the intervention request is skip container, according to a preset correspondence relationship between the type of the intervention request and the intervention file, it is determined that the intervention file corresponding to the type of the intervention request is a skip container file.

[0102] In one example, when the type of intervention request is to end the container, the writing module 323 includes:

[0103] The determination submodule 3231 is used to determine the order of the target containers in the target process when there are multiple target containers in the target process, and determine the target container at the first position.

[0104] The writing submodule 3232 is used to write the intervention file into the target container located at the first position.

[0105] In one example, the intervention request further includes an identity identifier, and the device further includes:

[0106] The execution unit 41 is used to execute the step of determining the working state of the target container in the target process if it is determined that the identity identifier has the operation permission, wherein the operation permission represents the permission to execute the intervention request.

[0107] In one example, the device further includes:

[0108] The obtaining unit 42 is used to obtain the execution result information corresponding to the target container according to the intervention request.

[0109] The device of this embodiment can execute the technical solution in the above method. Its specific implementation process and technical principles are the same and will not be repeated here.

[0110] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the electronic device includes: a memory 51 and a processor 52.

[0111] The memory 51 stores a computer program that can be executed on the processor 52 .

[0112] The processor 52 is configured to execute the method provided in the above embodiment.

[0113] The electronic device further includes a receiver 53 and a transmitter 54. The receiver 53 is used to receive instructions and data sent by an external device, and the transmitter 54 is used to send instructions and data to the external device.

[0114] Figure 7 This is a block diagram of an electronic device provided in an embodiment of the present application. The electronic device may be a mobile phone, a computer, a digital broadcast terminal, a message transceiver, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0115] The device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 614 , and a communication component 616 .

[0116] The processing component 602 generally controls the overall operation of the device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.

[0117] The memory 604 is configured to store various types of data to support operations on the device 600. Examples of such data include instructions for any application or method operating on the device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0118] The power supply component 606 provides power to the various components of the device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 600.

[0119] The multimedia component 608 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0120] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the device 600 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.

[0121] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0122] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the device 600. For example, the sensor assembly 614 can detect the open / closed state of the device 600, the relative positioning of components, such as the display and keypad of the device 600, the sensor assembly 614 can also detect the position change of the device 600 or a component of the device 600, the presence or absence of user contact with the device 600, the orientation or acceleration / deceleration of the device 600 and the temperature change of the device 600. The sensor assembly 614 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 614 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.

[0123] The communication component 616 is configured to facilitate wired or wireless communication between the device 600 and other devices. The device 600 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0124] In an exemplary embodiment, the apparatus 600 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0125] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by the processor 620 of the device 600 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0126] An embodiment of the present application also provides a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the method provided by the above embodiment.

[0127] An embodiment of the present application also provides a computer program product, which includes: a computer program, which is stored in a readable storage medium, and at least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the solution provided by any of the above embodiments.

[0128] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0129] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A data processing method for pipeline tasks, characterized in that: The method comprises: In response to an intervention request, wherein the intervention request is used to change the working state of a target container in the pipeline task, and the intervention request includes a target process and a target container in the target process, and determines the working state of the target container in the target process; the pipeline task includes a plurality of processes, and the process is used to indicate at least one container; If the working state of the target container is not completed, writing the intervention file into the target container according to the preset intervention file corresponding to the intervention request; If the working state of the target container is not completed, writing the intervention file into the target container according to the preset intervention file corresponding to the intervention request includes: If the working state of the target container is an unfinished state, determining the type of the intervention request; Determine, according to a preset correspondence relationship between the type of intervention request and the intervention file, an intervention file corresponding to the type of intervention request; wherein the intervention file is determined according to an index of the target container; Writing the intervention file into the target container; Determining the intervention file corresponding to the type of intervention request according to the preset correspondence between the type of intervention request and the intervention file includes: When it is determined that the type of the intervention request is an end container, according to a preset correspondence relationship between the type of the intervention request and the intervention file, it is determined that the intervention file corresponding to the type of the intervention request is an end container file, wherein when the index of the target container is m, the end container file is an m.err file; Determining the intervention file corresponding to the type of intervention request according to the preset correspondence between the type of intervention request and the intervention file includes: When it is determined that the type of the intervention request is a skip container, according to a preset correspondence between the type of the intervention request and the intervention file, it is determined that the intervention file corresponding to the type of the intervention request is a skip container file, wherein when the index of the target container is n, the skip container file is n file.

2. The method according to claim 1, characterized in that When the type of the intervention request is to end a container, writing the intervention file into the target container includes: When there are multiple target containers in the target process, determine the order of the target containers in the target process, and determine the target container at the top; The intervention file is written to the first target container.

3. The method according to any one of claims 1 to 2, characterized in that: The intervention request also includes an identity identifier, and the method further includes: If it is determined that the identity identifier has operation authority, wherein the operation authority represents the authority to execute the intervention request, a step of determining a working state of a target container within the target process is performed.

4. The method according to any one of claims 1 to 2, characterized in that: The method further comprises: Execution result information corresponding to the target container is obtained according to the intervention request.

5. A data processing device for pipeline tasks, characterized in that: The device comprises: a determining unit, configured to respond to an intervention request, wherein the intervention request is used to change the working state of a target container in the pipeline task, and the intervention request includes a target process and a target container in the target process, and determine the working state of the target container in the target process; the pipeline task includes a plurality of processes, and the process is used to indicate at least one container; a writing unit, configured to write the intervention file into the target container according to a preset intervention file corresponding to the intervention request if the working status of the target container is not completed; The writing unit comprises: A first determination module for determining the type of intervention request if the working state of the target container is an unfinished state; A second determination module is used to determine the intervention file corresponding to the type of the intervention request according to a preset correspondence relationship between the type of the intervention request and the intervention file; wherein the intervention file is determined according to the index of the target container; The second determination module is specifically used for: When it is determined that the type of the intervention request is an end container, according to a preset correspondence relationship between the type of the intervention request and the intervention file, the intervention file corresponding to the type of the intervention request is determined to be an end container file, wherein when the index of the target container is m, the end container file is the m.err file; The second determination module is specifically used for: When it is determined that the type of intervention request is skip container, according to the preset correspondence between the type of intervention request and the intervention file, the intervention file corresponding to the type of intervention request is determined to be the skip container file, wherein when the index of the target container is n, the skip container file is n file.

6. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements the method according to any one of claims 1 to 4 when executing the computer program.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 4 when executed by a processor.

Citation Information

Patent Citations

  • Method and device for controlling state of assembly line task

    CN113778527A