WO2022135079A1 - Data processing method for task flow engine, and task flow engine, device and medium - Google Patents

Data processing method for task flow engine, and task flow engine, device and medium Download PDF

Info

Publication number
WO2022135079A1
WO2022135079A1 PCT/CN2021/134268 CN2021134268W WO2022135079A1 WO 2022135079 A1 WO2022135079 A1 WO 2022135079A1 CN 2021134268 W CN2021134268 W CN 2021134268W WO 2022135079 A1 WO2022135079 A1 WO 2022135079A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
execution
task flow
current node
layer
Prior art date
Application number
PCT/CN2021/134268
Other languages
French (fr)
Chinese (zh)
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 WO2022135079A1 publication Critical patent/WO2022135079A1/en

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
    • 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Definitions

  • the present disclosure relates to the technical field of computer data processing, for example, to a data processing method of a task flow engine, a task flow engine, a device and a medium.
  • the task flow of a complex machine learning system can usually be abstracted as a Directed Acyclic Graph (DAG), and the execution of task nodes is completed through a special scheduling engine and a heterogeneous execution engine.
  • DAG Directed Acyclic Graph
  • the present disclosure provides a data processing method of a task flow engine, a task flow engine, a device and a medium, so as to improve the development efficiency of a task flow system.
  • the present disclosure provides a data processing method for a task flow engine, the method comprising:
  • DSL Domain-Specific Language
  • the operator logic of each node in the plurality of nodes is executed based on the node dependency, so as to process the data in the task flow engine.
  • the present disclosure also provides a task flow engine, the task flow engine includes:
  • the conversion module is set to convert the task flow in the task flow engine described by the DSL into a graphical node dependency
  • the data processing module is configured to execute the operator logic of each node in the plurality of nodes based on the node dependency, so as to process the data in the task flow engine.
  • the present disclosure also provides a task flow engine device, including:
  • processors one or more processors
  • memory arranged to store one or more programs
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned data processing method of the task flow engine.
  • the present disclosure also provides a medium, where the medium stores a computer program, and when the computer program is executed by a processor, implements the data processing method of the above task flow engine.
  • FIG. 1 is a flowchart of a data processing method for a task flow engine provided by an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of a graphical node dependency provided by an embodiment of the present disclosure
  • FIG. 3 is a flowchart of another data processing method of a task flow engine provided by an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of a graphical state monitoring interface provided by an embodiment of the present disclosure.
  • FIG. 5 is a schematic diagram of another graphical node dependency relationship provided by an embodiment of the present disclosure.
  • FIG. 6 is a structural diagram of a task flow engine provided by an embodiment of the present disclosure.
  • FIG. 7 is a structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • method embodiments of the present disclosure may be performed in different orders and/or in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this regard.
  • the term “including” and variations thereof are open-ended inclusions, ie, "including but not limited to”.
  • the term “based on” is “based at least in part on.”
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one additional embodiment”; the term “some embodiments” means “at least some embodiments”. Relevant definitions of other terms will be given in the description below.
  • FIG. 1 is a flowchart of a data processing method of a task flow engine provided by an embodiment of the present disclosure. This embodiment is applicable to the situation of arranging and processing data task flow.
  • the method can be executed by a task flow engine.
  • the task flow engine described above can be implemented by means of software and/or hardware.
  • the task flow engine can be integrated, for example, in a terminal device.
  • the data processing method of the task flow engine provided in this embodiment mainly includes steps S11 and S12.
  • DSL is also known as domain-specific language, DSL is only used in some specific fields.
  • DSL is only used in some specific fields.
  • HTML Hyper Text Markup Language
  • LISP Emac Locator Identifier Separation Protocol
  • the task flow is the calculation model of the task flow, that is, the logic and rules of how the work in the task flow is organized together before and after are represented in the computer with an appropriate model and the calculation is performed.
  • the main problem to be solved by task flow is: in order to achieve a business goal, among multiple participants, the computer is used to automatically transfer according to a predetermined rule.
  • Mapping and modeling can be included in the implementation of task flows. Mapping is the first step whose primary task is to identify and document all existing manual and automated business processes within the organization; modeling is the development of a model that helps streamline business processes.
  • the task flow engine is also called the workflow engine.
  • the task flow engine can take the task flow as a part of the application system and provide the application system with a core solution that has a decisive effect on the application system.
  • the division of labor and different conditions determine the information delivery route, content level, etc.
  • the task flow engine generally includes important functions such as process node management, flow direction management, and process sample management.
  • the task flow in the embodiments of the present disclosure mainly refers to a task flow used for data processing, and the task flow includes multiple nodes executed in a certain order and dependencies between the multiple nodes.
  • the dependency relationship between multiple nodes can be understood as the execution sequence relationship set for multiple nodes in the task flow.
  • a sequential task flow can be set.
  • the execution process of the sequential task flow is a continuous sequence of steps. In the sequential task flow, after the logical operation of one node is completed, the logical operation of the next node will be executed.
  • the task flow described by the DSL refers to the task flow described using the DSL language or the task flow defined using the DSL language. That is to use DSL language programming to describe the operator logic in each node in the task flow and the dependencies between multiple nodes.
  • Graphical node dependencies can be understood as expressing the dependencies between multiple nodes in a graphical manner, so as to realize the visualization of the dependencies between multiple established tasks.
  • FIG. 2 is a schematic diagram of a graphical node dependency provided by an embodiment of the present disclosure; as shown in FIG. 2 , the dependency between multiple nodes is that the node can be executed only after the operator logic in node A is executed.
  • the operator logic in node B can only be executed after the operator logic in node C is executed; the operator logic in node D and node B can be executed only after the operator logic in node D and node B are executed. sub logic.
  • FIG. 2 is only an exemplary illustration of the node dependency, but not a limitation. In practical applications, node dependencies are usually much more complex. For example, the first node needs to execute a web crawler to obtain massive data from the network, and the second node performs model training based on the obtained massive data.
  • Each node contains operator logic that needs to be executed, and operator logic refers to the logic of data processing in the node.
  • the operator logic may be the operation of performing the sum of two input data; another example: the operator logic may be the logical operation of performing the exclusive OR of the two input data. In this embodiment, only the operator logic is described, but not limited.
  • the scheduling layer of the task flow engine determines the current node based on the node dependency, and sends the node execution command to the execution layer of the task flow engine, and the execution layer executes the operator logic of the node based on the node execution command.
  • the execution layer of the task flow engine first executes the first layer node of the task flow, that is, the node without other predecessor dependencies. Generate new event messages to drive the operation of lower-level nodes.
  • the scheduling layer of the task flow engine sends node execution commands to the execution layer through the Remote Procedure Call (RPC) protocol.
  • RPC Remote Procedure Call
  • the scheduling layer of the task flow engine determines the current node based on the node dependency relationship, including: after receiving the successful execution information of the predecessor node sent by the execution layer, the scheduling layer determines the current node based on the node dependency relationship.
  • the scheduling layer After the scheduling layer receives the successful execution information of the predecessor node sent by the execution layer, the scheduling layer determines the current node based on the node dependency, and then the scheduling layer determines whether the current node execution condition is satisfied based on the predecessor node of the current node; condition, then execute the operation of sending the node execution command to the execution layer.
  • the number of predecessor nodes of the current node is determined based on the node dependency. If the number of predecessor nodes is one, the execution success information of one predecessor node is received, and the operation of sending the node execution command to the execution layer. If the number of precursor nodes is more than one, after receiving the successful execution information of the precursor nodes and the number of precursor nodes equal to the number of predecessor nodes, the operation of sending the node execution command to the execution layer.
  • a node in the execution layer executes the operator logic in the node based on the received input parameters to obtain output parameters.
  • the data processing method provided by this embodiment includes: converting the task flow described by the DSL into a graphical node dependency; executing the operator logic of each node in the multiple nodes based on the node dependency, so as to control the flow of tasks in the task flow engine. data is processed.
  • the embodiments of the present disclosure reduce the complexity of task flow arranging, debugging and running, and improve the efficiency of task flow system development by using a DSL to describe the data task flow and convert it into a graphically executable scheduling logic.
  • the method before converting the task flow described by the DSL into a graphical node dependency, the method further includes: using the DSL to describe the task flow for processing data in the task flow engine.
  • the DSL is used to describe the task flow.
  • a flowchart editing tool is used to edit the task flow, which reduces the complexity of task arrangement, debugging and running, and improves the development efficiency of the task flow system.
  • the definition layer of the task flow engine development system uses a DSL to describe the task flow for processing data in the task flow engine.
  • Use a DSL to describe the task flow for processing data including: using a DSL to describe the input parameters of each node, output parameters, and dependencies between multiple nodes.
  • the above-mentioned input parameters refer to the parameters required to execute the operator logic in the node, and the input parameters of a node may be one or multiple.
  • the input parameters are determined by the operator logic in the node.
  • the above output parameters refer to the parameters to be output after the node executes the operator logic.
  • the input parameters of a node can be one or more.
  • the output parameters are determined by the operator logic in the node.
  • FIG. 3 is a flowchart of another data processing method of a task flow engine provided by an embodiment of the present disclosure. As shown in FIG. 3 , the data processing method provided in this embodiment mainly includes steps S21 , S22 , S23 , S24 and S25 .
  • the scheduling layer in the task flow engine determines the current node based on the node dependency, and sends a node execution command to the execution layer in the task flow engine.
  • Node execution commands include the current node ID.
  • the current node refers to the node that is about to execute the operator logic
  • the node identifier refers to the characteristic value that uniquely identifies the node, which can be the node name, node code, etc.
  • the current node identifier refers to the characteristic value that uniquely identifies the current node.
  • the node execution command refers to a command or instruction instructing the execution layer to execute the operator logic in the node.
  • the scheduling layer can be understood as the layer where the task flow engine development system performs computer resource allocation or task allocation.
  • the execution layer can be understood as the layer that performs logical operations in the task flow engine development system.
  • the scheduling layer determines the current node based on the node dependency. It can be understood that the scheduling layer determines that the current node is node B after the operator logic in node A is executed; or the scheduling layer determines the operator in node C. After the logic is executed, it is determined that the current node is node D.
  • the execution layer first executes the first layer node of the task flow, that is, the node without other predecessor dependencies. Generate new event messages to drive the operation of lower-level nodes.
  • the scheduling layer sends the node execution command to the execution layer, including: the scheduling layer sends the node execution command to the execution layer through the RPC protocol.
  • the RPC protocol refers to a protocol that requests services from a remote computer program over a network without knowing the underlying network technology. That is, the scheduling layer calls an object that exists on the execution layer without knowing the details of the call, just like calling an object in the local application.
  • RPC implementations include: Dubbo, Thrift, GRPC, Hetty, etc.
  • any one of the RPC protocols may be selected, which is not limited in this embodiment.
  • the scheduling layer is completely decoupled from the execution layer based on the RPC protocol, and does not depend on each other, thereby improving the security of the task flow system.
  • the scheduling layer determining the current node based on the node dependency includes: after receiving the successful execution information of the predecessor node sent by the execution layer, the scheduling layer determines the current node based on the node dependency.
  • the predecessor node refers to the node of the operator logic executed before the current node. As shown in FIG. 2 , node A is the predecessor node of node B, node C is the predecessor node of node D, node D and node B is the predecessor node of node E.
  • the message that the predecessor node executes successfully refers to the message that the predecessor node executes the operator logic and successfully outputs the parameters.
  • the execution layer executes the operator logic in the current node, and returns a successful execution message to the scheduling layer after successful execution.
  • the scheduling layer processes task node dependencies based on a message-driven mechanism.
  • the scheduling layer determines that the current node is node B based on the node dependency; The layer determines that the current node is node D based on the node dependencies.
  • the method further includes: the scheduling layer judges whether the current node execution condition is satisfied based on the predecessor node of the current node; if the current node execution condition is satisfied, executes sending a node execution command to the execution layer operation.
  • the execution conditions of the current node refer to the conditions that the system needs to meet to execute the operator logic in the current node.
  • the current node execution condition includes: the number of predecessor nodes of the current node is equal to the number of the received predecessor node execution success information.
  • the number of predecessor nodes of the current node is determined based on the node dependency. If the number of predecessor nodes is one, the execution success information of one predecessor node is received, and the operation of sending the node execution command to the execution layer. If the number of precursor nodes is more than one, after receiving the successful execution information of the precursor nodes and the number of precursor nodes equal to the number of predecessor nodes, the operation of sending the node execution command to the execution layer.
  • the execution layer executes the operator logic in the current node.
  • the logical operator in the node refers to the logical relationship between predefined data.
  • the execution layer executes the operator logic in the current node, including: the current node in the execution layer obtains output parameters based on the received input parameters and the operator logic in the current node.
  • the operator logic in the node is executed to obtain the output parameters. For example: two input parameters are received, which are 1 and 2 respectively; the operator logic is summation, then 1 and 2 are summed, and the output parameter of the current node is 3.
  • An operator can be an abstraction of the computing process on any computing platform, so it is independent of the engine.
  • the method further includes: saving the output parameters through the hash signature of the input parameters, and using the saved output parameters as the corresponding input parameters cached results.
  • Hash signature is the most important digital signature method, also known as Digital Digest or Digital Finger Print.
  • Digital digest is to use a single Hash function to "digest" the plaintext to be encrypted into a string of fixed-length (127-bit) ciphertext.
  • This string of ciphertext is also called digital fingerprint, which has a fixed length, and different plaintext digests are Ciphertext, the result is always different, and the digest of the same plaintext must be consistent.
  • Common hash algorithms include: Message Digest Algorithm 2, MD2, version 2, Message Digest Algorithm 4, MD4, version 4, Message Digest Algorithm 5, MD5, version 5 ), HAVAL, Secure Hash Algorithm (SHA), etc.
  • the execution result saved by using the hash signature of the input parameter that is, the output parameter is used as the cached result corresponding to the input parameter of the node.
  • the task node directly outputs the cached result corresponding to the historical input parameter as the current output parameter.
  • a cache switch can also be set. If the cache switch is turned on, if the current input parameter is the same as a historical input parameter of the node, the task node directly outputs the cached result corresponding to the historical input parameter as the current output parameter. If the cache switch is closed, the task node performs calculations based on the current input parameters and operator logic to determine the current output parameters.
  • the execution layer executes the operator logic in the current node, including: the current node of the execution layer receives the input parameter; detects whether there is a cache parameter that is the same as the input parameter; If the same cache parameter is used, the cache result corresponding to the cache parameter is directly determined as the output parameter.
  • the execution layer judges whether the execution of the operator logic in the current node ends.
  • the completion of the execution of the operator logic in the current node includes one or more of the following: the execution of the operator logic of the current node is successful; the execution duration of the operator logic of the current node exceeds a preset duration; the operator logic of the current node is executed. The number of repeated executions of the sub-logic exceeds the preset number of times.
  • the execution layer sends a message that the execution of the current node ends to the scheduling layer.
  • the message that the execution of the current node ends includes: a message that the operator logic is successfully executed and a message that the operator logic fails to be executed.
  • Successful execution can be understood as the node executing the operator logic and outputting the correct result. If it is determined that the execution of the operator logic of the current node is successful, it is determined that the execution of the operator logic in the current node ends, and a message that the execution of the current node is successful is sent to the scheduling layer.
  • Execution failure can be understood as the node executing the operator logic and failing to output the correct result. If the execution time of the operator logic of the current node exceeds the preset time, or the number of repeated executions of the operator logic of the current node exceeds the preset number of times, it is determined that the execution of the operator logic in the current node has ended, and the execution failure of the current node is sent to the scheduling layer. information.
  • the preset duration and the preset number of times can be set according to actual conditions.
  • the scheduling layer determines the current node based on the node dependency. If the current node execution failure message is sent to the scheduling layer, the scheduling layer detects the cause of the failure based on the execution failure message, and tries to repair it.
  • the operator logic in the node is automatically executed by configuring the preset duration and the preset number of times by the user, so that errors in the node and the problem of executing the operator logic countless times can be avoided, and the robustness of the system can be improved.
  • the method further includes: acquiring the execution state of each node, and displaying the execution state of each node on a graph on each node described in the state monitoring interface.
  • the execution status of each node is displayed in the graphical status monitoring interface. For example, the execution status of the server node is listening, and the execution status of the Data Export node is ending ( finished), the execution status of the Data Augmentation node is finished, and the execution status of the Preprocess node is running. This allows the staff to easily understand the execution status of each node.
  • the engine By parsing the task flow description defined by the DSL language into a graphical representation, as shown in Figure 5.
  • the engine first executes the first layer node of the task flow, that is, the node without other precursor dependencies, such as the add node and the subtract node in Figure 5.
  • a new event message is generated to drive the operation of the lower layer node (such as multiply).
  • the task node in the execution layer usually includes an operator, which runs the operator logic through the parameters passed in by RPC, and returns the agreed parameter results to the scheduling layer.
  • FIG. 6 is a structural diagram of a task flow engine provided by an embodiment of the present disclosure. This embodiment is applicable to the situation of arranging and processing data task flow, and the task flow engine can be generated by software and/or hardware. accomplish.
  • the task flow engine can be integrated, for example, in a terminal device.
  • the task flow engine provided in this embodiment mainly includes a conversion module 61 and a data processing module 62 .
  • the conversion module 61 is configured to convert the task flow in the task flow engine described by the DSL into a graphical node dependency; the data processing module 62 is configured to execute the operator of each node in the multiple nodes based on the node dependency Logic to process data in the task flow engine.
  • the embodiments of the present disclosure provide a task flow engine, which performs the following operations: converts the task flow described by the DSL into a graphical node dependency; data in for processing.
  • the embodiments of the present disclosure reduce the complexity of task flow arranging, debugging and running, and improve the efficiency of task flow system development by using a DSL to describe the data task flow and convert it into a graphically executable scheduling logic.
  • the DSL Before converting the task flow described by the DSL into graphical node dependencies, it also includes: using the DSL to describe the task flow for processing data.
  • the using the DSL to describe the task flow for processing data includes: using the DSL to describe the input parameters, output parameters and dependencies between multiple nodes of each node in the task flow.
  • executing the operator logic of each node in the plurality of nodes includes: for each node, the scheduling layer in the task flow engine determines the current node based on the node dependency relationship, and reports to the node.
  • the execution layer in the task flow engine sends a node execution command, wherein the node execution command includes the current node identifier; the execution layer executes the operator logic in the current node.
  • the scheduling layer sending the node execution command to the execution layer includes: the scheduling layer sends the node execution command to the execution layer through the RPC protocol.
  • the scheduling layer determining the current node based on the node dependency includes: after receiving the successful execution information of the predecessor node sent by the execution layer, the scheduling layer determines the current node based on the node dependency.
  • the method further includes: the scheduling layer judges whether the execution condition of the current node is satisfied based on the predecessor node of the current node; if the execution condition of the current node is satisfied, executing the execution condition of the scheduling layer.
  • the layer sends the action of the node to execute the command.
  • the current node execution condition includes: the number of predecessor nodes of the current node is equal to the number of the received predecessor node execution success information.
  • the execution layer executes the operator logic in the current node, including: the current node in the execution layer obtains output parameters based on the received input parameters and the operator logic in the current node.
  • the method further includes: the current node in the execution layer saves the output parameters through the hash signature of the input parameters, and saves the saved output parameters.
  • the output parameter is used as the cached result corresponding to the input parameter.
  • the execution layer executes the operator logic in the current node, including: the current node of the execution layer receives the input parameter; detects whether there is a cache parameter that is the same as the input parameter; if there is a cache parameter that is the same as the input parameter, directly The cached result corresponding to the cached parameter is determined as the output parameter.
  • the method further includes: the execution layer determines whether the execution of the operator logic in the current node ends; if the execution of the operator logic in the current node ends, the execution The layer sends a message that the execution of the current node is over to the scheduling layer.
  • the execution end of the operator logic in the current node includes one or more of the following:
  • the execution of the operator logic of the current node is successful; the execution duration of the operator logic of the current node exceeds the preset duration; the repeated execution times of the operator logic of the current node exceeds the preset number of times.
  • the method further includes: acquiring the execution state of each node, and displaying the execution state of each node in a graphical state on each node in the monitoring interface.
  • the task flow engine provided in this embodiment can execute the data processing method of the task flow engine provided by any embodiment of the present disclosure, and has functional modules and effects corresponding to executing the data processing method of the task flow engine.
  • FIG. 7 it shows a schematic structural diagram of an electronic device (eg, a terminal device or a server in FIG. 7 ) 700 suitable for implementing an embodiment of the present disclosure.
  • Terminal devices in the embodiments of the present disclosure may include, but are not limited to, such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (Personal Digital Assistants, PDAs), tablet computers (PADs), and portable multimedia players (Portable Media Players). , PMP), in-vehicle terminals (eg, in-vehicle navigation terminals), and other mobile terminals, as well as fixed terminals such as digital (Television, TV), desktop computers, and the like.
  • PMP Personal Digital Assistants
  • PDAs Personal Digital Assistants
  • PADs tablet computers
  • PMP portable multimedia players
  • in-vehicle terminals eg, in-vehicle navigation terminals
  • other mobile terminals as well as fixed terminals such as digital (Television, TV), desktop computers, and the like.
  • the electronic device 700 may include a processing device (eg, a central processing unit, a graphics processor, etc.) 701, which may be based on a program stored in a read-only memory (Read-Only Memory, ROM) 702 or from a storage device 707 programs loaded into Random Access Memory (RAM) 703 to perform various appropriate actions and processes. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored.
  • the processing device 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704.
  • An Input/Output (I/O) interface 705 is also connected to the bus 704 .
  • I/O interface 705 the following devices may be connected to the I/O interface 705: input devices 708 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a Liquid Crystal Display (LCD) Output device 707 , speaker, vibrator, etc.; storage device 708 , including, for example, magnetic tape, hard disk, etc.; and communication device 709 .
  • Communication means 709 may allow electronic device 700 to communicate wirelessly or by wire with other devices to exchange data.
  • FIG. 7 shows an electronic device 700 having various means, it is not required to implement or have all of the illustrated means. More or fewer devices may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from the network via the communication device 709, or from the storage device 708, or from the ROM 702.
  • the processing device 701 the above-mentioned functions defined in the methods of the embodiments of the present disclosure are executed.
  • the computer-readable medium described above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two.
  • the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above.
  • Examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, RAM, ROM, Erasable Programmable Read-Only Memory (EPROM) or flash memory), optical fiber, portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • the program code embodied on the computer-readable medium may be transmitted by any suitable medium, including but not limited to: electric wire, optical fiber cable, radio frequency (RF), etc., or any suitable combination of the above.
  • the client and server can use any currently known or future developed network protocols such as HyperText Transfer Protocol (HTTP) to communicate, and can communicate with digital data in any form or medium.
  • HTTP HyperText Transfer Protocol
  • Data communications eg, communications networks
  • Examples of communication networks include Local Area Networks (LANs), Wide Area Networks (WANs), the Internet (eg, the Internet), and peer-to-peer networks (eg, ad hoc peer-to-peer networks), as well as any currently Known or future developed networks.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or may exist alone without being assembled into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device:
  • the task flow described by the DSL is converted into a graphical node dependency; the operator logic of each node in the multiple nodes is executed based on the node dependency, so as to process the data in the task flow engine.
  • Computer program code for performing operations of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and This includes conventional procedural programming languages - such as the "C" language or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer may be connected to the user's computer through any kind of network, including a LAN or WAN, or may be connected to an external computer (eg, using an Internet service provider to connect through the Internet).
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments of the present disclosure may be implemented in a software manner, and may also be implemented in a hardware manner. Among them, the name of the unit does not constitute a limitation of the unit itself in one case.
  • exemplary types of hardware logic components include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (Application Specific Standard Products) Standard Parts, ASSP), system on chip (System on Chip, SOC), complex programmable logic device (Complex Programmable Logic Device, CPLD) and so on.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSP Application Specific Standard Products
  • SOC System on Chip
  • complex programmable logic device Complex Programmable Logic Device, CPLD
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with the instruction execution system, apparatus or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any suitable combination of the foregoing. Examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer disks, hard disks, RAM, ROM, EPROM or flash memory, optical fibers, CD-ROMs, optical storage devices, magnetic storage devices, or Any suitable combination of the above.
  • a data processing method/task flow engine/device/medium of a task flow engine including:
  • the task flow in the task flow engine described by the DSL is converted into a graphical node dependency; the operator logic of each node in the multiple nodes is executed based on the node dependency to process the data in the task flow engine.
  • a data processing method/task flow engine/device/medium of a task flow engine in which the task flow described in the DSL is converted into a graphical one in the task flow engine Before node dependencies, also include:
  • the task flow for processing data in the task flow engine is described using a DSL.
  • a data processing method/task flow engine/device/medium of a task flow engine which describes the method for processing data in the task flow engine using a DSL Task flow, including:
  • a DSL is used to describe the input parameters of each node in the task flow, the output parameters and the dependencies among the plurality of nodes.
  • a data processing method/task flow engine/device/medium for a task flow engine wherein based on the node dependency relationship, a computation of each node in a plurality of nodes is performed.
  • Sub logic including:
  • the scheduling layer in the task flow engine determines the current node based on the node dependency, and sends a node execution command to the execution layer in the task flow engine, wherein the node execution command includes the current node identifier; the execution The layer executes the operator logic in the current node.
  • a scheduling layer in the task flow engine reports to an execution layer in the task flow engine Send node execution commands, including:
  • the scheduling layer sends the node execution command to the execution layer through the RPC protocol.
  • a data processing method/task flow engine/device/medium of a task flow engine wherein the scheduling layer determines the current node based on the node dependency, including:
  • the scheduling layer After receiving the successful execution information of the predecessor node sent by the execution layer, the scheduling layer determines the current node based on the node dependency.
  • a data processing method/task flow engine/device/medium of a task flow engine is provided, after the scheduling layer determines the current node based on the node dependency, further comprising:
  • the scheduling layer judges whether the execution condition of the current node is satisfied based on the predecessor node of the current node; if the execution condition of the current node is satisfied, the operation of sending the execution command of the node to the execution layer by the scheduling layer is performed.
  • a mail processing method/device/system is provided, and the current node execution condition includes:
  • the number of predecessor nodes of the current node is equal to the number of the received predecessor node execution success information.
  • a data processing method/task flow engine/device/medium of a task flow engine wherein the execution layer executes the operator logic in the current node, including:
  • the current node in the execution layer obtains output parameters based on the received input parameters and operator logic in the current node.
  • a mail processing method/device/system is provided, after the current node obtains output parameters based on the received input parameters and the operator logic in the current node, further include:
  • the current node in the execution layer saves the output parameter through the hash signature of the input parameter, and uses the saved output parameter as a cached result corresponding to the input parameter.
  • a data processing method/task flow engine/device/medium of a task flow engine wherein the execution layer executes the operator logic in the current node, including:
  • the current node of the execution layer receives the input parameter; detects whether there is a cache parameter that is the same as the input parameter; if there is a cache parameter that is the same as the input parameter, directly determines the cache result corresponding to the cache parameter as the output parameter.
  • a data processing method/task flow engine/device/medium of a task flow engine is provided. After executing the operator logic in the current node, the execution layer further includes:
  • the execution layer judges whether the execution of the operator logic in the current node ends; if the execution of the operator logic in the current node ends, the execution layer sends a message of the execution end of the current node to the scheduling layer.
  • a data processing method/task flow engine/device/medium of a task flow engine is provided, where the completion of the execution of the operator logic in the current node includes one or more of the following:
  • the execution of the operator logic of the current node is successful; the execution duration of the operator logic of the current node exceeds the preset duration; the repeated execution times of the operator logic of the current node exceeds the preset number of times.
  • a data processing method/task flow engine/device/medium for a task flow engine wherein based on the node dependency relationship, a computation of each node in a plurality of nodes is performed.
  • the sub logic also include:
  • the execution status of each node is acquired, and the execution status of each node is displayed on each node in the graphical status monitoring interface.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A data processing method for a task flow engine, and a task flow engine, a device and a medium, which relate to the technical field of computer data processing. The data processing method for a task flow engine comprises: converting a task flow described by a DSL into a graphical node dependency relationship (S11); and on the basis of the node dependency relationship, executing an operator logic of each node among a plurality of nodes, so as to process data in a task flow engine (S12).

