Algorithm execution method, device and system and readable storage medium

By constructing the execution process pipeline and data format conversion of the algorithm image, the complexity problem of algorithm code modification caused by changes in data sources is solved, the adaptability and computing efficiency of the algorithm code are improved, and the execution cost is reduced.

CN118733038APending Publication Date: 2024-10-01THE FOURTH PARADIGM BEIJING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310332212.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-30
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In the existing algorithm deployment process, when the data source changes, the algorithm developer needs to rework and modify the algorithm code, resulting in a long and complex chain from implementation engineers to R&D engineers, and from R&D engineers to algorithm engineers, which increases the execution cost of the algorithm.

Method used

By building the execution process pipeline of the algorithm image, we can obtain different formats of input and output data, use data sets to convert data formats, and execute the algorithm image without modifying the operator code to achieve adaptation to data source changes.

Benefits of technology

It improves the adaptability and computing efficiency of the algorithm code, reduces the modification workload when the data source changes, and reduces the execution cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733038A_ABST
    Figure CN118733038A_ABST
Patent Text Reader

Abstract

The invention provides an algorithm execution method, device and system and a readable storage medium, and the method comprises the steps: responding to an instruction for executing an algorithm mirror image, and constructing an execution process pipeline of the algorithm mirror image; wherein the algorithm mirror image is obtained by packaging an algorithm code of a wrapper, an algorithm code of an operator node in the execution flow pipeline and configuration information; obtaining a first data storage address of input data of the operator node, a first data format conforming to a wrapper of the algorithm mirror image, and a second data format conforming to the operator node; constructing a data set according to the first data format and the second data format; reading first data in the first data format from the first data storage address through the data set, and converting the first data into second data in the second data format; and sequentially executing the operator nodes in the execution flow pipeline according to the second data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence application technology, and more specifically, to an algorithm execution method, an algorithm execution device, a system including at least one computing device and at least one storage device, and a computer-readable storage medium. Background Art

[0002] With the rapid development and widespread application of technologies such as artificial intelligence and big data, the application scenarios of artificial intelligence algorithms are becoming more and more extensive.

[0003] In the existing algorithm deployment process, R&D engineers usually provide data according to the data sources that the algorithm developers (i.e., algorithm engineers) configure in advance in the algorithm code, package the algorithm into a computing service, and then hand it over to the implementation engineer for service deployment. In the case that the data source that the algorithm code connects to changes, the algorithm developer needs to rework and modify it to complete the corresponding calculation. This will generate a complex and long chain from at least implementation engineers to R&D engineers, and then from R&D engineers to algorithm engineers, increasing the execution cost of the algorithm. Summary of the invention

[0004] One object of the present disclosure is to provide a new technical solution for executing algorithms.

[0005] According to a first aspect of the present disclosure, there is provided an algorithm execution method, comprising:

[0006] In response to an instruction to execute an algorithm image, an execution process pipeline of the algorithm image is constructed; wherein the algorithm image is obtained by packaging the algorithm code of the wrapper, the algorithm code of the operator node in the execution process pipeline, and configuration information;

[0007] Acquire a first data storage address of input data of the operator node, a first data format of a wrapper conforming to the algorithm image, and a second data format conforming to the operator node;

[0008] Constructing a data set according to the first data format and the second data format; wherein the data set is used to read data in the first data format and convert the read data in the first data format into data in the second data format;

[0009] Reading first data in the first data format from the first data storage address through the data set, and converting the first data into second data in the second data format;

[0010] The operator nodes in the execution process pipeline are executed sequentially according to the second data.

[0011] Optionally, the data set is further used to convert the data in the second data format into the data in the first data format, and write the converted data in the first data format into a corresponding storage medium;

[0012] The method further comprises:

[0013] Obtain a second data storage address of the output data of the operator node;

[0014] The third data in the second data format output by the operator node is converted into fourth data in the first data format through the data set, and the fourth data is stored in the second data storage address.

[0015] Optionally, the method further includes:

