CN113515220A - Task processing method and device, electronic equipment and storage medium - Google Patents

Task processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113515220A
CN113515220A CN202110836334.2A CN202110836334A CN113515220A CN 113515220 A CN113515220 A CN 113515220A CN 202110836334 A CN202110836334 A CN 202110836334A CN 113515220 A CN113515220 A CN 113515220A
Authority
CN
China
Prior art keywords
graph
operation unit
workflow
calculation
computation
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202110836334.2A
Other languages
Chinese (zh)
Inventor
林成龙
高原
赵阳阳
林国敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Sensetime Technology Development Co Ltd
Original Assignee
Shanghai Sensetime Technology Development Co Ltd
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 Shanghai Sensetime Technology Development Co Ltd filed Critical Shanghai Sensetime Technology Development Co Ltd
Priority to CN202110836334.2A priority Critical patent/CN113515220A/en
Publication of CN113515220A publication Critical patent/CN113515220A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • 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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure provides a task processing method and device, an electronic device and a storage medium, wherein the method comprises the following steps: receiving a local selection instruction of a first computational graph corresponding to the overall workflow; the first calculation graph comprises at least one operation unit and at least one resource unit which are used for processing tasks corresponding to the whole workflow; determining a second calculation graph from a canvas displaying the first calculation graph according to the local selection instruction; the workflow corresponding to the second computation graph is a local workflow in the whole workflow; and operating the second calculation graph to complete the workflow of the task corresponding to the local workflow.

Description