Description

任务流引擎的数据处理方法、任务流引擎、设备和介质Data processing method of task flow engine, task flow engine, device and medium
本申请要求在2020年12月25日提交中国专利局、申请号为202011564198.8的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application No. 202011564198.8 filed with the China Patent Office on December 25, 2020, the entire contents of which are incorporated herein by reference.
技术领域technical field
本公开涉及计算机数据处理技术领域,例如涉及一种任务流引擎的数据处理方法、任务流引擎、设备和介质。The present disclosure relates to the technical field of computer data processing, for example, to a data processing method of a task flow engine, a task flow engine, a device and a medium.
背景技术Background technique
复杂的机器学习系统的任务流,通常可以抽象为有向无环图(Directed Acyclic Graph,DAG),通过专门的调度引擎及异构的执行引擎来完成任务节点的执行。The task flow of a complex machine learning system can usually be abstracted as a Directed Acyclic Graph (DAG), and the execution of task nodes is completed through a special scheduling engine and a heterogeneous execution engine.
但是专门的调度引擎及异构的执行引擎在执行任务节点的过程中,存在效率低下的问题。However, there is a problem of low efficiency in the process of executing task nodes with specialized scheduling engines and heterogeneous execution engines.
发明内容SUMMARY OF THE INVENTION
本公开提供一种任务流引擎的数据处理方法、任务流引擎、设备和介质,以提高任务流系统开发的效率。The present disclosure provides a data processing method of a task flow engine, a task flow engine, a device and a medium, so as to improve the development efficiency of a task flow system.
本公开提供了一种任务流引擎的数据处理方法,所述方法包括:The present disclosure provides a data processing method for a task flow engine, the method comprising:
将领域特定语言(Domain-Specific Language,DSL)描述的任务流引擎中的任务流转换为图形化的节点依赖关系;Convert the task flow in the task flow engine described by Domain-Specific Language (DSL) into graphical node dependencies;
基于所述节点依赖关系执行多个节点中每个节点的算子逻辑,以对所述任务流引擎中的数据进行处理。The operator logic of each node in the plurality of nodes is executed based on the node dependency, so as to process the data in the task flow engine.
本公开还提供了一种任务流引擎,所述任务流引擎包括:The present disclosure also provides a task flow engine, the task flow engine includes:
转换模块,设置为将DSL描述的任务流引擎中的任务流转换为图形化的节点依赖关系;The conversion module is set to convert the task flow in the task flow engine described by the DSL into a graphical node dependency;
数据处理模块,设置为基于所述节点依赖关系执行多个节点中每个节点的算子逻辑,以对所述任务流引擎中的数据进行处理。The data processing module is configured to execute the operator logic of each node in the plurality of nodes based on the node dependency, so as to process the data in the task flow engine.
本公开还提供了一种任务流引擎设备,包括:The present disclosure also provides a task flow engine device, including:
一个或多个处理器;one or more processors;
存储器,设置为存储一个或多个程序;memory, arranged to store one or more programs;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现上述的任务流引擎的数据处理方法。When the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned data processing method of the task flow engine.
本公开还提供了一种介质,所述介质存储有计算机程序,所述计算机程序被处理器执行时实现上述任务流引擎的的数据处理方法。The present disclosure also provides a medium, where the medium stores a computer program, and when the computer program is executed by a processor, implements the data processing method of the above task flow engine.
附图说明Description of drawings
图1是本公开实施例提供的一种任务流引擎的数据处理方法的流程图;1 is a flowchart of a data processing method for a task flow engine provided by an embodiment of the present disclosure;
图2是本公开实施例提供的一种图形化的节点依赖关系的示意图;2 is a schematic diagram of a graphical node dependency provided by an embodiment of the present disclosure;
图3是本公开实施例提供的另一种任务流引擎的数据处理方法的流程图;3 is a flowchart of another data processing method of a task flow engine provided by an embodiment of the present disclosure;
图4是本公开实施例提供的一种的图形化状态监控界面的示意图;4 is a schematic diagram of a graphical state monitoring interface provided by an embodiment of the present disclosure;
图5是本公开实施例提供的另一种的图形化的节点依赖关系的示意图;5 is a schematic diagram of another graphical node dependency relationship provided by an embodiment of the present disclosure;
图6是本公开实施例提供的一种任务流引擎的结构图;6 is a structural diagram of a task flow engine provided by an embodiment of the present disclosure;
图7是本公开实施例提供的一种电子设备的结构图。FIG. 7 is a structural diagram of an electronic device provided by an embodiment of the present disclosure.
具体实施方式Detailed ways
下面将参照附图描述本公开的实施例。虽然附图中显示了本公开的一些实施例,然而,本公开可以通过多种形式来实现,而且不应该被解释为限于这里阐述的实施例,提供这些实施例是为了更加透彻和完整地理解本公开。本公开的附图及实施例仅用于示例性作用。Embodiments of the present disclosure will be described below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, the present disclosure may, however, be embodied in various forms and should not be construed as limited to the embodiments set forth herein, which are provided for a more thorough and complete understanding this disclosure. The figures and examples of the present disclosure are for illustrative purposes only.
本公开的方法实施方式中记载的多个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。The multiple steps described in the method embodiments of the present disclosure may be performed in different orders and/or in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this regard.
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。As used herein, the term "including" and variations thereof are open-ended inclusions, ie, "including but not limited to". The term "based on" is "based at least in part on." The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the description below.
本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。Concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of functions performed by these devices, modules or units relation.
本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有指出,否则应该理解为“一个或多个”。Modifications of "a" and "a plurality" mentioned in the present disclosure are illustrative rather than limiting, and those skilled in the art should understand that unless the context indicates otherwise, they should be construed as "one or more".
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。The names of messages or information exchanged between multiple devices in the embodiments of the present disclosure are only for illustrative purposes, and are not intended to limit the scope of these messages or information.
图1是本公开实施例提供的一种任务流引擎的数据处理方法的流程图,本实施例可适用于对数据任务流进行编排、处理的情况,该方法可以由任务流引擎来执行,所述任务流引擎可以通过软件和/或硬件的方式来实现。所述任务流引擎例如可以集成在终端设备中。FIG. 1 is a flowchart of a data processing method of a task flow engine provided by an embodiment of the present disclosure. This embodiment is applicable to the situation of arranging and processing data task flow. The method can be executed by a task flow engine. The task flow engine described above can be implemented by means of software and/or hardware. The task flow engine can be integrated, for example, in a terminal device.
如图1所示,本实施例提供的任务流引擎的数据处理方法主要包括步骤S11和S12。As shown in FIG. 1 , the data processing method of the task flow engine provided in this embodiment mainly includes steps S11 and S12.
S11、将DSL描述的任务流引擎中的任务流转换为图形化的节点依赖关系。S11. Convert the task flow in the task flow engine described by the DSL into a graphical node dependency.
DSL又称为领域专用语言,DSL只用在一些特定的领域。比如用来显示网页的超文本标记语言(Hyper Text Markup Language,HTML),以及Emacs所使用的Emac定位编号分离协议(Locator Identifier Separation Protocol,LISP)语言。DSL is also known as domain-specific language, DSL is only used in some specific fields. For example, the Hyper Text Markup Language (HTML) used to display web pages, and the Emac Locator Identifier Separation Protocol (LISP) language used by Emacs.
任务流(workflow)是任务流程的计算模型,即将任务流程中的工作如何前后组织在一起的逻辑和规则在计算机中以恰当的模型进行表示并对其实施计算。任务流要解决的主要问题是:为实现一个业务目标,在多个参与者之间,利用计算机,按一种预定规则自动传递。The task flow (workflow) is the calculation model of the task flow, that is, the logic and rules of how the work in the task flow is organized together before and after are represented in the computer with an appropriate model and the calculation is performed. The main problem to be solved by task flow is: in order to achieve a business goal, among multiple participants, the computer is used to automatically transfer according to a predetermined rule.
任务流的实施过程中可以包括映射和建模。映射是第一个步骤,其首要任务是确定并且文档化组织内全部现有的手工和自动化的业务流程;建模则是开发一个有助于建成流线型业务过程的模型。Mapping and modeling can be included in the implementation of task flows. Mapping is the first step whose primary task is to identify and document all existing manual and automated business processes within the organization; modeling is the development of a model that helps streamline business processes.
任务流引擎也称为工作流引擎,任务流引擎可以将任务流作为应用系统的一部分,并为应用系统提供对应用系统有决定作用的核心解决方案,该核心解决方案包括根据任务流的角色、分工和条件的不同决定的信息传递路由、内容等级等。任务流引擎一般包括流程的节点管理、流向管理、流程样例管理等重要功能。The task flow engine is also called the workflow engine. The task flow engine can take the task flow as a part of the application system and provide the application system with a core solution that has a decisive effect on the application system. The division of labor and different conditions determine the information delivery route, content level, etc. The task flow engine generally includes important functions such as process node management, flow direction management, and process sample management.
本公开实施例中的任务流主要是指用于数据处理的任务流,任务流中包含了按照一定次序执行的多个节点以及多个节点之间的依赖关系。The task flow in the embodiments of the present disclosure mainly refers to a task flow used for data processing, and the task flow includes multiple nodes executed in a certain order and dependencies between the multiple nodes.
多个节点之间的依赖关系可以理解为任务流中的为多个节点设置的执行顺序关系。例如:可以设置顺序任务流,顺序任务流的执行过程是一个连续的步骤序列,顺序任务流中,在完成一个节点的逻辑运算之后会去执行下一个节点的逻辑运算。The dependency relationship between multiple nodes can be understood as the execution sequence relationship set for multiple nodes in the task flow. For example, a sequential task flow can be set. The execution process of the sequential task flow is a continuous sequence of steps. In the sequential task flow, after the logical operation of one node is completed, the logical operation of the next node will be executed.
DSL描述的任务流是指使用DSL语言描述的任务流或者使用DSL语言定义的任务流。即使用DSL语言编程的方式来描述任务流中的每个节点中的算子逻辑和多个节点之间的依赖关系。The task flow described by the DSL refers to the task flow described using the DSL language or the task flow defined using the DSL language. That is to use DSL language programming to describe the operator logic in each node in the task flow and the dependencies between multiple nodes.
图形化的节点依赖关系可以理解为以图形化的方式来表达多个节点之间的依赖关系,从而实现建立的多个任务之间的依赖关系的可视化。Graphical node dependencies can be understood as expressing the dependencies between multiple nodes in a graphical manner, so as to realize the visualization of the dependencies between multiple established tasks.
图2是本公开实施例提供的一种图形化的节点依赖关系的示意图;如图2所示,多个节点之间的依赖关系是:节点A中的算子逻辑执行完毕之后,才能执行节点B中的算子逻辑,节点C中的算子逻辑执行完毕之后,才能执行节点D中的算子逻辑;节点D和节点B中的算子逻辑都执行完毕之后,才能执行节点E中的算子逻辑。FIG. 2 is a schematic diagram of a graphical node dependency provided by an embodiment of the present disclosure; as shown in FIG. 2 , the dependency between multiple nodes is that the node can be executed only after the operator logic in node A is executed. The operator logic in node B can only be executed after the operator logic in node C is executed; the operator logic in node D and node B can be executed only after the operator logic in node D and node B are executed. sub logic.
图2仅仅是对节点依赖关系进行示例性说明,而非限定。在实际应用中,节点依赖关系通常要复杂很多。如:第一节点要执行网络爬虫,从网络中获取海量数据,第二节点基于获取的海量数据进行模型训练等。FIG. 2 is only an exemplary illustration of the node dependency, but not a limitation. In practical applications, node dependencies are usually much more complex. For example, the first node needs to execute a web crawler to obtain massive data from the network, and the second node performs model training based on the obtained massive data.
S12、基于节点依赖关系执行多个节点中每个节点的算子逻辑,以对任务流引擎中的数据进行处理。S12. Execute the operator logic of each node in the multiple nodes based on the node dependency, so as to process the data in the task flow engine.
每个节点中包含需要执行的算子逻辑,算子逻辑是指该节点中数据处理的逻辑。例如:算子逻辑可以是将两个输入数据执行和的操作;再如:算子逻辑可以是将两个输入数据执行异或的逻辑操作。本实施例中,仅对算子逻辑进行说明,而非限定。Each node contains operator logic that needs to be executed, and operator logic refers to the logic of data processing in the node. For example, the operator logic may be the operation of performing the sum of two input data; another example: the operator logic may be the logical operation of performing the exclusive OR of the two input data. In this embodiment, only the operator logic is described, but not limited.
在本实施例中,任务流引擎的调度层基于节点依赖关系确定当前节点,并发送节点执行命令至任务流引擎的执行层,执行层基于节点执行命令执行该节点的算子逻辑。In this embodiment, the scheduling layer of the task flow engine determines the current node based on the node dependency, and sends the node execution command to the execution layer of the task flow engine, and the execution layer executes the operator logic of the node based on the node execution command.
任务流引擎的执行层首先执行任务流的首层节点,即没有其它前驱依赖的节点。产生新的事件消息,驱动下层节点的运行。The execution layer of the task flow engine first executes the first layer node of the task flow, that is, the node without other predecessor dependencies. Generate new event messages to drive the operation of lower-level nodes.
任务流引擎的调度层通过远程过程调用(Remote Procedure Call,RPC)协议向执行层发送节点执行命令。The scheduling layer of the task flow engine sends node execution commands to the execution layer through the Remote Procedure Call (RPC) protocol.
所述任务流引擎的调度层基于所述节点依赖关系确定当前节点,包括:接收到执行层发送的前驱节点执行成功的信息后,调度层基于所述节点依赖关系确定当前节点。The scheduling layer of the task flow engine determines the current node based on the node dependency relationship, including: after receiving the successful execution information of the predecessor node sent by the execution layer, the scheduling layer determines the current node based on the node dependency relationship.
调度层接收到执行层发送的前驱节点执行成功的信息后,调度层基于节点依赖关系确定当前节点,然后调度层基于当前节点的前驱节点判断是否满足当前节点执行条件;若满足所述当前节点执行条件,则执行向执行层发送节点执行命令的操作。After the scheduling layer receives the successful execution information of the predecessor node sent by the execution layer, the scheduling layer determines the current node based on the node dependency, and then the scheduling layer determines whether the current node execution condition is satisfied based on the predecessor node of the current node; condition, then execute the operation of sending the node execution command to the execution layer.
基于节点依赖关系确定当前节点的前驱节点的数量,如果前驱节点的数量是一个,则接收到1个前驱节点执行成功信息,则向执行层发送节点执行命令的操作。如果前驱节点的数量是多个,则接收到前驱节点执行成功信息数量与前驱节点的数量相等后,则向执行层发送节点执行命令的操作。The number of predecessor nodes of the current node is determined based on the node dependency. If the number of predecessor nodes is one, the execution success information of one predecessor node is received, and the operation of sending the node execution command to the execution layer. If the number of precursor nodes is more than one, after receiving the successful execution information of the precursor nodes and the number of precursor nodes equal to the number of predecessor nodes, the operation of sending the node execution command to the execution layer.
在本实施例中,执行层中的节点基于接收到的输入参数,执行该节点中的算子逻辑,得到输出参数。In this embodiment, a node in the execution layer executes the operator logic in the node based on the received input parameters to obtain output parameters.
本实施例提供的数据处理方法,包括:将DSL描述的任务流转换为图形化的节点依赖关系;基于节点依赖关系执行多个节点中每个节点的算子逻辑,以对任务流引擎中的数据进行处理。本公开实施例通过使用DSL描述数据任务流,并转换为图形化可执行的调度逻辑,降低了任务流编排、调试与运行的复杂性,提高了任务流系统开发的效率。The data processing method provided by this embodiment includes: converting the task flow described by the DSL into a graphical node dependency; executing the operator logic of each node in the multiple nodes based on the node dependency, so as to control the flow of tasks in the task flow engine. data is processed. The embodiments of the present disclosure reduce the complexity of task flow arranging, debugging and running, and improve the efficiency of task flow system development by using a DSL to describe the data task flow and convert it into a graphically executable scheduling logic.
在上述实施例的基础上,将DSL描述的任务流转换为图形化的节点依赖关系之前,还包括:使用DSL描述用于在任务流引擎中处理数据的任务流。On the basis of the above embodiment, before converting the task flow described by the DSL into a graphical node dependency, the method further includes: using the DSL to describe the task flow for processing data in the task flow engine.
在本实施例中,使用DSL描述任务流,相比于相关技术中,使用流程图编辑工具编辑任务流,降低了任务编排、调试与运行的复杂性,提高了任务流系统开发的效率。In this embodiment, the DSL is used to describe the task flow. Compared with the related art, a flowchart editing tool is used to edit the task flow, which reduces the complexity of task arrangement, debugging and running, and improves the development efficiency of the task flow system.
在任务流引擎开发系统中,任务流引擎开发系统的定义层使用DSL描述用于在任务流引擎中处理数据的任务流。In the task flow engine development system, the definition layer of the task flow engine development system uses a DSL to describe the task flow for processing data in the task flow engine.
可以使用DSL语言编辑器描述任务流,将描述好的任务流直接导入引擎开发系统的定义层。也可以在引擎开发系统的定义层直接使用DSL语言编辑任务流。本实施例中,仅对编辑位置进行说明,而非限定。You can use the DSL language editor to describe the task flow, and directly import the described task flow into the definition layer of the engine development system. You can also use the DSL language to edit the task flow directly in the definition layer of the engine development system. In this embodiment, only the editing position is described, but not limited.
使用DSL描述用于处理数据的任务流,包括:使用DSL描述每个节点的输入参数,输出参数和多个节点之间的依赖关系。Use a DSL to describe the task flow for processing data, including: using a DSL to describe the input parameters of each node, output parameters, and dependencies between multiple nodes.
上述输入参数是指该节点中执行算子逻辑所需要的参数,一个节点的输入参数可以是一个,也可以是多个。输入参数由节点中的算子逻辑来确定。上述输出参数是指该节点执行算子逻辑之后要输出的参数,一个节点的输入参数可以是一个,也可以是多个。输出参数由节点中的算子逻辑来确定。The above-mentioned input parameters refer to the parameters required to execute the operator logic in the node, and the input parameters of a node may be one or multiple. The input parameters are determined by the operator logic in the node. The above output parameters refer to the parameters to be output after the node executes the operator logic. The input parameters of a node can be one or more. The output parameters are determined by the operator logic in the node.
图3是本公开实施例提供的另一种的任务流引擎的数据处理方法的流程图。如图3所示,本实施例提供的数据处理方法主要包括步骤S21、S22、S23、S24和S25。FIG. 3 is a flowchart of another data processing method of a task flow engine provided by an embodiment of the present disclosure. As shown in FIG. 3 , the data processing method provided in this embodiment mainly includes steps S21 , S22 , S23 , S24 and S25 .
S21、将DSL描述的任务流引擎中的任务流转换为图形化的节点依赖关系。S21. Convert the task flow in the task flow engine described by the DSL into a graphical node dependency.
S22、针对每个节点,所述任务流引擎中的调度层基于所述节点依赖关系确定当前节点,并向所述任务流引擎中的执行层发送节点执行命令。S22. For each node, the scheduling layer in the task flow engine determines the current node based on the node dependency, and sends a node execution command to the execution layer in the task flow engine.
节点执行命令包括当前节点标识。当前节点是指即将要执行算子逻辑的节点,节点标识是指唯一标识节点的特征值,可以是节点名称、节点编码等。当前节点标识是指唯一标识当前节点的特征值。节点执行命令是指指示执行层执行该节点中算子逻辑的命令或者指令。Node execution commands include the current node ID. The current node refers to the node that is about to execute the operator logic, and the node identifier refers to the characteristic value that uniquely identifies the node, which can be the node name, node code, etc. The current node identifier refers to the characteristic value that uniquely identifies the current node. The node execution command refers to a command or instruction instructing the execution layer to execute the operator logic in the node.
调度层可以理解为任务流引擎开发系统进行计算机资源分配或者进行任务分配的层。执行层可以理解为任务流引擎开发系统中执行逻辑运算的层。The scheduling layer can be understood as the layer where the task flow engine development system performs computer resource allocation or task allocation. The execution layer can be understood as the layer that performs logical operations in the task flow engine development system.
如图2所示,调度层基于节点依赖关系确定当前节点,可以理解为调度层确定节点A中的算子逻辑执行完毕之后,确定当前节点是节点B;或者调度层确定节点C中的算子逻辑执行完毕之后,确定当前节点是节点D。As shown in Figure 2, the scheduling layer determines the current node based on the node dependency. It can be understood that the scheduling layer determines that the current node is node B after the operator logic in node A is executed; or the scheduling layer determines the operator in node C. After the logic is executed, it is determined that the current node is node D.
执行层首先执行任务流的首层节点,即没有其它前驱依赖的节点。产生新的事件消息,驱动下层节点的运行。The execution layer first executes the first layer node of the task flow, that is, the node without other predecessor dependencies. Generate new event messages to drive the operation of lower-level nodes.
调度层向执行层发送节点执行命令,包括:调度层通过RPC协议向执行层发送节点执行命令。The scheduling layer sends the node execution command to the execution layer, including: the scheduling layer sends the node execution command to the execution layer through the RPC protocol.
RPC协议是指一种通过网络从远程计算机程序上请求服务,而不需要了解底层网络技术的协议。即调度层在不知道调用细节的情况下,调用存在于执行层上的一个对象,就像调用本地应用程序中的对象一样。The RPC protocol refers to a protocol that requests services from a remote computer program over a network without knowing the underlying network technology. That is, the scheduling layer calls an object that exists on the execution layer without knowing the details of the call, just like calling an object in the local application.
RPC实现包括:Dubbo、Thrift、GRPC、Hetty等。在本实施例中,可以选择RPC协议中任意一种,本实施例中不进行限定。RPC implementations include: Dubbo, Thrift, GRPC, Hetty, etc. In this embodiment, any one of the RPC protocols may be selected, which is not limited in this embodiment.
本实施例中,调度层基于RPC协议与执行层完全解耦,不在相互依赖,提高任务流系统的安全性。In this embodiment, the scheduling layer is completely decoupled from the execution layer based on the RPC protocol, and does not depend on each other, thereby improving the security of the task flow system.
所述调度层基于所述节点依赖关系确定当前节点,包括:接收到执行层发送的前驱节点执行成功的信息后,调度层基于所述节点依赖关系确定当前节点。The scheduling layer determining the current node based on the node dependency includes: after receiving the successful execution information of the predecessor node sent by the execution layer, the scheduling layer determines the current node based on the node dependency.
在本实施例中,前驱节点是指当前节点之前执行的算子逻辑的节点,如图2所示,节点A是节点B的前驱节点,节点C是节点D的前驱节点,节点D和节点B是节点E的前驱节点。In this embodiment, the predecessor node refers to the node of the operator logic executed before the current node. As shown in FIG. 2 , node A is the predecessor node of node B, node C is the predecessor node of node D, node D and node B is the predecessor node of node E.
前驱节点执行成功的消息是指前驱节点执行算子逻辑,成功输出参数的消息。执行层执行当前节点中的算子逻辑,执行成功之后,向调度层返回执行成功的消息。本实施例中,调度层基于消息驱动机制处理任务节点依赖关系。The message that the predecessor node executes successfully refers to the message that the predecessor node executes the operator logic and successfully outputs the parameters. The execution layer executes the operator logic in the current node, and returns a successful execution message to the scheduling layer after successful execution. In this embodiment, the scheduling layer processes task node dependencies based on a message-driven mechanism.
例如:调度层接收到执行层发送的前驱节点A执行成功的信息后,调度层基于节点依赖关系确定当前节点是节点B;调度层接收到执行层发送的前驱节点 C执行成功的信息后,调度层基于节点依赖关系确定当前节点是节点D。For example, after the scheduling layer receives the successful execution information of the predecessor node A sent by the execution layer, the scheduling layer determines that the current node is node B based on the node dependency; The layer determines that the current node is node D based on the node dependencies.
调度层基于所述节点依赖关系确定当前节点之后,还包括:调度层基于当前节点的前驱节点判断是否满足当前节点执行条件;若满足所述当前节点执行条件,则执行向执行层发送节点执行命令的操作。After the scheduling layer determines the current node based on the node dependency relationship, the method further includes: the scheduling layer judges whether the current node execution condition is satisfied based on the predecessor node of the current node; if the current node execution condition is satisfied, executes sending a node execution command to the execution layer operation.
当前节点的执行条件是指想要执行当前节点中的算子逻辑,系统需要满足的条件。所述当前节点执行条件,包括:所述当前节点的前驱节点数量与接收到的前驱节点执行成功信息数量相等。The execution conditions of the current node refer to the conditions that the system needs to meet to execute the operator logic in the current node. The current node execution condition includes: the number of predecessor nodes of the current node is equal to the number of the received predecessor node execution success information.
在本实施例中,当一个节点的前驱依赖节点的数量大于1个时,由于无法确定前驱节点完成时间的先后顺序,需要进行消息同步,以保证当前节点收集到与前驱节点数量相同的消息数。In this embodiment, when the number of precursor-dependent nodes of a node is greater than 1, since the sequence of the completion time of the precursor nodes cannot be determined, message synchronization needs to be performed to ensure that the current node collects the same number of messages as the number of precursor nodes. .
基于节点依赖关系确定当前节点的前驱节点的数量,如果前驱节点的数量是一个,则接收到1个前驱节点执行成功信息,则向执行层发送节点执行命令的操作。如果前驱节点的数量是多个,则接收到前驱节点执行成功信息数量与前驱节点的数量相等后,则向执行层发送节点执行命令的操作。The number of predecessor nodes of the current node is determined based on the node dependency. If the number of predecessor nodes is one, the execution success information of one predecessor node is received, and the operation of sending the node execution command to the execution layer. If the number of precursor nodes is more than one, after receiving the successful execution information of the precursor nodes and the number of precursor nodes equal to the number of predecessor nodes, the operation of sending the node execution command to the execution layer.
S23、执行层执行当前节点中的算子逻辑。S23, the execution layer executes the operator logic in the current node.
本实施例中,节点中的逻辑算子是指预先定义的数据之间的逻辑关系。In this embodiment, the logical operator in the node refers to the logical relationship between predefined data.
在一个实施方式中,所述执行层执行当前节点中的算子逻辑,包括:所述执行层中的当前节点基于接收到的输入参数和当前节点中的算子逻辑得到输出参数。In one embodiment, the execution layer executes the operator logic in the current node, including: the current node in the execution layer obtains output parameters based on the received input parameters and the operator logic in the current node.
在本实施例中,对接收到的输入参数,执行节点中的算子逻辑,得到输出参数。例如:接收到两个输入参数,分别是1和2;算子逻辑是求和,则对1和2进行求和,得到当前节点的输出参数是3。In this embodiment, for the received input parameters, the operator logic in the node is executed to obtain the output parameters. For example: two input parameters are received, which are 1 and 2 respectively; the operator logic is summation, then 1 and 2 are summed, and the output parameter of the current node is 3.
算子可以是任何一种计算平台上的计算过程抽象,因此和引擎是无关的。An operator can be an abstraction of the computing process on any computing platform, so it is independent of the engine.
所述当前节点基于接收到的输入参数和当前节点中的算子逻辑得到输出参数之后,还包括:通过所述输入参数的哈希签名保存输出参数,将保存的输出参数作为所述输入参数对应的缓存结果。After the current node obtains the output parameters based on the received input parameters and the operator logic in the current node, the method further includes: saving the output parameters through the hash signature of the input parameters, and using the saved output parameters as the corresponding input parameters cached results.
哈希(Hash)签名是最主要的一种数字签名方法,也称之为数字摘要法(Digital Digest)或数字指纹法(Digital Finger Print)。数字摘要就是采用单项Hash函数将需要加密的明文“摘要”成一串固定长度(127位)的密文,这一串密文又称为数字指纹,它有固定的长度,而且不同的明文摘要成密文,其结果总是不同的,而同样的明文的摘要必定一致。常见的哈希算法包括:第二版消息摘要算法(Message Digest Algorithm 2,MD2),第四版消息摘要算法(Message  Digest Algorithm 4,MD4),第五版消息摘要算法(Message Digest Algorithm 5,MD5),HAVAL,安全散列算法(Secure Hash Algorithm,SHA)等。Hash signature is the most important digital signature method, also known as Digital Digest or Digital Finger Print. Digital digest is to use a single Hash function to "digest" the plaintext to be encrypted into a string of fixed-length (127-bit) ciphertext. This string of ciphertext is also called digital fingerprint, which has a fixed length, and different plaintext digests are Ciphertext, the result is always different, and the digest of the same plaintext must be consistent. Common hash algorithms include: Message Digest Algorithm 2, MD2, version 2, Message Digest Algorithm 4, MD4, version 4, Message Digest Algorithm 5, MD5, version 5 ), HAVAL, Secure Hash Algorithm (SHA), etc.
在本实施例中,将采用输入参数的哈希签名保存的执行结果即输出参数做为节点的输入参数对应的缓存结果。在当前输入参数与节点的一历史输入参数相同的情况下,任务节点直接输出该历史输入参数对应的缓存结果作为当前输出参数。In this embodiment, the execution result saved by using the hash signature of the input parameter, that is, the output parameter is used as the cached result corresponding to the input parameter of the node. When the current input parameter is the same as a historical input parameter of the node, the task node directly outputs the cached result corresponding to the historical input parameter as the current output parameter.
在本实施中,还可以设置缓存开关,若缓存开关打开,则在当前输入参数与节点的一历史输入参数相同的情况下,任务节点直接输出该历史输入参数对应的缓存结果作为当前输出参数。若缓存开关关闭,则任务节点基于当前输入参数和算子逻辑进行计算,确定当前输出参数。In this implementation, a cache switch can also be set. If the cache switch is turned on, if the current input parameter is the same as a historical input parameter of the node, the task node directly outputs the cached result corresponding to the historical input parameter as the current output parameter. If the cache switch is closed, the task node performs calculations based on the current input parameters and operator logic to determine the current output parameters.
在另一个实施例方式中,所述执行层执行当前节点中的算子逻辑,包括:所述执行层的当前节点接收输入参数;检测是否存在与输入参数相同的缓存参数;若存在与输入参数相同的缓存参数,则直接将所述缓存参数对应的缓存结果确定为输出参数。In another embodiment, the execution layer executes the operator logic in the current node, including: the current node of the execution layer receives the input parameter; detects whether there is a cache parameter that is the same as the input parameter; If the same cache parameter is used, the cache result corresponding to the cache parameter is directly determined as the output parameter.
在本实施例中,接收到输入参数之后,可以先查询是否存在与输入参数相同的缓存参数,如果存在与输入参数相同的缓存参数,则表示节点曾经基于该输入参数执行过算子逻辑,并得到输出参数,作为缓存结果进行了缓存。此时,可以直接读取缓存参数对应的缓存结果,作为该输入参数对应的输出参数,进行输出。这样,可以避免节点频繁执行算子逻辑,导致执行层数据量过大,减低执行效率的问题,提高系统的运行效率。In this embodiment, after receiving the input parameter, you can first query whether there is a cache parameter that is the same as the input parameter. If there is a cache parameter that is the same as the input parameter, it means that the node has executed the operator logic based on the input parameter. Get the output parameter, which is cached as the cached result. At this time, the cached result corresponding to the cached parameter can be directly read, and outputted as the output parameter corresponding to the input parameter. In this way, frequent execution of operator logic by nodes can be avoided, resulting in an excessively large amount of data at the execution layer, reducing execution efficiency, and improving system operation efficiency.
S24、所述执行层判断当前节点中的算子逻辑执行是否结束。S24. The execution layer judges whether the execution of the operator logic in the current node ends.
所述当前节点中的算子逻辑执行结束包括如下一个或多个:所述当前节点的算子逻辑执行成功;所述当前节点的算子逻辑执行时长超过预设时长;所述当前节点的算子逻辑重复执行次数超过预设次数。The completion of the execution of the operator logic in the current node includes one or more of the following: the execution of the operator logic of the current node is successful; the execution duration of the operator logic of the current node exceeds a preset duration; the operator logic of the current node is executed. The number of repeated executions of the sub-logic exceeds the preset number of times.
S25、若所述当前节点中的算子逻辑执行结束,则所述执行层向调度层发送当前节点执行结束的消息。S25. If the execution of the operator logic in the current node ends, the execution layer sends a message that the execution of the current node ends to the scheduling layer.
当前节点执行结束的消息包括:算子逻辑执行成功的消息和算子逻辑执行失败的消息。The message that the execution of the current node ends includes: a message that the operator logic is successfully executed and a message that the operator logic fails to be executed.
执行成功可以理解为节点执行算子逻辑,并能输出正确结果。如果确定当前节点的算子逻辑执行成功,则确定当前节点中的算子逻辑执行结束,向调度层发送当前节点执行成功的消息。Successful execution can be understood as the node executing the operator logic and outputting the correct result. If it is determined that the execution of the operator logic of the current node is successful, it is determined that the execution of the operator logic in the current node ends, and a message that the execution of the current node is successful is sent to the scheduling layer.
执行失败可以理解为节点执行算子逻辑,未能输出正确结果。如果当前节点的算子逻辑执行时长超过预设时长,或者当前节点的算子逻辑重复执行次数 超过预设次数,则确定当前节点中的算子逻辑执行结束,向调度层发送当前节点执行失败的消息。其中,预设时长和预设次数均可以根据实际情况进行设置。Execution failure can be understood as the node executing the operator logic and failing to output the correct result. If the execution time of the operator logic of the current node exceeds the preset time, or the number of repeated executions of the operator logic of the current node exceeds the preset number of times, it is determined that the execution of the operator logic in the current node has ended, and the execution failure of the current node is sent to the scheduling layer. information. The preset duration and the preset number of times can be set according to actual conditions.
如果是向调度层发送当前节点执行成功的消息,则调度层接收到执行层发送的前驱节点执行成功的信息后,调度层基于所述节点依赖关系确定当前节点。如果是向调度层发送当前节点执行失败的消息,则调度层基于执行失败的消息,检测失败的原因,并尝试进行修复。If the message that the current node executes successfully is sent to the scheduling layer, after the scheduling layer receives the successful execution information of the predecessor node sent by the execution layer, the scheduling layer determines the current node based on the node dependency. If the current node execution failure message is sent to the scheduling layer, the scheduling layer detects the cause of the failure based on the execution failure message, and tries to repair it.
在本实施例中,通过用户配置预设时长和预设次数自动执行节点中的算子逻辑,这样,可以避免节点中出现错误,无数次的执行算子逻辑的问题,提高系统的鲁棒性。In this embodiment, the operator logic in the node is automatically executed by configuring the preset duration and the preset number of times by the user, so that errors in the node and the problem of executing the operator logic countless times can be avoided, and the robustness of the system can be improved. .
在上述实施例的基础上,基于节点依赖关系,执行每个节点中的算子逻辑之后,还包括:获取所述每个节点的执行状态,并将所述每个节点的执行状态显示在图形化状态监控界面中的所述每个节点上。On the basis of the above embodiment, after executing the operator logic in each node based on the node dependency, the method further includes: acquiring the execution state of each node, and displaying the execution state of each node on a graph on each node described in the state monitoring interface.
如图4所示,在图形化状态监控界面中显示每个节点的执行状态,例如:服务(server)节点的执行状态是监听(listening),数据输出(Data Export)节点的执行状态是结束(finished),数据增强(Data Augumentation)节点的执行状态是finished,预处理(Preprocess)节点的执行状态是运行中(running)。这样可以使得工作人员方便的了解每个节点的执行状态。As shown in Figure 4, the execution status of each node is displayed in the graphical status monitoring interface. For example, the execution status of the server node is listening, and the execution status of the Data Export node is ending ( finished), the execution status of the Data Augmentation node is finished, and the execution status of the Preprocess node is running. This allows the staff to easily understand the execution status of each node.
在一个应用性示例中,为了实现e=(a+b)×(c-d)这样的一个任务流,需要使用DSL语言定义三个算子:即和(add)、差(subtract)、乘(multiply)。定义每个算子的输入参数、输出参数。算子的依赖关系:multiply需要依赖add和subtract两个算子;以及每个算子的输入参数与该算子依赖的算子的执行结果之间的映射关系。In an application example, in order to implement a task flow such as e=(a+b)×(c-d), three operators need to be defined using DSL language: namely, add, subtract, multiply ). Define the input parameters and output parameters of each operator. Dependency of operators: multiply needs to depend on two operators, add and subtract; and the mapping relationship between the input parameters of each operator and the execution results of the operators that the operator depends on.
通过将DSL语言定义的任务流描述,解析成一个图形化的表示,如图5所示。在初始配置消息的驱动下,引擎首先执行任务流的首层节点,即没有其它前驱依赖的节点,如图5中的add节点和subtract节点。首层节点执行完毕后,产生新的事件消息,驱动下层节点(如multiply)的运行。By parsing the task flow description defined by the DSL language into a graphical representation, as shown in Figure 5. Driven by the initial configuration message, the engine first executes the first layer node of the task flow, that is, the node without other precursor dependencies, such as the add node and the subtract node in Figure 5. After the first layer node is executed, a new event message is generated to drive the operation of the lower layer node (such as multiply).
当一个节点的前驱依赖节点的数量大于1个时,由于无法确定前驱节点完成时间的先后顺序,需要进行消息同步,以保证当前节点收集到与前驱节点数量相同的消息数。When the number of precursor dependent nodes of a node is greater than one, since the sequence of the completion time of the predecessor nodes cannot be determined, message synchronization is required to ensure that the current node collects the same number of messages as the number of predecessor nodes.
执行层中的任务节点通常包含一个算子,通过RPC传入的参数进行算子逻辑的运行,并返回约定的参数结果至调度层。The task node in the execution layer usually includes an operator, which runs the operator logic through the parameters passed in by RPC, and returns the agreed parameter results to the scheduling layer.
图6是本公开实施例提供的一种任务流引擎的结构图,本实施例可适用于对数据任务流进行编排、处理的情况,所述任务流引擎可以通过软件和/或硬件的方式来实现。所述任务流引擎例如可以集成在终端设备中。FIG. 6 is a structural diagram of a task flow engine provided by an embodiment of the present disclosure. This embodiment is applicable to the situation of arranging and processing data task flow, and the task flow engine can be generated by software and/or hardware. accomplish. The task flow engine can be integrated, for example, in a terminal device.
如图6所示,本实施例提供的任务流引擎主要包括转换模块61、数据处理模块62。As shown in FIG. 6 , the task flow engine provided in this embodiment mainly includes a conversion module 61 and a data processing module 62 .
转换模块61,设置为将DSL描述的任务流引擎中的任务流转换为图形化的节点依赖关系;数据处理模块62,设置为基于所述节点依赖关系执行多个节点中每个节点的算子逻辑,以对任务流引擎中的数据进行处理。The conversion module 61 is configured to convert the task flow in the task flow engine described by the DSL into a graphical node dependency; the data processing module 62 is configured to execute the operator of each node in the multiple nodes based on the node dependency Logic to process data in the task flow engine.
本公开实施例提供任务流引擎,执行如下操作:将DSL描述的任务流转换为图形化的节点依赖关系;基于节点依赖关系执行多个节点中每个节点的算子逻辑,以对任务流引擎中的数据进行处理。本公开实施例通过使用DSL描述数据任务流,并转换为图形化可执行的调度逻辑,降低了任务流编排、调试与运行的复杂性,提高了任务流系统开发的效率。The embodiments of the present disclosure provide a task flow engine, which performs the following operations: converts the task flow described by the DSL into a graphical node dependency; data in for processing. The embodiments of the present disclosure reduce the complexity of task flow arranging, debugging and running, and improve the efficiency of task flow system development by using a DSL to describe the data task flow and convert it into a graphically executable scheduling logic.
将DSL描述的任务流转换为图形化的节点依赖关系之前,还包括:使用DSL描述用于处理数据的任务流。Before converting the task flow described by the DSL into graphical node dependencies, it also includes: using the DSL to describe the task flow for processing data.
所述使用DSL描述用于处理数据的任务流,包括:使用DSL描述所述任务流中每个节点的输入参数,输出参数和多个节点之间的依赖关系。The using the DSL to describe the task flow for processing data includes: using the DSL to describe the input parameters, output parameters and dependencies between multiple nodes of each node in the task flow.
基于所述节点依赖关系,执行多个节点中每个节点的算子逻辑,包括:针对每个节点,所述任务流引擎中的调度层基于所述节点依赖关系确定当前节点,并向所述任务流引擎中的执行层发送节点执行命令,其中,节点执行命令包括当前节点标识;执行层执行当前节点中的算子逻辑。Based on the node dependency relationship, executing the operator logic of each node in the plurality of nodes includes: for each node, the scheduling layer in the task flow engine determines the current node based on the node dependency relationship, and reports to the node. The execution layer in the task flow engine sends a node execution command, wherein the node execution command includes the current node identifier; the execution layer executes the operator logic in the current node.
调度层向执行层发送节点执行命令,包括:所述调度层通过RPC协议向执行层发送节点执行命令。The scheduling layer sending the node execution command to the execution layer includes: the scheduling layer sends the node execution command to the execution layer through the RPC protocol.
所述调度层基于所述节点依赖关系确定当前节点,包括:接收到执行层发送的前驱节点执行成功的信息后,调度层基于所述节点依赖关系确定当前节点。The scheduling layer determining the current node based on the node dependency includes: after receiving the successful execution information of the predecessor node sent by the execution layer, the scheduling layer determines the current node based on the node dependency.
调度层所述节点依赖关系确定当前节点之后,还包括:所述调度层基于当前节点的前驱节点判断是否满足当前节点执行条件;若满足所述当前节点执行条件,则执行所述调度层向执行层发送节点执行命令的操作。After the node dependency relationship of the scheduling layer determines the current node, the method further includes: the scheduling layer judges whether the execution condition of the current node is satisfied based on the predecessor node of the current node; if the execution condition of the current node is satisfied, executing the execution condition of the scheduling layer. The layer sends the action of the node to execute the command.
所述当前节点执行条件,包括:所述当前节点的前驱节点数量与接收到的前驱节点执行成功信息数量相等。The current node execution condition includes: the number of predecessor nodes of the current node is equal to the number of the received predecessor node execution success information.
所述执行层执行当前节点中的算子逻辑,包括:所述执行层中的当前节点基于接收到的输入参数和当前节点中的算子逻辑得到输出参数。The execution layer executes the operator logic in the current node, including: the current node in the execution layer obtains output parameters based on the received input parameters and the operator logic in the current node.
所述当前节点基于接收到的输入参数和当前节点中的算子逻辑得到输出参数之后,还包括:所述执行层中的当前节点通过所述输入参数的哈希签名保存输出参数,将保存的所述输出参数作为所述输入参数对应的缓存结果。After the current node obtains the output parameters based on the received input parameters and the operator logic in the current node, the method further includes: the current node in the execution layer saves the output parameters through the hash signature of the input parameters, and saves the saved output parameters. The output parameter is used as the cached result corresponding to the input parameter.
所述执行层执行当前节点中的算子逻辑,包括:所述执行层的当前节点接收输入参数;检测是否存在与输入参数相同的缓存参数;若存在与输入参数相同的缓存参数,则直接将所述缓存参数对应的缓存结果确定为输出参数。The execution layer executes the operator logic in the current node, including: the current node of the execution layer receives the input parameter; detects whether there is a cache parameter that is the same as the input parameter; if there is a cache parameter that is the same as the input parameter, directly The cached result corresponding to the cached parameter is determined as the output parameter.
所述执行层执行当前节点中的算子逻辑之后,还包括:所述执行层判断当前节点中的算子逻辑执行是否结束;若所述当前节点中的算子逻辑执行结束,则所述执行层向调度层发送当前节点执行结束的消息。After the execution layer executes the operator logic in the current node, the method further includes: the execution layer determines whether the execution of the operator logic in the current node ends; if the execution of the operator logic in the current node ends, the execution The layer sends a message that the execution of the current node is over to the scheduling layer.
所述当前节点中的算子逻辑执行结束包括如下一个或多个:The execution end of the operator logic in the current node includes one or more of the following:
所述当前节点的算子逻辑执行成功;所述当前节点的算子逻辑执行时长超过预设时长;所述当前节点的算子逻辑重复执行次数超过预设次数。The execution of the operator logic of the current node is successful; the execution duration of the operator logic of the current node exceeds the preset duration; the repeated execution times of the operator logic of the current node exceeds the preset number of times.
基于所述节点依赖关系,执行多个节点中每个节点的算子逻辑之后,还包括:获取所述每个个节点的执行状态,并将所述每个节点的执行状态显示在图形化状态监控界面中的所述每个节点上。After executing the operator logic of each node in the plurality of nodes based on the node dependency, the method further includes: acquiring the execution state of each node, and displaying the execution state of each node in a graphical state on each node in the monitoring interface.
本实施例所提供的任务流引擎可执行本公开任意实施例所提供任务流引擎的数据处理方法,具备执行任务流引擎的数据处理方法相应的功能模块和效果。The task flow engine provided in this embodiment can execute the data processing method of the task flow engine provided by any embodiment of the present disclosure, and has functional modules and effects corresponding to executing the data processing method of the task flow engine.
下面参考图7,其示出了适于用来实现本公开实施例的电子设备(例如图7中的终端设备或服务端)700的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、个人数字助理(Personal Digital Assistant,PDA)、平板电脑(PAD)、便携式多媒体播放器(Portable Media Player,PMP)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字(Television,TV)、台式计算机等等的固定终端。图7示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Referring next to FIG. 7 , it shows a schematic structural diagram of an electronic device (eg, a terminal device or a server in FIG. 7 ) 700 suitable for implementing an embodiment of the present disclosure. Terminal devices in the embodiments of the present disclosure may include, but are not limited to, such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (Personal Digital Assistants, PDAs), tablet computers (PADs), and portable multimedia players (Portable Media Players). , PMP), in-vehicle terminals (eg, in-vehicle navigation terminals), and other mobile terminals, as well as fixed terminals such as digital (Television, TV), desktop computers, and the like. The electronic device shown in FIG. 7 is only an example, and should not impose any limitation on the function and scope of use of the embodiments of the present disclosure.
如图7所示,电子设备700可以包括处理装置(例如中央处理器、图形处理器等)701,其可以根据存储在只读存储器(Read-Only Memory,ROM)702中的程序或者从存储装置707加载到随机访问存储器(Random Access Memory,RAM)703中的程序而执行多种适当的动作和处理。在RAM 703中,还存储有电子设备700操作所需的多种程序和数据。处理装置701、ROM 702以及RAM 703通过总线704彼此相连。输入/输出(Input/Output,I/O)接口705也连接至总线704。As shown in FIG. 7 , the electronic device 700 may include a processing device (eg, a central processing unit, a graphics processor, etc.) 701, which may be based on a program stored in a read-only memory (Read-Only Memory, ROM) 702 or from a storage device 707 programs loaded into Random Access Memory (RAM) 703 to perform various appropriate actions and processes. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An Input/Output (I/O) interface 705 is also connected to the bus 704 .
通常,以下装置可以连接至I/O接口705:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置708;包括例如液晶显示器(Liquid Crystal Display,LCD)、扬声器、振动器等的输出装置707;包括例如磁带、硬盘等的存储装置708;以及通信装置709。通信装置709可以允许电子设备700与其他设备进行无线或有线通信以交换数据。虽然图7示出了具有多种装置的电子设备700,但是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。Typically, the following devices may be connected to the I/O interface 705: input devices 708 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a Liquid Crystal Display (LCD) Output device 707 , speaker, vibrator, etc.; storage device 708 , including, for example, magnetic tape, hard disk, etc.; and communication device 709 . Communication means 709 may allow electronic device 700 to communicate wirelessly or by wire with other devices to exchange data. Although FIG. 7 shows an electronic device 700 having various means, it is not required to implement or have all of the illustrated means. More or fewer devices may alternatively be implemented or provided.
根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置709从网络上被下载和安装,或者从存储装置708被安装,或者从ROM 702被安装。在该计算机程序被处理装置701执行时,执行本公开实施例的方法中限定的上述功能。According to embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network via the communication device 709, or from the storage device 708, or from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are executed.
本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、RAM、ROM、可擦式可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、射频(Radio Frequency,RF)等等,或者上述的任意合适的组合。The computer-readable medium described above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. Examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, RAM, ROM, Erasable Programmable Read-Only Memory (EPROM) or flash memory), optical fiber, portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In this disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device . The program code embodied on the computer-readable medium may be transmitted by any suitable medium, including but not limited to: electric wire, optical fiber cable, radio frequency (RF), etc., or any suitable combination of the above.
在一些实施方式中,客户端、服务端可以利用诸如超文本传输协议(HyperText Transfer Protocol,HTTP)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络) 互连。通信网络的示例包括局域网(Local Area Network,LAN),广域网(Wide Area Network,WAN),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。In some embodiments, the client and server can use any currently known or future developed network protocols such as HyperText Transfer Protocol (HTTP) to communicate, and can communicate with digital data in any form or medium. Data communications (eg, communications networks) interconnect. Examples of communication networks include Local Area Networks (LANs), Wide Area Networks (WANs), the Internet (eg, the Internet), and peer-to-peer networks (eg, ad hoc peer-to-peer networks), as well as any currently Known or future developed networks.
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or may exist alone without being assembled into the electronic device.
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device:
将DSL描述的任务流转换为图形化的节点依赖关系;基于所述节点依赖关系执行多个节点中每个节点的算子逻辑,以对任务流引擎中的数据进行处理。The task flow described by the DSL is converted into a graphical node dependency; the operator logic of each node in the multiple nodes is executed based on the node dependency, so as to process the data in the task flow engine.
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务端上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括LAN或WAN—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for performing operations of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and This includes conventional procedural programming languages - such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. Where a remote computer is involved, the remote computer may be connected to the user's computer through any kind of network, including a LAN or WAN, or may be connected to an external computer (eg, using an Internet service provider to connect through the Internet).
附图中的流程图和框图,图示了按照本公开多种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在一种情况下并不构成对该单元本身的限定。The units involved in the embodiments of the present disclosure may be implemented in a software manner, and may also be implemented in a hardware manner. Among them, the name of the unit does not constitute a limitation of the unit itself in one case.
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门 阵列(Field Programmable Gate Array,FPGA)、专用集成电路(Application Specific Integrated Circuit,ASIC)、专用标准产品(Application Specific Standard Parts,ASSP)、片上系统(System on Chip,SOC)、复杂可编程逻辑设备(Complex Programmable Logic Device,CPLD)等等。The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (Application Specific Standard Products) Standard Parts, ASSP), system on chip (System on Chip, SOC), complex programmable logic device (Complex Programmable Logic Device, CPLD) and so on.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、RAM、ROM、EPROM或快闪存储器、光纤、CD-ROM、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with the instruction execution system, apparatus or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any suitable combination of the foregoing. Examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer disks, hard disks, RAM, ROM, EPROM or flash memory, optical fibers, CD-ROMs, optical storage devices, magnetic storage devices, or Any suitable combination of the above.
根据本公开的一个或多个实施例,提供了一种任务流引擎的数据处理方法/任务流引擎/设备/介质,包括:According to one or more embodiments of the present disclosure, a data processing method/task flow engine/device/medium of a task flow engine is provided, including:
将DSL描述的任务流引擎中的任务流转换为图形化的节点依赖关系;基于所述节点依赖关系执行多个节点中每个节点的算子逻辑,以对任务流引擎中的数据进行处理。The task flow in the task flow engine described by the DSL is converted into a graphical node dependency; the operator logic of each node in the multiple nodes is executed based on the node dependency to process the data in the task flow engine.
根据本公开的一个或多个实施例,提供了一种任务流引擎的数据处理方法/任务流引擎/设备/介质,在所述将DSL描述的在任务流引擎中任务流转换为图形化的节点依赖关系之前,还包括:According to one or more embodiments of the present disclosure, there is provided a data processing method/task flow engine/device/medium of a task flow engine, in which the task flow described in the DSL is converted into a graphical one in the task flow engine Before node dependencies, also include:
使用DSL描述用于在所述任务流引擎中处理数据的所述任务流。The task flow for processing data in the task flow engine is described using a DSL.
根据本公开的一个或多个实施例,提供了一种任务流引擎的数据处理方法/任务流引擎/设备/介质,所述使用DSL描述用于在所述任务流引擎中处理数据的所述任务流,包括:According to one or more embodiments of the present disclosure, there is provided a data processing method/task flow engine/device/medium of a task flow engine, which describes the method for processing data in the task flow engine using a DSL Task flow, including:
使用DSL描述所述任务流中每个节点的输入参数,输出参数和所述多个节点之间的依赖关系。A DSL is used to describe the input parameters of each node in the task flow, the output parameters and the dependencies among the plurality of nodes.
根据本公开的一个或多个实施例,提供了一种任务流引擎的数据处理方法/任务流引擎/设备/介质,所述基于所述节点依赖关系,执行多个节点中每个节点的算子逻辑,包括:According to one or more embodiments of the present disclosure, there is provided a data processing method/task flow engine/device/medium for a task flow engine, wherein based on the node dependency relationship, a computation of each node in a plurality of nodes is performed. Sub logic, including:
所述任务流引擎中的调度层基于所述节点依赖关系确定当前节点,并向所述任务流引擎中的执行层发送节点执行命令,其中,所述节点执行命令包括当前节点标识;所述执行层执行所述当前节点中的算子逻辑。The scheduling layer in the task flow engine determines the current node based on the node dependency, and sends a node execution command to the execution layer in the task flow engine, wherein the node execution command includes the current node identifier; the execution The layer executes the operator logic in the current node.
根据本公开的一个或多个实施例,提供了一种任务流引擎的数据处理方法/任务流引擎/设备/介质,所述任务流引擎中的调度层向所述任务流引擎中的执行层发送节点执行命令,包括:According to one or more embodiments of the present disclosure, there is provided a data processing method/task flow engine/device/medium of a task flow engine, where a scheduling layer in the task flow engine reports to an execution layer in the task flow engine Send node execution commands, including:
所述调度层通过RPC协议向所述执行层发送所述节点执行命令。The scheduling layer sends the node execution command to the execution layer through the RPC protocol.
根据本公开的一个或多个实施例,提供了一种任务流引擎的数据处理方法/任务流引擎/设备/介质,所述调度层基于所述节点依赖关系确定当前节点,包括:According to one or more embodiments of the present disclosure, a data processing method/task flow engine/device/medium of a task flow engine is provided, wherein the scheduling layer determines the current node based on the node dependency, including:
接收到执行层发送的前驱节点执行成功的信息后,调度层基于所述节点依赖关系确定所述当前节点。After receiving the successful execution information of the predecessor node sent by the execution layer, the scheduling layer determines the current node based on the node dependency.
根据本公开的一个或多个实施例,提供了一种任务流引擎的数据处理方法/任务流引擎/设备/介质,在所述调度层基于所述节点依赖关系确定当前节点之后,还包括:According to one or more embodiments of the present disclosure, a data processing method/task flow engine/device/medium of a task flow engine is provided, after the scheduling layer determines the current node based on the node dependency, further comprising:
所述调度层基于所述当前节点的前驱节点判断是否满足当前节点执行条件;若满足所述当前节点执行条件,则执行所述调度层向所述执行层发送所述节点执行命令的操作。The scheduling layer judges whether the execution condition of the current node is satisfied based on the predecessor node of the current node; if the execution condition of the current node is satisfied, the operation of sending the execution command of the node to the execution layer by the scheduling layer is performed.
根据本公开的一个或多个实施例,提供了一种邮件处理方法/装置/系统,所述当前节点执行条件,包括:According to one or more embodiments of the present disclosure, a mail processing method/device/system is provided, and the current node execution condition includes:
所述当前节点的前驱节点数量与接收到的前驱节点执行成功信息数量相等。The number of predecessor nodes of the current node is equal to the number of the received predecessor node execution success information.
根据本公开的一个或多个实施例,提供了一种任务流引擎的数据处理方法/任务流引擎/设备/介质,所述执行层执行当前节点中的算子逻辑,包括:According to one or more embodiments of the present disclosure, a data processing method/task flow engine/device/medium of a task flow engine is provided, wherein the execution layer executes the operator logic in the current node, including:
所述执行层中的所述当前节点基于接收到的输入参数和所述当前节点中的算子逻辑得到输出参数。The current node in the execution layer obtains output parameters based on the received input parameters and operator logic in the current node.
根据本公开的一个或多个实施例,提供了一种邮件处理方法/装置/系统,在所述当前节点基于接收到的输入参数和所述当前节点中的算子逻辑得到输出参数之后,还包括:According to one or more embodiments of the present disclosure, a mail processing method/device/system is provided, after the current node obtains output parameters based on the received input parameters and the operator logic in the current node, further include:
所述执行层中的所述当前节点通过所述输入参数的哈希签名保存所述输出参数,将保存的所述输出参数作为所述输入参数对应的缓存结果。The current node in the execution layer saves the output parameter through the hash signature of the input parameter, and uses the saved output parameter as a cached result corresponding to the input parameter.
根据本公开的一个或多个实施例,提供了一种任务流引擎的数据处理方法/任务流引擎/设备/介质,所述执行层执行当前节点中的算子逻辑,包括:According to one or more embodiments of the present disclosure, a data processing method/task flow engine/device/medium of a task flow engine is provided, wherein the execution layer executes the operator logic in the current node, including:
所述执行层的当前节点接收输入参数;检测是否存在与所述输入参数相同的缓存参数;若存在与所述输入参数相同的缓存参数,则直接将所述缓存参数对应的缓存结果确定为输出参数。The current node of the execution layer receives the input parameter; detects whether there is a cache parameter that is the same as the input parameter; if there is a cache parameter that is the same as the input parameter, directly determines the cache result corresponding to the cache parameter as the output parameter.
根据本公开的一个或多个实施例,提供了一种任务流引擎的数据处理方法/ 任务流引擎/设备/介质,所述执行层执行当前节点中的算子逻辑之后,还包括:According to one or more embodiments of the present disclosure, a data processing method/task flow engine/device/medium of a task flow engine is provided. After executing the operator logic in the current node, the execution layer further includes:
所述执行层判断当前节点中的算子逻辑执行是否结束;若所述当前节点中的算子逻辑执行结束,则所述执行层向所述调度层发送当前节点执行结束的消息。The execution layer judges whether the execution of the operator logic in the current node ends; if the execution of the operator logic in the current node ends, the execution layer sends a message of the execution end of the current node to the scheduling layer.
根据本公开的一个或多个实施例,提供了一种任务流引擎的数据处理方法/任务流引擎/设备/介质,所述当前节点中的算子逻辑执行结束包括如下一个或多个:According to one or more embodiments of the present disclosure, a data processing method/task flow engine/device/medium of a task flow engine is provided, where the completion of the execution of the operator logic in the current node includes one or more of the following:
所述当前节点的算子逻辑执行成功;所述当前节点的算子逻辑执行时长超过预设时长;所述当前节点的算子逻辑重复执行次数超过预设次数。The execution of the operator logic of the current node is successful; the execution duration of the operator logic of the current node exceeds the preset duration; the repeated execution times of the operator logic of the current node exceeds the preset number of times.
根据本公开的一个或多个实施例,提供了一种任务流引擎的数据处理方法/任务流引擎/设备/介质,所述基于所述节点依赖关系,执行多个节点中每个节点的算子逻辑之后,还包括:According to one or more embodiments of the present disclosure, there is provided a data processing method/task flow engine/device/medium for a task flow engine, wherein based on the node dependency relationship, a computation of each node in a plurality of nodes is performed. After the sub logic, also include:
获取所述每个节点的执行状态,并将所述每个节点的执行状态显示在图形化状态监控界面中的所述每个节点上。The execution status of each node is acquired, and the execution status of each node is displayed on each node in the graphical status monitoring interface.
此外,虽然采用特定次序描绘了多个操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了多个实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的一些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的多种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。Additionally, although operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while the above discussion contains several implementation details, these should not be construed as limitations on the scope of the present disclosure. Some features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.