[0016] Obtaining execution parameters of the wrapper;

[0017] The execution parameters are parsed to obtain the first data storage address, the second data storage address and the first data format.

[0018] Optionally, the method further includes:

[0019] Before executing the target operator node, executing the front hook of the target operator node and recording the first execution information of the target operator node; and / or,

[0020] After executing the target operator node, executing a post hook of the target operator node, and recording second execution information of the target operator node;

[0021] The target operator node is any operator node in the execution process pipeline.

[0022] Optionally, the execution process pipeline of building the algorithm image includes:

[0023] Constructing the operator nodes in the execution process pipeline in sequence;

[0024] Before constructing any operator node, determining whether the number of operator parameters of any operator node is variable;

[0025] In the case where the number of the operator parameters is variable, constructing any operator node having a variable number of operator parameters;

[0026] In the case where the number of the operator parameters is immutable, constructing any operator node with a fixed number of operator parameters.

[0027] Optionally, before reading the first data in the first data format from the first data storage address through the data set, the method further includes:

[0028] The data collection and the execution flow pipeline are registered in the wrapper.

[0029] Optionally, the method further includes:

[0030] Obtaining the algorithm code and configuration information of the operator node;

[0031] Obtaining the algorithm code of the wrapper;

[0032] The algorithm code of the wrapper, the algorithm code of the operator node and the configuration information are packaged through a packaging script to obtain the algorithm image.

[0033] According to a second aspect of the present disclosure, there is provided an algorithm execution device, comprising:

[0034] A pipeline construction module, configured to construct an execution process pipeline of the algorithm image in response to an instruction to execute the algorithm image; wherein the algorithm image is obtained by packaging the algorithm code of the wrapper, the algorithm code of the operator node in the execution process pipeline, and configuration information;

[0035] A first acquisition module, used to acquire a first data storage address of input data of an operator node in the execution process pipeline, a first data format conforming to a wrapper of the algorithm image, and a second data format conforming to the operator node;

[0036] A set construction module, used to construct a data set according to the first data format and the second data format; wherein the data set is used to read the data in the first data format and convert the read data in the first data format into the data in the second data format;

[0037] A second acquisition module, configured to read first data in the first data format from the first data storage address through the data set, and convert the first data into second data in the second data format;

[0038] An operator execution module is used to execute the operator nodes in the execution process pipeline in sequence according to the second data.

[0039] Optionally, the data set is further used to convert the data in the second data format into the data in the first data format, and write the converted data in the first data format into a corresponding storage medium;

[0040] The device also includes:

[0041] A third acquisition module, used to acquire a second data storage address of the output data of the operator node;

[0042] A data conversion module is used to convert the third data in the second data format output by the operator node into fourth data in the first data format through the data set, and store the fourth data in the second data storage address.

[0043] Optionally, the device further comprises:

[0044] A fourth acquisition module, used to acquire execution parameters of the wrapper;

[0045] A parameter parsing module is used to parse the execution parameters to obtain the first data storage address, the second data storage address and the first data format.

[0046] Optionally, the device further comprises:

[0047] a pre-hook execution module, used to execute the pre-hook of the target operator node and record the first execution information of the target operator node before the operator execution module executes the target operator node; and / or,

[0048] a post-hook execution module, configured to execute a post-hook of the target operator node and record second execution information of the target operator node after the operator execution module executes the target operator node;

[0049] The target operator node is any operator node in the execution process pipeline.

[0050] Optionally, the pipeline construction module includes:

[0051] An operator node construction unit, used to sequentially construct the operator nodes in the execution process pipeline;

[0052] A judging unit, used for judging whether the number of operator parameters of any operator node is variable before the operator node constructing unit constructs any operator node;

[0053] The operator node construction unit is used for constructing any operator node with a variable number of operator parameters when the number of operator parameters is variable;

[0054] The operator node construction unit is used to construct any operator node with a fixed number of operator parameters when the number of operator parameters is immutable.

[0055] Optionally, the device further comprises:

[0056] A registration module is used to register the data set and the execution process pipeline in the wrapper.

[0057] Optionally, the device further comprises:

[0058] A fifth acquisition module, used to acquire the algorithm code and configuration information of the operator node;

[0059] A sixth acquisition module, used to acquire the algorithm code of the wrapper;

[0060] The packaging module is used to package the algorithm code of the wrapper, the algorithm code and configuration information of the operator node through a packaging script to obtain the algorithm image.

[0061] According to a third aspect of the present disclosure, a system comprising at least one computing device and at least one storage device is provided, wherein the at least one storage device is used to store instructions, and the instructions are used to control the at least one computing device to execute the method according to the first aspect of the present disclosure.

[0062] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in the first aspect of the present disclosure is implemented.

[0063] Through the embodiments of the present disclosure, when executing an algorithm image, a data set is constructed according to a first data format of a wrapper that conforms to the algorithm image and a second data format of an operator node of an execution process pipeline that conforms to the algorithm image, and the data set is used to read first data in a first data format from a first data storage address of input data of the operator node, and the first data is converted into second data in a second data format, so that the operator nodes in the execution process pipeline are executed in sequence according to the second data. In this way, when the data source matched by the operator changes, there is no need to modify the algorithm code of the operator, which can improve the adaptability of the algorithm code of the operator and the computational efficiency of the algorithm code of the operator.

[0064] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0066] Figure 1 is a block diagram of an example of a hardware configuration of an electronic device that can be used to implement an embodiment of the present disclosure;

[0067] Figure 2is a flowchart of an algorithm execution method provided according to an embodiment of the present disclosure;

[0068] Figure 3 is a flowchart of an example of an algorithm execution method provided according to an embodiment of the present disclosure;

[0069] Figure 4 is a block diagram of an algorithm execution device provided according to an embodiment of the present disclosure;

[0070] Figure 5 It is a block diagram of a system provided according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0071] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.

[0072] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.

[0073] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0074] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0075] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0076] Hereinafter, various embodiments and examples according to embodiments of the present disclosure are described with reference to the drawings.

[0077] <Hardware Configuration>

[0078] Figure 1 1 is a block diagram showing a hardware configuration of an electronic device 1000 that can implement an embodiment of the present disclosure.

[0079] The electronic device 1000 may be a portable computer, a desktop computer, a mobile phone, a tablet computer, etc. Figure 1As shown, the electronic device 1000 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, and the like. Among them, the processor 1100 may be a central processing unit CPU, a microprocessor MCU, and the like. The memory 1200 includes, for example, a ROM (read-only memory), a RAM (random access memory), a non-volatile memory such as a hard disk, and the like. The interface device 1300 includes, for example, a USB interface, a headphone interface, and the like. The communication device 1400 is, for example, capable of wired or wireless communication, and may specifically include Wifi communication, Bluetooth communication, 2G / 3G / 4G / 5G communication, and the like. The display device 1500 is, for example, a liquid crystal display screen, a touch display screen, and the like. The input device 1600 may include, for example, a touch screen, a keyboard, a somatosensory input, and the like. The user may input / output voice information through the speaker 1700 and the microphone 1800.

[0080] Figure 1 The electronic device shown is merely illustrative and does not in any way imply any limitation on the present disclosure, its application or use. In the embodiments of the present disclosure, the memory 1200 of the electronic device 1000 is used to store instructions, and the instructions are used to control the processor 1100 to operate to execute any one of the management methods for artificial intelligence applications for algorithm execution devices provided in the embodiments of the present disclosure. It should be understood by those skilled in the art that although Figure 1 In the electronic device 1000, multiple devices are shown, but the present disclosure may only involve some of the devices, for example, the electronic device 1000 only involves the processor 1100 and the storage device 1200. A technician can design instructions according to the scheme disclosed in the present disclosure. How instructions control the processor to operate is well known in the art, so it will not be described in detail here.

[0081] <Method Example>

