WO2022247112A1 - 任务处理方法、装置、设备、存储介质、计算机程序及程序产品 - Google Patents

任务处理方法、装置、设备、存储介质、计算机程序及程序产品 Download PDF

Info

Publication number
WO2022247112A1
WO2022247112A1 PCT/CN2021/124996 CN2021124996W WO2022247112A1 WO 2022247112 A1 WO2022247112 A1 WO 2022247112A1 CN 2021124996 W CN2021124996 W CN 2021124996W WO 2022247112 A1 WO2022247112 A1 WO 2022247112A1
Authority
WO
WIPO (PCT)
Prior art keywords
panorama
units
unit
attributes
operation unit
Prior art date
Application number
PCT/CN2021/124996
Other languages
English (en)
French (fr)
Inventor
徐子豪
李韡
杨凯
高原
吴立威
崔磊
Original Assignee
上海商汤智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海商汤智能科技有限公司 filed Critical 上海商汤智能科技有限公司
Publication of WO2022247112A1 publication Critical patent/WO2022247112A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Definitions

  • the present disclosure relates to the technical field of artificial intelligence, and relates to but not limited to task processing methods, devices, equipment, storage media, computer programs and program products.
  • Embodiments of the present disclosure provide a task processing method, device, device, storage medium, computer program, and program product.
  • an embodiment of the present disclosure provides a task processing method, including:
  • the first panorama includes at least two operation units and resource units corresponding to each of the operation units;
  • the attributes of each operation unit in the intermediate file include attributes of resource units that have an input relationship and/or an output relationship with each of the operation units;
  • the intermediate file is converted into a second panorama.
  • the acquiring the first panorama of the task to be processed includes: determining a plurality of operation units and a plurality of resource units for implementing the task to be processed; each operation unit is used to implement a depth The training function, evaluation function or reasoning function in the learning model; each said resource unit includes the data input and/or output by the corresponding operation unit during the execution of the processing operation; the operation unit based on the task to be processed and the The multiple resource units are used to construct the first panorama of the task to be processed in the canvas of the model training platform.
  • the task processing method is limited to the multi-model serial training process of complex scenes, which is more convenient and effective than the existing method that can only manually control the operation of a single algorithm module. Quickly build a full-chain algorithm solution.
  • converting the first panorama into an intermediate file based on the attributes of the at least two operation units and the attribute of at least one resource unit corresponding to each operation unit includes: Determine the connection relationship between the at least two operating units; based on the attributes of the at least two operating units and the attributes of at least one resource unit corresponding to each of the operating units, each of the operating units will have an input The attribute of the resource unit of the relationship or the output relationship is merged into the attribute of the corresponding operation unit; the connection relationship between the at least two operation units and the attributes of the merged operation unit are saved to obtain the intermediate file.
  • the attributes of the input resource unit or output resource unit of each operation unit are combined into the attributes of the corresponding operation unit, and the connection relationship of each operation unit is calculated at the same time, so as to store each operation
  • the properties of the unit and the connection relationship between each operating unit are used as an intermediate file, which can conveniently store the content of the first panorama and provide support for subsequent conversion of other functional maps.
  • the saving the connection relationship between the at least two operation units and the attributes of the merged operation units to obtain the intermediate file includes: storing the at least two operation units The connection relationship between the units is incorporated into the attributes of the corresponding operation units; the merged attributes of at least two operation units are saved to obtain the intermediate file.
  • connection relationship of each operation unit is further incorporated into the attributes of the corresponding operation unit, and stored as an intermediate file, which can connect the first panorama and meet the needs of conversion into other pictures, solving the problem of the first panorama Difficult translation issues to second panoramas that are runnable on the backend.
  • the determining the connection relationship between the at least two operation units includes: in response to each of the resource units simultaneously serving as an output of the first operation unit and an input of the second operation unit, It is determined that there is a connection relationship between the first operation unit and the second operation unit.
  • the converting the intermediate file into a second panorama includes: determining an intermediate result graph corresponding to the intermediate file; responding to the fact that the intermediate result graph is a directed acyclic graph Next, the second panorama is generated based on the at least two operating units and the preset workflow template corresponding to each of the operating units; wherein, the preset workflow template corresponding to each of the operating units is the The above-mentioned front end is set according to the target task.
  • the determining the intermediate result graph corresponding to the intermediate file includes: extracting the connection relationship between each operation unit in the intermediate file and each operation unit; according to the connection relationship, Connecting each operation unit in the intermediate file to obtain the intermediate result graph.
  • an intermediate result graph is formed based on each operation unit in the intermediate file and the connection relationship between each operation unit, which can provide support for subsequent conversion of other function graphs.
  • the generating the second panorama based on the at least two operating units and the preset workflow template corresponding to each operating unit includes: All operation units are topologically sorted to obtain linear arrangement results; key information of each operation unit extracted from the intermediate result map is obtained; wherein, the key information is configured to fill necessary fields in the second panorama ; Based on the key information, fill in the necessary fields in the preset workflow template corresponding to the operation unit in turn; according to the linear arrangement result, based on the preset workflow template corresponding to each of the operation units, generate the Second panorama.
  • topologically sort the operation units in the intermediate file and extract key information from all operation units to overwrite the content of the corresponding preset workflow template, and finally generate the second panorama according to the topological sort order, which can be directly scheduled by the back-end task tool call.
  • the converting the intermediate file into a second panorama further includes: in response to the fact that the intermediate result graph is not a directed acyclic graph, outputting an error in creating an intermediate result graph Prompt information.
  • an embodiment of the present disclosure provides a task processing device, including:
  • An acquisition module configured to acquire a first panorama of tasks to be processed; wherein, the first panorama includes at least two operation units and resource units corresponding to each of the operation units;
  • the first conversion module is configured to convert the first panorama into an intermediate file, the attributes of each operation unit in the intermediate file include resource units having an input relationship and/or an output relationship with each operation unit Attributes;
  • the second conversion module is configured to convert the intermediate file into a second panorama.
  • an embodiment of the present disclosure provides an electronic device, including a memory and a processor, the memory stores a computer program that can run on the processor, and the processor implements the above-mentioned task processing method when executing the program. A step of.
  • an embodiment of the present disclosure provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above-mentioned task processing method are implemented.
  • the embodiment of the present disclosure further provides a computer program, including computer readable code, when the computer readable code is run in the electronic device, the processor in the electronic device executes the program for realizing the above task processing method.
  • the embodiments of the present disclosure further provide a computer program product, the computer program product includes one or more instructions, and the one or more instructions are suitable for being loaded by a processor and executing the steps in the above task processing method .
  • the first panorama of the task to be processed is obtained; wherein, the first panorama includes at least two operation units and resource units corresponding to each of the operation units; then, the obtained The first panorama is converted into an intermediate file, and the attributes of each operation unit in the intermediate file include the attributes of resource units that have an input relationship and/or an output relationship with each of the operation units; finally, the intermediate file is converted It is the second panorama; in this way, by defining an intermediate file that can connect the first panorama and meet the needs of conversion into other pictures, and open up the conversion from the first panorama to the back-end second panorama, complex scenes can be realized
  • the multi-model series training process is more convenient and faster to build a full-chain algorithm solution than the existing technology that can only use a single algorithm module.
  • FIG. 1 is a schematic flowchart of a task processing method provided by an embodiment of the present disclosure
  • FIG. 2 is a schematic flowchart of a task processing method provided by an embodiment of the present disclosure
  • FIG. 3 is a schematic flowchart of a task processing method provided by an embodiment of the present disclosure
  • FIG. 4 is a schematic flowchart of a task processing method provided by an embodiment of the present disclosure.
  • FIG. 5A is a schematic diagram of a first panoramic view provided by an embodiment of the present disclosure.
  • FIG. 5B is a schematic flow diagram of converting the first panorama image into an intermediate result image provided by an embodiment of the present disclosure
  • FIG. 5C is a schematic flow chart of converting an intermediate result map into a second panorama provided by an embodiment of the present disclosure
  • FIG. 5D is a schematic diagram of an intermediate result graph provided by an embodiment of the present disclosure.
  • FIG. 5E is a schematic diagram of the linear arrangement results of each operating unit provided by the embodiment of the present disclosure.
  • FIG. 5F is a schematic diagram of a second panorama provided by an embodiment of the present disclosure.
  • FIG. 6 is a schematic diagram of the composition and structure of a task processing device provided by an embodiment of the present disclosure.
  • FIG. 7 is a schematic diagram of a hardware entity of an electronic device provided by an embodiment of the present disclosure.
  • first ⁇ second ⁇ third involved in the embodiments of the present disclosure is only to distinguish similar objects, and does not represent a specific ordering of objects. Understandably, “first ⁇ second ⁇ third "Where permitted, the preset order or sequence may be interchanged so that the embodiments of the disclosure described herein can be practiced in an order other than that illustrated or described herein.
  • Artificial Intelligence is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
  • artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can respond in a similar way to human intelligence.
  • Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that the machines have the functions of perception, reasoning and decision-making.
  • Artificial intelligence technology is a comprehensive subject that involves a wide range of fields, including both hardware-level technology and software-level technology.
  • Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, and mechatronics.
  • Artificial intelligence software technology mainly includes several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning/deep learning.
  • Machine Learning is a multi-field interdisciplinary subject, involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. Specializes in the study of how computers simulate or implement human learning behaviors to acquire new knowledge or skills, and reorganize existing knowledge structures to continuously improve their performance.
  • Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent, and its application pervades all fields of artificial intelligence.
  • Machine learning and deep learning usually include techniques such as artificial neural network, belief network, reinforcement learning, transfer learning, inductive learning, and teaching learning.
  • An embodiment of the present disclosure provides a task processing method, which is applied to an electronic device.
  • An end-to-end visualization model generation platform is deployed on the electronic device, and a general training framework for artificial intelligence models commonly used in visual fields such as object detection and image classification is embedded.
  • the electronic devices include but are not limited to notebook computers, tablet computers, multimedia devices, mobile Internet devices or other types of devices, as well as devices with computing capabilities such as servers and distributed computing nodes.
  • the function realized by the method can be realized by calling the program code by the processor in the electronic device, and of course the program code can be stored in the computer storage medium.
  • Fig. 1 is a schematic flowchart of a task processing method provided by an embodiment of the present disclosure. As shown in Fig. 1, the method at least includes the following steps:
  • Step S110 acquiring the first panorama of the task to be processed
  • the first panorama (raw graph) is a complete solution for generating artificial intelligence models built by users on the canvas, including functions such as model training, evaluation, and reasoning logic series.
  • the canvas is a section on the artificial intelligence training platform for users to drag and drop different components to build the whole process of model production.
  • the first panorama includes at least two operation units (operation, op) and a resource unit corresponding to each operation unit.
  • the storage file of the first panorama includes attributes of at least two operation units and attributes of at least two resource units.
  • each operation unit is a virtualized node after encapsulating an algorithm module
  • the resource unit can be represented as a data node (node) having an input relationship and/or an output relationship with the operation unit
  • each resource unit is A virtualization node after encapsulating a data processing module, and the data processing module provides input data for a certain algorithm module, or processes output data of another algorithm module.
  • a resource unit is an input of an operation unit; in some embodiments, a resource unit is an output of an operation unit; in other embodiments, a resource unit is an output of an operation unit; The resource unit is both the output of the previous operation unit and the input of the next operation unit.
  • the first panorama is stored in the artificial intelligence training platform in the form of a file.
  • the first panorama includes the attributes of the operation unit and the attributes of the resource unit; in other implementations, the first panorama includes the attributes of the operation unit, the attributes of the resource unit, and the attributes of the operation unit and Connection relationship between resource units, such as connection line (link).
  • the attributes of the operation unit may include functions such as training, reasoning, and evaluation of the corresponding algorithm module, and may also include the name of the resource unit connected to the operation unit.
  • the attributes of the resource unit may include data entities in the process of model training or reasoning, and may also include data set interface functions, formats of input and output data, image sizes, and so on.
  • Step S120 converting the first panorama into an intermediate file
  • the intermediate file is a set intermediate storage form of a graph
  • the attributes of each operation unit in the intermediate file include attributes of resource units that have an input relationship and/or an output relationship with each operation unit .
  • a possible implementation is, for all operating units in the first panoramic view, the attributes of the input resource unit or output resource unit of each operating unit are incorporated into the attributes of the corresponding operating unit; at the same time, based on the The connection relationship between each operation unit, determine the connection relationship between two operation units that have an input and output relationship with the same resource unit, save the attributes of all operation units in the first panorama and the connection between every two operation units relationship to get the converted intermediate file.
  • the converted intermediate file can conveniently store the content of the first panorama, and provide support for subsequent conversion of other functional maps.
  • a possible implementation is, for all operating units in the first panoramic view, the attributes of the input resource unit or output resource unit of each operating unit are incorporated into the attributes of the corresponding operating unit; at the same time, based on the The connection relationship between each operation unit determines the connection relationship between two operation units that have an input and output relationship with the same resource unit, and incorporates the connection relationship into the attributes of the corresponding operation unit, directly storing the attributes of all operation units , to get the converted intermediate file.
  • the converted intermediate file can conveniently store the content of the first panorama, can connect the first panorama and can meet the needs of conversion into other pictures, and solves the difficulty of converting the first panorama to the second panorama that can be run at the back end. Problem with converting translations.
  • Step S130 converting the intermediate file into a second panorama.
  • the program code corresponding to the second panorama is used to be invoked by the task scheduling tool at the back end;
  • the task scheduling tool at the back end is a workflow engine (argo engine), and the second panorama (argo-workflow) corresponds to
  • the program code can be called by the back-end task scheduling tool to realize the operation of the entire algorithm scheme. That is to say, different algorithm modules and processing logics are used to form a workflow to make a unified call, so as to realize the orderly training or reasoning of multiple models in complex scenarios.
  • the intermediate file includes the properties of the operation unit, which can meet the requirement of converting to the second panorama.
  • the program code corresponding to the second panorama can be implemented using container technology
  • the second panorama can correspond to a POD
  • the POD represents a unit of deployment
  • the codes in all container images in the POD can form the first
  • code segments in different container images implement different operation units in the second panorama.
  • the container can be implemented using an open source application container engine (Docker).
  • Docker open source application container engine
  • the Docker image also contains some configuration parameters (such as anonymous volumes, environment variables, users, etc.) prepared for runtime.
  • a Docker container is the entity of the Docker image runtime. Docker containers can be created, started, stopped, deleted, paused, etc.
  • the Docker warehouse (Repository) can contain multiple warehouses; each warehouse can contain multiple tags (Tag); each tag corresponds to a Docker image, so the warehouse is used to store image files in a centralized manner.
  • the complex problem is decomposed into continuous training of the detection model and the classification model.
  • the first panorama can be constructed based on the model training task on the artificial intelligence training platform, and then the first panorama can be converted into the second panorama, for example
  • the algorithm module and the data processing module in the model training task are respectively packaged into a virtualization node to realize the operation of the entire algorithm scheme.
  • a first panorama of the task to be processed is obtained, and the first panorama includes at least two operation units and resource units corresponding to each of the operation units; then, the first The panorama is converted into an intermediate file, and the attributes of each operation unit in the intermediate file include the attributes of resource units that have an input relationship or an output relationship with each of the operation units; finally, the intermediate file is converted into a second panorama ;
  • the program code corresponding to the second panorama is used for calling by the task scheduling tool at the back end; thus, by defining an intermediate file that can connect the first panorama and meet the needs of conversion into other pictures, the first panorama can be opened
  • the conversion to the second panorama can realize the multi-model serial training process of complex scenes. Compared with the existing technology that can only use a single algorithm module, it is more convenient and faster to build a full-chain algorithm solution.
  • FIG. 2 is a schematic flowchart of a task processing method provided by an embodiment of the present disclosure. As shown in FIG. 2, the method at least includes the following steps:
  • Step S210 acquiring the first panorama of the task to be processed
  • the first panorama is a model training task diagram constructed through visual operations on the front-end interaction interface of the model training platform; multiple operation units and resource units are deployed on the front-end interaction interface, each of the The operation unit is used to implement the training function, evaluation function or inference function in the deep learning model.
  • visual operations can include clicking, inputting control instructions, uploading data, dragging and dropping algorithm modules and data processing modules, and selecting corresponding Operations such as visualization charts.
  • At least one operation unit or resource unit is determined based on the visual operation received on the front-end interaction interface of the model training platform, and a plurality of operation units and a plurality of resource units are connected to each other on the front-end interaction interface to form a first panorama of .
  • a possible implementation manner is: determine a plurality of operation units and a plurality of resource units to realize the task to be processed; each operation unit is used to realize the training function, evaluation function or reasoning function in the deep learning model; each The resource unit includes the data input and/or output by the corresponding operation unit during the execution of the processing operation; based on the operation unit of the task to be processed and the plurality of resource units, construct in the canvas of the model training platform The first panorama of the task to be processed.
  • Step S220 based on the attributes of the at least two operating units and the attributes of at least one resource unit corresponding to each of the operating units, converting the first panorama into an intermediate file;
  • Step S230 converting the intermediate file into a second panorama
  • steps S220 to S230 design the storage form of the intermediate file and convert the first panorama into the second panorama at the back end through two-step conversion, so as to realize the multi-model serial training process of complex scenes. Similar to the implementation process of step S110 to step S120, for the technical details not disclosed in the embodiment of the present disclosure, please refer to the description of the previous embodiment of the present disclosure for understanding.
  • program code corresponding to the obtained second panorama can be run by a task scheduling tool, so as to implement a multi-model series training process for complex scenes.
  • the first panorama by defining the first panorama, it can be a model training task graph, and the task processing method is limited to the multi-model serial training process of complex scenes, compared with the existing ones that can only be operated by artificially controlling a single algorithm module In this way, it is more convenient and faster to build a full-chain algorithm solution.
  • Fig. 3 is a schematic flowchart of a task processing method provided by an embodiment of the present disclosure.
  • step S120 or step S220 “based on the attributes of the at least two operating units and at least one corresponding to each of the operating units Attributes of the resource unit, "converting the first panorama into an intermediate file” includes the following steps:
  • Step S310 determining the connection relationship between the at least two operating units
  • each resource unit is connected to at least one operation unit, so that a connection relationship between two operation units connected to the same resource unit can be determined.
  • the attribute of each resource unit includes information about the operation unit connected to each resource unit, and the connection relationship between each operation unit may be determined based on the attribute of each resource unit: in response to each The resource unit serves as the output of the first operation unit and the input of the second operation unit at the same time, and it is determined that there is a connection relationship between the first operation unit and the second operation unit. In this way, based on the attributes of each resource unit, it is determined that there is a connection relationship between the two operation units connected before and after each resource unit, so that the operation units connected before and after each resource unit are connected, which is convenient for subsequent storage and composition. Different operation units are connected in series to obtain the whole algorithm scheme.
  • the first panorama can be a model training task map, and the corresponding coding form is set for each operating unit according to the actual task, and the connection between each operating unit can be determined based on the corresponding coding form of each operating unit relation.
  • the operation unit whose coding name is "model training_object detection_1” has a connection relationship with “inference_object detection_1” and "model evaluation_object detection_1” respectively.
  • model training_object detection_1 outputs the trained model A
  • model A is used as the input of the "reasoning_object detection_1” operation unit to perform inference verification on the model A
  • Model A is used as the input of the "model evaluation_object detection_1” operation unit to evaluate the ability of the model A.
  • Step S320 based on the attributes of at least two operation units and the attributes of at least one resource unit corresponding to each operation unit, incorporate the attributes of the resource units that have an input or output relationship with each of the operation units into the corresponding operation unit properties;
  • Step S330 saving the connection relationship between the at least two operation units and the attributes of the merged operation units to obtain the intermediate file
  • each operating unit and the connection relationship between each operating unit are stored as an intermediate file, which can conveniently store the content of the first panorama and provide support for subsequent conversion of other functional maps.
  • connection relationship between the at least two operating units may also be incorporated into the attributes of the corresponding operating units; the merged attributes of the at least two operating units may be saved to obtain the intermediate file.
  • connection relationship of each operation unit is further incorporated into the attributes of the corresponding operation unit, and stored as an intermediate file, which can connect the first panorama and meet the needs of conversion into other images.
  • the intermediate file can connect the first panorama and meet the needs of conversion into other images, solving the first problem.
  • Panorama to the second panorama that the backend can run is difficult to convert the translation problem.
  • Fig. 4 is a schematic flowchart of a task processing method provided by an embodiment of the present disclosure. As shown in Fig. 4, the above step S130 or step S230 "converting the intermediate file into a second panorama" can be implemented through the following steps:
  • Step S410 determining the intermediate result map corresponding to the intermediate file
  • connection relationship between each operation unit in the intermediate file and the operation units is extracted; then, according to the connection relationship, each operation unit in the intermediate file is connected to obtain the intermediate result graph.
  • An intermediate result graph is formed based on each operation unit in the intermediate file and the connection relationship between each operation unit, which can provide support for subsequent conversion of other function graphs.
  • Step S420 in response to the fact that the intermediate result graph is a directed acyclic graph, generate the second panorama based on the at least two operation units and the preset workflow template corresponding to each operation unit ;
  • the intermediate result graph is a directed acyclic graph (Directed Acyclic Graph, DAG), indicating that all operation units in the intermediate result graph each complete a part of the entire task, and each operation unit satisfies a specific execution sequence Constraints in which some units of operation must begin after execution of other units of operation has completed. In this way, it can be determined that a task composed of all operating units can be smoothly performed within a valid time.
  • DAG directed Acyclic Graph
  • the preset workflow template corresponding to each operation unit is set by the front end according to the target task. For example, for defect identification tasks in industrial scenarios, users need to detect the corresponding parts first, and then classify the corresponding different parts respectively. In this way, the problem is decomposed into continuous training of the detection model and the classification model, and the data for training the classification model depends on the inference results of the detection model. Therefore, for the scene where the target task is the defect recognition task, the front end of the model training platform reserves the detection training workflow template and the detection evaluation workflow template related to the object detection model, as well as the detection training workflow template related to the image classification model, and the detection and evaluation work. flow template.
  • the final second panorama is generated, which can realize the orderly training of multiple models in complex scenarios.
  • the process of "generating the second panorama based on the at least two operation units and the preset workflow template corresponding to each operation unit" can be realized by the following steps:
  • Step S4201 performing topological sorting on all operation units in the intermediate file to obtain a linear arrangement result
  • the linear arrangement result corresponding to the intermediate result graph can be obtained.
  • the topological sorting algorithm is mainly used to solve the dependency resolution problem in directed graphs. For any directed acyclic graph, performing topological sorting on it yields a linear arrangement of all operation units.
  • the linear permutation result satisfies the following condition: for any two operation units u and v in the graph, if there is a directed edge from u to v, then u must appear before v in the linear permutation result.
  • Step S4202 acquiring the key information of each operation unit extracted from the intermediate result graph
  • the key information is used to fill in necessary fields in the second panorama.
  • Step S4203 based on the key information, sequentially fill in the necessary fields in the preset workflow template corresponding to the operation unit;
  • Step S4204 according to the linear arrangement result, based on the preset workflow template corresponding to each of the operation units, the second panorama is generated.
  • the operation units in the intermediate file are topologically sorted, and key information is extracted from all operation units to cover the content of the corresponding preset workflow template.
  • the second panorama is generated according to the order of the topological sort, which can be directly scheduled by the back-end tasks tool call.
  • Step S430 in response to the fact that the intermediate result graph is not a directed acyclic graph, output a prompt message indicating an error in creating an intermediate result graph.
  • a prompt message is returned to stop the conversion of the intermediate file to the second panorama, so as to avoid the failure of calling the back-end task scheduling tool.
  • an intermediate result graph is first formed based on each operation unit in the intermediate file and the connection relationship between each operation unit, and then based on the operation units in the intermediate result graph that meet the conditions, the preset corresponding to each operation unit is combined.
  • the workflow template generates a second panorama that can be run by the backend, and can be directly called by the task scheduling tool of the backend.
  • this running pipeline can be described in the form of a directed acyclic graph, which can include the training and evaluation processes of various models.
  • a directed acyclic graph which can include the training and evaluation processes of various models.
  • users need to detect the corresponding components first, and then classify the corresponding different components.
  • this continuous process can build a panorama. That is to say, split the function of a task, define each function abstractly, and divide it into independent modules, and the modules are connected to each other. Modules produce task results.
  • the front end of the artificial intelligence training platform can realize the process of allowing users to manually drag and drop modules to form the first panorama. How to convert the first panorama generated by front-end drag-and-drop into the second panorama (argo-workflow graph) actually running on the back-end needs to be carefully designed.
  • the embodiment of the present disclosure proposes a method for converting the first panorama displayed on the front end into the second panorama actually run on the back end.
  • This method defines an intermediate storage form of the graph, which is mainly completed through two conversions, and finally The generated second panorama can be directly called and run by the task scheduling tool to realize the operation of the entire operation pipeline.
  • This method converts the first panorama formed by the user's front-end drag and drop to form a second panorama that can be run at the back end. The whole is divided into two stages. The first stage converts the first panorama into an intermediate result graph (inter graph ), the second stage converts the intermediate result map into a runnable second panorama.
  • a task example is used to describe the entire process.
  • the user needs to train two models of detection and classification.
  • the scenario is to detect the target to be tested first, and then classify the detected target.
  • the data for training the classification model depends on the inference results of the detection model.
  • the first panorama drawn by the user on the front end is shown in Figure 5A, where the rounded corner box is a resource unit 51, including "Dataset_Object Detection_1", “Model_Object Detection_1”, “Inference Result_Object Detection_1”, “Evaluation Report_Object Detection_1”, “Dataset_Object Detection_2”, “Dataset_Image Classification_2”, “Model_Image Classification_1”, “Inference Results_Image Classification _1” and “Evaluation Report_Image Classification_1” data processing modules, the right-angled rectangle is the operation unit 52, including "model training_object detection_1", “reasoning_object detection_1”, “model evaluation_object Detection_1
  • FIG. 5B is a schematic flow diagram of converting the first panorama image into an intermediate file according to an embodiment of the present disclosure. As shown in FIG. 5B , the flow includes the following steps:
  • Step S501 extracting attributes of all operating units from the first panorama
  • the first panorama includes resource units, operation units and connection lines.
  • the attributes of all the operating units may be extracted from the first panorama according to the storage fields corresponding to the operating units.
  • the attribute of the operation unit is the storage information of the operation unit, the connection line between the operation unit and the resource unit, and the like.
  • Step S502 merging the attribute of the resource unit having an input relationship or an output relationship with each operation unit into the attribute of the corresponding operation unit;
  • the attributes of the input and output resource units connected to each operation unit are merged into the attributes of the corresponding unit.
  • the input resource unit and the output resource unit of all the operation units are first determined through the connection line between each operation unit and at least one resource unit, and then the attributes of the input resource unit and the output resource unit are stored in the corresponding operation unit.
  • Step S503 determining the connection relationship between each operation unit
  • Step S504 storing the attributes of each operation unit as an intermediate file.
  • FIG. 5C is a schematic flow chart of converting an intermediate file into a second panorama provided by an embodiment of the present disclosure. As shown in FIG. 5C , the process includes the following steps:
  • Step S505 perform topological sorting on all operation units in the intermediate file
  • a graph is formed based on all the operation units and connection relations in the extracted intermediate file, which is the intermediate result graph, as shown in FIG. connection relationship between. Then judge whether there is a loop in the intermediate result graph, and return an error message indicating that there is an error in the created graph in response to the loop in the intermediate result graph; in response to the absence of a cycle in the intermediate result graph, use topological sorting to connect all operation units into a linear sort, and the sorting result is shown in the figure 5E, the arrangement order of each operation unit 52 is "model training_object detection_1", “model evaluation_object detection_1", “reasoning_object detection_1”, “result transfer data set_1", " Image Crop_1", “Model Training_Image Classification_1", “Model Evaluation_Image Classification_1”, “Inference_Image Classification_1".
  • Step S506 extract key information for each operation unit, and overwrite the fields of the corresponding preset template
  • Step S507 combining the preset templates of all operating units, and generating a second panorama according to the topological sorting result.
  • all operation units are integrated to form a complete second panorama according to the topological relationship, and at the same time supplement some other field information in the second panorama to generate the final second panorama picture.
  • the program code of the second panorama can be directly executed by the task scheduling tool.
  • an expression form of an intermediate graph is defined as the intermediate result representation of the panorama, which can be connected to the front-end panorama, conveniently store the content of the panorama, and provide subsequent conversion of other functional graphs such as workflow graphs and dynamic reasoning graphs. Support is provided to meet the needs of converting to other graphs.
  • the embodiment of the present disclosure aims at the problem that multiple models are required for complex scene tasks, and the training of the front and rear models has dependencies, so it is impossible to train in one step.
  • An expression form of an intermediate image design a verification and conversion algorithm to solve the problem of difficult conversion and translation from the first panorama to the second panorama that can be run on the back end.
  • the program code corresponding to the second panorama output by the conversion algorithm can be directly invoked and run by the task scheduling tool, and orderly training of multiple models in complex scenarios can be realized.
  • the present disclosure further provides a task processing device, the device includes each module included, each sub-module included in each module, and each unit, which can be processed by the processor in the electronic device Realize;
  • the processor can be a central processing unit (Central Processing Unit, CPU), a microprocessor (Micro Processing Unit, MPU), a digital signal processor (Digital Signal Processor) Signal Processor, DSP) or Field Programmable Gate Array (Field Programmable Gate Array, FPGA), etc.
  • CPU Central Processing Unit
  • MPU Micro Processing Unit
  • DSP Digital Signal Processor
  • FPGA Field Programmable Gate Array
  • FIG. 6 is a schematic diagram of the composition and structure of a task processing device provided by an embodiment of the present disclosure.
  • the device 600 includes an acquisition module 610, a first conversion module 620, and a second conversion module 630, wherein:
  • the acquiring module 610 is configured to acquire a first panorama of tasks to be processed; wherein, the first panorama includes at least two operation units and resource units corresponding to each of the operation units;
  • the first conversion module 620 is configured to convert the first panorama into an intermediate file, and the attributes of each operation unit in the intermediate file include an input relationship and/or an output relationship with each operation unit. Attributes of the resource unit;
  • the second conversion module 630 is configured to convert the intermediate file into a second panorama; wherein, the program code corresponding to the second panorama is used for calling by a backend task scheduling tool.
  • the first panorama includes attributes of the at least two operation units and attributes of at least one resource unit corresponding to each operation unit; the first conversion module 620, It is further configured to convert the first panorama into an intermediate file based on the attributes of the at least two operation units and the attributes of at least one resource unit corresponding to each of the operation units.
  • the acquisition module 610 includes a determination submodule and a construction submodule, wherein: the determination submodule is configured to determine a plurality of operation units and a plurality of resource units for realizing the task to be processed; Each of the operation units is used to implement the training function, evaluation function or reasoning function in the deep learning model; each of the resource units includes the data input and/or output by the corresponding operation unit during the execution of the processing operation; the The construction submodule is configured to construct a first panorama of the task to be processed in the canvas of the model training platform based on the operation unit of the task to be processed and the plurality of resource units.
  • the first converting module 620 includes a first determining submodule, a combining submodule and a storing submodule, wherein: the first determining submodule is configured to determine the at least two operation units The connection relationship between; the merging submodule is configured to have an input with each of the operation units based on the attributes of the at least two operation units and the attributes of at least one resource unit corresponding to each of the operation units The attribute of the resource unit of the relationship or the output relationship is merged into the attribute of the corresponding operation unit; the storage submodule is configured to save the connection relationship between the at least two operation units and the attribute of the merged operation unit , to get the intermediate file.
  • the storage submodule includes a merging unit and a storage unit, wherein: the merging unit is configured to merge the connection relationship between the at least two operation units into the attributes of the corresponding operation unit; The storage unit is configured to store attributes of the merged at least two operation units to obtain the intermediate file.
  • the first determination submodule is further configured to determine the first operation unit and There is a connection relationship between the second operation units.
  • the second converting module 630 includes a second determining submodule and a generating submodule, wherein: the second determining submodule is configured to determine the intermediate result graph corresponding to the intermediate file; The generation submodule is configured to generate the said intermediate result graph based on the at least two operation units and the preset workflow template corresponding to each operation unit in response to the situation that the intermediate result graph is a directed acyclic graph.
  • the second panorama wherein, the preset workflow template corresponding to each operation unit is set by the front end according to the target task.
  • the second determination submodule includes an extraction unit and a connection unit, wherein: the extraction unit is configured to extract each operation unit in the intermediate file and the connection between each operation unit relationship; the connection unit is configured to connect each operation unit in the intermediate file according to the connection relationship to obtain the intermediate result graph.
  • the generating submodule includes a sorting unit, an obtaining unit, a filling unit, and a generating unit, wherein: the sorting unit is configured to perform topological sorting on all operation units in the intermediate file to obtain Linearly arrange results; the acquisition unit is configured to acquire key information of each of the operation units extracted from the intermediate result map; wherein the key information is configured to fill in necessary fields in the second panorama.
  • the filling unit is configured to sequentially fill the necessary fields in the preset workflow template of the corresponding operation unit based on the key information; the generation unit is configured to arrange the results according to the linear arrangement, based on each operation The preset workflow template corresponding to the unit generates the second panorama.
  • the second conversion module further includes an output submodule configured to output a prompt message indicating an error in creating an intermediate result graph in response to a condition that the intermediate result graph is not a directed acyclic graph.
  • the description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment.
  • the description of the method embodiments of the present disclosure please refer to the description of the method embodiments of the present disclosure for understanding.
  • the above task processing method is implemented in the form of software function modules and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
  • the essence of the technical solutions of the embodiments of the present disclosure or the part that contributes to the related technologies can be embodied in the form of software products, the computer software products are stored in a storage medium, and include several instructions to make An electronic device (which may be a smart phone with a camera, a tablet computer, etc.) executes all or part of the methods described in various embodiments of the present disclosure.
  • the aforementioned storage medium includes: various media that can store program codes such as U disk, mobile hard disk, read-only memory (Read Only Memory, ROM), magnetic disk or optical disk.
  • program codes such as U disk, mobile hard disk, read-only memory (Read Only Memory, ROM), magnetic disk or optical disk.
  • an embodiment of the present disclosure provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps in any one of the task processing methods in the above-mentioned embodiments are implemented, wherein the The storage medium may be a volatile or nonvolatile computer-readable storage medium.
  • a chip is also provided, the chip includes a programmable logic circuit and/or program instructions, and when the chip is running, it is configured to implement the task processing described in any of the above embodiments steps in the method.
  • a computer program product is also provided, and when the computer program product is executed by the processor of the electronic device, it is configured to implement the steps in any one of the task processing methods in the above embodiments .
  • An embodiment of the present disclosure further provides a computer program product, the computer program product carries a program code, and instructions included in the program code can be used to execute the steps in any one of the task processing methods in the above method embodiments.
  • the above-mentioned computer program product may be specifically implemented by means of hardware, software or a combination thereof.
  • the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) etc. Wait.
  • An embodiment of the present disclosure also provides a computer program, including computer readable codes.
  • the processor in the electronic device executes any one of the above method embodiments.
  • the task processing method is not limited to:
  • FIG. 7 is a schematic diagram of hardware entities of an electronic device provided by an embodiment of the present disclosure.
  • the electronic device 700 includes a memory 710 and a processor 720, and the memory 710 stores a A computer program, the processor 720 implements the steps in any one of the task processing methods in the embodiments of the present disclosure when executing the program.
  • the memory 710 is configured to store instructions and applications executable by the processor 720, and can also cache data to be processed or processed by the processor 720 and various modules in the electronic device (for example, image data, audio data, voice communication data and video data).
  • Communication data which can be realized by flash memory (FLASH) or random access memory (Random Access Memory, RAM).
  • the processor 720 executes the program, the steps of any one of the above-mentioned task processing methods are realized.
  • the processor 720 generally controls the overall operation of the electronic device 700 .
  • the above-mentioned processor can be an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a digital signal processor (Digital Signal Processor, DSP), a digital signal processing device (Digital Signal Processing Device, DSPD), a programmable logic device (Programmable Logic At least one of Device, PLD), Field Programmable Gate Array (Field Programmable Gate Array, FPGA), Central Processing Unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor. It can be understood that the electronic device that realizes the above processor function may also be other, which is not specifically limited in this embodiment of the present disclosure.
  • the above-mentioned computer storage medium/memory can be read-only memory (Read Only Memory, ROM), programmable read-only memory (Programmable Read-Only Memory, PROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), Electrically Erasable Programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), Magnetic Random Access Memory (Ferromagnetic Random Access Memory, FRAM), Flash Memory (Flash Memory), Magnetic Surface Memory, CD-ROM, or CD-ROM (Compact Disc Read-Only Memory, CD-ROM) and other memories; it can also be various electronic devices including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants Wait.
  • the disclosed devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division.
  • the coupling, or direct coupling, or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be electrical, mechanical or other forms of.
  • the units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed to multiple network units; Part or all of the units can be selected according to actual needs to achieve the purpose of the solutions of the embodiments of the present disclosure.
  • each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may be used as a single unit, or two or more units may be integrated into one unit; the above-mentioned integration
  • the unit can be realized in the form of hardware or in the form of hardware plus software functional unit.
  • the above-mentioned integrated units of the present disclosure are realized in the form of software function modules and sold or used as independent products, they may also be stored in a computer-readable storage medium.
  • the aforementioned storage medium includes various media capable of storing program codes such as removable storage devices, ROMs, magnetic disks or optical disks.
  • a first panorama of the task to be processed is obtained, and the first panorama includes at least two operation units and resource units corresponding to each of the operation units; then, the first The panorama is converted into an intermediate file, and the attributes of each operation unit in the intermediate file include the attributes of resource units that have an input relationship or an output relationship with each of the operation units; finally, the intermediate file is converted into a second panorama ;
  • the program code corresponding to the second panorama is used for calling by the task scheduling tool at the back end; thus, by defining an intermediate file that can connect the first panorama and meet the needs of conversion into other pictures, the first panorama can be opened
  • the conversion to the second panorama can realize the multi-model serial training process of complex scenes. Compared with the existing technology that can only use a single algorithm module, it is more convenient and faster to build a full-chain algorithm solution.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biophysics (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Studio Devices (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本公开实施例公开了一种任务处理方法、装置、设备、存储介质、计算机程序及程序产品,所述方法包括:获取待处理任务的第一全景图;其中,所述第一全景图包括至少两个操作单元和每一所述操作单元对应的资源单元;将所述第一全景图转化为中间文件;其中,所述中间文件中每一操作单元的属性包括与每一所述操作单元具有输入关系和/或输出关系的资源单元的属性;将所述中间文件转换为第二全景图;其中,所述第二全景图对应的程序代码用于供后端的任务调度工具调用。

Description

任务处理方法、装置、设备、存储介质、计算机程序及程序产品
相关申请的交叉引用
本公开基于申请号为202110570294.1、申请日为2021年05月25日、申请名称为“任务处理方法及装置、电子设备和存储介质”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以全文引入的方式引入本公开。
技术领域
本公开涉及人工智能技术领域,涉及但不限定于任务处理方法、装置、设备、存储介质、计算机程序及程序产品。
背景技术
近些年,深度学习模型在计算机视觉领域取得突破,各项基本任务的性能指标大幅超过传统算法,如何将深度学习技术应用到真实场景中带来价值是一个十分重要的问题。
真实的场景往往比学术数据集复杂很多,问题难度也远远超过学术研究的基本任务,很多场景问题并不能转化为单一的基本任务,也无法使用一个基本任务模型解决问题。因此,复杂场景任务需要多个模型,且前后模型的训练有依赖关系,无法一步训练的问题。
发明内容
本公开实施例提供一种任务处理方法、装置、设备、存储介质、计算机程序及程序产品。
本公开实施例的技术方案是这样实现的:
第一方面,本公开实施例提供一种任务处理方法,包括:
获取待处理任务的第一全景图;其中,所述第一全景图包括至少两个操作单元和每一所述操作单元对应的资源单元;
将所述第一全景图转化为中间文件,所述中间文件中每一操作单元的属性包括与每一所述操作单元具有输入关系和/或输出关系的资源单元的属性;
将所述中间文件转换为第二全景图。
在一些可能的实施例中,所述第一全景图包括所述至少两个操作单元的属性和每一所述操作单元对应的至少一个所述资源单元的属性;所述将所述第一全景图转化为中间文件,包括:基于所述至少两个操作单元的属性和每一所述操作单元对应的至少一个资源单元的属性,将所述第一全景图转化为中间文件。
在一些可能的实施例中,所述获取待处理任务的第一全景图,包括:确定实现所述待处理任务的多个操作单元和多个资源单元;每一所述操作单元用于实现深度学***台的画布中构建所述待处理任务的第一全景图。
这样,通过模型训练平台待处理任务的第一全景图,将任务处理方法限定在复杂场景的多模型串联训练流程,相比现有的只能通过人为控制单个算法模块运行的方式,更加便利和快捷地构建全链条的算法解决方案。
在一些可能的实施例中,所述基于所述至少两个操作单元的属性和每一所述操作单元对应的至少一个资源单元的属性,将所述第一全景图转化为中间文件,包括:确定所述至少两个操作单元之间的连接关系;基于所述至少两个操作单元的属性和每一所述操作单元对应的至少一个资源单元的属性,将与每一所述操作单元具有输入关系或输出关系的资源单元的属性并入对应操作单元的属性中;将所述至少两个操作单元之间的连接关系和并入后的操作单元的属性进行保存,得到所述中间文件。
这样,对于第一全景图中的所有操作单元,将每一操作单元的输入资源单元或输出资源单元的属性合进相应操作单元的属性中,同时计算各个操作单元的连接关系,从而存储各个操作单元的属性以及各个操作单元之间的连接关系作为中间文件,该中间文件可以方便存储第一全景图的内容,并为后续其他功能图的转换提供支持。
在一些可能的实施例中,所述将所述至少两个操作单元之间的连接关系和并入后的操作单元的属性进行保存,得到所述中间文件,包括:将所述至少两个操作单元之间的连接关系并入对应操作单元的属性;保存并入后的至少两个操作单元的属性,得到所述中间文件。
这样,将各个操作单元的连接关系进一步并入相应操作单元的属性中,并存储为中间文件,该中间文件可以衔接第一全景图并且可以满足转换成其他图的需要,解决了第一全景图到后端可运行的第二全景图难以转换翻译的问题。
在一些可能的实施例中,所述确定所述至少两个操作单元之间的连接关系,包括:响应于每一所述资源单元同时作为第一操作单元的输出和第二操作单元的输入,确定所述第一操作单元与所述第二操作单元之间具有连接关系。
这样,便于后续存储以及以构图的方式串接不同的操作单元得到整个算法方案。
在一些可能的实施例中,所述将所述中间文件转换为第二全景图,包括:确定所述中间文件对应的中间结果图;响应于所述中间结果图为有向无环图的情况下,基于所述至少两个操作单元和每一所述操作单元对应的预置工作流模板,生成所述第二全景图;其中,每一所述操作单元对应的预置工作流模板为所述前端根据目标任务设定的。
这样,通过创建中间结果图并基于满足条件的中间结果图中的操作单元,结合各个操作单元对应的预置工作流模板,生成最终可被后端运行的第二全景图,可以实现复杂场景下多个模型的有序训练。
在一些可能的实施例中,所述确定所述中间文件对应的中间结果图,包括:提取所述中间文件中各操作单元和所述各操作单元之间的连接关系;按照所述连接关系,连接所述中间文件中各操作单元,得到所述中间结果图。
这样,基于中间文件中各操作单元和各操作单元之间的连接关系形成中间结果图, 能够为后续其他功能图的转换提供支持。
在一些可能的实施例中,所述基于所述至少两个操作单元和每一所述操作单元对应的预置工作流模板,生成所述第二全景图,包括:对所述中间文件中的所有操作单元进行拓扑排序,得到线性排列结果;获取从所述中间结果图中提取的每一所述操作单元的关键信息;其中,所述关键信息配置为填充所述第二全景图中必要字段;基于所述关键信息,依次填充对应所述操作单元的预置工作流模板中的必要字段;按照所述线性排列结果,基于每一所述操作单元对应的预置工作流模板,生成所述第二全景图。
这样,对中间文件中的操作单元进行拓扑排序,并对所有操作单元提取关键信息覆盖对应预置工作流模板的内容,最后根据拓扑排序的顺序生成第二全景图,能够直接被后端的任务调度工具调用。
在一些可能的实施例中,所述将所述中间文件转换为第二全景图,还包括:响应于所述中间结果图不为有向无环图的情况下,输出创建中间结果图错误的提示信息。
这样,在创建的中间结果图不为有向无环图的情况下,返回提示信息,停止中间文件向第二全景图转换,避免后端的任务调度工具调用失败。
第二方面,本公开实施例提供一种任务处理装置,包括:
获取模块,配置为获取待处理任务的第一全景图;其中,所述第一全景图包括至少两个操作单元和每一所述操作单元对应的资源单元;
第一转换模块,配置为将所述第一全景图转化为中间文件,所述中间文件中每一操作单元的属性包括与每一所述操作单元具有输入关系和/或输出关系的资源单元的属性;
第二转换模块,配置为将所述中间文件转换为第二全景图。
第三方面,本公开实施例提供一种电子设备,包括存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述任务处理方法中的步骤。
第四方面,本公开实施例提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述任务处理方法中的步骤。
第五方面,本公开实施例还提供一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现上述任务处理方法。
第六方面,本公开实施例还提供一种计算机程序产品,所述计算机程序产品包括一条或多条指令,所述一条或多条指令适于由处理器加载并执行上述任务处理方法中的步骤。
本公开实施例提供的技术方案带来的有益效果至少包括:
在本公开实施例中,首先,获取待处理任务的第一全景图;其中,所述第一全景图的包括至少两个操作单元和每一所述操作单元对应的资源单元;然后,将所述第一全景图转化为中间文件,所述中间文件中每一操作单元的属性包括与每一所述操作单元具有输入关系和/或输出关系的资源单元的属性;最后将所述中间文件转换为第二全景图;如 此,通过定义既可以衔接第一全景图并且可以满足转换成其他图的需要的中间文件,打通第一全景图到后端第二全景图的转换,可以实现复杂场景的多模型串联训练流程,相比现有的只能用单个算法模块的技术,更加便利和快捷地构建全链条的算法解决方案。
附图说明
为了更清楚地说明本公开实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图,其中:
图1为本公开实施例提供的任务处理方法的流程示意图;
图2为本公开实施例提供的任务处理方法的流程示意图;
图3为本公开实施例提供的任务处理方法的流程示意图;
图4为本公开实施例提供的任务处理方法的流程示意图;
图5A为本公开实施例提供的第一全景图的示意图;
图5B为本公开实施例提供的第一全景图转换为中间结果图的流程示意图;
图5C为本公开实施例提供的中间结果图转换为第二全景图的流程示意图;
图5D为本公开实施例提供的中间结果图的示意图;
图5E为本公开实施例提供的各操作单元的线性排列结果示意图;
图5F为本公开实施例提供的第二全景图的示意图;
图6为本公开实施例提供的一种任务处理装置的组成结构示意图;
图7为本公开实施例提供的一种电子设备的硬件实体示意图。
具体实施方式
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。以下实施例配置为说明本公开,但不用来限制本公开的范围。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。
需要指出,本公开实施例所涉及的术语“第一\第二\第三”仅仅是是区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换预设的顺序或先后次序,以使这里描述的本公开实施例能够以除了在这里图示或描述的以外的顺序实施。
本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语),具有与本公开实施例所属领域中的普通技术人员的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语,应该被理解为具有与现有技术 的上下文中的意义一致的意义,并且除非像这里一样被特定定义,否则不会用理想化或过于正式的含义来解释。
本公开实施例提供的方案涉及人工智能技术,具体通过如下实施例进行说明:
人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用***。换句话说,人工智能是计算机科学的一个综合技术,企图了解智能的实质,并生产出一种新的能以人类智能相似的方式做出反应的智能机器。人工智能也就是研究各种智能机器的设计原理与实现方法,使机器具有感知、推理与决策的功能。
人工智能技术是一门综合学科,涉及领域广泛,既有硬件层面的技术也有软件层面的技术。人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互***、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术、语音处理技术、自然语言处理技术以及机器学习/深度学习等几大方向。
其中,机器学习(Machine Learning,ML)是一门多领域交叉学科,涉及概率论、统计学、逼近论、凸分析、算法复杂度理论等多门学科。专门研究计算机怎样模拟或实现人类的学习行为,以获取新的知识或技能,重新组织已有的知识结构使之不断改善自身的性能。机器学习是人工智能的核心,是使计算机具有智能的根本途径,其应用遍及人工智能的各个领域。机器学习和深度学习通常包括人工神经网络、置信网络、强化学习、迁移学习、归纳学习、式教学习等技术。
近些年,深度学习模型在计算机视觉领域取得突破,各项基本任务的性能指标大幅超过传统算法,如何将深度学习技术应用到真实场景中带来价值是一个十分重要的问题。
本公开实施例提供一种任务处理方法,应用于电子设备。所述电子设备上部署有端到端可视化模型生成平台,内嵌物体检测、图像分类等视觉领域常用人工智能模型通用训练框架。所述电子设备包括但不限于笔记本电脑、平板电脑、多媒体设备、移动互联网设备或其他类型的设备,以及服务器、分布式计算节点等具有计算能力的设备。该方法所实现的功能可以通过电子设备中的处理器调用程序代码来实现,当然程序代码可以保存在计算机存储介质中。
图1为本公开实施例提供的任务处理方法的流程示意图,如图1所示,所述方法至少包括以下步骤:
步骤S110,获取待处理任务的第一全景图;
这里,所述第一全景图(raw graph)为用户在画布上构建的生成人工智能模型的完整解决方案,包括模型训练、评测、推理逻辑串联等功能。其中,画布是人工智能训练平台上供用户拖拽不同组件,以构建模型生产全流程的版块。第一全景图中包括至少两个操作单元(operation,op)和每一所述操作单元对应的资源单元。所述第一全景图的存储文件中包括至少两个操作单元的属性和至少两个资源单元的属性。其中,每一操作单元为对一个算法模块进行封装后的虚拟化节点;所述资源单元可以表示为与操作单元具有输入关系和/或输出关系的数据结点(node),每一资源单元为对一个数据处理模块 进行封装后的虚拟化节点,且数据处理模块为某一算法模块提供输入数据,或者对另一算法模块的输出数据进行处理。
在一些实施方式中,一所述资源单元为一所述操作单元的输入;在一些实施方式中,一所述资源单元为一所述操作单元的输出;在另一些实施方式中,一所述资源单元同时为上一操作单元的输出和下一操作单元的输入。
需要说明的是,很多场景问题并不能转化为单一的基本任务,也无法使用一个基本任务模型解决问题。在实施中,对复杂任务进行功能拆分,对每个功能进行抽象定义,划分成彼此独立的模块,模块与模块之间相互连接,前一个模块的输出是后一个模块的输入,最后一个模块产生任务结果。也就是说,将复杂问题拆解的若干算法模块和相应数据处理模块,这样通过用户在人工智能训练平台的前端交互界面上拖拽不同算法模块和数据处理模块形成第一全景图,用于描述一个实际场景下完整的人工智能解决方案,包括模型训练、评测、推理逻辑串联等功能。
第一全景图以文件的形式存储在人工智能训练平台中。在一些实施方式中,所述第一全景图包括操作单元的属性和资源单元的属性;在另一些实施方式中,所述第一全景图包括操作单元的属性、资源单元的属性以及操作单元和资源单元之间的连接关系,如连接线(link)。所述操作单元的属性可以包括对应算法模块的训练、推理、评测等功能,也可以包括与该操作单元连接的资源单元名称。所述资源单元的属性可以包括模型训练或推理过程中的数据实体,也可以包括数据集接口函数、输入输出数据的格式、图片尺寸等。
步骤S120,将所述第一全景图转化为中间文件;
这里,所述中间文件为设定的一种图的中间存储形式,所述中间文件中每一操作单元的属性包括与每一所述操作单元具有输入关系和/或输出关系的资源单元的属性。
一种可能的实现方式是,对于第一全景图中的所有操作单元,将每一操作单元的输入资源单元或输出资源单元的属性并入相应操作单元的属性中;同时基于第一全景图中各个操作单元之间的连接关系,确定与同一资源单元有输入输出关系的两个操作单元之间的连接关系,保存第一全景图中所有操作单元的属性和每两个操作单元之间的连接关系,得到转换后的中间文件。这样,转换后的中间文件可以方便存储第一全景图的内容,并为后续其他功能图的转换提供支持。
一种可能的实现方式是,对于第一全景图中的所有操作单元,将每一操作单元的输入资源单元或输出资源单元的属性并入相应操作单元的属性中;同时基于第一全景图中各个操作单元之间的连接关系,确定与同一资源单元有输入输出关系的两个操作单元之间的连接关系,将该连接关系也合入对应操作单元的属性中,直接存储所有操作单元的属性,得到转换后的中间文件。这样,转换后的中间文件可以方便存储第一全景图的内容,可以衔接第一全景图并且可以满足转换成其他图的需要,解决了第一全景图到后端可运行的第二全景图难以转换翻译的问题。
步骤S130,将所述中间文件转换为第二全景图。
这里,所述第二全景图对应的程序代码用于供后端的任务调度工具调用;所述后端的任务调度工具为工作流引擎(argo engine),所述第二全景图(argo-workflow)对应的程序代码可以供后端的任务调度工具调用,实现整个算法方案的运行。也就是说,采用不同的算法模块和处理逻辑形成工作流的形式来进行统一的调用,实现复杂场景下多个模型的有序训练或推理。
所述中间文件中包括操作单元的属性,可以满足转换成第二全景图的需要。
在一些实施例中,第二全景图对应的程序代码可以采用容器技术来实现,第二全景图可以对应于一个POD,POD代表部署的一个单位,POD中的所有容器镜像中的代码可以组成第二全景图对应的所有程序代码,不同的容器镜像中的代码段实现第二全景图中不同的操作单元。任务调度工具在调用的时候,可以通过不同的容器来实现。
在实施的时候,容器可以采用开源的应用容器引擎(Docker)来实现。一般来说,Docker镜像除了提供容器运行时所需的程序、库、资源、配置等文件外,还包含了一些为运行时准备的一些配置参数(如匿名卷、环境变量、用户等)。Docker容器是Docker镜像运行时的实体。Docker容器可以被创建、启动、停止、删除、暂停等。Docker仓库(Repository)中可以包含多个仓库;每个仓库可以包含多个标签(Tag);每个标签对应一个Docker镜像,因此,仓库用来集中存放镜像文件。
针对现实中复杂的工业场景,比如缺陷识别问题,用户需要先检测对应的部件,然后对相应的不同部件分别进行分类。这样将复杂问题拆解为检测模型和分类模型的连续训练,首先可以通过在人工智能训练平台上基于模型训练任务来构建第一全景图,然后将第一全景图转换成第二全景图,例如在实施中将模型训练任务中的算法模块和数据处理模块分别封装成一个虚拟化节点,以实现整个算法方案的运行。
在本公开实施例中,首先,获取待处理任务的第一全景图,所述第一全景图包括至少两个操作单元和每一所述操作单元对应的资源单元;然后,将所述第一全景图转化为中间文件,所述中间文件中每一操作单元的属性包括与每一所述操作单元具有输入关系或输出关系的资源单元的属性;最后将所述中间文件转换为第二全景图;所述第二全景图对应的程序代码用于供后端的任务调度工具调用;如此,通过定义既可以衔接第一全景图并且可以满足转换成其他图的需要的中间文件,打通第一全景图到第二全景图的转换,可以实现复杂场景的多模型串联训练流程,相比现有的只能用单个算法模块的技术,更加便利和快捷地构建全链条的算法解决方案。
图2为本公开实施例提供的任务处理方法的流程示意图,如图2所示,所述方法至少包括以下步骤:
步骤S210,获取待处理任务的第一全景图;
这里,所述第一全景图是在模型训练平台的前端交互界面上通过可视化操作搭建的模型训练任务图;所述前端交互界面上部署有多个操作单元和多个资源单元,每一所述操作单元用于实现深度学习模型中的训练功能、评估功能或推理功能。
可以理解的是,基于前端交互界面上的按键、输入框、菜单、工具栏之类的控件, 可视化操作可以包括点击、输入控制指令、上传数据、拖拽算法模块和数据处理模块、选择相应的可视化图表等操作。
在实施中,基于在所述模型训练平台的前端交互界面上接收的可视化操作,确定至少一个操作单元或资源单元,在所述前端交互界面上呈现多个操作单元和多个资源单元相互连接形成的第一全景图。一种可能的实施方式是:确定实现所述待处理任务的多个操作单元和多个资源单元;每一所述操作单元用于实现深度学***台的画布中构建所述待处理任务的第一全景图。
步骤S220,基于所述至少两个操作单元的属性和每一所述操作单元对应的至少一个资源单元的属性,将所述第一全景图转化为中间文件;
步骤S230,将所述中间文件转换为第二全景图;
上述步骤S220至步骤S230通过设计中间文件的存储形式,经过两步转换,将第一全景图转换为后端的第二全景图,以此实现复杂场景的多模型串联训练流程。与所述步骤S110至步骤S120的实施过程类似,对于本公开实施例中未披露的技术细节,请参照本公开前一实施例的描述而理解。
进一步地,得到的第二全景图对应的程序代码可以通过任务调度工具运行,以实现复杂场景的多模型串联训练流程。
在本公开实施例中,通过限定第一全景图可以为模型训练任务图,将任务处理方法限定在复杂场景的多模型串联训练流程,相比现有的只能通过人为控制单个算法模块运行的方式,更加便利和快捷地构建全链条的算法解决方案。
图3为本公开实施例提供的任务处理方法的流程示意图,如图3所示,上述步骤S120或者步骤S220“基于所述至少两个操作单元的属性和每一所述操作单元对应的至少一个资源单元的属性,将所述第一全景图转化为中间文件”包括以下步骤:
步骤S310,确定所述至少两个操作单元之间的连接关系;
这里,在第一全景图中,每一个资源单元都连接有至少一个操作单元,从而可以确定与同一资源单元连接的前后两个操作单元之间的连接关系。
在一种实施方式中,每一所述资源单元的属性包括与每一所述资源单元连接的操作单元信息,可以基于各资源单元的属性,确定各操作单元之间的连接关系:响应于每一所述资源单元同时作为第一操作单元的输出和第二操作单元的输入,确定所述第一操作单元与所述第二操作单元之间具有连接关系。这样,基于各个资源单元的属性,确定每一资源单元之前和之后分别连接的两个操作单元之间具有连接关系,从而将每一资源单元前后连接的操作单元连接起来,便于后续存储以及以构图的方式串接不同的操作单元得到整个算法方案。
在另一种实施方式中,第一全景图可以为模型训练任务图,根据实际任务为各操作单元设置对应的编码形式,可以基于各操作单元对应的编码形式,确定各操作单元之间 的连接关系。例如,编码名称为“模型训练_物体检测_1”的操作单元分别与“推理_物体检测_1”、“模型评测_物体检测_1”之间具有连接关系。其中,“模型训练_物体检测_1”这一操作单元输出训练好的模型A,且模型A作为“推理_物体检测_1”操作单元的输入,以对该模型A进行推理验证;或者,模型A作为“模型评测_物体检测_1”操作单元的输入,以对该模型A的能力进行评估。
步骤S320,基于至少两个操作单元的属性和每一操作单元对应的至少一个资源单元的属性,将与每一所述操作单元具有输入关系或输出关系的资源单元的属性并入对应操作单元的属性中;
这里,为了衔接第一全景图并且可以满足转换成其他图的需要,需要删除第一全景图中的资源单元,并将资源单元的属性并入到与该资源单元相连接的操作单元的属性中。对于第一全景图中的所有操作单元,将每一操作单元的输入资源单元或输出资源单元的属性合进相应操作单元的属性中,可以方便存储第一全景图的内容,并为后续其他功能图的转换提供支持。
步骤S330,将所述至少两个操作单元之间的连接关系和并入后的操作单元的属性进行保存,得到所述中间文件;
这里,存储各个操作单元的属性以及各个操作单元之间的连接关系作为中间文件,该中间文件可以方便存储第一全景图的内容,并为后续其他功能图的转换提供支持。
在其他一些实施方式中,还可以将所述至少两个操作单元之间的连接关系并入对应操作单元的属性;保存并入后的至少两个操作单元的属性,得到所述中间文件。这样,将各个操作单元的连接关系进一步并入相应操作单元的属性中,并存储为中间文件,该中间文件可以衔接第一全景图并且可以满足转换成其他图的需要。
在本公开实施例中,通过存储各个操作单元的属性以及各个操作单元之间的连接关系作为中间文件,该中间文件可以衔接第一全景图并且可以满足转换成其他图的需要,解决了第一全景图到后端可运行的第二全景图难以转换翻译的问题。
图4为本公开实施例提供的任务处理方法的流程示意图,如图4所示,上述步骤S130或者步骤S230“将所述中间文件转换为第二全景图”可以通过以下步骤实现:
步骤S410,确定所述中间文件对应的中间结果图;
这里,首先,提取所述中间文件中各操作单元和所述各操作单元之间的连接关系;然后,按照所述连接关系,连接所述中间文件中各操作单元,得到所述中间结果图。基于中间文件中各操作单元和各操作单元之间的连接关系形成中间结果图,能够为后续其他功能图的转换提供支持。
步骤S420,响应于所述中间结果图为有向无环图的情况下,基于所述至少两个操作单元和每一所述操作单元对应的预置工作流模板,生成所述第二全景图;
这里,所述中间结果图为有向无环图(Directed Acyclic Graph,DAG),表明所述中间结果图中的所有操作单元各自完成整个任务的一部分,且各操作单元之间满足特定执行顺序的约束,其中一些操作单元的开始必须是另一些操作单元执行完成之后。这样, 能够确定由所有操作单元组成的任务能够在有效时间内顺利进行。
每一所述操作单元对应的预置工作流模板为前端根据目标任务设定的。例如,对于工业场景中的缺陷识别任务,用户需要先检测对应的部件,然后对相应的不同部件分别进行分类。这样将问题拆解为检测模型和分类模型的连续训练,训练分类模型的数据依赖检测模型的推理结果。从而针对目标任务为缺陷识别任务的场景,模型训练平台的前端预留物体检测模型相关的检测训练工作流模板、检测评估工作流模板,以及图像分类模型相关的检测训练工作流模板、检测评估工作流模板。
基于有向无化图中的操作单元,结合各个操作单元对应的预置工作流模板,生成最终的第二全景图,可以实现复杂场景下多个模型的有序训练。
可以通过以下步骤实现“基于所述至少两个操作单元和每一所述操作单元对应的预置工作流模板,生成所述第二全景图”的过程:
步骤S4201,对所述中间文件中的所有操作单元进行拓扑排序,得到线性排列结果;
这里,当且仅当中间结果图为有向无环图时,才能得到对应于该中间结果图的线性排列结果。
需要说明的是,拓扑排序算法主要用来解决有向图中的依赖解析(dependency resolution)问题。对于任何有向无环图而言,对其进行拓扑排序得到所有操作单元的一个线性排列结果。该线性排列结果满足这样的条件:对于图中的任意两个操作单元u和v,若存在一条有向边从u指向v,则在线性排列结果中u一定出现在v前面。
步骤S4202,获取从所述中间结果图中提取的每一所述操作单元的关键信息;
这里,所述关键信息用于填充第二全景图中的必要字段。
步骤S4203,基于所述关键信息,依次填充对应操作单元的预置工作流模板中的必要字段;
步骤S4204,按照所述线性排列结果,基于每一所述操作单元对应的预置工作流模板,生成所述第二全景图。
这里,对中间文件中的操作单元进行拓扑排序,并对所有操作单元提取关键信息覆盖对应预置工作流模板的内容,最后根据拓扑排序的顺序生成第二全景图,能够直接被后端的任务调度工具调用。
步骤S430,响应于所述中间结果图不为有向无环图的情况下,输出创建中间结果图错误的提示信息。
这里,在创建的中间结果图不为有向无环图的情况下,返回提示信息,停止中间文件向第二全景图的转换,避免后端的任务调度工具调用失败。
在本公开实施例中,首先基于中间文件中各操作单元和各操作单元之间的连接关系形成中间结果图,然后基于满足条件的中间结果图中的操作单元,结合各个操作单元对应的预置工作流模板,生成最终可被后端运行的第二全景图,能够直接被后端的任务调度工具调用。
下面结合一个具体实施例对上述任务处理方法进行说明,然而值得注意的是,该具 体实施例仅是为了更好地说明本公开,并不构成对本公开的不当限定。
近些年,深度学习模型在计算机视觉领域取得突破,各项基本任务的性能指标大幅超过传统算法,如何将深度学习技术应用到真实场景中带来价值是一个十分重要的问题。真实的场景往往比学术数据集复杂很多,问题难度也远远超过学术研究的基本任务,很多场景问题并不能转化为单一的基本任务,也无法使用一个基本任务模型解决问题,而是需要研究员根据实际任务对问题进行拆解,以形成解决方案一整套运行管线(pipeline),各个深度学习基础的算法模块只是运行管线中的一个环节。
对于复杂的场景任务,这个运行管线可以用一张有向无环图的形式描述,它可以包含多种模型的训练、评估过程。针对现实中复杂的工业场景,比如缺陷识别问题,用户需要先检测对应的部件,然后对相应的不同部件分别进行分类。这样将问题拆解为检测模型和分类模型的连续训练,这一连续的流程可以构建全景图。也就是说,对一项任务进行功能拆分,对每个功能进行抽象定义,划分成彼此独立的模块,模块与模块之间相互连接,前一个模块的输出是后一个模块的输入,最后一个模块产生任务结果。人工智能训练平台的前端能够实现让用户手动拖拽模块形成第一全景图的过程。前端拖拽产生的第一全景图如何转换成后端实际运行的第二全景图(argo-workflow graph)是需要进行仔细设计的。
本公开实施例提出了一种将前端展示的第一全景图转换成后端实际运行的第二全景图的方法,该方法定义了一种图的中间存储形式,主要通过两次转换完成,最后生成的第二全景图可以直接被任务调度工具调用运行,实现整个运行管线的运行。该方法对用户前端拖拽形成的第一全景图进行转换,形成后端可运行的第二全景图,整体分为两大阶段,第一阶段将第一全景图转换为中间结果图(inter graph),第二阶段将中间结果图转换为可运行的第二全景图。
以一个任务例子描述整个流程,用户需要训练检测和分类两个模型,场景是先对待测目标进行检测,然后对检测出的目标进行分类,训练分类模型的数据依赖检测模型的推理结果。用户在前端绘制的第一全景图如图5A所示,其中圆角方框为资源单元51,包括“数据集_物体检测_1”、“模型_物体检测_1”、“推理结果_物体检测_1”、“测评报告_物体检测_1”、“数据集_物体检测_2”、“数据集_图像分类_2”、“模型_图像分类_1”、“推理结果_图像分类_1”和“测评报告_图像分类_1”这些数据处理模块,直角矩形为操作单元52,包括“模型训练_物体检测_1”、“推理_物体检测_1”、“模型测评_物体检测_1”、“结果转数据集_1”、“图像裁剪_1”、“模型训练_图像分类_1”、“推理_图像分类_1”、“模型测评_图像分类_1”这些算法处理模块。资源单元51与操作单元52之间的连线为连接线。这个全景图的实际存储形式为一个文件,该文件存储了各个资源单元、操作单元和连接线的信息。
图5B为本公开实施例提供的第一全景图转换为中间文件的流程示意图,如图5B所示,该流程包括以下步骤:
步骤S501,从第一全景图中提取所有操作单元的属性;
这里,第一全景图包括资源单元、操作单元和连接线。可以根据操作单元对应的存储字段,从第一全景图中提取所有操作单元的属性。其中,操作单元的属性为操作单元的存储信息以及操作单元与资源单元的连接线等。
步骤S502,将与每一操作单元具有输入关系或输出关系的资源单元的属性合并进相应操作单元的属性中;
这里,对于所有的操作单元,将与每一操作单元连接的输入、输出资源单元属性合并进相应单元的属性中。在实施中,首先通过每一操作单元与至少一个资源单元的连接线,确定所有操作单元的输入资源单元和输出资源单元,然后将输入资源单元和输出资源单元的属性存储进相应操作单元中。
步骤S503,确定各操作单元之间的连接关系;
这里,遍历所有操作单元和相应的连接线,计算各操作单元之间的连接关系,并且将连接关系存储进操作单元的属性中。
步骤S504,将各操作单元的属性存储为中间文件。
图5C为本公开实施例提供的中间文件转换为第二全景图的流程示意图,如图5C所示,该流程包括以下步骤:
步骤S505,对中间文件中的所有操作单元进行拓扑排序;
这里,首先,基于提取的中间文件中的所有操作单元和连接关系形成一张图,即为中间结果图,如图5D所示,该中间结果图中仅包括各个操作单元52和各操作单元52之间的连接关系。然后判断中间结果图是否有环,响应于中间结果图有环则返回创建图有错误的指示信息;响应于中间结果图无环,利用拓扑排序将所有操作单元连成线性排序,排序结果如图5E,各个操作单元52的排列顺序依次为“模型训练_物体检测_1”、“模型测评_物体检测_1”、“推理_物体检测_1”、“结果转数据集_1”、“图像裁剪_1”、“模型训练_图像分类_1”、“模型测评_图像分类_1”、“推理_图像分类_1”。
步骤S506,对每一操作单元提取关键信息,并覆盖对应的预置模板的字段;
这里,按照拓扑排序,对应每个操作单元,提取中间文件中该操作单元的关键信息,覆盖该操作单元对应的预置模板的字段,分别将“模型训练_物体检测_1”、“模型测评_物体检测_1”、“推理_物体检测_1”、“结果转数据集_1”、“图像裁剪_1”、“模型训练_图像分类_1”、“模型测评_图像分类_1”、“推理_图像分类_1”替换为如图5F所示,包括“检测训练的操作单元”、“检测评估的操作单元”、“检测推理的操作单元”、“结果转数据集的操作单元”、“图像裁剪的操作单元”、“分类训练的操作单元”、“分类测评的操作单元”和“分类推理的操作单元”。
步骤S507,结合所有操作单元的预置模板,按照拓扑排序结果生成第二全景图。
这里,在所有操作单元的预置模板内容替换完成后,综合所有操作单元,根据拓扑关系形成完整的第二全景图,同时补充第二全景图中的其他一些字段信息,生成最终的第二全景图。该第二全景图的程序代码可以直接被任务调度工具运行。
本公开实施例一方面打通前端的第一全景图到后端第二全景图的转换,可以实现复 杂场景的多模型串联训练流程,相比现有的只能用单个算法模块的技术,更加便利和快捷的构建全链条的算法解决方案。另一方面定义了一种中间图的表达形式作为全景图的中间结果表示,可以衔接前端的全景图,方便存储全景图内容,并为后续其他功能图如工作流图、动态推理图等的转换提供支持,可以满足转换成其他图的需要。
本公开实施例针对复杂场景任务需要多个模型,且前后模型的训练有依赖关系,无法一步训练的问题,首先以构图的方式来串接不同的算法模块和数据处理模块形成全景图,然后定义一种中间图的表达形式,设计校验及转换算法,解决从第一全景图到后端可运行的第二全景图难以转换翻译的问题。这样,利用该转换算法输出的第二全景图对应的程序代码可以直接被任务调度工具调用运行,可以实现复杂场景下多个模型的有序训练。
基于前述的实施例,本公开实施例再提供一种任务处理装置,所述装置包括所包括的各模块、以及各模块所包括的各子模块以及各单元,可以通过电子设备中的处理器来实现;当然也可通过具体的逻辑电路实现;在实施的过程中,处理器可以为中央处理器(Central Processing Unit,CPU)、微处理器(Micro Processing Unit,MPU)、数字信号处理器(Digital Signal Processor,DSP)或现场可编程门阵列(Field Programmable Gate Array,FPGA)等。
图6为本公开实施例提供的一种任务处理装置的组成结构示意图,如图6所示,所述装置600包括获取模块610、第一转换模块620、和第二转换模块630,其中:
所述获取模块610,配置为获取待处理任务的第一全景图;其中,所述第一全景图包括至少两个操作单元和每一所述操作单元对应的资源单元;
所述第一转换模块620,配置为将所述第一全景图转化为中间文件,所述中间文件中每一操作单元的属性包括与每一所述操作单元具有输入关系和/或输出关系的资源单元的属性;
所述第二转换模块630,配置为将所述中间文件转换为第二全景图;其中,所述第二全景图对应的程序代码用于供后端的任务调度工具调用。
在一些可能的实施例中,所述第一全景图包括所述至少两个操作单元的属性和每一所述操作单元对应的至少一个所述资源单元的属性;所述第一转换模块620,还配置为基于所述至少两个操作单元的属性和每一所述操作单元对应的至少一个资源单元的属性,将所述第一全景图转化为中间文件。
在一些可能的实施例中,所述获取模块610包括确定子模块和构建子模块,其中:所述确定子模块,配置为确定实现所述待处理任务的多个操作单元和多个资源单元;每一所述操作单元用于实现深度学***台的画布中构建所述待处理任务的第一全景图。
在一些可能的实施例中,所述第一转换模块620包括第一确定子模块、合并子模块 和存储子模块,其中:所述第一确定子模块,配置为确定所述至少两个操作单元之间的连接关系;所述合并子模块,配置为基于所述至少两个操作单元的属性和每一所述操作单元对应的至少一个资源单元的属性,将与每一所述操作单元具有输入关系或输出关系的资源单元的属性并入对应操作单元的属性中;所述存储子模块,配置为将所述至少两个操作单元之间的连接关系和并入后的操作单元的属性进行保存,得到所述中间文件。
在一些可能的实施例中,所述存储子模块包括合并单元和存储单元,其中:所述合并单元,配置为将所述至少两个操作单元之间的连接关系并入对应操作单元的属性;所述存储单元,配置为保存并入后的至少两个操作单元的属性,得到所述中间文件。
在一些可能的实施例中,所述第一确定子模块还配置为响应于每一所述资源单元同时作为第一操作单元的输出和第二操作单元的输入,确定所述第一操作单元与所述第二操作单元之间具有连接关系。
在一些可能的实施例中,所述第二转换模块630包括第二确定子模块、生成子模块,其中:所述第二确定子模块,配置为确定所述中间文件对应的中间结果图;所述生成子模块,配置为响应于所述中间结果图为有向无环图的情况下,基于所述至少两个操作单元和每一所述操作单元对应的预置工作流模板,生成所述第二全景图;其中,每一所述操作单元对应的预置工作流模板为所述前端根据目标任务设定的。
在一些可能的实施例中,所述第二确定子模块包括提取单元和连接单元,其中:所述提取单元,配置为提取所述中间文件中各操作单元和所述各操作单元之间的连接关系;所述连接单元,配置为按照所述连接关系,连接所述中间文件中各操作单元,得到所述中间结果图。
在一些可能的实施例中,所述生成子模块包括排序单元、获取单元、填充单元和生成单元,其中:所述排序单元,配置为对所述中间文件中的所有操作单元进行拓扑排序,得到线性排列结果;所述获取单元,配置为获取从所述中间结果图中提取的每一所述操作单元的关键信息;其中,所述关键信息配置为填充所述第二全景图中的必要字段;所述填充单元,配置为基于所述关键信息,依次填充对应操作单元的预置工作流模板中的必要字段;所述生成单元,配置为按照所述线性排列结果,基于每一所述操作单元对应的预置工作流模板,生成所述第二全景图。
在一些可能的实施例中,所述第二转换模块还包括输出子模块,配置为响应于所述中间结果图不为有向无环图的情况下,输出创建中间结果图错误的提示信息。
这里需要指出的是:以上装置实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本公开装置实施例中未披露的技术细节,请参照本公开方法实施例的描述而理解。
需要说明的是,本公开实施例中,如果以软件功能模块的形式实现上述任务处理方法,并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令 用以使得电子设备(可以是具有摄像头的智能手机、平板电脑等)执行本公开各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本公开实施例不限制于任何预设的硬件和软件结合。
对应地,本公开实施例提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述实施例中任一所述任务处理方法中的步骤,其中,该存储介质可以是易失性或非易失的计算机可读取存储介质。对应地,本公开实施例中,还提供了一种芯片,所述芯片包括可编程逻辑电路和/或程序指令,当所述芯片运行时,配置为实现上述实施例中任一所述任务处理方法中的步骤。
对应地,本公开实施例中,还提供了一种计算机程序产品,当该计算机程序产品被电子设备的处理器执行时,其配置为实现上述实施例中任一所述任务处理方法中的步骤。
本公开实施例还提供一种计算机程序产品,该计算机程序产品承载有程序代码,所述程序代码包括的指令可用于执行上述方法实施例中任一所述任务处理方法中的步骤。其中,上述计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。
本公开实施例还提供一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现上述方法实施例中任一所述任务处理方法。
基于同一技术构思,本公开实施例提供一种电子设备,用于实施上述方法实施例记载的任务处理方法。图7为本公开实施例提供的一种电子设备的硬件实体示意图,如图7所示,所述电子设备700包括存储器710和处理器720,所述存储器710存储有可在处理器720上运行的计算机程序,所述处理器720执行所述程序时实现本公开实施例任一所述任务处理方法中的步骤。
存储器710配置为存储由处理器720可执行的指令和应用,还可以缓存待处理器720以及电子设备中各模块待处理或已经处理的数据(例如,图像数据、音频数据、语音通信数据和视频通信数据),可以通过闪存(FLASH)或随机访问存储器(Random Access Memory,RAM)实现。
处理器720执行程序时实现上述任一项的任务处理方法的步骤。处理器720通常控制电子设备700的总体操作。
上述处理器可以为特定用途集成电路(Application Specific Integrated Circuit,ASIC)、数字信号处理器(Digital Signal Processor,DSP)、数字信号处理装置(Digital Signal Processing Device,DSPD)、可编程逻辑装置(Programmable Logic Device,PLD)、现场可编程门阵列(Field Programmable Gate Array,FPGA)、中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器中的至少一种。可以理解地,实现上述处理 器功能的电子器件还可以为其它,本公开实施例不作具体限定。
上述计算机存储介质/存储器可以是只读存储器(Read Only Memory,ROM)、可编程只读存储器(Programmable Read-Only Memory,PROM)、可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM)、电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、磁性随机存取存储器(Ferromagnetic Random Access Memory,FRAM)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(Compact Disc Read-Only Memory,CD-ROM)等存储器;也可以是包括上述存储器之一或任意组合的各种电子设备,如移动电话、计算机、平板设备、个人数字助理等。
这里需要指出的是:以上存储介质和设备实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本公开存储介质和设备实施例中未披露的技术细节,请参照本公开方法实施例的描述而理解。
应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本公开的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些预设的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本公开的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本公开实施例的实施过程构成任何限定。上述本公开实施例序号仅仅为了描述,不代表实施例的优劣。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
在本公开所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个***,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元;既可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本公开实施例方案的目的。
另外,在本公开各实施例中的各功能单元可以全部集成在一个处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。 或者,本公开上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得设备自动测试线执行本公开各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。
本公开所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。本公开所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。
以上所述,仅为本公开的实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以所述权利要求的保护范围为准。
工业实用性
在本公开实施例中,首先,获取待处理任务的第一全景图,所述第一全景图包括至少两个操作单元和每一所述操作单元对应的资源单元;然后,将所述第一全景图转化为中间文件,所述中间文件中每一操作单元的属性包括与每一所述操作单元具有输入关系或输出关系的资源单元的属性;最后将所述中间文件转换为第二全景图;所述第二全景图对应的程序代码用于供后端的任务调度工具调用;如此,通过定义既可以衔接第一全景图并且可以满足转换成其他图的需要的中间文件,打通第一全景图到第二全景图的转换,可以实现复杂场景的多模型串联训练流程,相比现有的只能用单个算法模块的技术,更加便利和快捷地构建全链条的算法解决方案。