Claims (17)

  1. 一种任务流引擎的数据处理方法,包括:A data processing method for a task flow engine, comprising:
    将领域特定语言DSL描述的任务流引擎中的任务流转换为图形化的节点依赖关系;Convert the task flow in the task flow engine described by the domain-specific language DSL into a graphical node dependency;
    基于所述节点依赖关系执行多个节点中每个节点的算子逻辑,以对所述任务流引擎中的数据进行处理。The operator logic of each node in the plurality of nodes is executed based on the node dependency, so as to process the data in the task flow engine.
  2. 根据权利要求1所述的方法,在所述将DSL描述的任务流引擎中的任务流转换为图形化的节点依赖关系之前,还包括:The method according to claim 1, before converting the task flow in the task flow engine described by the DSL into a graphical node dependency, further comprising:
    使用DSL描述用于在所述任务流引擎中处理数据的所述任务流。The task flow for processing data in the task flow engine is described using a DSL.
  3. 根据权利要求2所述的方法,其中,所述使用DSL描述用于在所述任务流引擎中处理数据的所述任务流,包括:3. The method of claim 2, wherein said using a DSL to describe the task flow for processing data in the task flow engine comprises:
    使用DSL描述所述任务流中每个节点的输入参数,输出参数和所述多个节点之间的依赖关系。A DSL is used to describe the input parameters of each node in the task flow, the output parameters and the dependencies among the plurality of nodes.
  4. 根据权利要求1所述的方法,其中,基于所述节点依赖关系,执行多个节点中每个节点的算子逻辑,包括:The method of claim 1, wherein, based on the node dependencies, executing the operator logic of each node in the plurality of nodes comprises:
    所述任务流引擎中的调度层基于所述节点依赖关系确定当前节点,并向所述任务流引擎中的执行层发送节点执行命令,其中,所述节点执行命令包括当前节点标识;The scheduling layer in the task flow engine determines the current node based on the node dependency, and sends a node execution command to the execution layer in the task flow engine, wherein the node execution command includes the current node identifier;
    所述执行层执行所述当前节点中的算子逻辑。The execution layer executes the operator logic in the current node.
  5. 根据权利要求4所述的方法,其中,所述任务流引擎中的调度层向所述任务流引擎中的执行层发送节点执行命令,包括:The method according to claim 4, wherein the scheduling layer in the task flow engine sends a node execution command to the execution layer in the task flow engine, comprising:
    所述调度层通过远程过程调用RPC协议向所述执行层发送所述节点执行命令。The scheduling layer sends the node execution command to the execution layer through the remote procedure call RPC protocol.
  6. 根据权利要求4所述的方法,其中,所述调度层基于所述节点依赖关系确定当前节点,包括:The method of claim 4, wherein the scheduling layer determines the current node based on the node dependency, comprising:
    接收到所述执行层发送的前驱节点执行成功的信息后,所述调度层基于所述节点依赖关系确定所述当前节点。After receiving the successful execution information of the predecessor node sent by the execution layer, the scheduling layer determines the current node based on the node dependency.
  7. 根据权利要求4所述的方法,在所述调度层基于所述节点依赖关系确定当前节点之后,还包括:The method according to claim 4, after the scheduling layer determines the current node based on the node dependency, further comprising:
    所述调度层基于所述当前节点的前驱节点判断是否满足当前节点执行条件;The scheduling layer judges whether the current node execution condition is satisfied based on the predecessor node of the current node;
    响应于满足所述当前节点执行条件,执行所述调度层向所述执行层发送所 述节点执行命令的操作。In response to satisfying the current node execution condition, an operation of the scheduling layer sending the node execution command to the execution layer is performed.
  8. 根据权利要求7所述的方法,其中,所述当前节点执行条件,包括:The method according to claim 7, wherein the current node execution condition comprises:
    所述当前节点的前驱节点数量与接收到的前驱节点执行成功信息数量相等。The number of predecessor nodes of the current node is equal to the number of the received predecessor node execution success information.
  9. 根据权利要求4所述的方法,其中,所述执行层执行当前节点中的算子逻辑,包括:The method according to claim 4, wherein the execution layer executes the operator logic in the current node, comprising:
    所述执行层中的所述当前节点基于接收到的输入参数和所述当前节点中的算子逻辑得到输出参数。The current node in the execution layer obtains output parameters based on the received input parameters and operator logic in the current node.
  10. 根据权利要求9所述的方法,在所述执行层中的所述当前节点基于接收到的输入参数和所述当前节点中的算子逻辑得到输出参数之后,还包括:The method according to claim 9, after the current node in the execution layer obtains output parameters based on the received input parameters and the operator logic in the current node, further comprising:
    所述执行层中的所述当前节点通过所述输入参数的哈希签名保存所述输出参数,将保存的所述输出参数作为所述输入参数对应的缓存结果。The current node in the execution layer saves the output parameter through the hash signature of the input parameter, and uses the saved output parameter as a cached result corresponding to the input parameter.
  11. 根据权利要求4所述的方法,其中,所述执行层执行当前节点中的算子逻辑,包括:The method according to claim 4, wherein the execution layer executes the operator logic in the current node, comprising:
    所述执行层的当前节点接收输入参数;The current node of the execution layer receives input parameters;
    检测是否存在与所述输入参数相同的缓存参数;Detecting whether there is a cache parameter that is the same as the input parameter;
    响应于存在与所述输入参数相同的缓存参数,直接将所述缓存参数对应的缓存结果确定为输出参数。In response to the existence of the same cache parameter as the input parameter, the cache result corresponding to the cache parameter is directly determined as the output parameter.
  12. 根据权利要求4所述的方法,其中,所述执行层执行当前节点中的算子逻辑之后,还包括:The method according to claim 4, wherein after the execution layer executes the operator logic in the current node, it further comprises:
    所述执行层判断当前节点中的算子逻辑执行是否结束;The execution layer judges whether the execution of the operator logic in the current node ends;
    响应于所述当前节点中的算子逻辑执行结束的情况下,所述执行层向所述调度层发送当前节点执行结束的消息。In response to a situation in which the execution of the operator logic in the current node ends, the execution layer sends a message that the execution of the current node ends to the scheduling layer.
  13. 根据权利要求12所述的方法,其中,所述当前节点中的算子逻辑执行结束包括如下至少一个:The method according to claim 12, wherein the completion of the execution of the operator logic in the current node comprises at least one of the following:
    所述当前节点的算子逻辑执行成功;The operator logic of the current node is successfully executed;
    所述当前节点的算子逻辑执行时长超过预设时长;The execution duration of the operator logic of the current node exceeds the preset duration;
    所述当前节点的算子逻辑重复执行次数超过预设次数。The number of repeated executions of the operator logic of the current node exceeds the preset number of times.
  14. 根据权利要求1所述的方法,其中,所述基于所述节点依赖关系,执行多个节点中每个节点的算子逻辑之后,还包括:The method according to claim 1, wherein after executing the operator logic of each node in the plurality of nodes based on the node dependency, the method further comprises:
    获取所述每个节点的执行状态,并将所述每个节点的执行状态显示在图形 化状态监控界面中的所述每个节点上。Acquire the execution status of each node, and display the execution status of each node on each node in the graphical status monitoring interface.
  15. 一种任务流引擎,包括:A task flow engine including:
    转换模块,设置为将领域特定语言DSL描述的任务流引擎中的任务流转换为图形化的节点依赖关系;The conversion module is set to convert the task flow in the task flow engine described by the domain-specific language DSL into a graphical node dependency;
    数据处理模块,设置为基于所述节点依赖关系执行多个节点中每个节点的算子逻辑,以对所述任务流引擎中的数据进行处理。The data processing module is configured to execute the operator logic of each node in the plurality of nodes based on the node dependency, so as to process the data in the task flow engine.
  16. 一种任务流引擎的数据处理设备,包括:A data processing device for a task flow engine, comprising:
    至少一个处理器;at least one processor;
    存储器,设置为存储至少一个程序;a memory, arranged to store at least one program;
    当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如权利要求1-14任一项所述的任务流引擎的数据处理方法。When the at least one program is executed by the at least one processor, the at least one processor implements the data processing method of the task flow engine according to any one of claims 1-14.
  17. 一种计算机存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-14任一项所述的任务流引擎的数据处理方法。A computer storage medium storing a computer program, when the computer program is executed by a processor, the data processing method of the task flow engine according to any one of claims 1-14 is implemented.