[0082] In this embodiment, an algorithm execution method is provided. The algorithm execution method may be implemented by an electronic device. The electronic device may be Figure 1 An electronic device 1000 is shown.

[0083] according to Figure 2 As shown, the algorithm execution method of this embodiment may include the following steps S2100 to S2300:

[0084] Step S2100, in response to an instruction to execute the algorithm image, construct an execution process pipeline of the algorithm image.

[0085] The algorithm image is obtained by packaging the algorithm code of the wrapper, the algorithm code of the operator node in the execution process pipeline, and the configuration information.

[0086] An operator node is an algorithm code for implementing a corresponding function, specifically an algorithm code for a calculation process that uses input data to calculate and obtain a calculation result.

[0087] The execution process pipeline is the orchestration of the execution process of operator nodes. In an algorithm, it can be divided into different modules, namely operator nodes, according to specific functions. Then, some or all operator nodes are selected according to needs and combined in a certain order to form an artificial intelligence algorithm that can complete specific functions. A group of operator nodes with a certain sequence can form an execution process pipeline.

[0088] In one embodiment of the present disclosure, before executing step S2100, the method may further include: obtaining the algorithm code and configuration information of the operator node; obtaining the algorithm code of the wrapper; and packaging the algorithm code of the wrapper, the algorithm code and configuration information of the operator node through a packaging script to obtain the algorithm image.

[0089] In this embodiment, an algorithm image may be pre-built and deployed online for subsequent execution.

[0090] Through this embodiment, efficient version delivery of algorithm images can be achieved, and the advantages and conveniences of cutting-edge technologies such as cloud native and microservices can be enjoyed.

[0091] In one embodiment of the present disclosure, constructing an execution process pipeline of an algorithm image may include: sequentially constructing operator nodes in the execution process pipeline.

[0092] In the execution process pipeline, each operator node is combined in a certain order to complete a specific function. Therefore, each operator node in the execution process pipeline can be constructed in sequence according to the combination order of the operator nodes.

[0093] When the operator nodes in the execution process pipeline are constructed, the execution process pipeline can be obtained, and each operator node in the execution process pipeline has a corresponding order.

[0094] Furthermore, before constructing any operator node, determine whether the number of operator parameters of the operator node is variable; if the number of operator parameters is variable, construct an operator node with a variable number of operator parameters when constructing the operator node; if the number of operator parameters is immutable, construct an operator node with a fixed number of operator parameters when constructing the operator node.

[0095] In this embodiment, whether the number of operator parameters of the operator node is variable may be determined according to the configuration information of the operator node.

[0096] For an operator node with a variable number of operator parameters, the number of operator parameters used during execution may be defined in the execution parameters, so that the operator node is constructed according to the number defined in the execution parameters.

[0097] In one embodiment of the present disclosure, when the execution process pipeline is constructed, the method may further include: registering the execution process pipeline in a wrapper.

[0098] In this way, the wrapper can identify the execution process pipeline to execute the operator nodes in the execution process pipeline through the wrapper.

[0099] Step S2200 , obtaining a first data storage address of input data of an operator node, a first data format of a wrapper that complies with an algorithm image, and a second data format that complies with an operator node.

[0100] In one embodiment of the present disclosure, the method may further include:

[0101] Obtain execution parameters of the wrapper; parse the execution parameters to obtain a first data storage address, a first data format, and a second data storage address of output data of the operator node.

[0102] The execution parameters in this embodiment may be used to execute the algorithm image, and are set by the algorithm engineer according to actual needs when an instruction to execute the algorithm image is triggered.

[0103] Furthermore, an execution page may be provided in advance, and the execution page includes at least one packaged algorithm image. When any algorithm image is selected, a configuration window for the execution parameters of the wrapper of the algorithm image may be provided, so that the algorithm engineer can configure the execution parameters of the wrapper of the selected algorithm image through the configuration window. The execution page may also provide an execution control for triggering the execution instruction. The algorithm engineer can trigger the instruction to execute the selected algorithm image according to the configured execution parameters through the execution control, that is, the instruction to execute the algorithm image in step S2100.

