A data pipeline orchestration method, apparatus, storage medium, and terminal device

By reading and applying data flow orchestration configuration files between the main processor and the AI ​​coprocessor chip, creating and setting corresponding objects, the cross-platform data flow orchestration problem is solved, and efficient data processing and flexible data flow connection are achieved.

CN114691380BActive Publication Date: 2025-06-13SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202011611320.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-29
Publication Date
2025-06-13
Estimated Expiration
2040-12-29

AI Technical Summary

Technical Problem

It is difficult for the prior art to realize cross-platform data flow orchestration between the main processor and the AI ​​coprocessor chip.

Method used

By reading the preset data flow orchestrating configuration files, create container objects on the host side, and create and set corresponding objects based on the communication link, thread and connection configuration information in the configuration file to establish a data flow connection between the host side and the slave side.

Benefits of technology

It realizes cross-platform data flow orchestration between the main processor and the AI ​​coprocessor chip, and can establish data flow connections according to preset configuration files, thereby improving the efficiency and flexibility of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114691380B_ABST
    Figure CN114691380B_ABST
Patent Text Reader

Abstract

This application belongs to the field of chip technology, and particularly relates to a data stream scheduling method, apparatus, computer-readable storage medium, and terminal device. The method includes: reading a preset data stream scheduling configuration file; creating a container object for data stream scheduling at the host side; creating a communication link object between the host side and the slave side within the container object according to the communication link configuration information in the configuration file; creating data processing thread objects at the host side and the slave side respectively according to the thread configuration information in the configuration file; establishing a data stream connection between each data processing thread object according to the connection configuration information in the configuration file, wherein a data stream connection is established between the data processing thread objects of the host side and the slave side through the communication link object; setting the input port and output port of the container object according to the input-output configuration information in the configuration file, so as to realize cross-platform data stream scheduling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of chip technology, and particularly relates to a data stream scheduling method, apparatus, computer-readable storage medium, and terminal device. Background Art

[0002] With the popularization of various Artificial Intelligence (AI) chips, the AI co-processor chip solution has gradually become the main application scenario of the solution in the field of artificial intelligence. However, the existing data stream scheduling methods mainly target the data stream scheduling within a single platform, and it is difficult to achieve cross-platform data stream scheduling between the main processor and the AI co-processor chip. Summary of the Invention

[0003] In view of this, embodiments of this application provide a data stream scheduling method, apparatus, computer-readable storage medium, and terminal device to solve the problem that the existing data stream scheduling methods mainly target the data stream scheduling within a single platform and it is difficult to achieve cross-platform data stream scheduling between the main processor and the AI co-processor chip.

[0004] The first aspect of the embodiments of this application provides a data stream scheduling method, which may include:

[0005] Read a preset data stream scheduling configuration file;

[0006] Create a container object for data stream scheduling at the host side;

[0007] Create a communication link object between the host side and the slave side within the container object according to the communication link configuration information in the configuration file;

[0008] Create data processing thread objects at the host side and the slave side respectively according to the thread configuration information in the configuration file;

[0009] Establish a data stream connection between each data processing thread object according to the connection configuration information in the configuration file, wherein a data stream connection is established between the data processing thread object at the host side and the data processing thread object at the slave side through the communication link object;

[0010] Set the input port and output port of the container object according to the input / output configuration information in the configuration file to complete data stream scheduling.

[0011] Further, the creating data processing thread objects at the host side and the slave side respectively according to the thread configuration information in the configuration file includes:

[0012] Call the thread management module on the host side to create a data processing thread object on the host side;

[0013] Call the thread management module on the slave side through the remote procedure call module to create a data processing thread object on the slave side.

[0014] Further, after creating data processing thread objects on the host side and the slave side respectively according to the thread configuration information in the configuration file, it further includes:

[0015] Call the attribute setting function in the thread base class on the host side to set the attributes of the data processing thread object on the host side;

[0016] Call the attribute setting function in the thread base class on the slave side through the remote procedure call module to set the attributes of the data processing thread object on the slave side.

[0017] Further, establishing a data flow connection between each data processing thread object according to the connection configuration information in the configuration file includes:

[0018] Call the input / output function in the thread base class on the host side to establish a data flow connection between the data processing thread objects on the host side;

[0019] Call the input / output function in the thread base class on the slave side through the remote procedure call module to establish a data flow connection between the data processing thread objects on the slave side;

[0020] Establish a data flow connection between the data processing thread object on the host side and the data processing thread object on the slave side through the communication link object.

[0021] Further, establishing a data flow connection between the data processing thread object on the host side and the data processing thread object on the slave side through the communication link object includes:

[0022] Connect the output port of the source thread object to the sending port of the communication link object; the source thread object is the data flow output party among the data processing thread objects on the host side and the data processing thread objects on the slave side;

[0023] Set the remote flag bit of the output port of the source thread object;

[0024] Read the task queue pointer of the input port of the destination thread object through the remote procedure call module and assign this pointer to the remote task queue pointer of the output port of the source thread object; the destination thread object is the data flow input party among the data processing thread objects on the host side and the data processing thread objects on the slave side;

[0025] Read the task type of the input port of the target thread object through the remote procedure call module, and assign the task type to the task type of the output port of the source thread object;

[0026] Set the remote flag bit of the input port of the target thread object through the remote procedure call module.

[0027] Further, after completing the data pipeline scheduling, it further includes:

[0028] Input a data processing task to the container object through the input port of the container object;

[0029] Drive the container object to process the data processing task to obtain a task processing result corresponding to the data processing task;

[0030] Output the task processing result through the output port of the container object.

[0031] Further, the driving the container object to process the data processing task includes:

[0032] Serialize the first data processing task through the output port of the source thread object, form a second data processing task according to the serialized first data processing task, the remote task queue and the task type, and send the second data processing task to the sending port of the communication link object; the source thread object is the data flow output party among the data processing thread objects of the host side and the data processing thread objects of the slave side;

[0033] Receive the second data processing task through the sending port of the communication link object, and send the second data processing task to the task queue of the input port of the target thread object; the target thread object is the data flow input party among the data processing thread objects of the host side and the data processing thread objects of the slave side;

[0034] Deserialize the second data processing task through the input port of the target thread object, and send the deserialized second data processing task to the data processing function of the target thread object for processing.

[0035] The second aspect of the embodiments of the present application provides a data pipeline scheduling device, which may include each functional module for implementing any one of the above data pipeline scheduling methods.

[0036] The third aspect of the embodiments of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, it implements the steps of any one of the above data pipeline scheduling methods.

[0037] In a fourth aspect of the embodiments of the present application, a terminal device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of any of the above data stream scheduling methods are implemented.

[0038] In a fifth aspect of the embodiments of the present application, a computer program product is provided. When the computer program product runs on a terminal device, the terminal device is caused to execute the steps of any of the above data stream scheduling methods.

[0039] The beneficial effects of the embodiments of the present application compared with the prior art are as follows: The embodiments of the present application read a preset data stream scheduling configuration file; create a container object for data stream scheduling at the host end; create a communication link object between the host end and the slave end within the container object according to the communication link configuration information in the configuration file; create data processing thread objects at the host end and the slave end respectively according to the thread configuration information in the configuration file; establish a data stream connection between each data processing thread object according to the connection configuration information in the configuration file, wherein a data stream connection is established between the data processing thread object at the host end and the data processing thread object at the slave end through the communication link object; set the input port and output port of the container object according to the input-output configuration information in the configuration file to complete data stream scheduling. Through the embodiments of the present application, a data stream connection can be established between the host end such as the main processor and the slave end such as the AI co-processor chip according to a preset configuration file, so as to realize cross-platform data stream scheduling. Description of the Drawings

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0041] Figure 1 It is a schematic diagram of a specific implementation environment of the embodiments of the present application;

[0042] Figure 2 It is a schematic diagram of a task queue for inter-thread task communication;

[0043] Figure 3 It is a schematic diagram of a thread base class;

[0044] Figure 4 It is a schematic diagram of thread registration;

[0045] Figure 5 Schematic diagram of a point-to-point channel between the host and slave ends;

[0046] Figure 6 Flowchart of an embodiment of a data pipelining and scheduling method in an embodiment of the present application;

[0047] Figure 7 Schematic diagram of the data flow connection between data processing thread objects at the host end;

[0048] Figure 8 Schematic diagram for backward and forward compatibility of data processing threads;

[0049] Figure 9 Schematic diagram of the data flow connection between a data processing thread object at the host end and a data processing thread object at the slave end;

[0050] Figure 10 Schematic diagram of a specific example of data pipelining and scheduling;

[0051] Figure 11 Structural diagram of an embodiment of a data pipelining and scheduling device in an embodiment of the present application;

[0052] Figure 12 Schematic block diagram of a terminal device in an embodiment of the present application. Detailed implementation manners

[0053] To make the objectives, features, and advantages of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the embodiments described below are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0054] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.

[0055] It should also be understood that the terms used in this specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this specification of the present application and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to include the plural forms.

[0056] It should also be further understood that the term "and / or" as used in the specification and appended claims of this application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0057] As used in this specification and the appended claims, the term "if" can be interpreted as "when", "once", "in response to determining", or "in response to detecting" depending on the context. Similarly, the phrase "if determined" or "if [the described condition or event] is detected" can be interpreted as meaning "once determined", "in response to determining", "once [the described condition or event] is detected", or "in response to detecting [the described condition or event]" depending on the context.

[0058] In addition, in the description of this application, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and should not be construed as indicating or implying relative importance.

[0059] Figure 1 The figure shows a schematic diagram of a specific implementation environment of a data stream scheduling method provided by an embodiment of this application. This implementation environment may include a host side (denoted as Host) and a slave side (denoted as Device). Among them, the host side is generally a main processor based on X86 or ARM, and the slave side is generally a device for specific purposes, such as an AI co-processor chip, etc.

[0060] In the embodiments of the present application, cross-platform data pipeline choreography between the host side and the slave side can be implemented through a preset container interface. Here, the container for data pipeline choreography is denoted as De::Graph. In existing computer technologies, a container is generally regarded as a special class, that is, an abstract template for various specific objects. In specific applications, a class can be instantiated according to the actual scenario to generate an object of the class. Here, the container object generated by instantiating De::Graph is denoted as Graph. De::Graph can use an external module, the thread management module (denoted as NodeWrapper), to manage data processing threads (denoted as Node), and can use an external module, the link management module (denoted as P2P ChannelWrapper), to manage cross-platform communication links (denoted as Bridge). Among them, the thread management module has a global entity object on both the host side and the slave side, denoted as HostNodeWrapper and Device NodeWrapper respectively, which manage the Node types registered on the host side / slave side and are responsible for the dynamic creation and deletion of Node objects; P2P ChannelWrapper is set on the host side and is responsible for the dynamic creation and deletion of the point-to-point channel (denoted as P2P Channel) between the host side and the slave side.

[0061] In the embodiments of the present application, a task queue (denoted as TaskQueue) as shown in Figure 2 can be used to communicate tasks (denoted as Task) between threads. The task queue internally uses a fixed-size first-in-first-out (FIFO) queue to save the Task information between threads. The Task information includes Task type information and the pointer information of the Task. As shown in Figure 2 the example, sending threads A and B dynamically allocate Task objects in the heap space, send tasks Task X and Y through the task queue object, and receiving thread C sequentially reads and processes the Tasks from the task queue object. The Task type is represented by a numerical value, and the type information of the Task pointer is agreed. After processing, the Task object is released in the heap space. If the FIFO queue of the task queue is full when the sending thread sends a task, then the sending thread will be blocked until the receiving thread removes the Task from the FIFO queue; if the FIFO queue of the task queue is empty when the receiving thread receives a task, then the receiving thread will be blocked waiting for the sending thread to send a Task.

[0062] In the embodiments of the present application, a thread input class (denoted as PIN) can be used to assist a thread in reading input tasks (denoted as input task) from a task queue. The PIN object may include the following information:

[0063] (1) A task queue object for Task communication between threads.

[0064] (2) Information about the types of input tasks supported by the thread. This type information is marked with a string of the type name (guaranteed to be globally unique). For example, if PIN supports two task types (denoted as task type), namely struct A in namespace X and struct B in namespace Y, then PIN sets the type information through the functions SetTypeInfo(0, "X::A") and SetTypeInfo(1, "Y::B"), indicating that the thread supports the pointer information of Task objects of X::A and Y::B in the task queue. If the task type is 0, it represents the pointer of an object of type X::A, and if the task type is 1, it represents the pointer of an object of type Y::B.

[0065] (3) Information about the Task deletion function in the task queue, which is used to release the Task pointer object of the task queue object when the PIN object is destructed.

[0066] In the embodiments of the present application, a thread output class (denoted as POUT) can be used to assist a thread in sending output tasks (denoted as output task). Each POUT object only allows one type of task to be output. The POUT object may include the following information:

[0067] (1) Pointer information of the task queue. If it is empty, it means that the POUT is dangling and task output is not allowed.

[0068] (2) Information about the types of output tasks supported by the thread. This type information is uniquely marked with a global type string. For example, if POUT supports the task type of struct A in namespace X, then POUT sets the type information through the function SetTypeInfo("X::A").

[0069] In the embodiments of the present application, a thread base class (denoted as NodeBase) as shown in Figure 3 can be used to abstract the common behaviors and properties of threads. The thread base class may include:

[0070] (1) One PIN object for reading received messages of the thread. The thread reads the input task from the PIN, parses the Task pointer information according to the type identifier (denoted as type id), and calls the task processing function (denoted as Proc) to process the task.

[0071] (2) Sixteen POUT objects for sending output messages of the thread. Each POUT only supports one type of output for the task processing function to output the output task.

[0072] (3) General property configuration parameters, as well as the interfaces of the setting function (denoted as Set) and the getting function (denoted as Get). The properties are set in key-value format. Among them, the key is of string type, and the value supports int, float, and string types. The properties are used to control the internal processing of the task processing function of the thread. For example, the function Set(“min.face.pixel”,48) of the base class can be called to set the minimum face parameter, and the minimum face parameter set by the user can be obtained through int min_face = Get(“min.face.pixel”).

[0073] (4) The task processing function of the thread reads and processes the input task using the PIN, and can send the output task through the POUT after processing.

[0074] (5) The start function (denoted as start) and the stop function (denoted as stop) of the thread are used to control the start and stop of the thread.

[0075] Nodes communicate through a task queue, and the task queue stores general void* pointers. It depends on the task type in the task queue to indicate how to parse the void* pointer task. In the embodiments of the present application, the task processing function of the Node defines the meaning of the type value of the task type, and the PIN object of the Node stores the type relationship of the task type. For example, during the design phase, it can be defined that the type “X::A” that the Node can process has a task type value of 0, and it can also be defined that the type “Y::B” that the Node can process has a task type value of 1.

[0076] Figure 4The following is a schematic diagram of Node registration. First, the required Node class (denoted as NodeClass) can be extended based on the thread base class. The task type information of PIN / POUT is injected into the constructor of the thread base class to implement the task processing function of the user's own input tasks. Then, the type information of NodeClass can be registered through the registration center (denoted as NodeRegister). The registration information records the string name of NodeClass, the creation function of NodeClass (denoted as new), and the deletion function (denoted as delete). Finally, the thread management module provides unified functions for creating and deleting Node objects. According to the registered string name of NodeClass, NodeClass objects are dynamically created / released.

[0077] In the embodiment of the present application, the P2P Channel can be divided into a channel from the host side to the slave side and a channel from the slave side to the host side, and data can be efficiently transmitted to the opposite end.

[0078] Take Figure 5 the channel from the host side to the slave side shown as an example. The P2P Channel may include:

[0079] (1) The task queue of the P2P sending thread on the host side, which is used to receive task (Task) sending requests from other threads on the host side. The content of the sent Task includes: the task queue information of the slave side, the serialized code stream information of the Task, and the Task type information. Among them, the Task type information is used to notify the slave side how to deserialize the received code stream information.

[0080] (2) The P2P sending thread on the host side (denoted as P2P TxChannel), which is used to take out the Task from the task queue and packetize and send it;

[0081] (3) The P2P receiving thread on the slave side (denoted as P2P RxChannel), which is used to receive the data packet and unpack it. After unpacking, the received task queue of the Task and the Task type information are obtained and pushed into the corresponding task queue on the slave side.

[0082] The P2P Channel from the slave side to the host side is similar. Only the slave side and the host side in the above content need to be interchanged, and the embodiment of the present application will not elaborate on this.

[0083] Bridge is an encapsulation based on the P2P Channel and is used for the general data transmission communication of serialized Tasks between the host side and the slave side. It can send serialized Tasks to the task queue of the peer through the P2P sending port (denoted as P2P TxPort) of the P2P Channel.

[0084] In the embodiment of the present application, De::Graph can be internally divided into the following independent modules:

[0085] (1) Thread creation / destruction module (denoted as Node Create / Destroy): This module creates or destroys Node objects according to the location of the Node specified by the user (host side or slave side); if the Node is on the host side, then call the Host NodeWrapper for processing; if the Node is on the slave side, then call the Device NodeWrapper on the slave side through the Remote Procedure Call (RPC) module for processing.

[0086] (2) Thread attribute setting module (denoted as NodeAttrs): The thread base class provides common key-value configurations for the threads derived from it, which are used to specify various attributes used in the processing of the threads. For any one of these attributes, there is a key value corresponding to this attribute. If the Node is on the host side, then call the Set / Get function interfaces of the local thread base class; if the Node is on the slave side, then call the Set / Get function interfaces of the thread base class through the remote procedure call module.

[0087] (3) Communication link creation / destruction module (denoted as Bridge Create / Destroy): This module calls the external P2PChannelWrapper to create / destroy cross-platform communication links.

[0088] (4) Thread connection module (denoted as NodesLink): This module is responsible for connecting the PIN and POUT between any threads.

[0089] Please refer to Figure 6 , an embodiment of a data pipeline orchestration method in the embodiment of the present application may include:

[0090] Step S601, read a preset data pipeline orchestration configuration file.

[0091] The configuration file can be pre-set by the user, and it may include the following information:

[0092] (1) Thread configuration information, which includes the string name of NodeClass and the string name of the Node object.

[0093] (2) Thread property configuration information, including the Node object string, the string name of the key in the configuration properties of the Node object, and the target value corresponding to the key (which can be an integer / floating point / string constant).

[0094] (3) Connection information between threads, including the string name of the source Node object of the connection, the POUT index number of the source Node object, and the string name of the destination Node object. Among them, the source Node object is the data stream output side, and the destination Node object is the data stream input side. Since there may be multiple POUTs in the same Node object, in order to facilitate its distinction, for any one POUT in the same Node object, a unique identifier can be set for it, that is, the POUT index number.

[0095] (4) Input and output information of the container object, including the input index number of the Graph and the string name of the input Node object, the output index number of the Graph and the string name of the output Node object, and the POUT index number of the output Node object. Since there may be multiple inputs in the Graph, in order to facilitate its distinction, for any one input in the Graph, a unique identifier can be set for it, that is, the input index number of the Graph; similarly, since there may be multiple outputs in the Graph, in order to facilitate its distinction, for any one output in the Graph, a unique identifier can be set for it, that is, the output index number of the Graph.

[0096] (5) Communication link configuration information, and connection information between threads through the communication link.

[0097] All of the above information is of constant type, and its data structure is designed as a json format (supporting standard json serialization / deserialization). In this way, the configuration method of reading data stream orchestration can be achieved through an offline json file, and the entire data stream orchestration process can be reconstructed. Users can also modify the configuration file according to the actual situation, and can obtain the required data stream orchestration without recompiling a new data stream orchestration.

[0098] Step S602: Create a container object for data stream orchestration on the host side.

[0099] Step S603: Create a communication link object between the host side and the slave side in the container object according to the communication link configuration information in the configuration file.

[0100] That is, create a Bridge object within the Graph container object. Graph supports Bridges between one host side and multiple slave sides, but does not support establishing Bridges between slave sides. In the embodiments of the present application, the following interfaces can be called to create a Bridge object:

[0101] graph->CreateBridge(Dev0, “chan#0”, Bridge0, {“mode”: H2D}), that is, create chan#0 from the host side to the slave side Dev0, and the index of the Bridge is 0;

[0102] graph->CreateBridge(Dev1, “chan#6”, Bridge3, {“mode”: D2H}), that is, create chan#6 from the slave side Dev1 to the host side, and the index of the Bridge is 3.

[0103] Step S604: Create data processing thread objects on the host side and the slave side respectively according to the thread configuration information in the configuration file.

[0104] Specifically, for the host side, Host NodeWrapper can be called to dynamically create a Node object on the host side according to the string name of NodeClass and the string name of the Node object. In the embodiments of the present application, assuming that in the thread configuration information, the string name of NodeClass is NodeA and the string name of the Node object is node-a, the following interface can be called to create a Node object:

[0105] graph->CreateHostNode(“NodeA”, “node-a”), that is, call Host NodeWrapper to create an object node-a of class NodeA.

[0106] For the slave side, the Device NodeWrapper can be called through the remote procedure call module to dynamically create a Node object on the slave side according to the string name of NodeClass and the string name of the Node object. In the embodiments of the present application, assuming that in the thread configuration information, the string name of NodeClass is NodeB and the string name of the Node object is node-b, the following interface can be called to create a Node object:

[0107] graph->CreateDevNode(Dev1, "NodeB", "node-b"), that is, create an object node-b of class NodeB through the Device NodeWrapper of slave Dev1 by RPC call.

[0108] Through the above process, data processing thread objects can be created on the host side and the slave side respectively according to the preset configuration file, that is, the creation of cross-platform data processing thread objects is realized.

[0109] Furthermore, the attributes of the Node object can also be set according to the thread attribute configuration information in the configuration file. For the host side, the setting function in the thread base class of the host side can be called to set the attributes of the Node object on the host side; for the slave side, the setting function in the thread base class of the slave side can be called through the remote procedure call module to set the attributes of the Node object on the slave side. In the embodiment of the present application, assume that in the thread configuration information, the string name of the Node object is node-a, the string name of the key in the configuration attributes of the Node object is resize_ratio, and the target value corresponding to this key is 0.5. Then the following interface can be called to set the attributes of the Node object:

[0110] graph->SetNodeAttr("node-a", "resize_ratio", 0.5), that is, set the value of the attribute "resize_ratio" of the node-a object to 0.5. In the internal implementation process, the location of the node-a object (host side or slave side) will be searched first. If it is on the host side, the setting function in the thread base class will be directly called for setting. If it is on the slave side, the corresponding slave device number will be found first, and then the setting function in the corresponding thread base class of the slave side will be called through the remote procedure call module for setting.

[0111] Through the above process, the attributes of the data processing thread objects can be set on the host side and the slave side respectively according to the preset configuration file, that is, the cross-platform setting of the attributes of the data processing thread objects is realized.

[0112] Step S605: Establish data flow connections between the respective data processing thread objects according to the connection configuration information in the configuration file.

[0113] The data flow connections between the respective Node objects can be divided into the following situations:

[0114] (1) Connection of Node objects on the host side: Specifically, according to the connection configuration information, the PIN and POUT in the thread base class of the host side can be directly called to establish data flow connections between the Node objects on the host side.

[0115] First, establish the connection relationship of the task queue: According to the string name of the source Node object and the POUT index number of the source Node object in the connection configuration information, the POUT of the unique source Node object can be determined. According to the string name of the destination Node object in the connection configuration information, the PIN of the unique destination Node object can be determined. After determining both, the task queue object pointer of the POUT of the source Node object X can be pointed to the task queue object of the PIN of the destination Node object Y; then, perform the type check and association of the Task: As Figure 7 In the example in, the PIN of the destination Node object Y defines the received Task types and received Task type identifiers that it can handle. The POUT[2] of the source Node object X defines the Task type information it sends. The POUT[2] object of the source Node object X will query whether the destination Node object Y supports the Task type information of "X::A". If a match is found and a valid task type identifier (type 0) is returned, it means that the connection between the POUT and the PIN is valid. The source Node object X carries the type identifier 0 of the sent task when sending a task to the task queue through POUT[2].

[0116] (2) Connection of the Node objects on the slave side: Remotely call the PIN and POUT in the thread base class on the slave side through the remote procedure call module to establish a data flow connection between the Node objects on the slave side.

[0117] The situation on the slave side is similar to that on the master side. For details, please refer to the description of the master side above and will not be elaborated here.

[0118] (3) Connection between the Node object on the master side and the Node object on the slave side: Establish a data flow connection between the Node object on the master side and the Node object on the slave side through the Bridge object.

[0119] In the embodiments of the present application, the Node type needs to be compatible with the connection methods of the front and rear Nodes. As Figure 8 shown, the Node type on the PIN needs to support the POUT connection of the local Node (denoted as Local Node) on the same platform according to the connected Node relationship, and also support the POUT of the remote Node (denoted as Remote Node) on different platforms to be connected through the Bridge; similarly, the POUT of the Node type also needs to be compatible with the PIN connections of the next-level Local Node and Remote Node.

[0120] To support the connection of the Remote Node, the following extensions can be made to the PIN of the Node:

[0121] Describe the remote flag bit array (denoted as RemoteFlags) that receives the connection status of the specified task type. If RemoteFlags[i] is true, it means that the Task of task type i comes from the Remote Node;

[0122] Describe the deserialization function array of the Task that receives the specified task type (denoted as TaskDeSers). If RemoteFlags[i] is True, it means that the Task read from the task queue has been serialized by the Bridge. Then, internally, TaskDeSers[i] needs to be called to deserialize the Task and then send it to the task processing function of the Node.

[0123] To support the connection of the Remote Node, the POUT of the Node can be extended as follows:

[0124] Describe the remote flag bit array (denoted as RemoteFlag) of the POUT connection status. If RemoteFlag is True, it means that the POUT sends to the PIN of the Remote Node;

[0125] Describe the serialization function (denoted as TaskSer) of the sending Task of the POUT. If RemoteFlag is True, then the POUT needs to call TaskSer to serialize the Task before sending it to the PIN of the Remote Node through the Bridge;

[0126] Describe the pointer of the remote task queue (denoted as RemoteTaskQueue) that the POUT sends to the Remote Node;

[0127] Describe the pointer of the sending port (denoted as P2PTxPort) that the POUT connects to the Bridge.

[0128] Figure 9 The figure shows an example diagram of the connection between the Node object on the host side and the Node object on the slave side. As shown in the figure, taking the example that POUT[0] of NodeA on the host side sends the TaskA::X task to NodeB on the slave side through Bridge#0, the cross-platform PIN and POUT connection process is described as follows:

[0129] (1) Connect the output port of the source thread object to the sending port of the communication link object.

[0130] In this example, it is to connect POUT[0] of NodeA on the host side to the P2PTxPort of Bridge#0.

[0131] (2) Set the attributes of the output port of the source thread object.

[0132] Specifically, set the remote flag bit of the output port of the source thread object; read the task queue pointer of the input port of the destination thread object through the remote procedure call module, and assign this pointer to the remote task queue pointer of the output port of the source thread object; read the task type of the input port of the destination thread object through the remote procedure call module, and assign this task type to the task type of the output port of the source thread object.

[0133] In this example, it is to set the attributes of POUT[0] of NodeA on the host side. Specifically, set RemoteFlag to True, read the PIN TaskQueue pointer of NodeB on the slave side through the remote procedure call module, and assign it to the remote task queue; read the PIN TaskType information of NodeB on the slave side through the remote procedure call module, and assign it to the task type of POUT. For example, the task type corresponding to TaskA::X in the figure is 1.

[0134] (3) Set the attributes of the input port of the destination thread object.

[0135] Specifically, set the remote flag bit of the input port of the destination thread object through the remote procedure call module.

[0136] In this example, it is to set the PIN attributes of NodeB on the slave side. Specifically, set the RemoteFlags array flag through the remote procedure call module. For example, if the task type corresponding to TaskA::X in the figure is 1, then set RemoteFlags[1] to True.

[0137] In the embodiments of the present application, the following interface can be called to establish a data flow connection between the Node object on the host side and the Node object on the slave side:

[0138] graph->LinkNodes(“node-a”,0,“node-b”), which means that the output POUT[0] of the host-side node-a object is connected to the PIN of the host-side node-b object. If the connected task types do not match, the connection fails; if node-a and node-b are not on the host side, the connection fails;

[0139] graph->LinkNodes("node-a", 1, "dev0-node-c", bridge0). Here, bridge0 represents the bridge channel from the host side to the slave side dev0. Through bridge 0, the output POUT[1] of the node-a object on the host side is connected to the PIN of the dev0-node-c object. If the connection task types do not match, the connection fails; if node-a is not on the host side and dev0-node-c is not on the slave side dev0, the connection fails.

[0140] Through the above process, according to the preset configuration file, a data flow connection can be established between the data processing thread object on the host side and the data processing thread object on the slave side through the communication link object, that is, a cross-platform data flow connection is achieved.

[0141] Through step S605, different processing methods for three cases, namely between host sides, between slave sides, and between host and slave sides, are provided, thus realizing the data flow connection between each data processing thread object.

[0142] Step S606: Set the input port (denoted as input) and output port (denoted as output) of the container object according to the input and output configuration information in the configuration file.

[0143] In the embodiment of the present application, assuming that in the input and output configuration information, the input index number of Graph is 0 and the string name of the input Node object is node-a, the following interface can be called to set the input and output of Graph:

[0144] graph->SetInputNode(0, "node-a"), which means that the PIN of the node-a object is the input input[0] of Graph;

[0145] Assuming that in the input and output configuration information, the output index number of Graph is 1, the string name of the output Node object is node-e, and the output POUT index number is 7, the following interface can be called to set the output of the container object:

[0146] graph->SetOutputNode(1, "node-e", 7), which means that the POUT[7] of the node-e object is the output output[1] of Graph;

[0147] Through the above process, a data stream connection can be established between the host end such as the main processor and the slave end such as the AI co-processor chip according to the preset configuration file, so as to realize cross-platform data stream scheduling and generate the final Graph for subsequent use.

[0148] Figure 10 The figure shows a specific example of data stream scheduling. As shown in the figure, NodeA and E objects are established at the host end. NodeB, C, and D objects, as well as communication link Bridge#1, 2, and 3 objects between the host end and the slave end, are established at the slave end through the remote procedure call module. Finally, the data association between PIN and POUT of each Node is established through the thread connection module of the Graph, forming a cross-platform data processing Graph stream.

[0149] After completing the data stream scheduling, when it is necessary to execute this data stream scheduling, start the Graph, call the start function start() of the Graph, input the Task to the Graph through the input of the Graph, and drive the Graph to process the Task to obtain the task processing result corresponding to the Task. Read and output the task processing result through the output of the Graph. After processing, call the stop function stop() of the Graph to stop the Graph, and finally delete the Graph. In this way, it is possible to execute the processing of various data processing tasks according to the pre-completed data stream scheduling.

[0150] Among them, during the process of driving the Graph to process the Task, when it is necessary to perform task transmission processing between the host end and the slave end, it may specifically include: serializing the original data processing task (denoted as the first data processing task) through the POUT of the source Node, forming a second data processing task according to the serialized first data processing task, the remote task queue, and the task type, and sending the second data processing task to the P2PTxPort of the Bridge; receiving the second data processing task through the P2PTxPort of the Bridge, and sending the second data processing task to the task queue of the PIN of the destination Node; deserializing the second data processing task through the PIN of the destination Node, and sending the deserialized second data processing task to the task processing function of the destination Node for processing.

[0151] Taking Figure 9 the transmission from NodeA at the host end to NodeB at the slave end as an example, after cross-platform connection through NodesLink, both NodeA and NodeB at the host end and the slave end have obtained the corresponding connection information. The Task transmission steps are as follows:

[0152] (1) The task processing function of NodeA performs business processing, applies for the TaskA::X task on the stack space and assigns values, and sends it to the Remote Node through NodeA POUT[1]->SendTask(tx_task,1) on the host side;

[0153] (2) If POUT[0] of NodeA on the host side detects that RemoteFlag is True, then call serTask = POUT[0]->TaskSer(tx_task) to serialize tx_task and release the original tx_task, and combine the remote task queue and the task type to form a new transmission task, and send it to POUT[0]->P2PTxPort;

[0154] (3) Bridge#0 receives the transmission task through P2PTxPort and calls the cross-platform underlying drive link to send it to the PIN TaskQueue of NodeB on the slave side;

[0155] (4) When NodeB on the slave side receives a task with a task type of 1 and detects that PIN->RemoteFlags[1] is True, then take out the transmission task, call PIN->TaskDeSers[1] to deserialize the transmission task and release the transmission task, obtain a new rx_task, and send it to the task processing function of the Node for processing.

[0156] Through the above process, the cross-platform task transmission processing between the data processing thread object on the host side and the data processing thread object on the slave side can be realized.

[0157] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0158] Corresponding to a data stream arrangement method described in the above embodiments, Figure 11 Fig. shows a structural diagram of an embodiment of a data stream arrangement device provided by an embodiment of the present application.

[0159] In this embodiment, a data stream arrangement device may include:

[0160] A configuration file reading module 1101, configured to read a preset data stream arrangement configuration file;

[0161] A container object creation module 1102, configured to create a container object for data stream arrangement on the host side;

[0162] A communication link object creation module 1103, configured to create a communication link object between the host end and the slave end within the container object according to the communication link configuration information in the configuration file;

[0163] A thread object creation module 1104, configured to create data processing thread objects at the host end and the slave end respectively according to the thread configuration information in the configuration file;

[0164] A data flow connection establishment module 1105, configured to establish a data flow connection between each data processing thread object according to the connection configuration information in the configuration file, wherein a data flow connection is established between the data processing thread object at the host end and the data processing thread object at the slave end through the communication link object;

[0165] An input / output setting module 1106, configured to set the input port and output port of the container object according to the input / output configuration information in the configuration file to complete data pipelining arrangement.

[0166] Further, the thread object creation module may include:

[0167] A host-end thread object creation unit, configured to call the thread management module at the host end to create a data processing thread object at the host end;

[0168] A slave-end thread object creation unit, configured to call the thread management module at the slave end to create a data processing thread object at the slave end through a remote procedure call module.

[0169] Further, the thread object creation module may further include:

[0170] A host-end thread object attribute setting unit, configured to call an attribute setting function in the thread base class at the host end to set the attributes of the data processing thread object at the host end;

[0171] A slave-end thread object attribute setting unit, configured to call an attribute setting function in the thread base class at the slave end to set the attributes of the data processing thread object at the slave end through a remote procedure call module.

[0172] Further, the data flow connection establishment module may include:

[0173] A host-end data flow connection establishment unit, configured to call an input / output function in the thread base class at the host end to establish a data flow connection between the data processing thread objects at the host end;

[0174] The slave - end data stream connection establishment unit is used to establish a data stream connection between the data - processing thread objects at the slave end by invoking the input - output functions in the thread base class at the slave end through the remote procedure call module;

[0175] The cross - platform data stream connection establishment unit is used to establish a data stream connection between the data - processing thread object at the host end and the data - processing thread object at the slave end through the communication link object.

[0176] Furthermore, the cross - platform data stream connection establishment unit may include:

[0177] The port connection sub - unit is used to connect the output port of the source thread object to the sending port of the communication link object; the source thread object is the data - stream output side among the data - processing thread objects at the host end and the data - processing thread objects at the slave end;

[0178] The first flag - bit setting sub - unit is used to set the remote flag - bit of the output port of the source thread object;

[0179] The pointer assignment sub - unit is used to read the task - queue pointer of the input port of the destination thread object through the remote procedure call module and assign this pointer to the remote task - queue pointer of the output port of the source thread object; the destination thread object is the data - stream input side among the data - processing thread objects at the host end and the data - processing thread objects at the slave end;

[0180] The task - type assignment sub - unit is used to read the task type of the input port of the destination thread object through the remote procedure call module and assign this task type to the task type of the output port of the source thread object;

[0181] The second flag - bit setting sub - unit is used to set the remote flag - bit of the input port of the destination thread object through the remote procedure call module.

[0182] Furthermore, the data - stream choreography device may also include:

[0183] The data - processing task input module is used to input data - processing tasks to the container object through the input port of the container object;

[0184] The data - processing task processing module is used to drive the container object to process the data - processing tasks and obtain a task - processing result corresponding to the data - processing tasks;

[0185] The task - processing result output module is used to output the task - processing result through the output port of the container object.

[0186] Further, the data processing task processing module may include:

[0187] A first processing unit, configured to serialize a first data processing task through an output port of a source thread object, form a second data processing task according to the serialized first data processing task, a remote task queue, and a task type, and send the second data processing task to a sending port of the communication link object; the source thread object is a data flow output party among the data processing thread objects of the host side and the data processing thread objects of the slave side;

[0188] A second processing unit, configured to receive the second data processing task through the sending port of the communication link object, and send the second data processing task to a task queue of an input port of a destination thread object; the destination thread object is a data flow input party among the data processing thread objects of the host side and the data processing thread objects of the slave side;

[0189] A third processing unit, configured to deserialize the second data processing task through the input port of the destination thread object, and send the deserialized second data processing task to a data processing function of the destination thread object for processing.

[0190] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described devices, modules, and units can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.

[0191] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not described or recorded in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0192] Figure 12 The schematic block diagram of a terminal device provided by an embodiment of the present application is shown. For the convenience of description, only the parts related to the embodiment of the present application are shown.

[0193] As Figure 12 shown, the terminal device 12 in this embodiment includes: a processor 120, a memory 121, and a computer program 122 stored in the memory 121 and executable on the processor 120. When the processor 120 executes the computer program 122, the steps in the foregoing method embodiments of various data pipelining arrangements are implemented, such as Figure 6 the steps S601 to S606 shown. Alternatively, when the processor 120 executes the computer program 122, the functions of the various modules / units in the foregoing device embodiments are implemented, such as Figure 11 the functions of the modules 1101 to 1106 shown.

[0194] Exemplarily, the computer program 122 may be divided into one or more modules / units, which are stored in the memory 121 and executed by the processor 120 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program 122 in the terminal device 12.

[0195] The terminal device 12 may be a computing device such as a desktop computer, a notebook, a palm computer, a smart phone, and a smart TV. Those skilled in the art can understand that Figure 12 merely examples of the terminal device 12, which do not constitute a limitation on the terminal device 12, may include more or fewer components than shown in the figure, or combine some components, or different components. For example, the terminal device 12 may further include input / output devices, network access devices, a bus, etc.

[0196] The processor 120 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor 120 may be the nerve center and command center of the terminal device 12. The processor 120 may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.

[0197] The memory 121 may be an internal storage unit of the terminal device 12, such as a hard disk or memory of the terminal device 12. The memory 121 may also be an external storage device of the terminal device 12, such as a plug-in hard disk equipped on the terminal device 12, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the memory 121 may also include both the internal storage unit and the external storage device of the terminal device 12. The memory 121 is used to store the computer program and other programs and data required by the terminal device 12. The memory 121 may also be used to temporarily store the data that has been output or will be output.

[0198] The terminal device 12 may further include a communication module, and the communication module may provide communication solutions applied to network devices, including Wireless Local Area Networks (WLANs) (such as Wi-Fi networks), Bluetooth, Zigbee, mobile communication networks, Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), etc. The communication module may be one or more devices integrating at least one communication processing module. The communication module may include an antenna, and the antenna may have only one element or may be an antenna array including multiple elements. The communication module may receive electromagnetic waves through the antenna, perform frequency modulation and filtering processing on the electromagnetic wave signals, and send the processed signals to the processor. The communication module may also receive the signals to be sent from the processor, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna for radiation.

[0199] The terminal device 12 may further include a power management module, and the power management module may receive inputs from an external power supply, a battery, and / or a charger to supply power to the processor, the memory, the communication module, etc.

[0200] The terminal device 12 may further include a display module, which can be used to display information input by the user or information provided to the user. The display module may include a display panel. Optionally, a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like may be used to configure the display panel. Further, a touch panel may cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the operation to the processor to determine the type of touch event. Subsequently, the processor provides a corresponding visual output on the display panel according to the type of touch event.

[0201] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of the present application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be described herein again.

[0202] In the above embodiments, the descriptions of the various embodiments have their own emphases. For parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0203] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0204] In the embodiments provided in this application, it should be understood that the disclosed device / terminal device and method can be implemented in other ways. For example, the device / terminal device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in electrical, mechanical or other forms.

[0205] The unit described as a separated component may or may not be physically separated. The component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0206] In addition, each functional unit in the various embodiments of this application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0207] This application embodiment provides a computer program product. When the computer program product runs on the terminal device, the terminal device can implement the steps in the above method embodiments.

[0208] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-described embodiment methods of this application, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable storage medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable storage medium does not include electrical carrier signals and telecommunication signals.

[0209] The above-described embodiments are only used to illustrate the technical solutions of this application, rather than to limit them; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A data pipeline orchestration method, characterized in that, it is used for cross-platform data pipeline orchestration between a host and a slave, including: Reading a preset data pipeline orchestration configuration file; Creating a container object for data pipeline orchestration on the host; Creating a communication link object between the host and the slave within the container object according to the communication link configuration information in the configuration file; Creating data processing thread objects on the host and the slave respectively according to the thread configuration information in the configuration file; Establishing a data flow connection between each data processing thread object according to the connection configuration information in the configuration file, wherein a data flow connection is established between the data processing thread object on the host and the data processing thread object on the slave through the communication link object; Setting the input port and output port of the container object according to the input / output configuration information in the configuration file to complete data pipeline orchestration.

2. The data pipeline orchestration method according to claim 1, characterized in that, The creating of data processing thread objects on the host and the slave respectively according to the thread configuration information in the configuration file includes: Invoking the thread management module on the host to create a data processing thread object on the host; Invoking the thread management module on the slave through a remote procedure call module to create a data processing thread object on the slave.

3. The data pipeline orchestration method according to claim 1, characterized in that, After creating data processing thread objects on the host and the slave respectively according to the thread configuration information in the configuration file, it further includes: Invoking the attribute setting function in the thread base class on the host to set the attributes of the data processing thread object on the host; Invoking the attribute setting function in the thread base class on the slave through a remote procedure call module to set the attributes of the data processing thread object on the slave.

4. The data pipeline orchestration method according to claim 1, characterized in that, The establishing of a data flow connection between each data processing thread object according to the connection configuration information in the configuration file includes: Invoking the input / output function in the thread base class on the host to establish a data flow connection between the data processing thread objects on the host; Invoking the input / output function in the thread base class on the slave through a remote procedure call module to establish a data flow connection between the data processing thread objects on the slave; Establishing a data flow connection between the data processing thread object on the host and the data processing thread object on the slave through the communication link object.

5. The data pipeline orchestration method according to claim 4, characterized in that, The establishing of a data flow connection between the data processing thread object on the host and the data processing thread object on the slave through the communication link object includes: Connecting the output port of the source thread object to the sending port of the communication link object; the source thread object is the data flow output party among the data processing thread object on the host and the data processing thread object on the slave; Set the remote flag bit of the output port of the source thread object; Read the task queue pointer of the input port of the destination thread object through the remote procedure call module, and assign this pointer to the remote task queue pointer of the output port of the source thread object; the destination thread object is the data stream input side among the data processing thread objects on the host side and the data processing thread objects on the slave side; Read the task type of the input port of the destination thread object through the remote procedure call module, and assign this task type to the task type of the output port of the source thread object; Set the remote flag bit of the input port of the destination thread object through the remote procedure call module.

6. The data stream scheduling method according to any one of claims 1 to 5, characterized in that, after completing the data stream scheduling, it further includes: Input a data processing task into the container object through the input port of the container object; Drive the container object to process the data processing task to obtain a task processing result corresponding to the data processing task; Output the task processing result through the output port of the container object.

7. The data stream scheduling method according to claim 6, characterized in that, the driving the container object to process the data processing task includes: Serialize the first data processing task through the output port of the source thread object, and form a second data processing task according to the serialized first data processing task, the remote task queue and the task type, and send the second data processing task to the sending port of the communication link object; the source thread object is the data stream output side among the data processing thread objects on the host side and the data processing thread objects on the slave side; Receive the second data processing task through the sending port of the communication link object, and send the second data processing task to the task queue of the input port of the destination thread object; the destination thread object is the data stream input side among the data processing thread objects on the host side and the data processing thread objects on the slave side; Deserialize the second data processing task through the input port of the destination thread object, and send the deserialized second data processing task to the data processing function of the destination thread object for processing.

8. A data stream scheduling device, characterized in that, used for cross-platform data stream scheduling between the host side and the slave side, including: A configuration file reading module, used to read a preset data stream scheduling configuration file; A container object creation module, used to create a container object for data stream scheduling on the host side; A communication link object creation module, used to create a communication link object between the host side and the slave side in the container object according to the communication link configuration information in the configuration file; A thread object creation module, used to create data processing thread objects on the host side and the slave side respectively according to the thread configuration information in the configuration file; A data stream connection establishment module, configured to establish a data stream connection between each data processing thread object according to the connection configuration information in the configuration file, wherein a data stream connection is established between the data processing thread object on the host side and the data processing thread object on the slave side through the communication link object; An input / output setting module, configured to set the input port and output port of the container object according to the input / output configuration information in the configuration file to complete data pipeline choreography.

9. A computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, the steps of the data pipeline choreography method according to any one of claims 1 to 7 are implemented.

10. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, the steps of the data pipeline choreography method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Intelligent data dissemination flow engine and data synchronization method thereof

    CN104991952A

  • Data synchronization method and device and terminal equipment

    CN110750592A

  • Feature library management method and coprocessor

    CN111221803A