PCT/CN2021/134268 2020-12-25 2021-11-30 Data processing method for task flow engine, and task flow engine, device and medium WO2022135079A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011564198.8A CN112685154A (en) 2020-12-25 2020-12-25 Data processing method of task flow engine, device and medium
CN202011564198.8 2020-12-25

Publications (1)

Publication Number Publication Date
WO2022135079A1 true WO2022135079A1 (en) 2022-06-30

Family

ID=75453256

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/134268 WO2022135079A1 (en) 2020-12-25 2021-11-30 Data processing method for task flow engine, and task flow engine, device and medium

Country Status (2)

Country Link
CN (1) CN112685154A (en)
WO (1) WO2022135079A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116302396A (en) * 2023-02-13 2023-06-23 上海浦东发展银行股份有限公司 Distributed task scheduling method based on directed acyclic
CN117610320A (en) * 2024-01-23 2024-02-27 中国人民解放军国防科技大学 Directed acyclic graph workflow engine cyclic scheduling method, device and equipment
CN117634866A (en) * 2024-01-25 2024-03-01 中国人民解放军国防科技大学 Method, device, equipment and medium for processing data among nodes of workflow scheduling engine

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112685154A (en) * 2020-12-25 2021-04-20 北京有竹居网络技术有限公司 Data processing method of task flow engine, device and medium
CN113377348B (en) * 2021-06-10 2024-06-28 平安科技(深圳)有限公司 Task adjusting method applied to task engine, related device and storage medium
CN113407321B (en) * 2021-06-18 2023-07-25 斑马网络技术有限公司 Task type session management framework, equipment and storage medium based on computational graph
CN113918298B (en) * 2021-10-12 2024-05-14 北京字节跳动网络技术有限公司 Multimedia data processing method, system and equipment
CN114564547A (en) * 2022-02-10 2022-05-31 阿里云计算有限公司 Data processing method, device, equipment and storage medium
CN114610418A (en) * 2022-03-15 2022-06-10 上海爱数信息技术股份有限公司 Digital content processing method, device, electronic equipment, storage medium and product
CN114595067A (en) * 2022-03-18 2022-06-07 北京百度网讯科技有限公司 Workflow node execution method, device, equipment and storage medium
CN114610200B (en) * 2022-03-23 2024-08-23 深圳海星智驾科技有限公司 Intelligent control method and device for engineering mechanical equipment and engineering mechanical equipment
CN114625757B (en) * 2022-03-29 2023-03-24 医渡云(北京)技术有限公司 Task execution method and device based on domain specific language, medium and equipment
CN117806787A (en) * 2022-09-26 2024-04-02 华为技术有限公司 Electronic device, distributed system and task scheduling method
CN117033027B (en) * 2023-08-18 2024-10-15 百度(中国)有限公司 Data processing method, device, electronic equipment and medium
CN117472553B (en) * 2023-12-28 2024-05-03 中移(苏州)软件技术有限公司 Workflow processing method, device, processing equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110297632A (en) * 2019-06-12 2019-10-01 百度在线网络技术(北京)有限公司 Code generating method and device
CN110427252A (en) * 2019-06-18 2019-11-08 平安银行股份有限公司 Method for scheduling task, device and the storage medium of task based access control dependence
US20200379998A1 (en) * 2019-05-31 2020-12-03 Ankit Dixit Systems and Methods for Determining Peak Memory Requirements in SQL Processing Engines with Concurrent Subtasks
CN112685154A (en) * 2020-12-25 2021-04-20 北京有竹居网络技术有限公司 Data processing method of task flow engine, device and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110609675B (en) * 2018-06-14 2023-08-08 中兴通讯股份有限公司 Workflow modeling method and device and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200379998A1 (en) * 2019-05-31 2020-12-03 Ankit Dixit Systems and Methods for Determining Peak Memory Requirements in SQL Processing Engines with Concurrent Subtasks
CN110297632A (en) * 2019-06-12 2019-10-01 百度在线网络技术(北京)有限公司 Code generating method and device
CN110427252A (en) * 2019-06-18 2019-11-08 平安银行股份有限公司 Method for scheduling task, device and the storage medium of task based access control dependence
CN112685154A (en) * 2020-12-25 2021-04-20 北京有竹居网络技术有限公司 Data processing method of task flow engine, device and medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116302396A (en) * 2023-02-13 2023-06-23 上海浦东发展银行股份有限公司 Distributed task scheduling method based on directed acyclic
CN116302396B (en) * 2023-02-13 2023-09-01 上海浦东发展银行股份有限公司 Distributed task scheduling method based on directed acyclic
CN117610320A (en) * 2024-01-23 2024-02-27 中国人民解放军国防科技大学 Directed acyclic graph workflow engine cyclic scheduling method, device and equipment
CN117610320B (en) * 2024-01-23 2024-04-02 中国人民解放军国防科技大学 Directed acyclic graph workflow engine cyclic scheduling method, device and equipment
CN117634866A (en) * 2024-01-25 2024-03-01 中国人民解放军国防科技大学 Method, device, equipment and medium for processing data among nodes of workflow scheduling engine
CN117634866B (en) * 2024-01-25 2024-04-19 中国人民解放军国防科技大学 Method, device, equipment and medium for processing data among nodes of workflow scheduling engine