Task processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer vision technologies, and in particular, to a task processing method and apparatus, an electronic device, and a storage medium.
Background
Computational graphs, which are composed of nodes and operations, are an efficient tool for describing the ongoing process of an engineering or system.
At present, a user can construct a computation graph corresponding to a workflow by using a specific application program in an electronic device, and the corresponding workflow can be completed by operating the computation graph. When the calculation graph is operated every time, the calculation graph needs to be operated completely, each step is completed, and the operation flexibility is low.
Disclosure of Invention
The embodiment of the disclosure is expected to provide a task processing method and device, an electronic device and a storage medium.
The technical scheme of the embodiment of the disclosure is realized as follows:
the embodiment of the disclosure provides a task processing method, which includes:
receiving a local selection instruction of a first computational graph corresponding to the overall workflow; wherein the first computational graph comprises at least one operation unit and at least one resource unit for processing tasks corresponding to the overall workflow;
determining a second computational graph from a canvas displaying the first computational graph according to the local selection instruction; the workflow corresponding to the second computation graph is a local workflow in the whole workflow;
and running the second computation graph to finish the processing of the tasks corresponding to the local workflow.
In the above method, the local selection instruction is a frame selection instruction; the determining, according to the local selection instruction, a second computation graph from a canvas displaying the first computation graph includes:
generating a candidate box within the canvas based on the box instruction;
confirming the candidate frame as the second calculation graph in at least two operation units selected by the frame of the first calculation graph; according to the selection sequence of the candidate boxes to the operation units in the first calculation graph, the first operation unit selected by boxes is the starting operation of the second calculation graph, and the last operation unit selected by boxes is the ending operation of the second calculation graph.
In the method, the local selection instruction is a touch instruction for instructing the second computation graph to start and end operations; the determining, according to the local selection instruction, a second computation graph from a canvas displaying the first computation graph includes:
determining the touched operation unit in the first calculation graph as the initial operation of the second calculation graph based on the touch instruction for selecting the initial operation;
determining the touched operation unit in the first calculation graph as the termination operation of the second calculation graph based on the touch instruction for selecting the termination operation;
in the first computation graph, an operation unit corresponding to the start operation, an operation unit corresponding to the end operation, and an operation unit and a resource unit included between the start operation and the end operation are confirmed as the second computation graph.
In the above method, further comprising:
in the second calculation graph, a start identifier representing a start operation is generated at an operation unit corresponding to the start operation, and an end identifier is generated at an operation unit corresponding to the end operation.
In the above method, further comprising:
in the second calculation graph, a click frame for canceling the initial operation is generated in an operation unit corresponding to the initial operation and a click frame for canceling the termination operation is generated in an operation unit corresponding to the termination operation;
when the click operation of the click frame for canceling the initial operation is received, canceling the current operation unit as the initial operation to re-confirm the operation unit corresponding to the initial operation;
and when the click operation of the click frame for canceling the termination operation is received, canceling the current operation unit as the termination operation so as to reconfirm the operation unit corresponding to the termination operation.
In the above method, the operation unit in the first computation graph is displayed according to a first display mode, and the method further includes:
and displaying according to a second mode, and displaying the operation unit corresponding to the second calculation graph in the canvas.
In the above method, before the executing the second computation graph, the method further includes:
checking the second calculation graph based on the received checking instruction;
and under the condition that the connection relation of the operation units in the second computational graph is a directed acyclic graph, confirming the successful verification of the second computational graph, and generating prompt information of the successful verification in the canvas.
In the above method, further comprising:
and under the condition that the connection relation of the operation units in the second computational graph is not a directed acyclic graph, confirming the verification failure of the second computational graph, and generating prompt information of the verification failure in the canvas.
In the above method, the executing the second computation graph includes:
and under the condition that the second computation graph is successfully operated, displaying the processing result of the task corresponding to the local workflow in the resource unit connected with the operation unit corresponding to the termination operation of the second computation graph.
In the above method, further comprising:
and under the condition that the second computing graph fails to run, generating prompt information of running failure in the canvas.
An embodiment of the present disclosure provides a task processing device, including:
the receiving module is used for receiving a local selection instruction of a first computational graph corresponding to the overall workflow; wherein the first computational graph comprises at least one operation unit and at least one resource unit for processing tasks corresponding to the overall workflow;
a determining module, configured to determine a second computation graph from a canvas displaying the first computation graph according to the local selection instruction; the workflow corresponding to the second computation graph is a local workflow in the whole workflow;
and the operation module is used for operating the second calculation graph so as to complete the processing of the corresponding tasks of the local workflow.
In the above apparatus, the local selection instruction is a framing instruction; the determination module is specifically configured to generate a candidate box within the canvas based on the box selection instruction; confirming the candidate frame as the second calculation graph in at least two operation units selected by the frame of the first calculation graph; according to the selection sequence of the candidate boxes to the operation units in the first calculation graph, the first operation unit selected by boxes is the starting operation of the second calculation graph, and the last operation unit selected by boxes is the ending operation of the second calculation graph.
In the above apparatus, the local selection instruction is a touch instruction for instructing the second computation graph to start and end operations; the determining module is specifically configured to determine, based on a touch instruction for selecting an initial operation, a touched operation unit in the first computation graph as an initial operation of the second computation graph; determining the touched operation unit in the first calculation graph as the termination operation of the second calculation graph based on the touch instruction for selecting the termination operation; in the first computation graph, an operation unit corresponding to the start operation, an operation unit corresponding to the end operation, and an operation unit and a resource unit included between the start operation and the end operation are confirmed as the second computation graph.
In the above apparatus, further comprising: a generating module, configured to generate, in the second computation graph, a start identifier representing a start operation in an operation unit corresponding to the start operation and an end identifier in an operation unit corresponding to the end operation, respectively.
In the above apparatus, the generating module is further configured to generate, in the second computation graph, a click frame for canceling the start operation in an operation unit corresponding to the start operation and a click frame for canceling the end operation in an operation unit corresponding to the end operation, respectively;
the receiving module is further configured to cancel the current operation unit as the start operation when receiving the click operation on the start operation cancellation click box, so as to re-confirm the operation unit corresponding to the start operation; and when the click operation of the click frame for canceling the termination operation is received, canceling the current operation unit as the termination operation so as to reconfirm the operation unit corresponding to the termination operation.
In the above apparatus, further comprising: the display module is used for displaying the operation unit in the first calculation graph according to a first display mode; and displaying according to a second mode, and displaying the operation unit corresponding to the second calculation graph in the canvas.
In the above apparatus, further comprising: the checking module is used for checking the second calculation graph based on the received checking instruction;
the generating module is further configured to confirm that the verification of the second computational graph is successful when the connection relationship of the operation units in the second computational graph is a directed acyclic graph, and generate prompt information of successful verification on the canvas.
In the above apparatus, the generating module is further configured to, when the operation unit connection relationship in the second computation graph is not a directed acyclic graph, confirm that the verification of the second computation graph fails, and generate a prompt message indicating that the verification fails on the canvas.
In the above apparatus, the running module is specifically configured to, when the second computation graph runs successfully, display a processing result of the task corresponding to the local workflow in a resource unit connected to an operation unit corresponding to a termination operation of the second computation graph.
In the above apparatus, the generating module is further configured to generate a prompt message of a failure of operation on the canvas when the second computation graph fails to operate.
An embodiment of the present disclosure provides an electronic device, including: a processor, a memory, and a communication bus; wherein,
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is used for executing one or more programs stored in the memory so as to realize the task processing method.
The disclosed embodiments provide a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement the above-described task processing method.
The embodiment of the disclosure provides a task processing method and device, an electronic device and a storage medium, wherein the method comprises the following steps: receiving a local selection instruction of a first computational graph corresponding to the overall workflow; the first calculation graph comprises at least one operation unit and at least one resource unit which are used for processing tasks corresponding to the whole workflow; determining a second calculation graph from a canvas displaying the first calculation graph according to the local selection instruction; the workflow corresponding to the second computation graph is a local workflow in the whole workflow; and operating the second calculation graph to complete the workflow of the task corresponding to the local workflow. According to the technical scheme provided by the embodiment of the disclosure, the local part can be selected from the calculation graph corresponding to the whole workflow to run, the task corresponding to the local workflow is completed, and the flexibility of the operation of the calculation graph is improved.
Drawings
Fig. 1 is a schematic flowchart of a task processing method according to an embodiment of the present disclosure;
FIG. 2 is a first exemplary interaction diagram provided by an embodiment of the present disclosure;
FIG. 3 is a diagram illustrating an exemplary interaction diagram II provided by an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of an exemplary task processing procedure provided by an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a task processing device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure.
The disclosed embodiments provide a task processing method, an execution subject of which may be a task processing apparatus, for example, the task processing method may be executed by a terminal device or a server or other electronic devices, where the terminal device may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, or the like. In some possible implementations, the task processing method may be implemented by a processor calling computer readable instructions stored in a memory.
The disclosed embodiments provide a method. Fig. 1 is a schematic flowchart of a task processing method according to an embodiment of the present disclosure. As shown in fig. 1, in the embodiment of the present disclosure, the task processing method mainly includes the following steps:
s101, receiving a local selection instruction of a first calculation graph corresponding to the whole workflow; the first calculation graph comprises at least one operation unit and at least one resource unit which are used for processing tasks corresponding to the whole workflow.
In an embodiment of the present disclosure, the task processing device may receive a local selection instruction for a first computation graph corresponding to the overall workflow.
It should be noted that, in the embodiment of the present disclosure, the first computation graph corresponding to the overall workflow includes at least one operation unit and at least one resource unit for processing the tasks corresponding to the overall workflow. The specific overall workflow may be a workflow of a complete task, or a workflow of a partial task in a complete task, and the specific overall workflow and the first computation graph are not limited in the embodiment of the present disclosure.
It should be noted that, in the embodiment of the present disclosure, the operation unit is a unit for performing a processing operation on a task, and the resource unit is a unit for characterizing data related to the operation unit in performing the processing operation.
It should be noted that, in the embodiments of the present disclosure, the resource units have different types, and correspond to the resource types of the resource center one to one. Each resource unit is bound to a specific version of a specific resource, e.g., an original data set, a labeled data set, a model, an evaluation result, an inference result, etc.
It should be noted that, in the embodiment of the present disclosure, the operation unit performs a specific operation on a specific version of a specific resource represented by the resource unit, and converts and processes one resource into another resource, so that the input and the output of the operation unit are both resource units.
It should be noted that, in the embodiment of the present disclosure, the task processing device may be provided with a display interface, a canvas may be displayed on the display interface, a first calculation graph may be displayed in the canvas, after the user views the first calculation graph, the user may send a local selection instruction to the task processing device through a device such as a mouse, and accordingly, the task processing device may receive the local selection instruction. The specific manner in which the local selection instruction is received by the task processing device may be determined according to an actual hardware configuration, and the embodiment of the present disclosure is not limited.
For example, in an embodiment of the present disclosure, the task processing device may provide a frame selection tool, and a user may click the frame selection tool through a mouse, so as to send a frame selection instruction for the first computation graph to the task processing device by using frame selection of the frame selection tool, where the frame selection instruction is a local selection instruction.
For example, in the embodiment of the present disclosure, a user may send a touch instruction to the task processing device, where the touch instruction indicates a start operation and a stop operation of the second computation graph, and the task processing device may receive the start operation and the stop operation, that is, the local selection instruction.
Fig. 2 is a first exemplary interaction diagram provided in an embodiment of the present disclosure. As shown in fig. 2, in the embodiment of the present disclosure, the user may click on the operation unit "data processing" in the displayed first calculation graph, thereby selecting "set start point", setting the operation unit "data processing" as the start operation, selecting "data processing", and selecting an instruction "set start point", that is, an instruction included in the local selection instruction. Of course, in the case of selecting the start operation, the end operation is also selected, and the related instruction for selecting the end operation is also included in the local selection instruction.
S102, determining a second calculation chart from a canvas displaying the first calculation chart according to a local selection instruction; and the workflow corresponding to the second calculation graph is a local workflow in the whole workflow.
In an embodiment of the present disclosure, after receiving the local selection instruction, the task processing device may determine the second computation graph from the canvas displaying the first computation graph according to the local selection instruction.
Specifically, in this embodiment of the present disclosure, when the local selection instruction is a block selection instruction, the task processing device determines, according to the local selection instruction, a second computation graph from a canvas displaying the first computation graph, including: generating a candidate box within the canvas based on the framing instruction; confirming at least two operation units of the candidate frame in the frame of the first calculation graph as a second calculation graph; and according to the selection sequence of the candidate frames to the operation units in the first calculation graph, wherein the first operation unit selected by frames is the starting operation of the second calculation graph, and the last operation unit selected by frames is the ending operation of the second calculation graph.
It is understood that, in the embodiment of the present disclosure, the local selection instruction may be a frame selection instruction, so that, after the user selects a part of the first computation graph in the canvas by dragging a frame selection tool, the task processing device may generate a candidate frame in the canvas based on the frame selection instruction after receiving the frame selection instruction, where the frame in the candidate frame selects at least two operation units in the first computation graph. In the process of frame selection, the operation unit selected by the first frame is automatically used as the start operation of the second calculation graph, and the operation unit selected by the last frame is automatically used as the end operation of the second calculation graph, and one or more operation units may be included between the start operation and the end operation, or of course, any operation unit may not be included. The user only needs to indicate each operation unit included in the second calculation graph expected to be obtained to the task processing device through the frame selection instruction, and the task processing device can automatically complete the determination of the second calculation graph.
Specifically, in an embodiment of the present disclosure, in a case where the local selection instruction is a touch instruction for instructing a start operation and a termination operation of the second computation graph, the determining, by the task processing device, the second computation graph from a canvas displaying the first computation graph according to the local selection instruction includes: determining the touched operation unit in the first calculation graph as the initial operation of the second calculation graph based on the touch instruction of the selected initial operation; determining the touched operation unit in the first calculation graph as the termination operation of the second calculation graph based on the touch instruction for selecting the termination operation; and confirming an operation unit corresponding to the starting operation, an operation unit corresponding to the ending operation, and an operation unit and a resource unit included between the starting operation and the ending operation as a second calculation graph from the first calculation graph.
It is understood that, in the embodiment of the present disclosure, the local selection instruction may be a touch instruction for instructing a start operation and an end operation of the second computation graph, so that after receiving the touch instruction, the task processing apparatus may select, according to the touch instruction, the start operation and the end operation that need to be set by the second computation graph instructed by the user from the first computation graph, and then the task processing apparatus may automatically continue to select, from the first computation graph, an operation unit and a resource unit that are connected between two operations, for example, the start operation is the operation unit 1, the end operation is the operation unit 3, the operation unit 1 is connected to the operation unit 2, and the operation unit 2 is connected to the operation unit 3, so that the operation unit 2 may be selected, thereby obtaining all operations that need to be included in the second computation graph. In addition, the task processing device combines each selected operation with the node and the connecting line which are connected with each selected operation in the first calculation graph to form a second calculation graph. The user only needs to indicate the start-stop operation included in the second calculation graph expected to be obtained to the task processing device through the local selection instruction, and the task processing device can automatically complete the determination of the second calculation graph.
It should be noted that, in the embodiment of the present disclosure, the information indicated by the two local selection instructions and the determination manner of the second computation graph described according to the two local selection instructions are only two optional solutions provided in the embodiment of the present disclosure, and of course, other local selection instructions may also be set according to actual needs and application scenarios, so that the task processing device determines the second computation graph from the first computation graph.
It should be noted that, in the embodiment of the present disclosure, the task processing device may further perform the following steps: in the second calculation graph, a start identifier representing the start operation is generated at an operation unit corresponding to the start operation, and an end identifier is generated at an operation unit corresponding to the end operation.
It can be understood that, in the embodiment of the present disclosure, in the case that the second calculation diagram is determined, for the operation units corresponding to the start operation and the end operation in the second calculation diagram, the task processing device may set corresponding identifiers for the operation units respectively, and display the identifiers on the canvas, so that when the user views the second calculation diagram, the user may visually and explicitly know the start-stop operation of the specific setting.
It should be noted that, in the embodiment of the present disclosure, the task processing device may further perform the following steps: in the second calculation graph, a click frame for canceling the initial operation is generated in an operation unit corresponding to the initial operation and a click frame for canceling the termination operation is generated in an operation unit corresponding to the termination operation; when the click operation of the click frame for canceling the initial operation is received, canceling the current operation unit as the initial operation to re-confirm the operation unit corresponding to the initial operation; and when the click operation of the click box for canceling the termination operation is received, canceling the current operation unit as the termination operation so as to reconfirm the operation unit corresponding to the termination operation.
Fig. 3 is an exemplary interaction diagram ii provided in the embodiment of the present disclosure. As shown in fig. 3, in the embodiment of the present disclosure, in the case that the operation unit "data processing" of the first computation graph is selected as the start operation of the second computation graph, and the "data processing-small object" is selected as the end operation of the second computation graph, the user may also perform the set cancellation according to the actual requirement, that is, the user may click the "cancel start point" option of the operation unit "data processing" and click the "cancel end point" option of the operation unit "data processing-small object", so that the operation unit reselection may be performed.
It should be noted that, in the embodiment of the present disclosure, the operation unit in the first computation graph is displayed according to the first display mode, and the task processing device may further perform the following steps: and displaying according to a second mode, and displaying the operation unit corresponding to the second calculation graph in the canvas.
It can be understood that, in the embodiment of the present disclosure, for the operation units in the first computation graph and the second computation graph, the operation units may be displayed in different display manners in the canvas, so as to distinguish between the operation units and the canvas, for example, the second manner may be to highlight a border of an operation unit corresponding to a start operation and an operation unit corresponding to a termination operation, may also be to highlight each operation unit in the second computation graph, and further, may also highlight each operation unit and resource unit in the second computation graph. The specific display mode may be set according to actual requirements, and the embodiment of the present disclosure is not limited.
It should be noted that, in the embodiment of the present disclosure, the second computation graph determined by the task processing device from the first computation graph may be one or more, that is, the local selection instruction may include an instruction indicating one or more second computation graphs. That is, for one first computation graph, the task processing device may determine, according to the local selection instruction, a plurality of computation graphs from the first computation graph, and each determined computation graph may be used as one second computation graph.
And S103, operating the second calculation graph to complete the processing of the corresponding tasks of the local workflow.
In the embodiment of the present disclosure, after determining the second computation graph, the task processing device may run the second computation graph to complete processing of the task corresponding to the local workflow.
It can be understood that, in a general situation, if there are many steps of the overall workflow corresponding to the first computation graph, the task processing device needs to integrally run the first computation graph each time to complete the processing of the tasks corresponding to the overall workflow, so as to implement the checking of the feasibility of each step, and the efficiency is low.
In an embodiment of the present disclosure, before the task processing device runs the second computation graph, the following steps may also be performed: based on the received checking instruction, checking the second calculation graph; and under the condition that the connection relation of the operation units in the second calculation graph is the directed acyclic graph, confirming the successful verification of the second calculation graph, and generating prompt information of the successful verification in the canvas.
It is understood that, in the embodiment of the present disclosure, the task processing device may check the second computation graph before executing the second computation graph, and if the check is successful, that is, the connection relationships of the operation units in the second computation graph are represented by directed acyclic graphs, the task processing device is operable to execute the second computation graph again to complete the processing of the tasks corresponding to the local workflow.
It should be noted that, in the embodiment of the present disclosure, the task processing device may perform verification on the second computation graph, specifically, a preset verification rule may be used, if the second computation graph satisfies the preset verification rule, it may be determined that the connection relationship of the operation units in the second computation graph is a directed acyclic graph, a verification result of the directed acyclic graph is a verification pass, and if the second computation graph does not satisfy the preset verification rule, a verification result of the directed acyclic graph is a verification fail. The preset check rule may include a preset basic connection rule and/or a preset validity rule, where the preset basic connection rule is used to check whether the connection relationship between the operation units in the second calculation graph is correct, and the preset validity rule is used to check the validity of the connection between the operation units and the resource units in the second calculation graph. The specific preset check rule can be set according to actual requirements and application scenarios, and the embodiment of the application is not limited.
In an embodiment of the present disclosure, the task processing device may further perform the following steps: and confirming the verification failure of the second computational graph and generating prompt information of the verification failure in the canvas under the condition that the connection relation of the operation units in the second computational graph is not the directed acyclic graph.
It is to be understood that, in the embodiment of the present disclosure, if the check result of the second computation graph is a check failure, that is, it is characterized that the second computation graph has an error on the logical sum connection, that is, the second computation graph is not a directed acyclic graph. At this moment, the task processing device can generate prompt information of the failure of the verification of the second calculation diagram on the canvas, so that the adjustment of the second calculation diagram can be reminded in time before the second calculation diagram is not operated, and in fact, the local workflow is adjusted, so that the success rate of the operation of the second calculation diagram is improved.
Specifically, in an embodiment of the present disclosure, the task processing device runs the second computation graph, and includes: and under the condition that the second calculation graph is successfully operated, displaying the processing result of the task corresponding to the local workflow in the resource unit connected with the operation unit corresponding to the termination operation of the second calculation graph.
It can be understood that, in the embodiment of the present disclosure, the task processing device runs the second computation graph, and actually runs the task of the corresponding local workflow, where the operation unit is used to perform processing operation on the task, and the resource unit is used to represent data related to the operation unit in the process of performing the processing operation, so that, for the resource unit connected to the operation unit corresponding to the termination operation, it actually represents the final result of the task execution corresponding to the entire local workflow, and therefore, the processing result may be displayed in the resource unit, so that the user can intuitively know the running result.
In an embodiment of the present disclosure, the task processing device may further perform the following steps: and under the condition that the second computation graph fails to run, generating prompt information of the failure in running on the canvas. .
It can be understood that, in the embodiment of the present disclosure, after the task processing device runs the second computation graph, if the second computation graph fails to run, a prompt message indicating that the running of the second computation graph fails may be generated on the canvas, and a user may know that the running of the second computation graph fails by checking the prompt message, so that the second computation graph may be adjusted in time, that is, the local workflow is adjusted, so as to improve the success rate of running of the second computation graph.
Fig. 4 is a schematic diagram of an exemplary task processing procedure provided in an embodiment of the present disclosure. As shown in steps S401 to S408 in fig. 4, the task processing device may draw a first computation graph corresponding to the entire workflow on the canvas, and then may receive an instruction of a user clicking a box selection tool, and further automatically determine a second computation graph from the canvas displaying the first computation graph based on the box selection instruction, and further may receive a touch instruction for an operation unit in the first computation graph as an initial operation and a touch instruction for an operation unit as a termination operation, thereby automatically determining the second computation graph. And the task processing device can check the second calculation graph under the condition of obtaining the second calculation graph, so that the second calculation graph is operated under the condition of successful check to complete the processing of the corresponding task of the corresponding local workflow. In addition, if the second computation graph fails to operate or the verification fails, the task processing device may output prompt information.
The embodiment of the disclosure provides a task processing method, which includes: receiving a local selection instruction of a first computational graph corresponding to the overall workflow; the first calculation graph comprises at least one operation unit and at least one resource unit which are used for processing tasks corresponding to the whole workflow; determining a second calculation graph from a canvas displaying the first calculation graph according to the local selection instruction; the workflow corresponding to the second calculation graph is a local workflow in the whole workflow; and operating the second computation graph to complete the processing of the tasks corresponding to the local workflow. According to the task processing method provided by the embodiment of the disclosure, a part can be selected from the calculation graph corresponding to the whole workflow to run, so that the task corresponding to the local workflow is completed, and the flexibility of the running of the calculation graph is improved.
The embodiment of the disclosure provides a task processing device. Fig. 5 is a schematic structural diagram of a task processing device according to an embodiment of the present disclosure. As shown in fig. 5, in an embodiment of the present disclosure, a task processing device includes:
a receiving module 501, configured to receive a local selection instruction for a first computation graph corresponding to an overall workflow; wherein the first computational graph comprises at least one operation unit and at least one resource unit for processing tasks corresponding to the overall workflow;
a determining module 502, configured to determine a second computational graph from a canvas displaying the first computational graph according to the local selection instruction; the workflow corresponding to the second computation graph is a local workflow in the whole workflow;
and the running module 503 is configured to run the second computation graph to complete processing of tasks corresponding to the local workflow.
In an embodiment of the present disclosure, the local selection instruction is a box selection instruction, and the determining module 502 is specifically configured to generate a candidate box in the canvas based on the box selection instruction; confirming the candidate frame as the second calculation graph in at least two operation units selected by the frame of the first calculation graph; according to the selection sequence of the candidate boxes to the operation units in the first calculation graph, the first operation unit selected by boxes is the starting operation of the second calculation graph, and the last operation unit selected by boxes is the ending operation of the second calculation graph.
In an embodiment of the present disclosure, the local selection instruction is a touch instruction for instructing a start operation and an end operation of the second computation graph, and the determining module 502 is specifically configured to determine, based on a touch instruction for selecting the start operation, a touched operation unit in the first computation graph as the start operation of the second computation graph; determining the touched operation unit in the first calculation graph as the termination operation of the second calculation graph based on the touch instruction for selecting the termination operation; in the first computation graph, an operation unit corresponding to the start operation, an operation unit corresponding to the end operation, and an operation unit and a resource unit included between the start operation and the end operation are confirmed as the second computation graph.
In an embodiment of the present disclosure, the method further includes: a generating module (not shown in the figure), configured to generate, in the second computation graph, a start identifier representing a start operation in an operation unit corresponding to the start operation and an end identifier in an operation unit corresponding to the end operation, respectively.
In an embodiment of the present disclosure, the generating module is further configured to generate, in the second computation graph, a click frame for canceling the initial operation in an operation unit corresponding to the initial operation and a click frame for canceling the termination operation in an operation unit corresponding to the termination operation, respectively;
the receiving module 501 is further configured to cancel the current operation unit as the start operation when receiving the click operation on the start operation cancellation click box, so as to re-confirm the operation unit corresponding to the start operation; and when the click operation of the click frame for canceling the termination operation is received, canceling the current operation unit as the termination operation so as to reconfirm the operation unit corresponding to the termination operation.
In an embodiment of the present disclosure, the method further includes: the display module (not shown in the figure) is used for displaying the operation unit in the first calculation graph according to a first display mode; and displaying according to a second mode, and displaying the operation unit corresponding to the second calculation graph in the canvas.
In an embodiment of the present application, the method further includes: a verification module (not shown in the figures),
the checking module is used for checking the second calculation graph based on the received checking instruction;
the generating module is further configured to confirm that the verification of the second computational graph is successful when the connection relationship of the operation units in the second computational graph is a directed acyclic graph, and generate prompt information of successful verification on the canvas.
In an embodiment of the present disclosure, the generating module is further configured to, when an operation unit connection relationship in the second computation graph is not a directed acyclic graph, confirm that the verification of the second computation graph fails, and generate a prompt message indicating that the verification fails on the canvas.
In an embodiment of the present disclosure, the running module 503 is specifically configured to, when the second computation graph runs successfully, display a processing result of a task corresponding to the local workflow in a resource unit connected to an operation unit corresponding to a termination operation of the second computation graph.
In an embodiment of the present disclosure, the generating module is further configured to generate a prompt message of a failure of operation on the canvas when the second computation graph fails to operate.
The embodiment of the disclosure provides a task processing device, which receives a local selection instruction of a first computation graph corresponding to an overall workflow; the first calculation graph comprises at least one operation unit and at least one resource unit which are used for processing tasks corresponding to the whole workflow; determining a second calculation graph from a canvas displaying the first calculation graph according to the local selection instruction; the workflow corresponding to the second computation graph is a local workflow in the whole workflow; and operating the second calculation graph to complete the workflow of the task corresponding to the local workflow. The task processing device provided by the embodiment of the disclosure can select a part from the calculation graph corresponding to the whole workflow to run, and complete the task corresponding to the local workflow, thereby improving the flexibility of the operation of the calculation graph.
The embodiment of the disclosure provides an electronic device. Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 6, in an embodiment of the present disclosure, an electronic apparatus includes: a processor 601, memory 602, and a communication bus 603; wherein,
the communication bus 603 is used for realizing connection communication between the processor 601 and the memory 602;
the processor 601 is configured to execute one or more programs stored in the memory 602 to implement the task processing method.
The disclosed embodiments provide a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement the above-described task processing method. The computer-readable storage medium may be a volatile Memory (volatile Memory), such as a Random-Access Memory (RAM); or a non-volatile Memory (non-volatile Memory), such as a Read-Only Memory (ROM), a flash Memory (flash Memory), a Hard Disk (Hard Disk Drive, HDD) or a Solid-State Drive (SSD); or may be a respective device, such as a mobile phone, computer, tablet device, personal digital assistant, etc., that includes one or any combination of the above-mentioned memories.
As will be appreciated by one skilled in the art, embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable signal processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable signal processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable signal processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable signal processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only for the preferred embodiment of the present disclosure, and is not intended to limit the scope of the present disclosure.