[0104] Step S2300: construct a data set according to the first data format and the second data format.

[0105] The data set is used to read data in a first format and convert the read data in the first data format into data in a second data format.

[0106] In this embodiment, the second data format of the data that can be recognized may be different for different operator nodes. Moreover, for an operator node, the second data format of the data that can be recognized may be one or more, so at least one data set may be constructed for the second data format that conforms to all operator nodes and at least one first data format that conforms to the wrapper.

[0107] Specifically, when the number of second data formats that conform to all operator nodes is n, and the number of first data formats that conform to wrappers is m, the number of constructed data sets can be m*n. For example, the second data formats that conform to all operator nodes include the first format, the second format, and the third format, and the first data formats that conform to wrappers include the fourth format and the fifth format, then 6 data sets can be obtained, including: a data set corresponding to the first format and the fourth format, a data set corresponding to the first format and the fifth format, a data set corresponding to the second format and the fourth format, a data set corresponding to the second format and the fifth format, a data set corresponding to the third format and the fourth format, and a data set corresponding to the third format and the fifth format.

[0108] The data set corresponding to the first format and the fourth format can be used to convert the data in the first format and the fourth format; the data set corresponding to the first format and the fifth format can be used to convert the data in the first format and the fifth format; the data set corresponding to the second format and the fourth format can be used to convert the data in the second format and the fourth format; the data set corresponding to the second format and the fifth format can be used to convert the data in the second format and the fifth format; the data set corresponding to the third format and the fourth format can be used to convert the data in the third format and the fourth format; the data set corresponding to the third format and the fifth format can be used to convert the data in the third format and the fifth format.

[0109] In the case of obtaining the data set, the method may further include: registering the data set in a wrapper.

[0110] In this way, the wrapper can identify the data set, so that the wrapper reads the data in the first format through the data set and converts the read data in the first data format into data in the second data format.

[0111] Step S2400: read first data in a first data format from a first data storage address through a data set, and convert the first data into second data in a second data format.

[0112] In this embodiment, the wrapper may convert first data in a first data format stored in a first data storage address into second data in a second data format that can be recognized by an operator node through a data set, and provide the second data to a corresponding operator node.

[0113] Step S2500: execute the operator nodes in the execution process pipeline in sequence according to the second data.

[0114] In one embodiment of the present disclosure, the operator nodes in the execution process pipeline may be executed in sequence according to the order of the operator nodes in the execution process pipeline.

[0115] Specifically, the operator nodes in the execution process pipeline can be traversed according to the order of the operator nodes in the execution process pipeline, and the currently traversed operator node can be executed according to the corresponding second data. After executing the currently traversed operator node, it is determined whether the currently traversed operator node is the last operator node in the execution process pipeline. If so, the process ends; if not, the traversal continues.

[0116] Through the embodiments of the present disclosure, when executing an algorithm image, a data set is constructed according to a first data format of a wrapper that conforms to the algorithm image and a second data format of an operator node of an execution process pipeline that conforms to the algorithm image, and the data set is used to read first data in a first data format from a first data storage address of input data of the operator node, and the first data is converted into second data in a second data format, so that the operator nodes in the execution process pipeline are executed in sequence according to the second data. In this way, when the data source matched by the operator changes, there is no need to modify the algorithm code of the operator, which can improve the adaptability of the algorithm code of the operator and the computational efficiency of the algorithm code of the operator.

[0117] In one embodiment of the present disclosure, the method may further include:

[0118] Before executing the target operator node, executing the front hook of the target operator node and recording the first execution information of the target operator node; and / or,

[0119] After executing the target operator node, the post hook of the target operator node is executed, and the second execution information of the target operator node is recorded.

[0120] The target operator node is any operator node in the execution process pipeline.

[0121] The front hook and the back hook in this embodiment are both life cycle hooks. The life cycle hook is a code that can add algorithm execution functions at different stages of algorithm execution.