Also Published As

Publication number Publication date
CN112685154A (en) 2021-04-20

Similar Documents

Publication Publication Date Title
WO2022135079A1 (en) Data processing method for task flow engine, and task flow engine, device and medium
US11188380B2 (en) Method and apparatus for processing task in smart device
CN109523187B (en) Task scheduling method, device and equipment
WO2020029971A1 (en) Processing method and device for payment process, medium and electronic device
US20080127124A1 (en) Converged call flow and web service application integration using a processing engine
CN112114979A (en) Remote procedure call method and device
WO2020119804A1 (en) Page view display method, apparatus, device and storage medium
US7966625B2 (en) Extending web service description language for SIP/call flow interactions
JP2011118587A (en) System for executing cooperative service by plurality of servers
CN111930709B (en) Data storage method, apparatus, electronic device, and computer readable medium
US20210149678A1 (en) Fault-Tolerant Execution of Command Pipeline Steps
WO2023093016A1 (en) Cloud code development system, method, and apparatus, device, and storage medium
WO2024124789A1 (en) File processing method and apparatus, server, and medium
CN110868324A (en) Service configuration method, device, equipment and storage medium
CN111338813B (en) Method, device, medium and electronic equipment for dynamically generating middleware
US11249793B2 (en) Executing a pipeline command sequence designed for execution on a single node across a fleet of nodes
CN112256372B (en) Information processing method and device and electronic equipment
WO2024001240A1 (en) Task integration method and apparatus for multiple technology stacks
CN113672671A (en) Method and device for realizing data processing
Sax et al. Aeolus: An optimizer for distributed intra-node-parallel streaming systems
CN111414161B (en) Method, device, medium and electronic equipment for generating IDL file
CN111399902B (en) Client source file processing method and device, readable medium and electronic equipment
CN113961330A (en) Distributed timing task execution method, device, equipment and computer readable medium
CN114327404A (en) File processing method and device, electronic equipment and computer readable medium
CN113760262A (en) Task processing method, device, computer system and computer readable storage medium

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: 21909078

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: 21909078

Country of ref document: EP

Kind code of ref document: A1