Statistical method, device and equipment for execution results of assembly line tasks and medium
By passing random numbers between pipeline task nodes and judging task execution results using XOR operation, the problems of high resource occupation and static task nodes are solved, and efficient execution and flexible node management of pipeline tasks are realized.
Patent Information
- Application Number
- CN202410999544.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-11-08
AI Technical Summary
The existing statistical method of pipeline task execution results occupies a large amount of resources when the task depth is high and cannot dynamically adjust the task nodes, limiting the flexibility of pipeline tasks.
By passing random numbers between task nodes and judging task execution results using XOR operation, we avoid step by step waiting and fixed number of task nodes, and efficient use of resources and dynamic increase and decrease of task nodes are achieved.
Reduces resource consumption, supports dynamic node management of pipeline tasks, and improves system flexibility and efficiency.
Smart Images

Figure CN118916082A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to a statistical method, device, equipment and medium for pipeline task execution results. Background Art
[0002] A pipeline task refers to a series of related tasks that are executed in sequence. A pipeline task usually refers to a series of tasks or steps that are automatically executed during software development and continuous integration / continuous deployment. These tasks are organized into pipelines to complete code building, testing, deployment and other operations in an automated manner. The purpose of pipeline tasks is to improve development efficiency, reduce human errors, ensure software quality and rapid iteration. In actual production environments, tasks that usually require the use of pipelines will have multiple branches. In some scenarios, it is necessary to wait for all tasks in each branch to be successfully executed before executing the next step, so a certain design is required in the statistics of task execution results.
[0003] There are generally two statistical methods for execution results. The first method is to wait for the execution results of the downstream task nodes at the beginning of the pipeline task, and so on. The second method is to save the execution results of each task node in the pipeline to the database, and add a scheduled task to scan whether the execution results of all task nodes in the current pipeline are successful.
[0004] However, the former needs to wait for the execution results step by step. If the task depth is too high, a large amount of resources will be occupied and cannot be released, resulting in a waste of system resources. The latter needs to know the number of task nodes in the current pipeline in advance, which limits the dynamic increase and decrease of pipeline tasks. When the demand changes, the plan needs to be modified to adapt. Summary of the invention
[0005] The present invention provides a statistical method, device, equipment and medium for pipeline task execution results, so as to reduce the resource consumption required for statistical task execution results and support dynamic increase and decrease of task nodes.
[0006] According to one aspect of the present invention, a statistical method for pipeline task execution results is provided, comprising:
[0007] Receive a pipeline task identifier and a first random number sent by an upstream node;
[0008] If the task is successfully executed and there is a downstream task node, a second random number is generated, the first random number, the second random number and the pipeline task identifier are determined as a feedback message, and the pipeline task identifier and the second random number are sent to the downstream task node;
[0009] If the task is successfully executed and there is no downstream task node, determining the first random number and the pipeline task identifier as a feedback message;
[0010] The feedback message is sent to the execution result statistics process to instruct the execution result statistics process to perform an XOR operation on the random number in the feedback message sent by the node belonging to the target pipeline task according to the pipeline task identifier in the feedback message, and determine that the target pipeline task is executed successfully when the operation result is zero.
[0011] According to another aspect of the present invention, there is provided a statistical device for pipeline task execution results, comprising:
[0012] A data acquisition module, used for receiving a pipeline task identifier and a first random number sent by an upstream node;
[0013] A first data sorting module is used to generate a second random number if the task is successfully executed and there is a downstream task node, determine the first random number, the second random number and the pipeline task identifier as a feedback message, and send the pipeline task identifier and the second random number to the downstream task node;
[0014] A second data sorting module, configured to determine the first random number and the pipeline task identifier as a feedback message if the task is successfully executed and there is no downstream task node;
[0015] A message sending module is used to send the feedback message to the execution result statistics process, and is used to instruct the execution result statistics process to perform an XOR operation on the random number in the feedback message sent by the node belonging to the target pipeline task according to the pipeline task identifier in the feedback message, and determine that the target pipeline task is executed successfully when the operation result is zero.
[0016] According to another aspect of the present invention, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method for counting pipeline task execution results according to any embodiment of the present invention.
[0017] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0018] at least one processor; and
[0019] a memory communicatively connected to the at least one processor; wherein,
[0020] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the statistical method for pipeline task execution results described in any embodiment of the present invention.
[0021] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to implement the statistical method for pipeline task execution results described in any embodiment of the present invention when executed by a processor.
[0022] The embodiment of the present invention generates, transmits or feeds back random numbers when the execution is successful, and the execution result statistics process performs an XOR operation on the random numbers. Based on the characteristics of the XOR operation, it solves the problem that the resources occupied by the task pipeline cannot be released when the execution result statistics are performed, and the statistical method and the number of task nodes are decoupled.
[0023] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1A It is a flow chart of a method for counting the execution results of pipeline tasks provided according to an embodiment of the present invention;
[0026] Figure 1B is a schematic diagram of a pipeline task provided according to an embodiment of the present invention;
[0027] Figure 2A is a flow chart of a method for counting pipeline task execution results provided according to another embodiment of the present invention;
[0028] Figure 2B is a schematic diagram of a pipeline task execution result statistics process provided according to another embodiment of the present invention;
[0029] Figure 3 is a structural schematic diagram of a method for collecting statistics on pipeline task execution results provided according to another embodiment of the present invention;
[0030] Figure 4 It is a schematic diagram of the structure of an electronic device implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "input", "output", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] To facilitate understanding of the working principle of the following embodiments, the characteristics of the XOR operation are briefly described first:
[0034] The XOR operation is a bitwise operation. For the same set of numbers, no matter what order the XOR operation is performed, the final result is the same. This is because the XOR operation satisfies the commutative and associative laws.
[0035] Commutative law: a⊕b=b⊕a
[0036] Associative law: a⊕b⊕c=a⊕(b⊕c)=(a⊕b)⊕c
[0037] Because of these two properties, a set of numbers can be XORed in any order, and the final result is the same. For example, for a set of numbers a, b, c, and d, no matter in what order the XOR operation is performed (such as a⊕b⊕c⊕d, a⊕c⊕d⊕b), the result is the same.
[0038] This property is very useful in some algorithms and data structures. For example, when calculating the XOR check value of a set of numbers, the data can be easily processed in parallel or in any order without affecting the final check result.
[0039] Figure 1AThis is a flowchart of a method for counting the execution results of pipeline tasks provided by an embodiment of the present invention. This embodiment can be applied to the case where an execution result counting process is deployed on a server, and the execution result counting process is used to simultaneously count the execution results of one or more pipeline tasks. This method can be executed by a statistical device for the execution results of pipeline tasks, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device with corresponding data processing capabilities, such as a server where a task node is located. Figure 1A As shown, the method includes:
[0040] S110: Receive a pipeline task identifier and a first random number sent by an upstream node.
[0041] S120. If the task is executed successfully and there is a downstream task node, generate a second random number, determine the first random number, the second random number and the pipeline task identifier as a feedback message, and send the pipeline task identifier and the second random number to the downstream task node.
[0042] S130: If the task is executed successfully and there is no downstream task node, the first random number and the pipeline task identifier are determined as a feedback message.
[0043] S240. Send the feedback message to the execution result statistics process, instructing the execution result statistics process to perform an XOR operation on the random number in the feedback message sent by the node belonging to the target pipeline task according to the pipeline task identifier in the feedback message, and determine that the target pipeline task is executed successfully when the operation result is zero.
[0044] The first random number is a random number generated by the upstream node and sent to the current node, and the second random number is a random number generated by the current node and sent to the downstream node.
[0045] Specifically, Figure 1B As shown, a pipeline task consists of a start node and task nodes, and each task node performs a specific operation in the pipeline.
[0046] For the start node of the pipeline task: when the start node starts the pipeline task, it generates a pipeline task identifier and generates a second random number for the downstream node. Then the second random number and the pipeline task identifier are sent to the execution result statistics process as feedback messages of the start node. At the same time, the pipeline task identifier and the second random number are sent to the downstream node.
[0047] For each task node of the pipeline task: the task node receives the pipeline task identifier and the first random number sent by the upstream node, and the random number is the second random number relative to the upstream node and the first random number relative to the current node.
[0048] If the current node has a downstream node, a second random number is generated for the downstream node, and the second random number and the pipeline task identifier obtained from the upstream node are sent to the downstream node. At the same time, the generated second random number, the pipeline task identifier obtained from the upstream node, and the first random number are sent as feedback messages to the execution result statistics process.
[0049] If the current node has no downstream node, the pipeline task identifier and the first random number obtained from the upstream node can be directly sent to the execution result statistics process as a feedback message.
[0050] It should be noted that the task node will send corresponding data to the process and downstream nodes only after its corresponding specific operation is successfully executed; it will not send corresponding data to the process and downstream nodes before its corresponding specific operation is successfully executed.
[0051] The execution result statistics process counts the execution results of one or more pipeline tasks at the same time, and will receive feedback messages sent by nodes from each task pipeline. Therefore, the process needs to first distinguish the feedback messages according to the pipeline task identifier in the feedback message, and then perform an XOR operation on the random numbers in the feedback messages sent by the nodes belonging to the target pipeline task.
[0052] Based on the characteristics of XOR operation, the result of XOR operation will be zero only when every node of the pipeline task is executed successfully. That is, if the result is zero, it means that all nodes of the target pipeline task are executed successfully, and the target pipeline task is executed successfully; if the result is 1, it means that there are nodes in the target pipeline task that are not executed successfully, and the target pipeline task fails to execute.
[0053] The node of the embodiment of the present invention generates, transmits or feeds back a random number when the execution is successful, and the execution result statistics process performs an XOR operation on the random number. Based on the characteristics of the XOR operation, the problem that the resource occupation of the task pipeline cannot be released when the execution result statistics is performed, and the problem of decoupling the statistical method and the number of task nodes is solved.
[0054] On the basis of the above embodiment, optionally, there are multiple message queues in the execution result statistics process, and the message queues, pipeline tasks and pipeline task identifiers correspond one to one.
[0055] Specifically, multiple message queues are deployed in the execution result statistics process, and each message queue corresponds to a pipeline task. For each feedback message, the process determines the pipeline task to which the node sending the feedback message belongs based on the pipeline task identifier in the feedback message, and puts the random number in the feedback message into the message queue corresponding to the pipeline task (identifier).
[0056] Based on the above embodiment, optionally, the execution result statistics process is specifically configured as follows:
[0057] For each feedback message, placing the random number in the feedback message into a message queue corresponding to the pipeline task identifier in the feedback message;
[0058] Pull the random number from the target message queue and perform XOR operation;
[0059] If the calculation result is zero within the task cycle of the target pipeline task, it is determined that the target pipeline task is executed successfully;
[0060] If the operation result is 1 at the end of the task cycle of the target pipeline task, it is determined that the target pipeline task has failed to execute.
[0061] Specifically, the task cycle of each pipeline task is pre-set. For the target message queue corresponding to the target pipeline task, the target message queue is traversed to see if there is a newly put random number, and if there is, it is pulled to perform XOR operation.
[0062] If the calculation result is 0 within the task cycle of the target pipeline task, it means that all nodes of the target pipeline task have been successfully executed within the task cycle and have sent feedback messages. The pipeline task is executed successfully. At this time, the callback interface can be called to continue the downstream step task or feedback the execution result of the target pipeline task.
[0063] If the calculation result is still 1 at the end of the task cycle of the target pipeline task, it means that there is a node in the target pipeline task that has not been successfully executed within the task cycle and has not issued a feedback message, and the pipeline task has failed to execute. At this time, an execution failure alarm of the target pipeline task can be issued.
[0064] Based on the above embodiment, optionally, the task node is an original task node that has been planned before the task starts or a newly added task node that is replanned after the task starts.
[0065] Specifically, by actively sending feedback messages to the process, the execution results of the task nodes no longer need to be saved in the database, so that the pipeline task has the ability to dynamically increase or decrease nodes.
[0066] After the pipeline task starts, a new task node can be added after any task node that has not yet been completed. For the new task node, it only needs to follow the same random number generation, transmission and feedback rules as the original task node.
[0067] Similarly, after the pipeline task starts, you can delete an original task node downstream of any task node that has not yet been completed, which will not affect the subsequent task result statistics.
[0068] Figure 2A This is a flowchart of a method for calculating the results of pipeline task execution provided by another embodiment of the present invention. This embodiment is optimized and improved on the basis of the above embodiment. Figure 2A As shown, the method includes:
[0069] S210: Receive a pipeline task identifier and a first random number sent by an upstream node.
[0070] S220. If the task is successfully executed and there are multiple downstream task nodes, a second random number is generated for each downstream task node; and the second random number generated for the task node and the pipeline task identifier are sent to each downstream task node.
[0071] Specifically, if the current node has only one downstream task node, it is only necessary to generate a second random number for the only downstream task node and send it together with the pipeline task identifier. If the current node has multiple task nodes, it is necessary to generate a second random number for each downstream task node, and the second random number corresponds to the downstream task node one by one. For each downstream task node, the current node sends the second random number and the pipeline task identifier generated for it to the task node.
[0072] Optionally, each random number carries a node identifier of a node that generates the random number, which is used to distinguish random numbers with the same value during an XOR operation.
[0073] Specifically, when there are many task nodes in a pipeline task, random numbers with the same value may be generated in different task nodes, affecting the subsequent XOR operation, and thus affecting the process's judgment of the task execution result. To this end, when generating a random number, the task node can attach its own node to it. In this way, even if the values of two random numbers are exactly the same, the process can distinguish between them when performing the XOR operation.
[0074] S230: Determine the first random number, the second random number, and the pipeline task identifier as a feedback message.
[0075] S240. Send the feedback message to the execution result statistics process, instructing the execution result statistics process to perform an XOR operation on the random number in the feedback message sent by the node belonging to the target pipeline task according to the pipeline task identifier in the feedback message, and determine that the target pipeline task is executed successfully when the operation result is zero.
[0076] For example, Figure 2BAs shown in the figure, 1. When the start node starts the task, it generates the pipeline task identifier task_uid and transparently passes task_uid to each task node. The task node generates<task_uid,random()> , that is, generate a random number pair for task_uid.
[0077] 2. Start the node to send feedback messages to the execution result statistics process<task_uid,r1> .
[0078] 3. Task node A receives<task_uid,r1> , there are two downstream nodes B and C. Send data to node B<task_uid,r2> , send data to node C<task_uid,r3> After the A node is successfully executed, it sends a feedback message to the execution result statistics process.<task_uid,r1^r2^r3> .
[0079] 4. Task node B receives<task_uid,r2> , there is a downstream node D. Send data to node D<task_uid,r4> After successful execution, node B sends a feedback message to the execution result statistics process.<task_uid,r2^r4> .
[0080] 5. Task node C receives<task_uid,r3> , there is no downstream node. After the C node is successfully executed, it sends a feedback message to the execution result statistics process<task_uid,r3> .
[0081] 6. Task node D receives<task_uid,r4> , there is no downstream node. After the D node is successfully executed, it sends a feedback message to the execution result statistics process<task_uid,r4> .
[0082] The feedback data received by the execution result statistics process includes:<task_uid,r1> ,<task_uid,r1^r2^r3> ,<task_uid,r3> ,<task_uid,r2^r4> ,<task_uid,r4> .
[0083] The execution result statistics process performs an XOR operation on the random number in the received feedback message:
[0084] r1^(r1^r2^r3)^r3^(r2^r4)^r4
[0085] ^^^^^^^
[0086] =r1 r1 r2 r3 r3 r2 r4 r4
[0087] ^^^^^^^
[0088] =r1 r1 r2 r2 r3 r3 r44
[0089] =0.
[0090] The final calculation result is 0, and the execution result statistics process determines that the pipeline task is executed successfully.
[0091] The embodiment of the present invention realizes the statistics of the execution results of the multi-branch pipeline tasks by generating a second random number for each downstream node.
[0092] Figure 3 A schematic diagram of a statistical device for pipeline task execution results provided by another embodiment of the present invention. Figure 3 As shown, the device comprises:
[0093] The data acquisition module 310 is used to receive the pipeline task identifier and the first random number sent by the upstream node;
[0094] The first data sorting module 320 is used to generate a second random number if the task is successfully executed and there is a downstream task node, determine the first random number, the second random number and the pipeline task identifier as a feedback message, and send the pipeline task identifier and the second random number to the downstream task node;
[0095] A second data sorting module 330 is configured to determine the first random number and the pipeline task identifier as a feedback message if the task is successfully executed and there is no downstream task node;
[0096] The message sending module 340 is used to send the feedback message to the execution result statistics process, and is used to instruct the execution result statistics process to perform an XOR operation on the random number in the feedback message sent by the node belonging to the target pipeline task according to the pipeline task identifier in the feedback message, and determine that the target pipeline task is successfully executed when the operation result is zero.
[0097] The statistical device for pipeline task execution results provided by the embodiment of the present invention can execute the statistical method for pipeline task execution results provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0098] Optionally, if there are multiple downstream task nodes, the first data sorting module 320 includes a random number generating unit, which is used to generate a second random number for each downstream task node;
[0099] Correspondingly, the first data sorting module 320 includes a random number sending unit, which is used to send the second random number generated for the task node and the pipeline task identifier to each downstream task node.
[0100] Optionally, each random number carries a node identifier of a node that generates the random number, which is used to distinguish random numbers with the same value during an XOR operation.
[0101] Optionally, the task node is an original task node that has been planned before the task starts or a newly added task node that is replanned after the task starts.
[0102] Optionally, there are multiple message queues in the execution result statistics process, and the message queues, pipeline tasks and pipeline task identifiers correspond one to one.
[0103] Optionally, the execution result statistics process is specifically configured as follows:
[0104] For each feedback message, placing the random number in the feedback message into a message queue corresponding to the pipeline task identifier in the feedback message;
[0105] Pull the random number from the target message queue and perform XOR operation;
[0106] If the calculation result is zero within the task cycle of the target pipeline task, it is determined that the target pipeline task is executed successfully;
[0107] If the operation result is 1 at the end of the task cycle of the target pipeline task, it is determined that the target pipeline task has failed to execute.
[0108] The statistical device for pipeline task execution results further described can also execute the statistical method for pipeline task execution results provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0109] Figure 4 A schematic diagram of the structure of an electronic device 40 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0110] like Figure 4As shown, the electronic device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0111] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange messages / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0112] The processor 41 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as statistical methods for pipeline task execution results.
[0113] In some embodiments, the statistical method of pipeline task execution results can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the statistical method of pipeline task execution results described above can be performed. Alternatively, in other embodiments, the processor 41 can be configured to execute the statistical method of pipeline task execution results in any other appropriate manner (for example, by means of firmware).
[0114] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0115] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0116] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0117] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying messages to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0118] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0119] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0120] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0121] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A statistical method for pipeline task execution results, characterized in that: Applied to a task node of a pipeline task, the method comprises: Receive a pipeline task identifier and a first random number sent by an upstream node; If the task is successfully executed and there is a downstream task node, a second random number is generated, the first random number, the second random number and the pipeline task identifier are determined as a feedback message, and the pipeline task identifier and the second random number are sent to the downstream task node; If the task is successfully executed and there is no downstream task node, determining the first random number and the pipeline task identifier as a feedback message; The feedback message is sent to the execution result statistics process to instruct the execution result statistics process to perform an XOR operation on the random number in the feedback message sent by the node belonging to the target pipeline task according to the pipeline task identifier in the feedback message, and determine that the target pipeline task is executed successfully when the operation result is zero.
2. The method according to claim 1, characterized in that If the number of the downstream task nodes is multiple, the generating of the second random number includes: Generate a second random number for each downstream task node; Correspondingly, sending the pipeline task identifier and the second random number to the downstream task node includes: Sending a second random number generated for each downstream task node and the pipeline task identifier to the task node.
3. The method according to claim 1 or 2, characterized in that: Each random number carries the node identifier of the node that generates the random number, which is used to distinguish random numbers with the same value during XOR operations.
4. The method according to claim 1, characterized in that: The task node is an original task node that has been planned before the task starts or a newly added task node that is replanned after the task starts.
5. The method according to claim 1, characterized in that: There are multiple message queues in the execution result statistics process, and the message queues, pipeline tasks and pipeline task identifiers correspond one to one.
6. The method according to claim 5, characterized in that The execution result statistics process is specifically configured as follows: For each feedback message, placing the random number in the feedback message into a message queue corresponding to the pipeline task identifier in the feedback message; Pull the random number from the target message queue and perform XOR operation; If the calculation result is zero within the task cycle of the target pipeline task, it is determined that the target pipeline task is executed successfully; If the operation result is 1 at the end of the task cycle of the target pipeline task, it is determined that the target pipeline task has failed to execute.
7. A statistical device for pipeline task execution results, characterized in that: The device is deployed on a task node of a pipeline task, and comprises: A data acquisition module, used for receiving a pipeline task identifier and a first random number sent by an upstream node; A first data sorting module is used to generate a second random number if the task is successfully executed and there is a downstream task node, determine the first random number, the second random number and the pipeline task identifier as a feedback message, and send the pipeline task identifier and the second random number to the downstream task node; A second data sorting module, configured to determine the first random number and the pipeline task identifier as a feedback message if the task is successfully executed and there is no downstream task node; A message sending module is used to send the feedback message to the execution result statistics process, and is used to instruct the execution result statistics process to perform an XOR operation on the random number in the feedback message sent by the node belonging to the target pipeline task according to the pipeline task identifier in the feedback message, and determine that the target pipeline task is executed successfully when the operation result is zero.
8. The device according to claim 7, characterized in that If the number of the downstream task nodes is multiple, the first data sorting module includes a random number generating unit, which is used to generate a second random number for each downstream task node; Correspondingly, the first data sorting module includes a random number sending unit, which is used to send the second random number generated for the task node and the pipeline task identifier to each downstream task node.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the statistical method for pipeline task execution results described in any one of claims 1-6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the statistical method for pipeline task execution results according to any one of claims 1 to 6 when executing the computer instructions.