Claims (13)

1. A method for processing a task, the method comprising:
receiving a local selection instruction of a first computational graph corresponding to the overall workflow; wherein the first computational graph comprises at least one operation unit and at least one resource unit for processing tasks corresponding to the overall workflow;
determining a second computational graph from a canvas displaying the first computational graph according to the local selection instruction; the workflow corresponding to the second computation graph is a local workflow in the whole workflow;
and running the second computation graph to finish the processing of the tasks corresponding to the local workflow.
2. The method of claim 1, wherein the local selection instruction is a box selection instruction; the determining, according to the local selection instruction, a second computation graph from a canvas displaying the first computation graph includes:
generating a candidate box within the canvas based on the box instruction;
confirming the candidate frame as the second calculation graph in at least two operation units selected by the frame of the first calculation graph; according to the selection sequence of the candidate boxes to the operation units in the first calculation graph, the first operation unit selected by boxes is the starting operation of the second calculation graph, and the last operation unit selected by boxes is the ending operation of the second calculation graph.
3. The method according to claim 1, wherein the local selection instruction is a touch instruction for instructing the second computation graph to start and end operations; the determining, according to the local selection instruction, a second computation graph from a canvas displaying the first computation graph includes:
determining the touched operation unit in the first calculation graph as the initial operation of the second calculation graph based on the touch instruction for selecting the initial operation;
determining the touched operation unit in the first calculation graph as the termination operation of the second calculation graph based on the touch instruction for selecting the termination operation;
in the first computation graph, an operation unit corresponding to the start operation, an operation unit corresponding to the end operation, and an operation unit and a resource unit included between the start operation and the end operation are confirmed as the second computation graph.
4. A method according to claim 2 or 3, characterized in that the method further comprises:
in the second calculation graph, a start identifier representing a start operation is generated at an operation unit corresponding to the start operation, and an end identifier is generated at an operation unit corresponding to the end operation.
5. The method according to any one of claims 2-4, further comprising:
in the second calculation graph, a click frame for canceling the initial operation is generated in an operation unit corresponding to the initial operation and a click frame for canceling the termination operation is generated in an operation unit corresponding to the termination operation;
when the click operation of the click frame for canceling the initial operation is received, canceling the current operation unit as the initial operation to re-confirm the operation unit corresponding to the initial operation;
and when the click operation of the click frame for canceling the termination operation is received, canceling the current operation unit as the termination operation so as to reconfirm the operation unit corresponding to the termination operation.
6. The method according to any one of claims 1 to 5, wherein the operation unit in the first computation graph is displayed in a first display mode, and the method further comprises:
and displaying according to a second mode, and displaying the operation unit corresponding to the second calculation graph in the canvas.
7. The method of claim 1, wherein prior to the executing the second computation graph, the method further comprises:
checking the second calculation graph based on the received checking instruction;
and under the condition that the connection relation of the operation units in the second computational graph is a directed acyclic graph, confirming the successful verification of the second computational graph, and generating prompt information of the successful verification in the canvas.
8. The method of claim 7, further comprising:
and under the condition that the connection relation of the operation units in the second computational graph is not a directed acyclic graph, confirming the verification failure of the second computational graph, and generating prompt information of the verification failure in the canvas.
9. The method of claim 1, wherein the executing the second computation graph comprises:
and under the condition that the second computation graph is successfully operated, displaying the processing result of the task corresponding to the local workflow in the resource unit connected with the operation unit corresponding to the termination operation of the second computation graph.
10. The method of claim 9, further comprising:
and under the condition that the second computing graph fails to run, generating prompt information of running failure in the canvas.
11. A task processing apparatus, comprising:
the receiving module is used for receiving a local selection instruction of a first computational graph corresponding to the overall workflow; wherein the first computational graph comprises at least one operation unit and at least one resource unit for processing tasks corresponding to the overall workflow;
a determining module, configured to determine a second computation graph from a canvas displaying the first computation graph according to the local selection instruction; the workflow corresponding to the second computation graph is a local workflow in the whole workflow;
and the operation module is used for operating the second calculation graph so as to complete the processing of the corresponding tasks of the local workflow.
12. An electronic device, characterized in that the electronic device comprises: a processor, a memory, and a communication bus; wherein,
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more programs stored in the memory to implement the task processing method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that the computer-readable storage medium stores one or more programs which can be executed by one or more processors to implement the task processing method according to any one of claims 1 to 10.
CN202110836334.2A 2021-07-23 2021-07-23 Task processing method and device, electronic equipment and storage medium Pending CN113515220A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110836334.2A CN113515220A (en) 2021-07-23 2021-07-23 Task processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110836334.2A CN113515220A (en) 2021-07-23 2021-07-23 Task processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113515220A true CN113515220A (en) 2021-10-19