Claims (24)

  1. 一种任务处理方法,所述方法包括:
    获取待处理任务的第一全景图;其中,所述第一全景图包括至少两个操作单元和每一所述操作单元对应的至少一个资源单元;
    将所述第一全景图转化为中间文件;其中,所述中间文件中每一操作单元的属性包括与每一所述操作单元具有输入关系和/或输出关系的资源单元的属性;
    将所述中间文件转换为第二全景图;其中,所述第二全景图对应的程序代码配置为供后端的任务调度工具调用。
  2. 如权利要求1所述的方法,其中,所述第一全景图包括所述至少两个操作单元的属性和每一所述操作单元对应的至少一个所述资源单元的属性;
    所述将所述第一全景图转化为中间文件,包括:
    基于所述至少两个操作单元的属性和每一所述操作单元对应的至少一个资源单元的属性,将所述第一全景图转化为中间文件。
  3. 如权利要求1或2所述的方法,其中,所述获取待处理任务的第一全景图,包括:
    确定实现所述待处理任务的多个操作单元和多个资源单元;每一所述操作单元用于实现深度学习模型中的训练功能、评估功能或推理功能;每一所述资源单元包括对应操作单元在执行所述处理操作过程中输入和/或输出的数据;
    基于所述待处理任务的操作单元和所述多个资源单元,在模型训练平台的画布中构建所述待处理任务的第一全景图。
  4. 如权利要求2或3所述的方法,其中,所述基于所述至少两个操作单元的属性和每一所述操作单元对应的至少一个资源单元的属性,将所述第一全景图转化为中间文件,包括:
    确定所述至少两个操作单元之间的连接关系;
    基于所述至少两个操作单元的属性和每一所述操作单元对应的至少一个资源单元的属性,将与每一所述操作单元具有输入关系或输出关系的资源单元的属性并入对应操作单元的属性中;
    将所述至少两个操作单元之间的连接关系和并入后的操作单元的属性进行保存,得到所述中间文件。
  5. 如权利要求4所述的方法,其中,所述将所述至少两个操作单元之间的连接关系和并入后的操作单元的属性进行保存,得到所述中间文件,包括:
    将所述至少两个操作单元之间的连接关系并入对应操作单元的属性;
    保存并入后的至少两个操作单元的属性,得到所述中间文件。
  6. 如权利要求4或5所述的方法,其中,所述确定所述至少两个操作单元之间的连接关系,包括:
    响应于每一所述资源单元同时作为第一操作单元的输出和第二操作单元的输入,确定所述第一操作单元与所述第二操作单元之间具有连接关系。
  7. 如权利要求1至6任一项所述的方法,其中,所述将所述中间文件转换为第二全景图,包括:
    确定所述中间文件对应的中间结果图;
    响应于所述中间结果图为有向无环图的情况下,基于所述至少两个操作单元和每一所述操作单元对应的预置工作流模板,生成所述第二全景图;其中,每一所述操作单元对应的预置工作流模板为前端根据目标任务设定的。
  8. 如权利要求7所述的方法,其中,所述确定所述中间文件对应的中间结果图,包括:
    提取所述中间文件中各操作单元和所述各操作单元之间的连接关系;
    按照所述连接关系,连接所述中间文件中各操作单元,得到所述中间结果图。
  9. 如权利要求7或8所述的方法,其中,所述基于所述至少两个操作单元和每一所述操作单元对应的预置工作流模板,生成所述第二全景图,包括:
    对所述中间文件中的所有操作单元进行拓扑排序,得到线性排列结果;
    获取从所述中间结果图中提取的每一所述操作单元的关键信息;其中,所述关键信息用于填充所述第二全景图中的必要字段;
    基于所述关键信息,依次填充对应所述操作单元的预置工作流模板中的必要字段;
    按照所述线性排列结果,基于每一所述操作单元对应的预置工作流模板,生成所述第二全景图。
  10. 如权利要求7至9任一项所述的方法,其中,所述将所述中间文件转换为第二全景图,还包括:
    响应于所述中间结果图不为有向无环图的情况下,输出创建中间结果图错误的提示信息。
  11. 一种任务处理装置,所述装置包括:
    获取模块,配置为获取待处理任务的第一全景图;其中,所述第一全景图包括至少两个操作单元和每一所述操作单元对应的至少一个资源单元;
    第一转换模块,配置为将所述第一全景图转化为中间文件,所述中间文件中每一操作单元的属性包括与每一所述操作单元具有输入关系和/或输出关系的资源单元的属性;
    第二转换模块,配置为将所述中间文件转换为第二全景图。
  12. 如权利要求11上述的装置,其中,所述第一全景图包括所述至少两个操作单元的属性和每一所述操作单元对应的至少一个所述资源单元的属性;
    所述第一转换模块,还配置为基于所述至少两个操作单元的属性和每一所述操作单元对应的至少一个资源单元的属性,将所述第一全景图转化为中间文件。
  13. 如权利要求11或12所述的装置,其中,所述获取模块包括:
    确定子模块,配置为确定实现所述待处理任务的多个操作单元和多个资源单元;每 一所述操作单元用于实现深度学习模型中的训练功能、评估功能或推理功能;每一所述资源单元包括对应操作单元在执行所述处理操作过程中输入和/或输出的数据;
    构建子模块,配置为基于所述待处理任务的操作单元和所述多个资源单元,在模型训练平台的画布中构建所述待处理任务的第一全景图。
  14. 如权利要求12或13所述的装置,其中,所述第一转换模块包括:
    第一确定子模块,配置为确定所述至少两个操作单元之间的连接关系;
    合并子模块,配置为基于所述至少两个操作单元的属性和每一所述操作单元对应的至少一个资源单元的属性,将与每一所述操作单元具有输入关系或输出关系的资源单元的属性并入对应操作单元的属性中;
    存储子模块,配置为将所述至少两个操作单元之间的连接关系和并入后的操作单元的属性进行保存,得到所述中间文件。
  15. 如权利要求14所述的装置,其中,所述存储子模块包括:
    合并单元,配置为将所述至少两个操作单元之间的连接关系并入对应操作单元的属性;
    存储单元,配置为保存并入后的至少两个操作单元的属性,得到所述中间文件。
  16. 如权利要求14或15所述的装置,其中,所述第一确定子模块还配置为响应于每一所述资源单元同时作为第一操作单元的输出和第二操作单元的输入,确定所述第一操作单元与所述第二操作单元之间具有连接关系。
  17. 如权利要求11至16任一项所述的装置,其中,所述第二转换模块包括:
    第二确定子模块,配置为确定所述中间文件对应的中间结果图;
    生成子模块,配置为响应于所述中间结果图为有向无环图的情况下,基于所述至少两个操作单元和每一所述操作单元对应的预置工作流模板,生成所述第二全景图;其中,每一所述操作单元对应的预置工作流模板为所述前端根据目标任务设定的。
  18. 如权利要求17所述的装置,其中,所述第二确定子模块包括:
    提取单元,配置为提取所述中间文件中各操作单元和所述各操作单元之间的连接关系;
    连接单元,配置为按照所述连接关系,连接所述中间文件中各操作单元,得到所述中间结果图。
  19. 如权利要求17或18所述的装置,其中,所述生成子模块包括:
    排序单元,配置为对所述中间文件中的所有操作单元进行拓扑排序,得到线性排列结果;
    获取单元,配置为获取从所述中间结果图中提取的每一所述操作单元的关键信息;其中,所述关键信息配置为填充所述第二全景图中的必要字段;
    填充单元,配置为基于所述关键信息,依次填充对应所述操作单元的预置工作流模板中的必要字段;
    生成单元,配置为按照所述线性排列结果,基于每一所述操作单元对应的预置工作 流模板,生成所述第二全景图。
  20. 如权利要求17至19任一项所述的装置,其中,所述第二转换模块还包括:
    输出子模块,配置为响应于所述中间结果图不为有向无环图的情况下,输出创建中间结果图错误的提示信息。
  21. 一种电子设备,包括存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,所述处理器执行所述程序时实现权利要求1至10任一项所述方法中的步骤。
  22. 一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现权利要求1至10中任一项所述方法中的步骤。
  23. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现权利要求1至10中任一项所述的方法。
  24. 一种计算机程序产品,所述计算机程序产品包括一条或多条指令,所述一条或多条指令适于由处理器加载并执行如权利要求1至10任一项所述方法中的步骤。
PCT/CN2021/124996 2021-05-25 2021-10-20 任务处理方法、装置、设备、存储介质、计算机程序及程序产品 WO2022247112A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110570294.1A CN113342489A (zh) 2021-05-25 2021-05-25 任务处理方法及装置、电子设备和存储介质
CN202110570294.1 2021-05-25

Publications (1)

Publication Number Publication Date
WO2022247112A1 true WO2022247112A1 (zh) 2022-12-01

Family

ID=77471254

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/124996 WO2022247112A1 (zh) 2021-05-25 2021-10-20 任务处理方法、装置、设备、存储介质、计算机程序及程序产品

Country Status (2)

Country Link
CN (1) CN113342489A (zh)
WO (1) WO2022247112A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113342489A (zh) * 2021-05-25 2021-09-03 上海商汤智能科技有限公司 任务处理方法及装置、电子设备和存储介质
US11907693B2 (en) 2022-04-29 2024-02-20 Zhejiang Lab Job decomposition processing method for distributed computing
CN114579183B (zh) * 2022-04-29 2022-10-18 之江实验室 一种用于分布式计算的作业分解处理方法

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108073582A (zh) * 2016-11-08 2018-05-25 中移(苏州)软件技术有限公司 一种计算框架选择方法和装置
CN110058985A (zh) * 2019-04-09 2019-07-26 美林数据技术股份有限公司 一种拖拽式构建企业级ai应用的***及方法
US20200057675A1 (en) * 2018-08-16 2020-02-20 EMC IP Holding Company LLC Workflow optimization
CN111240662A (zh) * 2020-01-16 2020-06-05 同方知网(北京)技术有限公司 一种基于任务可视化拖拽的spark机器学习***及学习方法
CN111310936A (zh) * 2020-04-15 2020-06-19 光际科技(上海)有限公司 机器学***台、装置、设备及存储介质
CN111435352A (zh) * 2019-01-11 2020-07-21 北京京东尚科信息技术有限公司 一种分布式实时计算方法、装置、***及其存储介质
CN111488211A (zh) * 2020-04-09 2020-08-04 北京嘀嘀无限科技发展有限公司 基于深度学习框架的任务处理方法、装置、设备及介质
CN111639859A (zh) * 2020-06-01 2020-09-08 腾讯科技(深圳)有限公司 人工智能ai解决方案的模板生成方法和装置及存储介质
CN113342489A (zh) * 2021-05-25 2021-09-03 上海商汤智能科技有限公司 任务处理方法及装置、电子设备和存储介质

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108073582A (zh) * 2016-11-08 2018-05-25 中移(苏州)软件技术有限公司 一种计算框架选择方法和装置
US20200057675A1 (en) * 2018-08-16 2020-02-20 EMC IP Holding Company LLC Workflow optimization
CN111435352A (zh) * 2019-01-11 2020-07-21 北京京东尚科信息技术有限公司 一种分布式实时计算方法、装置、***及其存储介质
CN110058985A (zh) * 2019-04-09 2019-07-26 美林数据技术股份有限公司 一种拖拽式构建企业级ai应用的***及方法
CN111240662A (zh) * 2020-01-16 2020-06-05 同方知网(北京)技术有限公司 一种基于任务可视化拖拽的spark机器学习***及学习方法
CN111488211A (zh) * 2020-04-09 2020-08-04 北京嘀嘀无限科技发展有限公司 基于深度学习框架的任务处理方法、装置、设备及介质
CN111310936A (zh) * 2020-04-15 2020-06-19 光际科技(上海)有限公司 机器学***台、装置、设备及存储介质
CN111639859A (zh) * 2020-06-01 2020-09-08 腾讯科技(深圳)有限公司 人工智能ai解决方案的模板生成方法和装置及存储介质
CN113342489A (zh) * 2021-05-25 2021-09-03 上海商汤智能科技有限公司 任务处理方法及装置、电子设备和存储介质

Also Published As

Publication number Publication date
CN113342489A (zh) 2021-09-03

Similar Documents

Publication Publication Date Title
Brownlee Deep learning for computer vision: image classification, object detection, and face recognition in python
WO2022247112A1 (zh) 任务处理方法、装置、设备、存储介质、计算机程序及程序产品
Shanmugamani Deep Learning for Computer Vision: Expert techniques to train advanced neural networks using TensorFlow and Keras
JP6944548B2 (ja) 自動コード生成
US10235602B1 (en) Machine learning artificial intelligence system for identifying vehicles
Villán Mastering OpenCV 4 with Python: a practical guide covering topics from image processing, augmented reality to deep learning with OpenCV 4 and Python 3.7
US11526655B2 (en) Machine learning systems and methods for translating captured input images into an interactive demonstration presentation for an envisioned software product
CN111260545B (zh) 生成图像的方法和装置
CN112819052B (zh) 多模态细粒度混合方法、***、设备和存储介质
CN113453040B (zh) 短视频的生成方法、装置、相关设备及介质
WO2021129181A1 (en) Portrait segmentation method, model training method and electronic device
AU2021354030B2 (en) Processing images using self-attention based neural networks
KR20150143473A (ko) 재계산 사용자 인터페이스 내의 신호 캡처 컨트롤
CN109522970B (zh) 图像分类方法、装置及***
CN111126347B (zh) 人眼状态识别方法、装置、终端及可读存储介质
Bayraktar et al. A hybrid image dataset toward bridging the gap between real and simulation environments for robotics: Annotated desktop objects real and synthetic images dataset: ADORESet
Thakkar Beginning machine learning in ios: CoreML framework
CN110489613B (zh) 协同可视数据推荐方法及装置
CN115438225A (zh) 视频文本互检方法及其模型训练方法、装置、设备、介质
CN115145568A (zh) 基于图像识别的代码生成方法以及相关设备
CN111445545B (zh) 一种文本转贴图方法、装置、存储介质及电子设备
CN111768214A (zh) 产品属性的预测方法、***、设备和存储介质
Newnham Machine Learning with Core ML: An iOS developer's guide to implementing machine learning in mobile apps
Guo Hair Segmentation using Deep Learning
CN116383426B (zh) 基于属性的视觉情感识别方法、装置、设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21942676

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21942676

Country of ref document: EP

Kind code of ref document: A1