[0122] When the first execution information and / or the second execution information is obtained, the first execution information and / or the second execution information may be recorded in the execution log of the execution process pipeline this time.

[0123] For example, if you need to analyze the execution speed of a target operator node, you can register a pre-hook and a post-hook of a target operator to obtain the start execution time and the end execution time of the target operator node, respectively, so as to determine the execution speed of the target operator node according to the start execution time and the end execution time. In this way, there is no need to modify the code of the operator node, reducing the workload of algorithm engineers.

[0124] In one embodiment of the present disclosure, the data set may also be used to convert data in the second data format into data in the first data format, and write the converted data in the first data format into a corresponding storage medium.

[0125] On this basis, the method may also include: obtaining a second data storage address of the output data of the operator node; converting the third data in the second data format output by the operator node into fourth data in the first data format through a data set, and storing the fourth data in the second data storage address.

[0126] Through the data set of this embodiment, the data output after the operator node is executed can be stored in the second data storage address.

[0127] <Example>

[0128] Figure 3 The present invention is a flowchart of an example of an algorithm execution method according to an embodiment of the present disclosure.

[0129] according to Figure 3 As shown, the algorithm execution method may include steps S3010 to S3140 as shown below:

[0130] Step S3010, in response to an instruction to execute the algorithm image, construct an execution process pipeline of the algorithm image.

[0131] Step S3020, register the execution process pipeline in the wrapper.

[0132] Step S3030, obtaining execution parameters of the wrapper.

[0133] Step S3040, parsing the execution parameter to obtain a first data storage address of the input data of the operator node, a first data format of the wrapper that complies with the algorithm image, and a second data storage address of the output data of the operator node.

[0134] Step S3050: Acquire a second data format that conforms to the operator node.

[0135] Step S3060: construct a data set according to the first data format and the second data format.

[0136] Step S3070, register the data set in the wrapper.

[0137] Step S3080: read first data in a first data format from a first data storage address through a data set, and convert the first data into second data in a second data format.

[0138] Step S3090, traverse the operator nodes in the execution process pipeline.

[0139] Step S3100, execute the front hook of the currently traversed operator node, and record the first execution information of the currently traversed operator node.

[0140] Step S3110: execute the currently traversed operator nodes in sequence according to the second data.

[0141] Step S3120: convert the third data in the second data format output by the operator node into fourth data in the first data format through the data set, and store the fourth data in the second data storage address.

[0142] Step S3130, executing the post hook of the currently traversed operator node, and recording the second execution information of the currently traversed operator node.

[0143] Step S3140, determine whether the currently traversed operator node is the last operator node in the execution process pipeline, if not, continue to execute step S3090; if yes, end.

[0144] <Device Example>

[0145] In this embodiment, an algorithm execution device 4000 is provided, such as Figure 4 As shown, it includes a pipeline construction module 4100, a first acquisition module 4200, a set construction module 4300, a second acquisition module 4400 and an operator execution module 4500.

[0146] The pipeline construction module 4100 is used to construct an execution process pipeline of the algorithm image in response to an instruction to execute the algorithm image; wherein the algorithm image is obtained by packaging the algorithm code of the wrapper, the algorithm code of the operator node in the execution process pipeline, and the configuration information.

[0147] The first acquisition module 4200 is used to obtain the first data storage address of the input data of the operator node in the execution process pipeline, the first data format of the wrapper that conforms to the algorithm image, and the second data format that conforms to the operator node.

[0148] The set construction module 4300 is used to construct a data set according to the first data format and the second data format; wherein the data set is used to read data in the first data format and convert the read data in the first data format into data in the second data format.

[0149] The second acquisition module 4400 is used to read first data in the first data format from the first data storage address through the data set, and convert the first data into second data in the second data format.

[0150] The operator execution module 4500 is used to execute the operator nodes in the execution process pipeline in sequence according to the second data.

[0151] In one embodiment of the present disclosure, the data set is further used to convert the data in the second data format into data in the first data format, and write the converted data in the first data format into a corresponding storage medium;

[0152] The algorithm execution device 4000 further includes a third acquisition module and a data conversion module.

[0153] The third acquisition module is used to obtain the second data storage address of the output data of the operator node.

[0154] A data conversion module is used to convert the third data in the second data format output by the operator node into fourth data in the first data format through the data set, and store the fourth data in the second data storage address.

[0155] In one embodiment of the present disclosure, the algorithm execution device 4000 further includes a fourth acquisition module and a parameter parsing module.

[0156] The fourth acquisition module is used to acquire the execution parameters of the wrapper.

[0157] A parameter parsing module is used to parse the execution parameters to obtain the first data storage address, the second data storage address and the first data format.

[0158] In one embodiment of the present disclosure, the algorithm execution device 4000 further includes a front hook execution module and / or a rear hook execution module.

[0159] The pre-hook execution module is used to execute the pre-hook of the target operator node before the operator execution module executes the target operator node, and record the first execution information of the target operator node.

[0160] The post-hook execution module is used to execute the post-hook of the target operator node and record the second execution information of the target operator node after the operator execution module executes the target operator node.

[0161] The target operator node is any operator node in the execution process pipeline.

[0162] In one embodiment of the present disclosure, the pipeline construction module 4100 includes an operator node construction unit and a judgment unit.

[0163] The operator node construction unit is used to sequentially construct the operator nodes in the execution process pipeline.

[0164] The judging unit is used to judge whether the number of operator parameters of any operator node is variable before the operator node constructing unit constructs any operator node.

[0165] The operator node construction unit is used to construct any operator node with a variable number of operator parameters when the number of operator parameters is variable.

[0166] The operator node construction unit is used to construct any operator node with a fixed number of operator parameters when the number of operator parameters is immutable.

[0167] In one embodiment of the present disclosure, the algorithm execution device 4000 further includes a registration module for registering the data set and the execution process pipeline in the wrapper.

[0168] In one embodiment of the present disclosure, the algorithm execution device 4000 further includes a fifth acquisition module, a sixth acquisition module and a packaging module.

[0169] The fifth acquisition module is used to acquire the algorithm code and configuration information of the operator node.

[0170] The sixth acquisition module is used to acquire the algorithm code of the wrapper.

[0171] The packaging module is used to package the algorithm code of the wrapper, the algorithm code and configuration information of the operator node through a packaging script to obtain the algorithm image.

[0172] Those skilled in the art should understand that the algorithm execution device 4000 can be implemented in various ways. For example, the algorithm execution device 4000 can be implemented by configuring the processor through instructions. For example, the instructions can be stored in a ROM, and when the device is started, the instructions are read from the ROM into a programmable device to implement the algorithm execution device 4000. For example, the algorithm execution device 4000 can be solidified into a dedicated device (such as an ASIC). The algorithm execution device 4000 can be divided into independent units, or they can be combined together for implementation. The algorithm execution device 4000 can be implemented by one of the various implementations described above, or can be implemented by a combination of two or more of the various implementations described above.

[0173] In this embodiment, the algorithm execution device 4000 can have multiple implementation forms. For example, the algorithm execution device 4000 can be a functional module running in any software product or application that provides algorithm execution services, or it can be an embedded peripheral, plug-in, patch, etc. of these software products or applications, or it can also be these software products or applications themselves.

[0174] <System Embodiment>

[0175] In this embodiment, if Figure 5 As shown, a system 6000 of at least one computing device 6100 and at least one storage device 6200 is also provided. The at least one storage device 6200 is used to store executable instructions; the instructions are used to control the at least one computing device 6100 to execute the algorithm execution method for the algorithm execution device according to any embodiment of the present disclosure.

[0176] In this embodiment, the system 6000 can be a mobile phone, a tablet computer, a PDA, a desktop computer, a laptop computer, a workstation, a game console, etc., or it can be a distributed system composed of multiple devices.

[0177] <Computer Readable Storage Medium>

[0178] In this embodiment, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the algorithm execution method of any embodiment of the present disclosure is implemented.

[0179] The present disclosure may be a device, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0180] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: 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), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0181] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0182] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0183] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0184] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0185] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0186] The flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of an instruction, and the module, a program segment or a part of an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.

[0187] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present disclosure is defined by the appended claims.

Claims

1. An algorithm execution method, comprising: In response to an instruction to execute an algorithm image, an execution process pipeline of the algorithm image is constructed; wherein the algorithm image is obtained by packaging the algorithm code of the wrapper, the algorithm code of the operator node in the execution process pipeline, and configuration information; Acquire a first data storage address of input data of the operator node, a first data format of a wrapper conforming to the algorithm image, and a second data format conforming to the operator node; Constructing a data set according to the first data format and the second data format; wherein the data set is used to read data in the first data format and convert the read data in the first data format into data in the second data format; Reading first data in the first data format from the first data storage address through the data set, and converting the first data into second data in the second data format; The operator nodes in the execution process pipeline are executed sequentially according to the second data.

2. The method according to claim 1, wherein the data set is further used to convert the data in the second data format into the data in the first data format, and write the converted data in the first data format into a corresponding storage medium; The method further comprises: Obtain a second data storage address of the output data of the operator node; The third data in the second data format output by the operator node is converted into fourth data in the first data format through the data set, and the fourth data is stored in the second data storage address.

3. The method according to claim 2, further comprising: Obtaining execution parameters of the wrapper; The execution parameters are parsed to obtain the first data storage address, the second data storage address and the first data format.

4. The method according to claim 1, further comprising: Before executing the target operator node, executing a pre-hook of the target operator node, and recording first execution information of the target operator node; and / or, After executing the target operator node, executing a post hook of the target operator node, and recording second execution information of the target operator node; The target operator node is any operator node in the execution process pipeline.

5. According to the method of claim 1, the step of constructing the execution process pipeline of the algorithm image comprises: Constructing the operator nodes in the execution process pipeline in sequence; Before constructing any operator node, determining whether the number of operator parameters of any operator node is variable; In the case where the number of the operator parameters is variable, constructing any operator node having a variable number of operator parameters; In the case where the number of the operator parameters is immutable, constructing any operator node with a fixed number of operator parameters.

6. The method according to claim 1, before reading the first data in the first data format from the first data storage address through the data set, the method further comprises: The data collection and the execution flow pipeline are registered in the wrapper.

7. The method according to any one of claims 1 to 6, further comprising: Obtaining the algorithm code and configuration information of the operator node; Obtaining the algorithm code of the wrapper; The algorithm code of the wrapper, the algorithm code of the operator node and the configuration information are packaged through a packaging script to obtain the algorithm image.

8. An algorithm execution device, comprising: A pipeline construction module, configured to construct an execution process pipeline of the algorithm image in response to an instruction to execute the algorithm image; wherein the algorithm image is obtained by packaging the algorithm code of the wrapper, the algorithm code of the operator node in the execution process pipeline, and configuration information; A first acquisition module, used to acquire a first data storage address of input data of an operator node in the execution process pipeline, a first data format conforming to a wrapper of the algorithm image, and a second data format conforming to the operator node; A set construction module, used to construct a data set according to the first data format and the second data format; wherein the data set is used to read the data in the first data format and convert the read data in the first data format into the data in the second data format; A second acquisition module, configured to read first data in the first data format from the first data storage address through the data set, and convert the first data into second data in the second data format; An operator execution module is used to execute the operator nodes in the execution process pipeline in sequence according to the second data.

9. An electronic device comprising at least one computing device and at least one storage device, wherein: The at least one storage device is used to store instructions, and the instructions are used to control the at least one computing device to execute the method according to any one of claims 1 to 7; or, the device implements the device according to claim 8 through the computing device and the storage device.

10. A computer-readable storage medium, wherein: A computer program is stored thereon, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.