Distributed data transmission method, device, system, equipment and storage medium

Through batch division and overlapping, messages to be transmitted are processed in parallel, which solves the problem of serial execution of partitioned message communication and local computing processes in distributed graph computing, and improves overall performance and efficiency.

CN118409884BActive Publication Date: 2024-08-27HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410847324.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-08-27
Estimated Expiration
2044-06-27

AI Technical Summary

Technical Problem

In existing distributed graph computing, the partition message communication process and the local computing process are strongly coupled and executed serially, resulting in high communication costs and storage costs, low efficiency, inability to fully utilize network bandwidth resources, and low overall computing performance.

Method used

Batch is used to divide the message set to be transmitted, and the partition message communication and local computing process are processed in parallel based on the overlap of batch sequence information. The data size is detected in real time through the message sending buffer, and the message transmission and computing process is optimized to achieve parallel overlap between partitions. .

Benefits of technology

It improves the overall performance of distributed graph computing, makes full use of network bandwidth resources, and improves computing efficiency and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118409884B
    Figure CN118409884B
Patent Text Reader

Abstract

The present application discloses a distributed data transmission method, apparatus, system, equipment and storage medium, wherein the distributed data transmission method comprises: obtaining a set of messages to be transmitted; dividing the set of messages to be transmitted into batches to obtain multiple batches of message sets to be transmitted and batch sequence information; based on the batch sequence information, sending the multiple batches of message sets to be transmitted to the second computing nodes of other partitions in sequence. The present application divides the set of messages to be transmitted into batches, and then divides the set of messages to be transmitted into multiple batches of message sets, and sends each batch of message sets to be transmitted to the computing nodes of other partitions in batch order, so that when the first computing node transmits the remaining batches of message sets to be transmitted to the second computing node, the second computing node also synchronously calculates the corresponding batches of message sets to be transmitted that have been transmitted by the first computing node, thereby improving the overall performance of distributed graph computing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of distributed graph computing technology, and in particular to a distributed data transmission method, apparatus, system, device and storage medium. Background Art

[0002] At present, with the development of knowledge graphs, the data scale of knowledge graphs has become huge, and single-machine processes can no longer realize computational mining on the entire graph. Therefore, it is proposed to use distributed multi-process computing to realize computational mining on the entire graph. For distributed graph computing, it is usually implemented based on the BSP (Bulk Synchronous Parallel) model. The BSP graph computing model is vertex-centric, and messages are passed to all other computing nodes and saved in full. However, this also brings a lot of communication costs and storage costs, resulting in a decrease in computing performance. How to improve the computing performance of computing nodes in distributed graphs is currently a hot issue in the field of knowledge graphs.

[0003] Related technologies propose that in a distributed scenario, when sending messages, computing nodes only need to send messages to computing nodes where nodes with topological relationships with the message source are located, without the need to send messages at the granularity of graph vertices, thereby reducing communication costs and storage costs, and thus improving the performance of data transmission in distributed graphs. However, in this method, the partition message communication process and the local computing process are strongly coupled and executed serially, and each partition computing node is usually in a "hungry" or "lazy" mode when communicating messages, that is, it sends a message as soon as it generates one, or waits for all messages to be ready before sending them all at once. The above two methods are not only inefficient, but also fail to fully utilize network bandwidth resources, resulting in low overall computing performance of distributed graph computing. Summary of the invention

[0004] The main purpose of this application is to provide a distributed data transmission method, apparatus, system, device and storage medium, aiming to solve the technical problem of low overall computing performance of distributed graph computing in the prior art.

[0005] To achieve the above objectives, the present application provides a distributed data transmission method, the distributed data transmission method comprising:

[0006] Get the message set to be transmitted;

[0007] Dividing the message set to be transmitted into batches to obtain multiple batches of message sets to be transmitted and batch sequence information, wherein each batch of message sets to be transmitted includes multiple messages to be transmitted, rather than one message to be transmitted or all messages to be transmitted;

[0008] Based on the batch sequence information, the multiple batches of message sets to be transmitted are sent to the second computing nodes of other partitions in sequence, so that the second computing nodes can directly calculate the corresponding batches of message sets to be transmitted after receiving the corresponding batches of message sets to be transmitted, wherein the partition message communication process of the first computing node and the local computing process of the second computing node are overlapped and processed in parallel, including: while the first computing node is transmitting the remaining batches of message sets to be transmitted to the second computing node, the second computing node is also synchronously calculating the corresponding batches of message sets to be transmitted that have been transmitted by the first computing node.

[0009] Optionally, the step of sending the multiple batches of message sets to be transmitted to the second computing nodes of other partitions in sequence based on the batch sequence information includes:

[0010] Based on the batch sequence information, the plurality of batches of message sets to be transmitted are sequentially added to the message sending buffer;

[0011] Detecting the data size of the message sending buffer in real time to obtain a detection result;

[0012] If the detection result is that the data size of the message sending buffer reaches a preset threshold, the set of messages to be transmitted in the message sending buffer is sent to the second computing node of the other partition based on the batch sequence information.

[0013] Optionally, the step of obtaining a set of messages to be transmitted includes:

[0014] Receive a set of messages to be calculated sent by a second computing node in another partition, wherein the set of messages to be calculated includes an iteration round;

[0015] Dividing the set of messages to be calculated into the iteration rounds to obtain divided sets of messages to be calculated in different iteration rounds;

[0016] Saving the message sets to be calculated in different iteration rounds to different message receiving buffers, wherein the message receiving buffers include at least two;

[0017] Iterative calculation is performed on the message set to be calculated in the message receiving buffer to obtain the message set to be transmitted.

