Parameter transmission method, device and equipment based on assembly line and storage medium
By introducing a global parameter buffer pool into the pipeline, flexible flow of parameters between nodes and data transmission is realized, the problem of parameter transfer isolation between nodes in the existing technology is solved, and node reusability and data transmission capabilities of pipelines are improved.
Patent Information
- Application Number
- CN202411829203.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-03-21
AI Technical Summary
In the prior art, the data between the front and rear nodes in the pipeline is isolated, and the parameter transfer between nodes cannot be completed, resulting in the inability to flexibly flow of pipeline parameters, poor node reusability, and lack of data transfer support.
By introducing a global parameter buffer pool into the pipeline, the response node obtains input data (formal parameters) when it starts execution, and obtains global parameters from the global parameter buffer pool. If the node has an actual parameter, the data is obtained from the global parameters based on the actual parameter and assigned to the formal parameters, thereby achieving flexible parameters flow.
It realizes flexible flow of pipeline parameters, improves node reusability, provides data transfer support for pipelines, and solves the problem of isolation of parameter transfer between nodes.
Smart Images

Figure CN119668219A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of automated operation and maintenance, and in particular to a pipeline-based parameter transfer method, device, equipment and storage medium. Background Art
[0002] During the operation of the pipeline, the execution of a node depends on the parameters returned by other nodes, that is, the node needs to directly transfer parameters. However, in the prior art, since the data between the front and rear nodes in the pipeline are isolated, parameter transfer between nodes cannot be completed.
[0003] In summary, how to achieve flexible flow of pipeline parameters, improve node reusability, and provide support for data transmission for the pipeline is an urgent problem that technical personnel in this field need to solve. Summary of the invention
[0004] In view of this, the present application provides a parameter transfer method, device, equipment and storage medium, aiming to achieve flexible flow of pipeline parameters, improve node reusability, and provide data transfer support for the pipeline.
[0005] In a first aspect, the present application provides a pipeline-based parameter transfer method, comprising:
[0006] In response to the node starting to execute, obtaining input data; the input data is a formal parameter;
[0007] Get global parameters from the pipeline global parameter buffer pool;
[0008] Determine whether the node is configured with actual parameters;
[0009] If so, obtain data from the global parameters according to the actual parameters;
[0010] The data obtained from the global parameter according to the actual parameter is assigned to the formal parameter to obtain the data obtained by the formal parameter from the global parameter.
[0011] Optionally, after determining whether the node is configured with actual parameters, the method further includes:
[0012] If not, data is obtained from the global parameters according to the formal parameters to obtain the data obtained by the formal parameters from the global parameters.
[0013] Optionally, after obtaining the data obtained by the formal parameter from the global parameter, the method further includes:
[0014] The data obtained from the global parameters by using the formal parameters is processed.
[0015] Optionally, after processing the data obtained from the global parameter using the formal parameter, the method further includes:
[0016] Determine whether the node is configured with output parameters;
[0017] If yes, save the output parameter to the pipeline global parameter buffer pool to obtain an updated pipeline global parameter buffer pool; end the node execution;
[0018] If not, the execution of the node is terminated.
[0019] Optionally, after saving the output parameter to the pipeline global parameter buffer pool and ending the node execution, the method further includes:
[0020] In response to the next time the node starts executing, the global parameters are obtained from the updated pipeline global parameter buffer pool.
[0021] In a second aspect, the present application provides a pipeline-based parameter transfer device, comprising:
[0022] A first acquisition module is used to acquire input data in response to the node starting to execute; the input data is a formal parameter;
[0023] The second acquisition module is used to obtain global parameters from the pipeline global parameter buffer pool;
[0024] A first judgment module, used to judge whether the node is configured with actual parameters;
[0025] A third acquisition module is used for acquiring data from global parameters according to the actual parameters if yes;
[0026] An allocation module is used to allocate the data obtained from the global parameter according to the actual parameter to the formal parameter to obtain the data obtained by the formal parameter from the global parameter.
[0027] Optionally, the device further comprises:
[0028] The fourth acquisition module is used to acquire data from the global parameters according to the formal parameters if no, to obtain the data acquired by the formal parameters from the global parameters.
[0029] Optionally, the device further comprises:
[0030] A processing module is used to process the data obtained from the global parameters using the formal parameters.
[0031] Optionally, the device further comprises:
[0032] A second judgment module is used to judge whether the node is configured with output parameters;
[0033] An updating module, for, if yes, saving the output parameter to the pipeline global parameter buffer pool to obtain an updated pipeline global parameter buffer pool; and terminating the execution of the node;
[0034] The end module is used to end the execution of the node if no.
[0035] Optionally, the device further comprises:
[0036] The fifth acquisition module is used to acquire the global parameters from the updated pipeline global parameter buffer pool in response to the next node starting execution.
[0037] In a third aspect, an embodiment of the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the pipeline-based parameter passing method described in any one of the implementation methods in the first aspect of the embodiment of the present application.
[0038] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device executes the pipeline-based parameter passing method described in any implementation method of the first aspect of the embodiment of the present application.
[0039] The present application provides a parameter transfer method based on pipeline. When executing the method, in response to the node starting to execute, input data is obtained, wherein the input data is a formal parameter, and then the global parameter is obtained from the pipeline global parameter buffer pool, and then it is determined whether the node is configured with an actual parameter. If so, data is obtained from the global parameter according to the configured actual parameter, and finally the data obtained from the global parameter according to the actual parameter is assigned to the formal parameter to obtain the data obtained from the global parameter by the formal parameter. In this way, through the mutual mapping and conversion of formal parameters and actual parameters, pipeline-based parameters can be realized, the node reusability is improved, and data transfer support is provided for the pipeline. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1A flow chart of a pipeline-based parameter transfer method provided in an embodiment of the present application;
[0042] Figure 2 A flowchart of another pipeline-based parameter transfer method provided in an embodiment of the present application;
[0043] Figure 3 A schematic diagram of the structure of a pipeline-based parameter transfer device provided in an embodiment of the present application;
[0044] Figure 4 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. The present application provides a parameter transfer method, device, equipment and storage medium for use in the technical field of automated operation and maintenance. The above is only an example and does not limit the application field of the method and device name provided in the present application.
[0046] During the operation of the pipeline, the execution of a node depends on the parameters returned by other nodes, that is, the node needs to directly transfer parameters. However, in the prior art, since the data between the front and rear nodes in the pipeline are isolated, parameter transfer between nodes cannot be completed.
[0047] After research, the inventor proposed the technical solution of this application. In response to the node starting to execute, input data is obtained, where the input data is a formal parameter, and then the global parameter is obtained from the pipeline global parameter buffer pool. Then, it is determined whether the node is configured with an actual parameter. If so, data is obtained from the global parameter according to the configured actual parameter. Finally, the data obtained from the global parameter according to the actual parameter is assigned to the formal parameter to obtain the data obtained from the global parameter by the formal parameter. In this way, through the mutual mapping and conversion of formal parameters and actual parameters, the flexible flow of pipeline parameters can be realized, the node reusability is improved, and data transmission support is provided for the pipeline.
[0048] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. It should be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
[0049] Before introducing the embodiments provided in this application, some terms in the embodiments provided in this application are explained first:
[0050] Assembly line: usually refers to a series of workflows or processes that are connected in a certain order to form a continuous work path.
[0051] Formal parameter: The full name is formal parameter, which is the variable in the brackets after the function name when defining a function. The formal parameter has no definite value when the function is not called. It is just a formal parameter used as a local variable inside the function.
[0052] Actual parameter: The full name is actual parameter, which is the parameter passed to the function when the function is called. The actual parameter can be a constant, variable or expression, and it must have a definite value in order to be passed to the formal parameter when the function is called.
[0053] Node: In this application, a node refers to a specific operation, including but not limited to starting a service, stopping a service, uploading a file, etc.
[0054] See also Figure 1 , Figure 1 A flow chart of a pipeline-based parameter transfer method provided in an embodiment of the present application includes:
[0055] S101: In response to a node starting execution, obtaining input data.
[0056] In response to the node starting execution, the node obtains input data, wherein the input data is a formal parameter.
[0057] S102: Obtain global parameters from the pipeline global parameter buffer pool.
[0058] The node obtains the global parameters from the pipeline global parameter buffer pool and copies the obtained global parameters.
[0059] S103: Determine whether the node is configured with actual parameters.
[0060] Determine whether the node is configured with actual parameters, if yes, execute step S104; if not, execute step S105.
[0061] S104: Obtain data from global parameters according to actual parameters.
[0062] Data is obtained from the global parameters obtained in S102 according to the actual parameters of the node configuration.
[0063] S105: Assign the data obtained from the global parameter according to the actual parameter to the formal parameter.
[0064] The data obtained from the global parameters according to the actual parameters are assigned to the formal parameters in sequence to obtain the data obtained by the formal parameters from the global parameters.
[0065] S106: Obtain data from the global parameters according to the formal parameters, and obtain the data obtained by the formal parameters from the global parameters.
[0066] The data is obtained from the global parameters obtained in S102 according to the formal parameters, so as to obtain the data obtained by the formal parameters from the global parameters.
[0067] In the embodiment provided by the present application, in response to the node starting to execute, input data is obtained, wherein the input data is a formal parameter, and then the global parameter is obtained from the pipeline global parameter buffer pool, and then it is determined whether the node is configured with an actual parameter, and if so, data is obtained from the global parameter according to the configured actual parameter, and finally the data obtained from the global parameter according to the actual parameter is assigned to the formal parameter to obtain the data obtained from the global parameter by the formal parameter. In this way, by mapping and converting the formal parameter and the actual parameter to each other, the flexible flow of the pipeline parameters can be realized, the node reusability can be improved, and data transmission support is provided for the pipeline. Figure 2 As shown, Figure 2 A flowchart of another pipeline-based parameter transfer method provided in an embodiment of the present application includes:
[0068] The implementation of steps S201 to S206 is the same as that of steps S101 to S106, and will not be repeated here.
[0069] S207: Perform data processing using the data obtained from the global parameters using the formal parameters.
[0070] The node performs data processing using the data obtained from the global parameters using the formal parameters obtained in step S205 or step S206.
[0071] S208: Determine whether the node is configured with output parameters.
[0072] Determine whether the node is configured with output parameters, if yes, execute step S209; if not, execute step S211.
[0073] S209: Save the output parameters to the pipeline global parameter buffer pool to obtain an updated pipeline global parameter buffer pool.
[0074] The output parameters of the node are saved in the pipeline global parameter buffer pool to obtain an updated pipeline global parameter buffer pool, and then the updated global parameters can be obtained from the updated pipeline global parameter buffer pool.
[0075] S210: End node execution.
[0076] S211: In response to the next node starting execution, obtaining global parameters from the updated pipeline global parameter buffer pool.
[0077] In response to the next time the node starts executing, the node obtains the updated global parameters from the updated pipeline global parameter buffer pool.
[0078] S212: End node execution.
[0079] The above are some specific implementations of the pipeline-based parameter transfer method provided by the embodiment of the present application. Based on this, the present application also provides a corresponding device. The device provided by the embodiment of the present application will be introduced from the perspective of functional modularization.
[0080] See also Figure 3 , Figure 3 A schematic diagram of a pipeline-based parameter transfer device provided in an embodiment of the present application is provided. The pipeline-based parameter transfer device 300 includes:
[0081] The first acquisition module 310 is used to acquire input data in response to the node starting to execute; the input data is a formal parameter;
[0082] The second acquisition module 320 is used to acquire global parameters from the pipeline global parameter buffer pool;
[0083] A first judgment module 330, used to judge whether the node is configured with actual parameters;
[0084] A third acquisition module 340 is used to obtain data from the global parameters according to the actual parameters if yes;
[0085] The allocation module 350 is used to allocate the data obtained from the global parameter according to the actual parameter to the formal parameter to obtain the data obtained by the formal parameter from the global parameter.
[0086] Optionally, the device 300 further includes:
[0087] The fourth acquisition module is used to acquire data from the global parameters according to the formal parameters if no, to obtain the data acquired by the formal parameters from the global parameters.
[0088] Optionally, the device 300 further includes:
[0089] A processing module is used to process the data obtained from the global parameters using the formal parameters.
[0090] Optionally, the device 300 further includes:
[0091] A second judgment module is used to judge whether the node is configured with output parameters;
[0092] An updating module, for, if yes, saving the output parameter to the pipeline global parameter buffer pool to obtain an updated pipeline global parameter buffer pool; and terminating the execution of the node;
[0093] The end module is used to end the execution of the node if no.
[0094] Optionally, the device 300 further includes:
[0095] The fifth acquisition module is used to acquire the global parameters from the updated pipeline global parameter buffer pool in response to the next node starting execution.
[0096] The embodiments of the present application also provide corresponding devices and computer storage media for implementing the solutions provided by the embodiments of the present application.
[0097] like Figure 4 As shown, the computer device 01 is in the form of a general computing device. The components of the computer device 01 may include but are not limited to: one or more processors or processing units 03, a system memory 08, and a bus 04 connecting different system components (including the system memory 08 and the processing unit 03).
[0098] Bus 04 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.
[0099] The computer device 01 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 01, including volatile and non-volatile media, removable and non-removable media.
[0100] The system memory 08 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 09 and / or cache memory 10. The computer device 01 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 11 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 not shown, usually called a "hard drive"). Although Figure 4Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 04 via one or more data medium interfaces. The memory 08 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0101] A program / utility 12 having a set (at least one) of program modules 13 may be stored, for example, in the memory 08, such program modules 13 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may include an implementation of a network environment. The program modules 13 generally perform the functions and / or methods of the embodiments described herein.
[0102] The computer device 01 may also communicate with one or more external devices 02 (e.g., keyboard, pointing device, display 07, etc.), one or more devices that enable a user to interact with the computer device 01, and / or any device that enables the computer device 01 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed via input / output (I / O) interface 06. Furthermore, the computer device 01 may also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN) and / or public network, such as the Internet) via network adapter 05. Figure 4 As shown, the network adapter 05 communicates with other modules of the computer device 01 via the bus 04. It should be understood that although Figure 4 Not shown, other hardware and / or software modules may be used in conjunction with computer device 01, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0103] The processor unit 03 executes various functional applications and data processing by running the programs stored in the system memory 08, for example, implementing a pipeline-based parameter transfer method provided in an embodiment of the present application.
[0104] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0105] Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment of the present application or some parts of the embodiments.
[0106] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0107] The above description is merely an exemplary embodiment of the present application and is not intended to limit the protection scope of the present application.
Claims
1. A pipeline-based parameter transfer method, characterized in that: include: In response to the node starting to execute, obtaining input data; the input data is a formal parameter; Get global parameters from the pipeline global parameter buffer pool; Determine whether the node is configured with actual parameters; If so, obtain data from the global parameters according to the actual parameters; The data obtained from the global parameter according to the actual parameter is assigned to the formal parameter to obtain the data obtained by the formal parameter from the global parameter.
2. The method according to claim 1, characterized in that After determining whether the node is configured with actual parameters, the method further includes: If not, data is obtained from the global parameters according to the formal parameters to obtain the data obtained by the formal parameters from the global parameters.
3. The method according to claim 1 or 2, characterized in that: After obtaining the data obtained by the formal parameter from the global parameter, the method further includes: The data obtained from the global parameters by using the formal parameters is processed.
4. The method according to claim 3, characterized in that After the data obtained from the global parameter using the formal parameter is processed, the method further includes: Determine whether the node is configured with output parameters; If yes, save the output parameter to the pipeline global parameter buffer pool to obtain an updated pipeline global parameter buffer pool; end the node execution; If not, the execution of the node is terminated.
5. The method according to claim 4, characterized in that After saving the output parameter to the pipeline global parameter buffer pool and ending the node execution, the method further includes: In response to the next time the node starts executing, the global parameters are obtained from the updated pipeline global parameter buffer pool.
6. A parameter transfer device based on pipeline, characterized in that: include: A first acquisition module is used to acquire input data in response to the node starting to execute; the input data is a formal parameter; The second acquisition module is used to obtain global parameters from the pipeline global parameter buffer pool; A first judgment module, used to judge whether the node is configured with actual parameters; A third acquisition module is used for acquiring data from global parameters according to the actual parameters if yes; An allocation module is used to allocate the data obtained from the global parameter according to the actual parameter to the formal parameter to obtain the data obtained by the formal parameter from the global parameter.
7. The device according to claim 6, characterized in that The device also includes: The fourth acquisition module is used to acquire data from the global parameters according to the formal parameters if no, to obtain the data acquired by the formal parameters from the global parameters.
8. The device according to claim 6 or 7, characterized in that The device also includes: A processing module is used to process the data obtained from the global parameters using the formal parameters.
9. A computer device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the pipeline-based parameter transfer method according to any one of claims 1 to 5 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the pipeline-based parameter transfer method according to any one of claims 1 to 5.