Family

ID=78068547

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110836334.2A Pending CN113515220A (en) 2021-07-23 2021-07-23 Task processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113515220A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140215487A1 (en) * 2013-01-28 2014-07-31 Hewlett-Packard Development Company, L.P. Optimizing execution and resource usage in large scale computing
CN110689232A (en) * 2019-09-03 2020-01-14 深圳壹账通智能科技有限公司 Workflow configuration optimization processing method and device and computer equipment
US20200019899A1 (en) * 2018-07-12 2020-01-16 Nintex USA, Inc. Business Designer
CN111210493A (en) * 2018-11-21 2020-05-29 鸿合科技股份有限公司 Method for realizing writing software flow chart
CN112000453A (en) * 2020-08-25 2020-11-27 支付宝(杭州)信息技术有限公司 Scheduling method and system of stream computing system
CN113094164A (en) * 2021-04-27 2021-07-09 上海商汤科技开发有限公司 Task processing device and method, computer equipment and storage medium
CN113112217A (en) * 2021-03-18 2021-07-13 上海宜员网络技术有限公司 Business process configuration method and device, electronic equipment and computer readable medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140215487A1 (en) * 2013-01-28 2014-07-31 Hewlett-Packard Development Company, L.P. Optimizing execution and resource usage in large scale computing
US20200019899A1 (en) * 2018-07-12 2020-01-16 Nintex USA, Inc. Business Designer
CN111210493A (en) * 2018-11-21 2020-05-29 鸿合科技股份有限公司 Method for realizing writing software flow chart
CN110689232A (en) * 2019-09-03 2020-01-14 深圳壹账通智能科技有限公司 Workflow configuration optimization processing method and device and computer equipment
CN112000453A (en) * 2020-08-25 2020-11-27 支付宝(杭州)信息技术有限公司 Scheduling method and system of stream computing system
CN113112217A (en) * 2021-03-18 2021-07-13 上海宜员网络技术有限公司 Business process configuration method and device, electronic equipment and computer readable medium
CN113094164A (en) * 2021-04-27 2021-07-09 上海商汤科技开发有限公司 Task processing device and method, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109684057B (en) Task processing method and device and storage medium
CN109710428B (en) Dynamic calling method and device for implementation class
CN110825705A (en) Data set caching method and related device
CN111061551A (en) Node merging and scheduling method, device, equipment and storage medium
CN110609755A (en) Message processing method, device, equipment and medium for cross-block chain node
CN112613840B (en) Job scheduling control method, device, equipment and storage medium
CN112306471A (en) Task scheduling method and device
CN108733468A (en) Timed task Dynamic Configuration and device, storage medium and server cluster
CN111857803A (en) Page updating method, device, server and storage medium
CN108647023A (en) Picture compression method, apparatus, equipment and the storage medium of Software Development Tools
CN114647519A (en) Data transmission method and device between native platform and Flutter platform and storage medium
CN105100117A (en) Method and device for accessing combined services
CN110928672B (en) Task arranging method, device and equipment and storage medium
CN101753360B (en) Method applying system start-up, parallel management system and application management system
CN113515220A (en) Task processing method and device, electronic equipment and storage medium
CN114185557A (en) Software product deployment method, device, medium and electronic equipment
CN114327673A (en) Task starting method and device, electronic equipment and storage medium
CN114064025A (en) Generation method, device, equipment and storage medium of training pipeline model
CN108038668B (en) Method and equipment for cooperative office, terminal and readable storage medium
CN112330304A (en) Contract approval method and device
CN112686391A (en) Modeling method and device based on federal learning, equipment and storage medium
CN112669123A (en) Order management method and device for vehicle owner platform
CN111324368A (en) Data sharing method and server
CN112115488B (en) Data processing method and device and electronic equipment
CN115526580B (en) Node state determining method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination