Distributed data processing method and apparatus, and electronic device

Through the distributed data processing method, the data processing model is divided into sub-graphs and allocated to multiple servers for processing, which solves the problem of poor data processing effect in large computing power model calculations and multi-model high-real-time tasks, and realizes the Efficient data processing and real-time balance.

WO2025000747A1PCT designated stage expired Publication Date: 2025-01-02ECARX (HUBEI) TECHCO LTD

Patent Information

Application Number
PCT/CN2023/124442
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-26
Filing Date
2023-10-13
Publication Date
2025-01-02

AI Technical Summary

Technical Problem

When vehicle-mounted multi-system equipment handles high-real-time tasks for large computing power model calculations and multi-model high-reality tasks, a single computing unit is difficult to meet the needs, resulting in poor data processing effects. The existing methods require sacrificing model accuracy or reducing frame rates.

Method used

Using distributed data processing method, by obtaining the data processing model, dividing it into multiple sub-graphs according to the preset sub-graph segmentation rules, and using the cyber protocol to allocate the sub-graphs to multiple servers for processing, merging the processing results to achieve the goal result.

Benefits of technology

It realizes efficient data processing, meets the computing needs of large computing power models, improves the processing effect of multi-model high-real-time tasks, and avoids sacrificing model accuracy and frame rate reduction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023124442_02012025_PF_FP_ABST
    Figure CN2023124442_02012025_PF_FP_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a distributed data processing method and apparatus, and an electronic device. The distributed data processing method comprises: acquiring a data processing model of an application program; according to a preset subgraph partitioning rule, partitioning the data processing model to obtain a plurality of subgraphs; and on the basis of a preset scheduling sequence configuration file, respectively sending a corresponding task to each server among a plurality of servers, wherein the task comprises some subgraphs among the plurality of subgraphs, so that each server performs data processing on the basis of the received subgraph to obtain a processing result; for each server among the plurality of servers, receiving a processing result sent by the server; and merging the plurality of processing results to obtain a target result of the data processing model.
Need to check novelty before this filing date? Find Prior Art

Description

Distributed data processing method, device and electronic equipment

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on June 26, 2023, with application number 202310763755.6, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of computer technology, for example, to a distributed data processing method, device and electronic device. Background Art

[0003] In-vehicle multi-system equipment often contains multiple computing units such as network processors (neural-network process units, NPUs), microprocessors (digital signal processors, DSPs) or central processing units (CPUs). Each computing unit has a certain computing power, but using a single computing unit is often difficult to meet the needs of large-scale computing model calculations and multi-model high-real-time tasks.

[0004] Based on the above problems, the current solution is to sacrifice model accuracy or reduce frame rate requirements, but this reduces the data processing effect of large computing power model calculations and multi-model high-real-time tasks.

[0005] Summary of the Invention

[0006] The present application provides a distributed data processing method, device, and electronic device to solve the technical problem that the data processing methods of related technologies have poor data processing effects in large-scale computing model calculations and multi-model high-real-time tasks.

[0007] In the first aspect, an embodiment of the present application provides a distributed data processing method, which is applied to a terminal device, including obtaining a data processing model of an application; dividing the data processing model according to a preset subgraph segmentation rule to obtain multiple subgraphs; sending corresponding tasks to each of a plurality of servers according to a preset scheduling sequence configuration file, the tasks including: a partial subgraph in a plurality of subgraphs, so that each server performs data processing according to the received subgraph to obtain a processing result; for each server in a plurality of servers, receiving the processing result sent by the server, and the server and the processing result correspond one to one; merging the multiple processing results to obtain the target result of the data processing model.

[0008] On the second aspect, the present application provides a distributed data processing method, which is applied to each server in multiple servers. The distributed data processing method includes: receiving a task sent by a terminal device, the task including: a partial subgraph of multiple subgraphs; the multiple subgraphs are obtained by the terminal device according to a preset subgraph segmentation rule, by segmenting the data processing model of the application; processing the task to obtain a processing result; sending the processing result to the terminal device, so that the terminal device merges multiple processing results of multiple servers to obtain the target result corresponding to the data processing model.

[0009] In a third aspect, the present application provides a distributed data processing apparatus, applied to a terminal device, comprising:

[0010] The acquisition module is configured to obtain the data processing model of the application;

[0011] A segmentation module is configured to segment the data processing model according to a preset subgraph segmentation rule to obtain multiple subgraphs;

[0012] a sending module configured to send a corresponding task to each of the plurality of servers according to a preset scheduling sequence configuration file, the task including: a portion of a subgraph from the plurality of subgraphs, so that each server processes data according to the received subgraph to obtain a processing result;

[0013] A receiving module is configured to receive a processing result sent by each of the multiple servers, with the servers and the processing results corresponding one to one;

[0014] The merging module is configured to merge multiple processing results to obtain the target result of the data processing model.

[0015] In a fourth aspect, the present application provides a distributed data processing apparatus, applied to each of a plurality of servers, comprising:

[0016] A receiving module configured to receive tasks sent by a terminal device, the tasks including: partial subgraphs of a plurality of subgraphs; the plurality of subgraphs are obtained by the terminal device by segmenting the data processing model of the application according to a preset subgraph segmentation rule;

[0017] A processing module is configured to process the task and obtain the processing result;

[0018] The sending module is configured to send the processing result to the terminal device so that the terminal device can merge multiple processing results of multiple servers to obtain the target result corresponding to the data processing model.

[0019] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the electronic device to execute the distributed data processing method of any one of the above-mentioned first or second aspects.

[0020] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, a distributed data processing method as described in any one of the first or second aspects above is implemented.

[0021] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, comprising computer-executable instructions, which, when executed by a processor, implement the distributed data processing method of any one of the first or second aspects above. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] FIG1 is a schematic diagram of a scenario of a distributed data processing method provided in an embodiment of the present application;

[0023] FIG2 is a flowchart of the steps of a first distributed data processing method provided in an embodiment of the present application;

[0024] FIG3 is a flowchart of the steps of a second distributed data processing method provided in an embodiment of the present application;

[0025] FIG4 is a flowchart of the steps of a third distributed data processing method provided in an embodiment of the present application;

[0026] FIG5 is a flowchart of the steps of a fourth distributed data processing method provided in an embodiment of the present application;

[0027] FIG6 is a structural block diagram of a distributed data processing device provided in an embodiment of the present application;

[0028] FIG7 is a structural block diagram of another distributed data processing device provided in an embodiment of the present application;

[0029] FIG8 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] The terms "first," "second," "third," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, such that the embodiments of the application described herein can be practiced in orders other than those illustrated or described herein.

[0031] In addition, the terms "comprises" and "having" and any variations thereof are intended to cover a non-exclusive inclusion. For example, a process, method, system, product or apparatus that includes a series of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, product or apparatus.

[0032] In scenarios where data processing models require significant computing power, the required computing power exceeds that of a single computing unit. For example, a data processing model may require 8 teraflops (TFLOPS) of computing power, while a single NPU may only have 4 TFLOPS, failing to meet the required computing power. Even if the computational complexity of individual subgraphs is small after blindly splitting the data processing model, scenarios with a large number of subgraphs can challenge the real-time nature of the computation. Frequent switching of the NPU to local random access memory (RAM) consumes significant additional time, resulting in a decrease in the overall algorithm frame rate.

[0033] Based on the above problems, although the computing power of a single computing unit is insufficient, the combined use of multiple computing units can meet the computing power requirements of the data processing model. When there are a large number of data processing models and the computing power of the server is limited, how to combine multiple computing units to maximize the performance of data processing and balance the real-time performance is the problem solved by this application. This solution combines the cyber protocol (a decentralized Internet protocol) to process the computing units (NPU, DSP, CPU and other computing resources) in multiple servers through the cyber protocol process, divides the data processing model into subgraphs based on preset subgraph segmentation rules, and assigns them to computing units of different servers according to preset scheduling sequence configuration files. The cyber protocol is used to transfer data between terminal devices and servers, as well as between servers, and the processing results are merged to obtain the target results.

[0034] Exemplarily, Figure 1 is a scenario diagram of a distributed data processing method provided by an embodiment of the present application. As shown in Figure 1, it includes: a terminal device and multiple servers (server A and server B). The terminal device and server A and server B can communicate separately, and server A and server B can communicate with each other. Server A includes multiple computing units (such as network processor a1, microprocessor a2 and central processing unit a3), and server B includes multiple computing units (such as network processor b1, microprocessor b2 and central processing unit b3). The present application can call multiple servers to distributely process the subgraphs of the data processing model to complete the processing tasks.

[0035] FIG2 is a flow chart of a distributed data processing method provided in an embodiment of the present application. The distributed data processing method is applied to a terminal device and includes the following steps:

[0036] S201, obtaining a data processing model of an application.

[0037] Among them, the data processing model is a neural network model, and the data processing model can process the input data to obtain processing results; the data processing model is such as a target detection model or a semantic segmentation model.

[0038] In embodiments of the present application, applications can use data processing models to implement corresponding functions. For example, a user inputs data through the application, and the data is processed by the data processing model to obtain an output result. For example, the data processing model is a speech recognition model. A user inputs a speech segment through the application, and the speech recognition model recognizes the speech segment, obtaining the corresponding text.

[0039] S202: Segment the data processing model according to a preset subgraph segmentation rule to obtain a plurality of subgraphs.

[0040] Exemplarily, the data processing model is divided into subgraphs 1 to 9. The preset subgraph segmentation rule is based on the computational characteristics of the original data processing model, and some calculations are merged into operators and then packaged separately. The subgraph segmentation configuration file and the scheduling sequence configuration file are generated according to the preset subgraph segmentation rule. How to segment the data processing model to obtain multiple subgraphs can refer to the subgraph segmentation rules or custom rules of the Tensor Virtual Machine (TVM) (a model segmentation tool), which is not limited in this application.

[0041] This application obtains a preset graph segmentation configuration file, parses the preset subgraph segmentation rules from the graph segmentation configuration file, and segments the data processing model into multiple subgraphs according to the preset subgraph segmentation rules.

[0042] S203: Send corresponding tasks to each of the multiple servers according to the preset scheduling sequence configuration file.

[0043] The task includes: a part of the subgraphs among the multiple subgraphs, so that each server processes the data according to the received subgraph to obtain a processing result.

[0044] In an embodiment of the present application, a scheduling sequence configuration file is generated based on preset subgraph segmentation rules. The scheduling sequence configuration file solves the problem of which servers the terminal device communicates with. That is, multiple servers can be determined based on the scheduling sequence configuration file, and the scheduling sequence configuration file plus the application name, channel name and part of the subgraph are encapsulated into a message package as a task and sent to the corresponding server.

[0045] The scheduling sequence configuration file specifies the correspondence between subgraphs and servers, allowing subgraphs to be sent to corresponding servers. For example, referring to Figure 1, if a terminal device sends subgraphs 1 through 5 to server A for processing, server A can use the computing unit in server A to process the data based on subgraphs 1 through 5. If a terminal device sends subgraphs 6 through 9 to server B for processing, server B can use the computing unit in server B to process the data based on subgraphs 6 through 9.

[0046] In addition, the terminal device sends a corresponding task to each of the multiple servers. For example, referring to FIG1 , the terminal device sends task A to server A and sends task B to server B.

[0047] In an embodiment of the present application, the number of servers can be determined based on the computing requirements of the data processing model. The greater the computing requirements, the more servers there are, and the tasks of the data processing model can be processed in a distributed manner, thereby improving the efficiency of data processing without sacrificing model accuracy or reducing frame rate requirements.

[0048] S204: For each of the multiple servers, receive a processing result sent by the server.

[0049] Among them, the server and the processing result correspond one to one. In the embodiment of the present application, each server obtains the corresponding processing result after processing the corresponding task and returns the processing result to the terminal device.

[0050] For example, referring to FIG. 1 , server A may return a processing result A to the terminal device after completing data processing, and server B may return a processing result B to the terminal device after completing data processing.

[0051] S205: Merge multiple processing results to obtain the target result of the data processing model.

[0052] Among them, after receiving each processing result, the terminal device can save the processing result in the shared memory corresponding to the data processing model. After receiving the processing results sent by all servers, the processing results in the shared memory can be merged to obtain the target result of the data processing model.

[0053] In an embodiment of the present application, the terminal device can also send input data to the server, or the server can obtain input data through other channels. The server uses a computing unit to calculate based on the subgraph and the input data to obtain a processing result.

[0054] In this embodiment, the terminal device's primary task is to split the data processing model issued by the application, partitioning it into multiple subgraphs. It then creates a client using the cyber protocol to connect to the server, transmitting the subgraphs to the server for processing. The cyber subscriber receives the processing results and returns them to the application, thereby achieving a balance between maximizing data processing performance and ensuring real-time performance by combining multiple computing servers.

[0055] 3 is a flowchart of another distributed data processing method provided in another embodiment of the present application. The distributed data processing method is applied to a terminal device and includes the following steps:

[0056] S301, after the application is started, the application calls the dynamic library provided by the terminal device.

[0057] Wherein, dynamic library (So library) is set to when application program is running, and the required code is copied in memory. Therefore, after application program starts, calling dynamic library provided by terminal device is to copy the code that application program needs to run in memory.

[0058] S302: Obtain a data processing model of the application.

[0059] The implementation process of this step refers to S201 and will not be repeated here.

[0060] S303: Segment the data processing model according to a preset subgraph segmentation rule to obtain multiple subgraphs.

[0061] The implementation process of this step is referred to S202 and will not be described again here.

[0062] S304: Create a client.

[0063] Exemplarily, a client based on a cyber protocol is created, wherein the client is configured to communicate with a plurality of servers.

[0064] S305 , based on the client, multiple servers are determined according to the scheduling sequence configuration file, and communication connection establishment requests are sent to the multiple servers.

[0065] Among them, the client confirms which server's server needs to communicate with according to the scheduling sequence configuration file, and actively connects to the server.

[0066] S306 , for each of the multiple servers, after receiving a communication connection success message from the server, the client sends a corresponding task to the server.

[0067] The task also includes: a scheduling sequence configuration file, an application name, and a channel name.

[0068] In the embodiment of the present application, the channel name between the client and the server is different for different servers, and each server has a corresponding channel name. Referring to Figure 1, the channel name between the client and server A is 1, and the channel name between the client and server B is 2.

[0069] S307: Create a subscriber according to the scheduling sequence configuration file, and receive the processing result sent by the server through the subscriber based on the channel name.

[0070] Among them, the subscriber is configured with a channel name.

[0071] For example, the terminal device creates a subscription end (sub) based on the cyber protocol according to the requirements of the scheduling sequence configuration file, and receives the processing results returned from the publishing end (pub) of the server. The channel name of the subscription end is defined in S306 and sent to the corresponding server.

[0072] In this embodiment of the present application, a terminal device creates a corresponding subscriber for each server. Subscribers correspond one-to-one with servers, and the channel names of the subscribers correspond one-to-one with the subscribers. Referring to Figure 1 , the terminal device creates subscribers 1 and 2. The channel name of subscriber 1 is "Channel Name 1," and it is set to communicate with server A. The channel name of subscriber 2 is "Channel Name 2," and it is set to communicate with server B.

[0073] For example, after server A completes data processing, the obtained processing result is returned to the terminal device via subscriber terminal 1. After server B completes data processing, the obtained processing result is returned to the terminal device via subscriber terminal 2.

[0074] In an embodiment of the present application, the subscription end 1 of the terminal device is connected to the publishing end 1 of server A, and the subscription end 2 of the terminal device is connected to the publishing end 2 of server B.

[0075] S308: The server creates a shared memory and stores the multiple processing results in the shared memory.

[0076] The terminal device may create a shared memory in the terminal device, and the shared memory is configured to store the processing results returned by each server.

[0077] In an embodiment of the present application, the subscribers in the terminal device (such as subscribers 1 and 2 in Figure 1) perform a message receiving loop, wait for messages to be received, and determine whether a message sent by the publisher of the server has been received. After confirming receipt of the message (including the processing result), the processing result is stored in the shared memory. Among them, the connection between the terminal device and each server requires the subscriber to perform a message receiving loop, and store the received processing results in the shared memory to collect and complete all processing results.

[0078] S309, the server returns the multiple processing results in the shared memory to the application, and the terminal device merges the multiple processing results based on the application to obtain the target result of the data processing model.

[0079] In an embodiment of the present application, after receiving multiple processing results, the application merges the multiple processing results to obtain the target result of the data processing model.

[0080] Here, merging refers to fusion according to preset merging rules, and this application does not limit the merging rules.

[0081] The embodiment of the present application obtains the data processing model of the application; divides the data processing model according to the preset subgraph division rule to obtain multiple subgraphs; sends corresponding tasks to each of the multiple servers according to the preset scheduling sequence configuration file, and the tasks include: partial subgraphs in the multiple subgraphs, so that each server processes the data according to the received subgraphs to obtain processing results; for each of the multiple servers, receives the processing results sent by the server, and the servers and the processing results correspond one to one; merges the multiple processing results to obtain the target result of the data processing model. The present application does not need to sacrifice the model accuracy or reduce the frame rate requirements. The present application divides the data processing model into multiple subgraphs, and makes each of the multiple servers process partial subgraphs in the multiple subgraphs, so as to achieve efficient data processing for the data processing model.

[0082] 4 is a flowchart of a distributed data processing method according to another embodiment of the present application, which is applied to each of a plurality of servers. Each server performs the following steps based on a received subgraph:

[0083] S401, receiving a task sent by a terminal device.

[0084] The tasks include: partial subgraphs of multiple subgraphs; the multiple subgraphs are obtained by segmenting the data processing model of the application program by the terminal device according to a preset subgraph segmentation rule.

[0085] The implementation process of this step refers to S201 to S203 and will not be repeated here.

[0086] S402: Process the task and obtain a processing result.

[0087] In the embodiment of the present application, each server calls the computing unit in the server to process the received task and obtains the processing result.

[0088] S403: Send the processing result to the terminal device, so that the terminal device merges multiple processing results of multiple servers to obtain the target result corresponding to the data processing model.

[0089] The implementation process of this step refers to S204 and S205 and will not be repeated here.

[0090] In an embodiment of the present application, if the data processing model requires a large amount of computation, or the number of data processing models is large, the data processing model can be divided into multiple subgraphs and distributed to multiple servers for distributed processing. Each server only needs to process part of the received subgraph to obtain the processing results, thereby improving the data processing efficiency for the data processing model without sacrificing model accuracy or reducing frame rate requirements.

[0091] 5 is a flowchart of a distributed data processing method according to another embodiment of the present invention, which is applied to each of a plurality of servers and includes the following steps:

[0092] S501, after the server is started, create a publisher and a subscriber connected to other servers.

[0093] After startup, a server creates a publisher and subscriber (pub and sub) connection with other servers to transfer data, such as processing results. For example, referring to Figure 1, Server A and Server B establish connections between publisher 3 and subscriber 4, and vice versa.

[0094] Exemplarily, the subscription end of the server performs message receiving loop processing to determine whether intermediate data such as processing results sent by other servers are received.

[0095] S502: After receiving the processing results from other servers, the subscriber saves the processing results from other servers into a pre-created shared memory.

[0096] There is a one-to-one correspondence between shared memory and tasks. Shared memory includes the processing results of other servers. The local storage of a server includes shared memory.

[0097] In an embodiment of the present application, each server can create a shared memory for a task. For example, referring to FIG1 , server A creates a shared memory a4 for a task sent by a terminal device, and server B creates a shared memory b4 for a task sent by a terminal device.

[0098] Exemplarily, after receiving the processing results sent by other servers, the subscriber of the server stores the processing results in the shared memory.

[0099] Exemplarily, the subscriber 3 of server A receives the processing result (intermediate data) obtained by server B and sent by server B through the publisher 4. Server A may store the processing result in the shared memory a4.

[0100] S503: Receive a task sent by the terminal device.

[0101] The tasks include: partial subgraphs of multiple subgraphs; the multiple subgraphs are obtained by segmenting the data processing model of the application program by the terminal device according to a preset subgraph segmentation rule.

[0102] S504 : In response to receiving the partial sub-graph sent by the terminal device, save the received partial sub-graph to a global buffer or a disk.

[0103] Exemplarily, after the server is started, it will simultaneously create a server end, and the server end is configured to receive tasks sent by the terminal device.

[0104] In the embodiment of the present application, the local storage includes: a global buffer or a disk. Exemplarily, the received file can be saved to a specified path on the disk.

[0105] It can be understood that this application upgrades the global buffer, disk and shared memory to local storage, and the local storage is set to store various related data. When the server processes tasks, the relevant data can be called from the local storage for data processing.

[0106] Exemplarily, the created server performs message receiving loop processing and waits for receiving messages.

[0107] S505 : Determine a subgraph calling sequence of the partial subgraph according to the partial subgraph and the scheduling sequence configuration file.

[0108] The task is a task delivery message, and the task also includes: a scheduling sequence configuration file; the server includes multiple computing units.

[0109] The message sent by the terminal device to the server can be a file or a task delivery message. The task is sent to the server in the form of a task delivery message, which also includes a scheduling sequence configuration file. The scheduling sequence configuration file describes a scheduling sequence for multiple subgraphs. The server can determine a subgraph call sequence for each subgraph based on the received subgraphs and the scheduling sequence configuration file. The subgraph call sequence describes the order in which the subgraphs are processed.

[0110] Exemplarily, the computing unit includes: a network processor, a microprocessor or a central processing unit.

[0111] S506 , determining at least one target computing unit from the plurality of computing units according to the subgraph calling sequence, and creating a task queue for each target computing unit.

[0112] In an embodiment of the present application, the server includes multiple computing units. For example, server A in Figure 1 includes a network processor a1, a microprocessor a2, and a central processing unit a3. If the subgraph call sequence indicates that the network processor a1, the microprocessor a2, and the central processing unit a3 are required, then these three computing units are all target computing units. If it indicates that the network processor a1 and the microprocessor a2 are required, then the network processor a1 and the microprocessor a2 are the target computing units.

[0113] Among them, the computing unit performs actual computing calls according to the corresponding task queue.

[0114] S507: Create a scheduling thread for the target computing unit.

[0115] A scheduling thread may be created for each target computing unit.

[0116] S508: Use a scheduling thread to schedule the task queue for processing to obtain a processing result.

[0117] The task also includes: the channel name of the terminal device

[0118] Among them, a scheduling thread is used to schedule the task queue for processing to obtain the processing result, including: obtaining relevant data of the task queue from local storage, the relevant data including: processing results of some sub-graphs and other servers; and using the scheduling thread to process the relevant data to obtain the processing result.

[0119] In an embodiment of the present application, input data is required in the scheduling thread of the target computing unit. According to the description in the task queue, the input data is at least one of calling a partial subgraph sent by a terminal device from a global buffer or disk and obtaining processing results of other servers from a shared memory.

[0120] Exemplarily, the processing result obtained by the current server is saved to a location specified in the shared memory.

[0121] S509 , in response to the description in the task queue that the processing result needs to be sent back to the terminal device, the processing result is sent to the terminal device through the subscription end of the terminal device corresponding to the channel name included in the task.

[0122] Among them, the task sent by the terminal device received by the server contains a channel name, which is the channel name for communication between the terminal device and the server. The server can determine the subscription end of the terminal device through the channel name and send the processing result to the terminal device, so that the terminal device can merge multiple processing results of multiple servers to obtain the target result corresponding to the data processing model.

[0123] S510 , in response to a description in the task queue that the processing result needs to be sent to other servers, the processing result is sent to the other servers based on the publishing end established with the other servers.

[0124] Among them, the publishing end is the port through which the server sends data to other servers. Referring to Figure 1, server A to server B has a publishing end 3, and the subscription end 4 is the port through which server B receives data from other servers. Therefore, the processing results can be sent to other servers through the publishing end.

[0125] In this embodiment of the present application, after receiving a task, the server invokes a computing unit to process the task and obtain a processing result. Distributed processing across multiple servers can yield multiple processing results, and the terminal device, after receiving multiple processing results, merges them to obtain the target result. This improves data processing efficiency without sacrificing model accuracy or reducing frame rate requirements.

[0126] FIG6 is a block diagram of a distributed data processing apparatus 60 provided in an embodiment of the present application. The distributed data processing apparatus 60 provided in an embodiment of the present application includes:

[0127] An acquisition module 61 is configured to acquire a data processing model of an application program;

[0128] A segmentation module 62 is configured to segment the data processing model according to a preset subgraph segmentation rule to obtain multiple subgraphs;

[0129] a sending module 63 configured to send a corresponding task to each of the plurality of servers according to a preset scheduling sequence configuration file, the task including: a portion of a subgraph from the plurality of subgraphs, so that each server processes data according to the received subgraph to obtain a processing result;

[0130] A receiving module 64 is configured to receive, for each of the multiple servers, a processing result sent by the server, with the server and the processing result corresponding one to one;

[0131] The merging module 65 is configured to merge multiple processing results to obtain a target result of the data processing model.

[0132] In another embodiment of the present application, the sending module 63 is configured to: create a client, and the client is configured to communicate with multiple servers; based on the client, determine multiple servers according to a scheduling sequence configuration file, and send a communication connection establishment request to the multiple servers; for each of the multiple servers, after receiving the server's communication connection success message, send the corresponding task to the server based on the client.

[0133] In another embodiment of the present application, the receiving module 64 is configured to: create a subscription end according to the scheduling sequence configuration file, the subscription end is configured with a channel name; and receive the processing result sent by the server through the subscription end based on the channel name.

[0134] In one embodiment of the present application, the task further includes: a scheduling sequence configuration file and a channel name.

[0135] In one embodiment of the present application, the merging module 65 is configured as follows: the server creates a shared memory and stores multiple processing results in the shared memory; the server returns the multiple processing results in the shared memory to the application, and the terminal device merges the multiple processing results based on the application to obtain the target result of the data processing model.

[0136] The distributed data processing device provided in the embodiment of the present application is configured to execute the technical solutions in the above-mentioned corresponding method embodiments. Its implementation principles and technical effects are similar and will not be repeated here.

[0137] FIG7 is a block diagram of a distributed data processing device 70 provided in an embodiment of the present application. The distributed data processing device is applied to each of a plurality of servers. The distributed data processing device 70 provided in an embodiment of the present application includes:

[0138] A receiving module 71 is configured to receive a task sent by a terminal device, wherein the task includes: a partial subgraph of a plurality of subgraphs; the plurality of subgraphs are obtained by the terminal device by segmenting the data processing model of the application according to a preset subgraph segmentation rule;

[0139] The processing module 72 is configured to process the task and obtain a processing result;

[0140] The sending module 73 is configured to send the processing result to the terminal device, so that the terminal device merges multiple processing results of multiple servers to obtain the target result corresponding to the data processing model.

[0141] In one embodiment of the present application, the task is a task sending message, and the task also includes: a scheduling sequence configuration file; the server includes multiple computing units, and the processing module 72 is configured to: determine the subgraph call sequence of the partial subgraph according to the partial subgraph and the scheduling sequence configuration file; determine at least one target computing unit among the multiple computing units according to the subgraph call sequence, and create a task queue for each target computing unit; create a scheduling thread for the target computing unit; use the scheduling thread to schedule the task queue for processing to obtain a processing result.

[0142] In one embodiment of the present application, when the processing module 72 uses a scheduling thread to schedule a task queue for processing and obtains a processing result, it is configured to: obtain relevant data of the task queue from local storage, the relevant data including: processing results of some sub-graphs and other servers; and use a scheduling thread to process the relevant data to obtain a processing result.

[0143] In one embodiment of the present application, the local storage includes: shared memory, and also includes: a saving module (not shown), which is configured to create a publishing end and a subscriber end connected to other servers after the server is started before obtaining relevant data of the task queue from the local storage; after the subscriber end receives the processing results of other servers, the processing results of other servers are saved in a pre-created shared memory, and the shared memory and the task correspond one to one, and the relevant data include: the processing results of other servers.

[0144] In one embodiment of the present application, the local storage includes: a global buffer or disk, and the saving module is further configured to save the received partial sub-graph to the global buffer or disk in response to receiving the partial sub-graph sent by the terminal device before obtaining relevant data of the task queue from the local storage.

[0145] In one embodiment of the present application, the task also includes: the channel name of the terminal device, and the sending module 73 is configured to: in response to the description in the task queue that the processing result needs to be sent back to the terminal device, send the processing result to the terminal device through the subscription end of the terminal device corresponding to the channel name contained in the task.

[0146] In one embodiment of the present application, the sending module 73 is further configured to: in response to a description in the task queue that the processing result needs to be sent to other servers, send the processing result to other servers based on the publishing end created with other servers.

[0147] In one embodiment of the present application, the computing unit includes: a network processor, a microprocessor or a central processing unit.

[0148] The distributed data processing device provided in the embodiment of the present application is configured to execute the technical solutions in the above-mentioned corresponding method embodiments. Its implementation principles and technical effects are similar and will not be repeated here.

[0149] Figure 8 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. As shown in Figure 8, the electronic device 80 in an embodiment of the present application may include: at least one processor 81 (only one processor is shown in Figure 8); and a memory 82 in communication with the at least one processor. The memory 82 stores instructions that can be executed by the at least one processor 81. The instructions are executed by the at least one processor 81 to enable the electronic device 80 to perform the technical solution of any of the aforementioned method embodiments.

[0150] Optionally, the memory 82 can be independent or integrated with the processor 81.

[0151] When the memory 82 is a device independent of the processor 81 , the electronic device 80 further includes a bus 83 configured to connect the memory 82 and the processor 81 .

[0152] The electronic device provided in the embodiments of the present application can execute the technical solution of any of the aforementioned method embodiments, and its implementation principles and technical effects are similar, which will not be repeated here.

[0153] An embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the technical solution in any of the aforementioned method embodiments is implemented.

[0154] An embodiment of the present application provides a computer program product, including a computer program, which implements the technical solution of any of the aforementioned method embodiments when executed by a processor.

[0155] An embodiment of the present application further provides a chip, including: a processing module and a communication interface, wherein the processing module can execute the technical solution in the aforementioned method embodiment.

[0156] Exemplarily, the chip also includes a storage module (e.g., a memory), the storage module is configured to store instructions, the processing module is configured to execute the instructions stored in the storage module, and the execution of the instructions stored in the storage module enables the processing module to execute the technical solution in the aforementioned method embodiment.

[0157] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), or application-specific integrated circuits (ASICs). A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in this application may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.

[0158] The memory may include a high-speed RAM memory, and may also include non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk.

[0159] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be classified into address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.

[0160] The storage medium may be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0161] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and storage medium can be located in an application-specific integrated circuit (ASIC). Of course, the processor and storage medium can also exist as discrete components in an electronic device.

Claims

1. A distributed data processing method, applied to a terminal device, the distributed data processing method comprising: Get the data processing model of the application; According to a preset subgraph segmentation rule, the data processing model is segmented to obtain a plurality of subgraphs; According to a preset scheduling sequence configuration file, a corresponding task is sent to each of the multiple servers respectively, wherein the task includes: a part of the subgraphs in the multiple subgraphs, so that each server performs data processing according to the received subgraph to obtain a processing result; For each server among the multiple servers, receiving a processing result sent by the server, wherein the server and the processing result correspond one to one; Multiple processing results are combined to obtain the target result of the data processing model.

2. The distributed data processing method according to claim 1, wherein: The step of sending corresponding tasks to each of the plurality of servers according to the preset scheduling sequence configuration file comprises: creating a client, wherein the client is configured to communicate with a plurality of the servers; Based on the client, determine a plurality of the servers according to the scheduling sequence configuration file, and send a communication connection establishment request to the plurality of the servers; For each of the multiple servers, after receiving a communication connection success message from the server, a corresponding task is sent to the server based on the client.

3. The distributed data processing method according to claim 2, wherein: The receiving the processing result sent by the server includes: Create a subscriber according to the scheduling sequence configuration file, wherein the subscriber is configured with a channel name; The processing result sent by the server is received through the subscriber based on the channel name.

4. The distributed data processing method according to claim 3, wherein: The task also includes: the scheduling sequence configuration file and the channel name.

5. The distributed data processing method according to any one of claims 1 to 4, wherein: The combining of the multiple processing results to obtain the target result of the data processing model includes: The server creates a shared memory, and stores the multiple processing results in the shared memory; The server returns the multiple processing results in the shared memory to the application, and the terminal device merges the multiple processing results based on the application to obtain the target result of the data processing model.

6. A distributed data processing method, applied to each server in a plurality of servers, the distributed data processing method comprising: Receive a task sent by a terminal device, the task comprising: a partial subgraph of a plurality of subgraphs; the plurality of subgraphs are obtained by the terminal device segmenting a data processing model of an application according to a preset subgraph segmentation rule; Processing the task to obtain a processing result; The processing result is sent to the terminal device so that the terminal device merges multiple processing results of multiple servers to obtain a target result corresponding to the data processing model.

7. The distributed data processing method according to claim 6, wherein: The task is a task sending message, and the task also includes: a scheduling sequence configuration file; the server includes multiple computing units, and the task is processed to obtain a processing result, including: Determine a subgraph calling sequence of the partial subgraph according to the partial subgraph and the scheduling sequence configuration file; According to the subgraph call sequence, determining at least one target computing unit among the plurality of computing units, and creating a task queue for each target computing unit; Create a scheduling thread for the target computing unit; The scheduling thread is used to schedule the task queue for processing to obtain the processing result.

8. The distributed data processing method according to claim 7, wherein: The using the scheduling thread to schedule the task queue for processing to obtain the processing result includes: Obtaining relevant data of the task queue from local storage, the relevant data including: processing results of the partial subgraph and other servers; The scheduling thread is used to process the relevant data to obtain the processing result.

9. The distributed data processing method according to claim 8, wherein: The local storage includes: a shared memory, and before obtaining the relevant data of the task queue from the local storage, the method further includes: After the server is started, create a publisher and a subscriber connected to other servers; After the subscriber receives the processing results of other servers, the processing results of other servers are saved in a pre-created shared memory, and the shared memory corresponds to the task one by one.

10. The distributed data processing method according to claim 9, wherein: The local storage includes: a global buffer or a disk. Before obtaining the relevant data of the task queue from the local storage, the method further includes: In response to receiving the partial sub-image sent by the terminal device, the received partial sub-image is saved to the global buffer or disk.

11. The distributed data processing method according to any one of claims 7 to 10, wherein: The task further includes: a channel name of a terminal device, and sending the processing result to the terminal device includes: In response to the description in the task queue that the processing result needs to be sent back to the terminal device, the processing result is sent to the terminal device through the subscription end of the terminal device corresponding to the channel name contained in the task.

12. The distributed data processing method according to any one of claims 7 to 10, further comprising: In response to the description in the task queue that the processing result needs to be sent to other servers, the processing result is sent to other servers based on the publishing end created with other servers.

13. The distributed data processing method according to any one of claims 7 to 10, wherein: The computing unit includes at least one of a network processor, a microprocessor and a central processing unit.

14. A distributed data processing device, applied to a terminal device, the distributed data processing device comprising: An acquisition module is configured to acquire a data processing model of an application; A segmentation module, configured to segment the data processing model according to a preset subgraph segmentation rule to obtain a plurality of subgraphs; The sending module is configured to send corresponding tasks to each of the multiple servers according to a preset scheduling sequence configuration file, wherein the tasks include: a portion of the multiple subgraphs, Each server processes data according to the received subgraph to obtain a processing result; A receiving module, configured to receive, for each server among the plurality of servers, a processing result sent by the server, wherein the server and the processing result correspond one to one; The merging module is configured to merge multiple processing results to obtain the target result of the data processing model.

15. A distributed data processing device, applied to each server among a plurality of servers, the distributed data processing device comprising: A receiving module, configured to receive a task sent by a terminal device, wherein the task includes: a partial subgraph of a plurality of subgraphs; the plurality of subgraphs are obtained by the terminal device segmenting a data processing model of an application according to a preset subgraph segmentation rule; A processing module, configured to process the task and obtain a processing result; The sending module is configured to send the processing result to the terminal device so that the terminal device merges multiple processing results of multiple servers to obtain the target result corresponding to the data processing model.

16. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the electronic device to perform the distributed data processing method according to any one of claims 1 to 13.

17. A computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the distributed data processing method according to any one of claims 1 to 13 is implemented.

Citation Information

Patent Citations

  • Data processing method and device, scheduling server and medium

    CN111459659A

  • Machine learning algorithm conversion system and method and electronic equipment

    CN112016703A

  • Data processing method and device, electronic equipment and medium

    CN112035258A

  • Message transmission method and apparatus, device and medium

    US20200073736A1

Cited By

  • Data processing method based on cloud computing platform and cloud computing platform

    CN119988038A