[0018] Optionally, the message set to be calculated includes an iteration round, and the step of iteratively calculating the message set to be calculated in the message receiving buffer to obtain the message set to be transmitted includes:

[0019] Performing local calculation of the iteration round on the message set to be calculated in the message receiving buffer to obtain the message set to be transmitted and iteration information of the iteration round;

[0020] Determining whether the iteration information satisfies a preset iteration termination condition;

[0021] If the iteration information does not meet the iteration termination condition, the data transmission of the message set to be transmitted and the algorithm initialization of the next iteration round are executed until the message set to be calculated of the next iteration round of the second computing node in other partitions is received, and then the next round of iterative calculation is executed based on the initialized algorithm.

[0022] Optionally, after the step of performing data transmission of the message set to be transmitted and algorithm initialization for the next iteration round if the iteration information does not satisfy the iteration termination condition, the method includes:

[0023] If the iteration information satisfies the iteration termination condition, the iterative calculation and data transmission are stopped to obtain the partition map calculation result after the final iteration is completed.

[0024] Optionally, the step of iteratively calculating the message set to be calculated in the message receiving buffer to obtain the message set to be transmitted includes:

[0025] Based on the iteration rounds, the iteration rounds are sorted in order from small to large to obtain an execution order;

[0026] Based on the execution order, the message set to be calculated in the message receiving buffer of the corresponding iteration round is iteratively calculated to obtain the message set to be transmitted.

[0027] Optionally, the set of messages to be transmitted is a set of initial calculation results of each graph node in the partition, and the initial calculation results are determined by each graph node in the partition according to a preset graph algorithm task; or the set of messages to be transmitted is the calculation results of the second computing nodes in other partitions received by the first computing node through local calculation.

[0028] Optionally, the step of dividing the set of messages to be transmitted into batches to obtain multiple batches of the set of messages to be transmitted includes:

[0029] Based on a preset data partition size, the message set to be transmitted is divided into batches to obtain multiple batches of message sets to be transmitted with the same data size.

[0030] The present application also provides a distributed data transmission device, which is applied to a first computing node of any partition in a distributed data transmission system, and the distributed data transmission device includes:

[0031] An acquisition module, used to acquire a set of messages to be transmitted;

[0032] A division module, used to divide the message set to be transmitted into batches to obtain multiple batches of message sets to be transmitted and batch sequence information, wherein each batch of message sets to be transmitted includes multiple messages to be transmitted, rather than one message to be transmitted or all messages to be transmitted;

[0033] A sending module is used to send the multiple batches of message sets to be transmitted to the second computing nodes of other partitions in sequence based on the batch sequence information, so that the second computing nodes can directly calculate the corresponding batch of message sets to be transmitted after receiving the corresponding batch of message sets to be transmitted, wherein the partition message communication process of the first computing node and the local calculation process of the second computing node are overlapped and processed in parallel, including: when the first computing node is transmitting the remaining batches of message sets to be transmitted to the second computing node, the second computing node is also synchronously calculating the corresponding batch of message sets to be transmitted that the first computing node has transmitted.

[0034] The present application also provides a distributed data transmission system, the distributed data transmission system comprising a plurality of partitions, each partition comprising a plurality of computing nodes, wherein any node of any partition is a first computing node, and any node of other partitions is a second computing node, and computing nodes of different partitions are connected in communication.

[0035] The first computing node is used to obtain a set of messages to be transmitted; divide the set of messages to be transmitted into batches to obtain a plurality of batches of message sets to be transmitted and batch sequence information, wherein each batch of message sets to be transmitted includes a plurality of messages to be transmitted, rather than a single message to be transmitted or all messages to be transmitted; and based on the batch sequence information, sequentially send the plurality of batches of message sets to be transmitted to the second computing nodes in other partitions;

[0036] The second computing node is used to receive multiple batches of message sets to be transmitted sent by the first computing node, and directly calculate the corresponding batch of message sets to be transmitted after receiving the corresponding batch of message sets to be transmitted, wherein the partitioned message communication process of the first computing node and the local computing process of the second computing node are overlapping and parallel processing including: while the first computing node is transmitting the remaining batches of message sets to be transmitted to the second computing node, the second computing node is also synchronously calculating the corresponding batch of message sets to be transmitted that has been transmitted by the first computing node.

[0037] The present application also provides a distributed data transmission device, the distributed data transmission device comprising: a memory, a processor, and a program stored in the memory for implementing the distributed data transmission method.

[0038] The memory is used to store a program for implementing a distributed data transmission method;

[0039] The processor is used to execute a program for implementing the distributed data transmission method to implement the steps of the distributed data transmission method.

[0040] The present application also provides a storage medium, on which is stored a program for implementing the distributed data transmission method, and the program for implementing the distributed data transmission method is executed by a processor to implement the steps of the distributed data transmission method.

[0041] The present application divides the set of messages to be transmitted that the first computing node sends to the second computing node of other partitions into batches, so that the set of messages to be transmitted is divided into multiple batches of message sets, and sends each batch of message sets to be transmitted to the computing nodes of other partitions in batch order, so that while the first computing node is transmitting the remaining batches of message sets to be transmitted to the second computing node, the second computing node is also synchronously calculating the corresponding batches of message sets to be transmitted that have been transmitted by the first computing node, thereby realizing parallel overlap between partition message communication and local computing, thereby making full use of network bandwidth resources and improving the overall performance of distributed graph computing. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art description will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0043] Figure 1 This is a flow chart of the first embodiment of the distributed data transmission method of the present application;

[0044] Figure 2 This is a schematic diagram of a distributed graph calculation process under the first embodiment of the distributed data transmission method of the present application;

[0045] Figure 3 A schematic diagram of a batch message communication system for the distributed data transmission method of the present application;

[0046] Figure 4 This is a flow chart of the second embodiment of the distributed data transmission method of the present application;

[0047] Figure 5This is a schematic diagram of a distributed graph calculation process under the third embodiment of the distributed data transmission method of the present application;

[0048] Figure 6 This is a schematic diagram of the partitioned asynchronous iteration process of the distributed data transmission method of this application;

[0049] Figure 7 This is a schematic diagram of the modules of the distributed data transmission device of the present application;

[0050] Figure 8 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.

[0051] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0052] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0053] Reference Figure 1 , Figure 1 This is a flow chart of the first embodiment of the distributed data transmission method of the present application.

[0054] In a first embodiment, the distributed data transmission method comprises the following steps:

[0055] Step S100, obtaining a set of messages to be transmitted;

[0056] It should be noted that the execution subject of the distributed data transmission method is the first computing node of any partition in the distributed graph, wherein the distributed graph refers to the graph data (or knowledge graph) being divided into multiple parts, each part being stored on a different computing node, and the graph is a data structure composed of nodes and edges, which is used to represent the topological relationship between entities. Among them, the node usually represents the entity, and the edge represents various types of relationships between entities. The entity is the basic unit of the graph and can contain attributes, which can store relevant information of the entity.

[0057] It is understandable that the application scenario of the present application is data transmission between computing nodes in a distributed graph scenario. Based on this, the applicant found that if the computing node tries to send messages only to the computing nodes where the nodes with topological relationships with the message source point are located when sending messages, and does not send them at the granularity of the graph vertex, so as to reduce communication costs and storage costs, the scheme cannot be directly implemented because the partition message communication process and the local computing process in the technology are strongly coupled and executed serially, and each partition computing node is usually in a "hungry" or "lazy" mode when performing message communication, that is, a message is sent when a message is generated or all messages are sent at once after they are ready. The above two methods are not only inefficient, but also cannot make full use of network bandwidth resources, resulting in limited distributed graph computing performance. Based on the above technical problems, the applicant proposed an improved internal working mechanism that can overlap the partition message communication process and the local computing process that are processed in parallel. Therefore, in order to better overlap the above two processes, the present application proposes to separate the partition message communication process from the distributed graph computing to form a unified distributed message communicator, and on this basis, a set of parallel overlapping architectures of partition message communication process and local computing process are designed to improve the overall performance of distributed graph computing.

[0058] In a specific implementation, the message set to be transmitted refers to a message set sent by the first computing node to the second computing node in other partitions according to the needs of local graph data calculation or extraction, wherein the message includes but is not limited to the calculation results attached to the points in the distributed graph and the point attributes (such as point ID), etc. Specifically, the first computing node can be the message set to be transmitted obtained after iterative calculation based on the local computing unit, or when performing distributed data calculation for the first time, the first computing node uses the preset initial calculation result as the message set to be transmitted.

[0059] Step S200, dividing the message set to be transmitted into batches to obtain multiple batches of message sets to be transmitted and batch sequence information, wherein each batch of message sets to be transmitted includes multiple messages to be transmitted, rather than one message to be transmitted or all messages to be transmitted;

[0060] In a specific implementation, the first computing node performs batch division on the message set to be transmitted, specifically, the first computing node traverses all messages in the message set to be transmitted, divides the batches according to the priority of the messages, divides the batches into multiple batches of message sets to be transmitted, and obtains corresponding batch sequence information, wherein each batch of the message set to be transmitted includes multiple messages to be transmitted, rather than one message to be transmitted or all messages to be transmitted.

[0061] In the specific implementation, this application proposes to use batch message communication to transmit messages between partitions. The batch message communication method divides the point set in the graph into different batches, so that when the current batch of points is transmitting messages, other batches of points can perform local calculations, thereby achieving the effect of overlapping partition communication and local calculations to improve the overall computing performance of the system. The batch message communication method also makes better use of network bandwidth resources and avoids the extreme cases of lazy and hungry message communication modes.

[0062] In a specific implementation, the device divides the set of messages to be transmitted into batches to obtain multiple batches of the set of messages to be transmitted, including:

[0063] The device divides the message set to be transmitted into batches based on a preset data division size to obtain multiple batches of message sets to be transmitted with the same data size.

[0064] It should be noted that the data partition size refers to the preset data partition amount, which is used to divide data batches into equal amounts. For example, computing node A transmits a message set to be transmitted with a data amount of 30MB to computing node B, where the data partition size is 5MB. Computing node A divides the message set to be transmitted into 6 batches of message sets with a data amount of 5MB, that is, each batch set includes messages with a data amount of 5MB.

[0065] Step S300, based on the batch sequence information, sends the multiple batches of message sets to be transmitted to the second computing nodes of other partitions in sequence, so that the second computing nodes can directly calculate the corresponding batch of message sets to be transmitted after receiving the corresponding batch of message sets to be transmitted, wherein the partition message communication process of the first computing node and the local computing process of the second computing node are overlapped and processed in parallel, including: while the first computing node is transmitting the remaining batches of message sets to be transmitted to the second computing node, the second computing node is also synchronously calculating the corresponding batch of message sets to be transmitted that the first computing node has transmitted.

[0066] In a specific implementation, the first computing node sends the multiple batches of message sets to be transmitted to the second computing nodes of other partitions in sequence according to the batch sequence information, so that the second computing node can directly calculate the corresponding batch of message sets to be transmitted after receiving the corresponding batch of message sets to be transmitted, without waiting for all message sets to be transmitted to be distributed before calculating, and while calculating, the first computing node also synchronously transmits the remaining batches of message sets to be transmitted. That is, when the current batch point is transmitting messages, other batch points can perform local calculations, thereby achieving the effect of overlapping partition communication and local calculations to improve the overall computing performance of the system.

[0067] In a specific implementation, the step of sending the plurality of batches of message sets to be transmitted to the second computing nodes of other partitions in sequence based on the batch sequence information includes:

[0068] Based on the batch sequence information, the device adds the multiple batches of message sets to be transmitted to the message sending buffer in sequence; detects the data size of the message sending buffer in real time to obtain a detection result; if the detection result is that the data size of the message sending buffer reaches a preset threshold, then based on the batch sequence information, the message sets to be transmitted in the message sending buffer are sent to the second computing node in other partitions.

[0069] In the specific implementation, the batch message communication method proposed in this application refers to a mode of message transmission between computing nodes in a distributed graph computing system. The information to be transmitted is first saved in a buffer and then sent after the buffer is full, thereby improving communication efficiency.

[0070] In the specific implementation, refer to Figure 2 , the batch message communication implementation process includes:

[0071] The first computing node starts the message sending thread, pulls the message buffer to be sent from the message sending blocking queue for sending; each parallel computing thread adds the point id and message to be sent to the distributed message communicator; the distributed message communicator adds the message to the message sending buffer of the corresponding target partition under the corresponding parallel computing thread id according to the parallel computing thread id and the message target partition; if the message sending buffer size reaches the specified threshold, it is added to the message sending queue; when the parallel computing thread has added all the messages, all the message sending buffers corresponding to the parallel computing thread id are added to the message sending queue.

[0072] Furthermore, the present application relies on batch message communication design to process points in the distributed graph in batches. When the current batch of points performs local calculation after completing message communication, other batches of points can be designed to be performing message communication, thereby achieving fine-grained overlap of partition communication and local calculation. Figure 3 The specific steps of the technical solution for overlapping partition message communication and local computing fine-grained in distributed graph computing scenarios proposed in this application include:

[0073] The first computing node adds the messages to be sent by each parallel computing thread to the distributed message communicator; the distributed message communicator performs batch sending and receiving of messages between partitions; each parallel computing thread continuously pulls the received and processed messages from the distributed message communicator and performs local computing, wherein, while the local computing is in progress, the partition message communication is always working.

[0074] The present application divides the set of messages to be transmitted that the first computing node sends to the second computing node of other partitions into batches, so that the set of messages to be transmitted is divided into multiple batches of message sets, and sends each batch of message sets to be transmitted to the computing nodes of other partitions in batch order, so that while the first computing node is transmitting the remaining batches of message sets to be transmitted to the second computing node, the second computing node is also synchronously calculating the corresponding batches of message sets to be transmitted that have been transmitted by the first computing node, thereby realizing parallel overlap between partition message communication and local computing, thereby making full use of network bandwidth resources and improving the overall performance of distributed graph computing.

[0075] Based on the above first embodiment, the present application also provides another embodiment, referring to Figure 4 , the distributed data transmission method comprises:

[0076] In a specific implementation, the step of the device obtaining a set of messages to be transmitted includes:

[0077] Step A100, receiving a message set to be calculated sent by a second computing node in another partition, wherein the message set to be calculated includes an iteration round;

[0078] Step A200, dividing the message set to be calculated into the iteration rounds to obtain message sets to be calculated in different iteration rounds after division;

[0079] Step A300, saving the message sets to be calculated in different iteration rounds to different message receiving buffers, wherein the message receiving buffers include at least two;

[0080] It should be noted that the computing nodes of each partition will perform three stages: partition communication, local computing, and partition synchronization. While the first computing node transmits data to the second computing node of other partitions, it will also receive the set of messages to be calculated sent by the second computing node of other partitions, and save the set of messages to be calculated to the message receiving buffer.

[0081] In the specific implementation, since the first computing node will receive batch messages from multiple partitions at the same time, and each partition will send multiple batches, if there is no receiving buffer and the messages are directly calculated, the message reception will be affected, resulting in performance degradation. If a receiving buffer is set, the message reception will not be affected by the calculation, and there is no need to wait for a batch of messages to be calculated before receiving the next batch of messages, thereby improving the calculation performance. It should be noted that there is no need to set a data threshold for the message receiving buffer, that is, when the second computing node sends data, the first computing node receives the corresponding amount of data.

[0082] In the specific implementation, refer to Figure 5Each computing node is equipped with at least two message receiving buffers, where multiple buffers are used to store messages received in different rounds. Because some partitions execute faster and some execute slower, the slower partition may receive messages from the N+1th round of iteration when executing the Nth round of iteration. At this time, the messages from the two rounds will be saved at the same time. And because batch messages from multiple partitions will be received at the same time, and each partition will send multiple batches, if there is no receiving buffer and the messages are directly calculated, the message reception will be affected, resulting in performance degradation. With a receiving buffer, message reception will not be affected by calculation, otherwise you have to wait until a batch of messages is calculated before receiving the next batch of messages.

[0083] Step A400, iteratively calculate the message set to be calculated in the message receiving buffer to obtain the message set to be transmitted.

[0084] It should be noted that the distribution graph algorithm usually involves multiple rounds of iterations, and each round of iteration will update the state of the node until the iteration stop condition is met. Therefore, after the first computing node receives the set of messages to be calculated sent by the second computing node, it iteratively calculates the set of messages to be calculated in the message receiving buffer to obtain the set of messages to be transmitted.

[0085] In a specific implementation, the device iteratively calculates the message set to be calculated in the message receiving buffer to obtain the step of obtaining the message set to be transmitted, including:

[0086] The device performs local calculation of the iterative round on the message set to be calculated in the message receiving buffer, and obtains the message set to be transmitted and iteration information of the iterative round; determines whether the iterative information satisfies a preset iteration termination condition; if the iterative information does not satisfy the iterative termination condition, performs data transmission of the message set to be transmitted and algorithm initialization of the next iterative round, until the message set to be calculated of the next iterative round of the second computing node in other partitions is received, and then performs the next round of iterative calculation based on the initialized algorithm; if the iterative information satisfies the iterative termination condition, stops the iterative calculation and data transmission, and obtains the partition map calculation result after the final iteration is completed.

[0087] It should be noted that under the traditional graph computing paradigm, all partitions need to be synchronized at the end of each execution superstep. This synchronization operation can fully guarantee the correctness of the iterative calculation results of each partition. However, due to the synchronization operation, the faster executing partitions in a round of iterations will wait for the slower executing partitions, thus causing the barrel effect, which greatly affects the performance of iterative calculations.

[0088] Based on this, the applicant proposed that if no mandatory synchronization is performed at the end of a round of iteration, that is, a partition has completed the Nth round of iteration, if the iteration termination condition has not been met at this time, then the partition can directly perform the N+1th round of iteration without waiting for the remaining partitions to complete the Nth round of iteration, thereby realizing partition asynchronous iteration to improve computing performance. Among them, the key to partition asynchronous iteration lies in how to distinguish and process messages received from different iteration rounds. The present application proposes a technical solution that uses iteration rounds as message TAGs for communication, and adaptively processes messages of different iteration rounds based on the received message TAGs to support the implementation of partition asynchronous iteration.

[0089] In the specific implementation, first, the first computing node performs local calculation of the iterative round on the message set to be calculated in the message receiving buffer, and obtains the message set to be transmitted and iteration information of the iterative round; secondly, the first computing node determines whether the iterative information satisfies the preset iteration termination condition; if the iterative information does not satisfy the iteration termination condition, that is, the iteration termination condition has not been met at this time, then the data transmission of the message set to be transmitted and the algorithm initialization of the next iterative round are executed, until the message set to be calculated of the next iterative round is received from the second computing node in other partitions, and then the next round of iterative calculation is executed based on the initialized algorithm.

[0090] For example, refer to Figure 6 , in the Nth round of iterative calculation process, including the first computing node A and the second computing node B, wherein the first computing node A executes faster and the second computing node B executes slower. After completing this round of iteration, the first computing node A sends the TAG (iteration round) completed in this round to the second computing node B. If the iteration termination condition has not been met at this time, and the TAG information of completing this round of iteration sent by the second computing node B has not been received, then it continues to perform N+1 rounds of iteration without waiting for the second computing node B. At this time, the second computing node B is still performing the Nth round of iteration and receives the TAG information sent by the first computing node A. The second computing node B saves it to the corresponding buffer. Finally, when the second computing node B completes this round of iteration, according to the iteration round information sent by the first computing node A in the buffer, there is no need to wait for the calculation synchronization of the first computing node A, and directly continues to perform N+1 rounds of iteration.

[0091] Furthermore, in the above embodiment, when the first computing node A continues to perform N+1 rounds of iterations, since executing the complete N+1 round of iterative calculations requires the calculation results of the second computing node B after completing N rounds of iterative calculations, the first computing node A only performs N+1 rounds of algorithm initialization, so that after receiving the calculation results of the second computing node B, it can perform N+1 rounds of iterative calculations on it more quickly, thereby achieving improved computing efficiency. Specifically, during the N+1 round of iterations, the first computing node A will block and wait to receive the N-round calculation result message and TAG information sent by partition B, so there is at most one round of iteration difference between different partitions.

[0092] It should be noted that the faster computing node has not yet received the message of the next iteration round from the slower computing node, that is, it cannot perform the iterative calculation of the next iteration round, but it can perform the data transmission of the iterative calculation results of the previous iteration cycle and the algorithm initialization of the next iteration round. Therefore, the difference between different partitions is at most one iteration round. However, this method can effectively support distributed graph computing to realize partition asynchronous iteration, thereby improving the overall performance of distributed graph computing.

[0093] The present application also provides a distributed data transmission device, which is applied to a first computing node of any partition in a distributed data transmission system, Figure 7 , the distributed data transmission device comprises:

[0094] An acquisition module 10 is used to acquire a message set to be transmitted;

[0095] A division module 20 is used to divide the message set to be transmitted into batches to obtain multiple batches of message sets to be transmitted and batch sequence information, wherein each batch of message sets to be transmitted includes multiple messages to be transmitted, rather than one message to be transmitted or all messages to be transmitted;

[0096] The sending module 30 is used to send the multiple batches of message sets to be transmitted to the second computing nodes of other partitions in sequence based on the batch sequence information, so that the second computing nodes can directly calculate the message sets to be transmitted of the corresponding batches after receiving the message sets to be transmitted of the corresponding batches, wherein the partition message communication process of the first computing node and the local computing process of the second computing node are overlapped and processed in parallel, including: when the first computing node is transmitting the message sets to be transmitted of the remaining batches to the second computing node, the second computing node is also synchronously calculating the message sets to be transmitted of the corresponding batches that have been transmitted by the first computing node;

[0097] And / or, the sending module 30 includes: an adding module, which is used to add the multiple batches of message sets to be transmitted to the message sending buffer in sequence based on the batch sequence information; a detection module, which is used to detect the data size of the message sending buffer in real time to obtain a detection result; a transmission module, which is used to send the message set to be transmitted in the message sending buffer to the second computing node of another partition based on the batch sequence information if the detection result is that the data size of the message sending buffer reaches a preset threshold;

[0098] And / or, the acquisition module 10 includes: a receiving module, used to receive a set of messages to be calculated sent by a second computing node in other partitions, wherein the set of messages to be calculated includes iteration rounds; a round division module, used to divide the set of messages to be calculated by the iteration rounds to obtain the sets of messages to be calculated of different iteration rounds after division; a saving module, used to save the sets of messages to be calculated of different iteration rounds to different message receiving buffers, wherein the message receiving buffers include at least two; an iterative calculation module, used to iteratively calculate the set of messages to be calculated in the message receiving buffer to obtain the set of messages to be transmitted;

[0099] And / or, the iterative calculation module includes: a local calculation module, which is used to perform local calculation of the iterative round on the message set to be calculated in the message receiving buffer to obtain the message set to be transmitted and iteration information of the iterative round; a judgment module, which is used to judge whether the iterative information satisfies a preset iteration termination condition; an execution module, which is used to execute data transmission of the message set to be transmitted and algorithm initialization of the next iterative round if the iterative information does not satisfy the iterative termination condition, until the message set to be calculated of the next iterative round of the second computing node in other partitions is received, and then the next round of iterative calculation is executed based on the initialized algorithm;

[0100] And / or, the distributed data transmission device further comprises: a partition map calculation result determination module, configured to stop iterative calculation and data transmission if the iteration information satisfies the iteration termination condition, and obtain the partition map calculation result after the final iteration is completed;

[0101] And / or, the iterative calculation module further includes: an execution order determination module, which is used to sort the iterative rounds in order from small to large based on the iterative rounds to obtain an execution order; a message iterative calculation module, which is used to iteratively calculate the message set to be calculated in the message receiving buffer of the corresponding iterative round based on the execution order to obtain a message set to be transmitted;

[0102] And / or, the division module 20 includes: dividing the to-be-transmitted message set into batches based on a preset data division size to obtain multiple batches of to-be-transmitted message sets with the same data size.

[0103] The specific implementation of the distributed data transmission device of the present application is basically the same as the above-mentioned embodiments of the distributed data transmission method, and will not be repeated here.

[0104] The present application also provides a distributed data transmission system, the distributed data transmission system comprising a plurality of partitions, each partition comprising a plurality of computing nodes, wherein any node of any partition is a first computing node, and any node of other partitions is a second computing node, and computing nodes of different partitions are connected in communication.

[0105] The first computing node is used to obtain a set of messages to be transmitted; divide the set of messages to be transmitted into batches to obtain a plurality of batches of message sets to be transmitted and batch sequence information, wherein each batch of message sets to be transmitted includes a plurality of messages to be transmitted, rather than a single message to be transmitted or all messages to be transmitted; and based on the batch sequence information, sequentially send the plurality of batches of message sets to be transmitted to the second computing nodes in other partitions;

[0106] The second computing node is used to receive multiple batches of message sets to be transmitted sent by the first computing node, and directly calculate the corresponding batch of message sets to be transmitted after receiving the corresponding batch of message sets to be transmitted, wherein the partitioned message communication process of the first computing node and the local computing process of the second computing node are overlapping and parallel processing including: while the first computing node is transmitting the remaining batches of message sets to be transmitted to the second computing node, the second computing node is also synchronously calculating the corresponding batch of message sets to be transmitted that has been transmitted by the first computing node.

[0107] The specific implementation of the distributed data transmission system of the present application is basically the same as the above-mentioned embodiments of the distributed data transmission method, and will not be repeated here.

[0108] Reference Figure 8 , Figure 8 It is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present application.

[0109] like Figure 8As shown, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0110] Optionally, the distributed data transmission device may also include a rectangular user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, etc. The rectangular user interface may include a display screen (Display), an input submodule such as a keyboard (Keyboard), and the optional rectangular user interface may also include a standard wired interface and a wireless interface. The network interface may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).

[0111] Those skilled in the art will understand that Figure 7 The distributed data transmission device structure shown in the figure does not constitute a limitation on the distributed data transmission device, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0112] like Figure 8 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module and a distributed data transmission program. The operating system is a program that manages and controls the hardware and software resources of the distributed data transmission device, and supports the operation of the distributed data transmission program and other software and / or programs. The network communication module is used to realize the communication between the components inside the memory 1005, and the communication with other hardware and software in the distributed data transmission system.

[0113] exist Figure 8 In the distributed data transmission device shown, the processor 1001 is used to execute the distributed data transmission program stored in the memory 1005 to implement the steps of any of the above-mentioned distributed data transmission methods.

[0114] The specific implementation of the distributed data transmission device of the present application is basically the same as the above-mentioned embodiments of the distributed data transmission method, and will not be repeated here.

[0115] The present application also provides a storage medium, on which a program for implementing a distributed data transmission method is stored, and the program for implementing a distributed data transmission method is executed by a processor to implement the distributed data transmission method described below:

[0116] Get the message set to be transmitted;

[0117] Dividing the message set to be transmitted into batches to obtain multiple batches of message sets to be transmitted and batch sequence information, wherein each batch of message sets to be transmitted includes multiple messages to be transmitted, rather than one message to be transmitted or all messages to be transmitted;

[0118] Based on the batch sequence information, the multiple batches of message sets to be transmitted are sent to the second computing nodes of other partitions in sequence, so that the second computing nodes can directly calculate the corresponding batches of message sets to be transmitted after receiving the corresponding batches of message sets to be transmitted, wherein the partition message communication process of the first computing node and the local computing process of the second computing node are overlapped and processed in parallel, including: while the first computing node is transmitting the remaining batches of message sets to be transmitted to the second computing node, the second computing node is also synchronously calculating the corresponding batches of message sets to be transmitted that have been transmitted by the first computing node.

[0119] Optionally, the step of sending the multiple batches of message sets to be transmitted to the second computing nodes of other partitions in sequence based on the batch sequence information includes:

[0120] Based on the batch sequence information, the plurality of batches of message sets to be transmitted are sequentially added to the message sending buffer;

[0121] Detecting the data size of the message sending buffer in real time to obtain a detection result;

[0122] If the detection result is that the data size of the message sending buffer reaches a preset threshold, the set of messages to be transmitted in the message sending buffer is sent to the second computing node of the other partition based on the batch sequence information.

[0123] Optionally, the step of obtaining a set of messages to be transmitted includes:

[0124] Receive a set of messages to be calculated sent by a second computing node in another partition, wherein the set of messages to be calculated includes an iteration round;

[0125] Dividing the set of messages to be calculated into the iteration rounds to obtain divided sets of messages to be calculated in different iteration rounds;

[0126] Saving the message sets to be calculated in different iteration rounds to different message receiving buffers, wherein the message receiving buffers include at least two;

[0127] Iterative calculation is performed on the message set to be calculated in the message receiving buffer to obtain the message set to be transmitted.

[0128] Optionally, the message set to be calculated includes an iteration round, and the step of iteratively calculating the message set to be calculated in the message receiving buffer to obtain the message set to be transmitted includes:

[0129] Performing local calculation of the iteration round on the message set to be calculated in the message receiving buffer to obtain the message set to be transmitted and iteration information of the iteration round;

[0130] Determining whether the iteration information satisfies a preset iteration termination condition;

[0131] If the iteration information does not meet the iteration termination condition, the data transmission of the message set to be transmitted and the algorithm initialization of the next iteration round are executed until the message set to be calculated of the next iteration round of the second computing node in other partitions is received, and then the next round of iterative calculation is executed based on the initialized algorithm.

[0132] Optionally, after the step of performing data transmission of the message set to be transmitted and algorithm initialization for the next iteration round if the iteration information does not satisfy the iteration termination condition, the method includes:

[0133] If the iteration information satisfies the iteration termination condition, the iterative calculation and data transmission are stopped to obtain the partition map calculation result after the final iteration is completed.

[0134] Optionally, the step of iteratively calculating the message set to be calculated in the message receiving buffer to obtain the message set to be transmitted includes:

[0135] Based on the iteration rounds, the iteration rounds are sorted in order from small to large to obtain an execution order;

[0136] Based on the execution order, the message set to be calculated in the message receiving buffer of the corresponding iteration round is iteratively calculated to obtain the message set to be transmitted.

[0137] Optionally, the set of messages to be transmitted is a set of initial calculation results of each graph node in the partition, and the initial calculation results are determined by each graph node in the partition according to a preset graph algorithm task; or the set of messages to be transmitted is the calculation results of the second computing nodes in other partitions received by the first computing node through local calculation.

[0138] Optionally, the step of dividing the set of messages to be transmitted into batches to obtain multiple batches of the set of messages to be transmitted includes:

[0139] Based on a preset data partition size, the message set to be transmitted is divided into batches to obtain multiple batches of message sets to be transmitted with the same data size.

[0140] The specific implementation of the storage medium of the present application is basically the same as the above-mentioned embodiments of the distributed data transmission method, and will not be repeated here.

[0141] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned distributed data transmission method when executed by a processor.

[0142] The specific implementation of the computer program product of the present application is basically the same as the above-mentioned embodiments of the distributed data transmission method, and will not be repeated here.

[0143] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0144] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0145] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0146] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A distributed data transmission method, It is characterized in that Applied to a first computing node of any partition in a distributed data transmission system, the distributed data transmission method comprising: Get the message set to be transmitted; The step of obtaining a set of messages to be transmitted includes: Receive a set of messages to be calculated sent by a second computing node in another partition, wherein the set of messages to be calculated includes an iteration round; Dividing the set of messages to be calculated into the iteration rounds to obtain divided sets of messages to be calculated in different iteration rounds; Saving the message sets to be calculated in different iteration rounds to different message receiving buffers, wherein the message receiving buffers include at least two; Iteratively calculating the message set to be calculated in the message receiving buffer to obtain the message set to be transmitted; Dividing the message set to be transmitted into batches to obtain multiple batches of message sets to be transmitted and batch sequence information, wherein each batch of message sets to be transmitted includes multiple messages to be transmitted, rather than one message to be transmitted or all messages to be transmitted; Based on the batch sequence information, the multiple batches of message sets to be transmitted are sent to the second computing nodes of other partitions in sequence, so that the second computing nodes can directly calculate the corresponding batches of message sets to be transmitted after receiving the corresponding batches of message sets to be transmitted, wherein the partition message communication process of the first computing node and the local computing process of the second computing node are overlapped and processed in parallel, including: while the first computing node is transmitting the remaining batches of message sets to be transmitted to the second computing node, the second computing node is also synchronously calculating the corresponding batches of message sets to be transmitted that have been transmitted by the first computing node.

2. The distributed data transmission method according to claim 1, It is characterized in that The step of sending the plurality of batches of message sets to be transmitted to the second computing nodes of other partitions in sequence based on the batch sequence information includes: Based on the batch sequence information, the plurality of batches of message sets to be transmitted are sequentially added to the message sending buffer; Detecting the data size of the message sending buffer in real time to obtain a detection result; If the detection result is that the data size of the message sending buffer reaches a preset threshold, the set of messages to be transmitted in the message sending buffer is sent to the second computing node of the other partition based on the batch sequence information.

3. The distributed data transmission method according to claim 1, It is characterized in that The message set to be calculated includes an iterative round, and the step of iteratively calculating the message set to be calculated in the message receiving buffer to obtain the message set to be transmitted includes: Performing local calculation of the iteration round on the message set to be calculated in the message receiving buffer to obtain the message set to be transmitted and iteration information of the iteration round; Determining whether the iteration information satisfies a preset iteration termination condition; If the iteration information does not meet the iteration termination condition, the data transmission of the message set to be transmitted and the algorithm initialization of the next iteration round are executed until the message set to be calculated of the next iteration round of the second computing node in other partitions is received, and then the next round of iterative calculation is executed based on the initialized algorithm.

4. The distributed data transmission method according to claim 3, It is characterized in that After the step of performing data transmission of the message set to be transmitted and algorithm initialization for the next iteration round if the iteration information does not satisfy the iteration termination condition, the method comprises: If the iteration information satisfies the iteration termination condition, the iterative calculation and data transmission are stopped to obtain the partition map calculation result after the final iteration is completed.

5. The distributed data transmission method according to claim 1, It is characterized in that The step of iteratively calculating the message set to be calculated in the message receiving buffer to obtain the message set to be transmitted includes: Based on the iteration rounds, the iteration rounds are sorted in order from small to large to obtain an execution order; Based on the execution order, the message set to be calculated in the message receiving buffer of the corresponding iteration round is iteratively calculated to obtain the message set to be transmitted.

6. The distributed data transmission method according to claim 1, It is characterized in that The set of messages to be transmitted is a set of initial calculation results of each graph node in the partition, and the initial calculation results are determined by each graph node in the partition according to a preset graph algorithm task; Alternatively, the set of messages to be transmitted is obtained by locally calculating the calculation results received by the first computing node from the second computing nodes in other partitions.

7. The distributed data transmission method according to claim 1, It is characterized in that The step of dividing the set of messages to be transmitted into batches to obtain multiple batches of the set of messages to be transmitted comprises: Based on a preset data partition size, the message set to be transmitted is divided into batches to obtain multiple batches of message sets to be transmitted with the same data size.

8. A distributed data transmission device, It is characterized in that The distributed data transmission device is applied to a first computing node of any partition in a distributed data transmission system, wherein the distributed data transmission device comprises: An acquisition module, used to acquire a set of messages to be transmitted; The acquisition module comprises: A receiving module, configured to receive a set of messages to be calculated sent by a second computing node in another partition, wherein the set of messages to be calculated includes an iteration round; A round division module, used for dividing the message set to be calculated into the iteration rounds to obtain the message sets to be calculated in different iteration rounds after division; A saving module, used to save the message sets to be calculated in different iteration rounds to different message receiving buffers, wherein the message receiving buffers include at least two; An iterative calculation module, used for iteratively calculating the message set to be calculated in the message receiving buffer to obtain a message set to be transmitted; A division module, used for dividing the set of messages to be transmitted into batches to obtain multiple batches of the set of messages to be transmitted and batch sequence information, wherein each batch of the set of messages to be transmitted includes multiple messages to be transmitted, rather than one message to be transmitted or all messages to be transmitted; A sending module is used to send the multiple batches of message sets to be transmitted to the second computing nodes of other partitions in sequence based on the batch sequence information, so that the second computing nodes can directly calculate the corresponding batch of message sets to be transmitted after receiving the corresponding batch of message sets to be transmitted, wherein the partition message communication process of the first computing node and the local calculation process of the second computing node are overlapped and processed in parallel, including: when the first computing node is transmitting the remaining batches of message sets to be transmitted to the second computing node, the second computing node is also synchronously calculating the corresponding batch of message sets to be transmitted that the first computing node has transmitted.

9. A distributed data transmission system, It is characterized in that The distributed data transmission system includes multiple partitions, each partition includes multiple computing nodes, wherein any node in any partition is a first computing node, and any node in other partitions is a second computing node, and computing nodes in different partitions are connected in communication. The first computing node is used to receive a set of messages to be calculated sent by a second computing node in other partitions, wherein the set of messages to be calculated includes iteration rounds; the set of messages to be calculated is divided into the iteration rounds to obtain the set of messages to be calculated of different iteration rounds after the division; the set of messages to be calculated of different iteration rounds are saved in different message receiving buffers, wherein the message receiving buffers include at least two; iteratively calculate the set of messages to be calculated in the message receiving buffer to obtain a set of messages to be transmitted; divide the set of messages to be transmitted into batches to obtain multiple batches of message sets to be transmitted and batch sequence information, wherein each batch of the set of messages to be transmitted includes multiple messages to be transmitted, rather than one message to be transmitted or all messages to be transmitted; based on the batch sequence information, the multiple batches of message sets to be transmitted are sent in sequence to the second computing nodes in other partitions; The second computing node is used to receive multiple batches of message sets to be transmitted sent by the first computing node, and directly calculate the corresponding batch of message sets to be transmitted after receiving the corresponding batch of message sets to be transmitted, wherein the partitioned message communication process of the first computing node and the local computing process of the second computing node are overlapping and parallel processing including: while the first computing node is transmitting the remaining batches of message sets to be transmitted to the second computing node, the second computing node is also synchronously calculating the corresponding batch of message sets to be transmitted that has been transmitted by the first computing node.

10. A distributed data transmission device, It is characterized in that The distributed data transmission device comprises: a memory, a processor, and a program stored in the memory for implementing the distributed data transmission method. The memory is used to store a program for implementing a distributed data transmission method; The processor is used to execute a program for implementing the distributed data transmission method, so as to implement the steps of the distributed data transmission method as claimed in any one of claims 1 to 7.

11. A storage medium, It is characterized in that The storage medium stores a program for implementing a distributed data transmission method, and the program for implementing a distributed data transmission method is executed by a processor to implement the steps of the distributed data transmission method as claimed in any one of claims 1 to 7.