Data processing method, device, system, electronic device and storage medium

Through parallel reading and block partitioning of graph-structured data by distributed computing nodes, the problems of slow loading of graph-structured data and low coding efficiency are solved, and the performance of the graph computing process is improved.

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

Patent Information

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

AI Technical Summary

Technical Problem

When processing large-scale graph structure data, existing technologies have problems such as slow loading speed, high storage requirements, and low coding efficiency. These problems are particularly obvious in dynamic graph scenarios. Traditional methods cannot effectively cope with frequent changes in point data and edge data. characteristics.

Method used

The graph structure data is read in parallel through multiple distributed computing nodes, and methods such as block partitioning and hash modulus are used to ensure coding continuity within and between each computing node and improve loading speed and coding efficiency.

Benefits of technology

It improves the loading speed and coding efficiency of graph-structured data, ensures the performance of graph partitioning and graph calculation processes, and reduces memory access delays and cache miss rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118277624B
    Figure CN118277624B
Patent Text Reader

Abstract

The embodiment of the present application provides a data processing method, which relates to the field of data processing technology. The method comprises: reading graph structure data in parallel through multiple distributed computing nodes; each computing node determines the target computing node corresponding to the original ID of each vertex in the read batch data, and sends it to the corresponding target computing node for storage; each computing node performs deduplication processing on the original ID stored by itself, and determines the uncoded original ID; each computing node continuously encodes the uncoded original ID stored by itself based on the corresponding coding ID interval; the coding ID intervals corresponding to multiple computing nodes are continuous, and the number of encodable IDs in the coding ID interval is the same as the number of uncoded original IDs, and each computing node replaces the original ID of the vertex of the point data and / or edge data in the read batch data with the coding ID, obtains the encoded point data and / or edge data, and stores it in its own storage space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a data processing method, device, system, electronic device and storage medium. Background Art

[0002] As the scale of graph structured data grows, it becomes a trend to store graph structured data in a data storage medium or data storage system located outside the graph structured data processing device. When processing graph structured data, it is necessary to load the graph structured data from the external data storage medium or data storage system into the computing environment or storage system of the graph data processing device so that the graph data processing device can perform graph partitioning or graph calculation later.

[0003] However, related technologies have some problems when processing large-scale graph structure data, such as slow loading speed, high storage requirements, low encoding efficiency, etc. These problems are particularly obvious in dynamic graph scenarios. Dynamic graph structure data may contain a large amount of point data and edge data, and the point data and edge data have the characteristics of frequent changes. Traditional graph structure data processing methods cannot effectively deal with these problems. Summary of the invention

[0004] The present application provides a data processing method, device, system, electronic device and storage medium, which load graph structure data through multiple distributed computing nodes to improve the loading speed and encoding efficiency of graph structure data, and can continuously encode vertex IDs within the same computing node and between different computing nodes to ensure the performance of subsequent graph partitioning and graph calculation processes.

[0005] The first aspect of an embodiment of the present application provides a data processing method, which reads graph structure data in parallel through multiple distributed computing nodes; the graph structure data includes point data and / or edge data, the point data includes a vertex, and the edge data includes two vertices, a source vertex and a target vertex; multiple batches of data; each computing node reads a batch of data obtained by dividing the graph structure data; each computing node determines a target computing node corresponding to the original identification ID of each vertex in the read batch data, and sends the original ID to the corresponding target computing node for storage; each computing node deduplicates the original ID stored in itself, determines the uncoded original ID, and sends the number of uncoded original IDs to the main computing node, which is one of the multiple distributed computing nodes; the main computing node determines the coded ID interval corresponding to each computing node based on the number of uncoded original IDs and historical coded IDs in each computing node, and sends the coded ID interval to the corresponding target computing node for storage; The id interval is sent to the corresponding computing node; wherein the historical coding id is the end value of the last coding id interval arranged in the previous encoding process; the coding id intervals corresponding to multiple distributed computing nodes are continuous, and the starting value of the first coding id interval is the next continuous coding id of the historical coding id, and the number of encodable ids in the coding id interval corresponding to each computing node is the same as the number of unencoded original ids corresponding to itself; each computing node continuously encodes the unencoded original id stored in itself based on the corresponding coding id interval to obtain the coding id and the mapping relationship between the original id and the coding id; each computing node replaces the original id of the vertex of the point data and / or edge data in the read batch data with the coding id based on the mapping relationship between the original id and the coding id in all computing nodes to obtain the encoded point data and / or edge data; each computing node respectively stores the point data and / or edge data obtained after its own encoding.

[0006] The data processing method provided by the embodiment of the present application first divides the graph structure data into blocks to obtain multiple batches of data when loading data, and then reads multiple batches of data in parallel through multiple computing nodes in a distributed manner to improve the speed of data reading. After each computing node reads a batch of data, it first determines the target computing node corresponding to the original ID of each vertex in the batch data, and sends it to its corresponding target computing node, so that each computing node corresponds to the original ID of the storage part. After each computing node deduplicates the original ID stored by itself, it determines the uncoded original ID, and then can continuously encode the uncoded original ID stored by itself according to the corresponding encoded ID interval.

[0007] Among them, the coding id intervals corresponding to multiple computing nodes are continuous, and the interval length of the coding id interval corresponding to each computing node is the number of uncoded original ids in the computing node; the starting value of the first coding id interval is the historical coding id, that is, the end value of the last coding id interval in the last encoding. In this way, after each computing node encodes the uncoded original id according to the corresponding coding id interval, the coding ids of the uncoded original ids in each computing node are continuous, and the coding ids stored in multiple computing nodes are also continuous. Then, based on the mapping relationship between the coding id and the original id in all computing nodes, each computing node replaces the original identification id of the vertex of the point data and / or edge data in each batch of data with the coding id, obtains the encoded point data and / or edge data, and stores them in its corresponding storage space respectively.

[0008] It can be seen that the data processing method provided in the present application adopts a parallel reading method of multiple distributed computing nodes to load graph structure data, which can improve the loading speed and encoding speed of graph structure data, and when encoding the data, it encodes according to the number of unencoded IDs and historical encoded IDs in each processing, which can ensure the encoding continuity in the same computing node and between multiple computing nodes, thereby improving the performance of subsequent graph partitioning and graph calculation processes.

[0009] In combination with the first implementation method of the first aspect, each computing node replaces the original ids of the vertices of the point data and / or edge data in the read batch data with the encoded id based on the mapping relationship between the original ids and the encoded ids in all computing nodes to obtain the encoded point data and / or edge data, including: each computing node determines the original computing node corresponding to the unencoded original id stored in itself; the original computing node is the computing node that sends the unencoded original id to the current computing node; the unencoded original id and the corresponding encoded id are sent to the corresponding original computing node; the unencoded original id and the corresponding encoded id are received from other computing nodes; based on the unencoded original ids and the corresponding encoded ids sent by other computing nodes, and the mapping relationship between the original ids and the corresponding encoded ids stored in themselves, the original ids of the vertices of the point data and / or edge data in each batch of data are replaced with the corresponding encoded ids.

[0010] In combination with the second implementation method of the first aspect, the target computing node corresponding to the original identification id of the vertex in each batch of data is determined, and before the original id is sent to the target computing node, the method also includes: each computing node determines a target partition corresponding to each original id by hash modulo; one computing node corresponds to multiple partitions; the original id is sent to the corresponding target partition by means of the information transfer interface MPI communication; and the original id in each partition is deduplicated.

[0011] In combination with the third implementation method of the first aspect, each computing node determines a target computing node corresponding to the original identification id of the vertex of the batch data, and sends the original id to the corresponding target computing node for storage, including: each computing node determines the target computing node corresponding to the original id of each vertex in the batch data by hash modulus; and sends the original id to the corresponding target computing node for storage by Shuffle communication.

[0012] In combination with the fourth implementation method of the first aspect, graph structured data is read in parallel through multiple distributed computing nodes, including: reading and parsing multiple batches of data in parallel through multiple computing nodes in multiple data processing devices, and one data processing device includes at least one computing node.

[0013] In combination with a fifth implementation method of the first aspect, graph structured data is read in parallel through multiple distributed computing nodes, including: each computing node divides a batch of data into blocks to obtain at least one block of data; multiple distributed computing nodes read at least one block of data in parallel, and each computing node reads the block data in parallel through at least one thread; each computing node determines a target computing node corresponding to the original identification id of the vertex of the batch data, and sends the original id to the corresponding target computing node for storage, specifically: each computing node determines a target computing node corresponding to the original id of the vertex in each block of data; the original identification id of the vertex of the point data and / or edge data in each batch of data is replaced with the encoded id, specifically: the original id of the vertex of the point data and / or edge data in each block of data is replaced with the encoded id.

[0014] The second aspect of the embodiment of the present application provides a data processing device, including: a reading module, used to read a batch of data obtained by dividing graph structure data; the graph structure data includes point data and / or edge data, the point data includes a vertex, and the edge data includes two vertices, a source vertex and a target vertex; a sending module, used to determine a target computing node corresponding to the original id of each vertex in the read batch data, and send the original id to the corresponding target computing node for storage; a deduplication module, used to deduplicate the original id stored in itself, and determine the uncoded original id, and send the number of uncoded original ids to the main computing node, so that the main computing node determines the coded id interval corresponding to each computing node based on the number of uncoded original ids in each computing node and the historical coded id, and sends the coded id interval to the corresponding computing node; wherein the historical coded id The code id is the end value of the last coding id interval arranged in the previous encoding process; the coding id intervals corresponding to multiple distributed computing nodes are continuous, and the starting value of the front-arranged coding id interval is the next continuous coding id of the historical coding id, and the number of encodable ids in the coding id interval corresponding to each computing node is the same as the number of unencoded original ids corresponding to itself; the encoding module is used to continuously encode the unencoded original id stored in itself based on the corresponding coding id interval to obtain the coding id and the mapping relationship between the original id and the coding id; the encoding module is also used to replace the original ids of the vertices of the point data and / or edge data in the read batch data with the coding id based on the mapping relationship between the original id and the coding id in all computing nodes to obtain the encoded point data and / or edge data; the storage module is used to store the encoded point data and / or edge data.

[0015] The third aspect of the embodiment of the present application provides a data processing system, including: multiple data processing devices; each data processing device includes one or more computing nodes, and multiple data processing devices read multiple batches of data in parallel through multiple computing nodes; the batch data is obtained by dividing the graph structure data, the graph structure data includes point data and / or edge data, the point data includes a vertex, and the edge data includes two vertices, a source vertex and a target vertex; each data processing device determines a target computing node corresponding to the original identification ID of each vertex in the read batch data, and sends the original ID to the corresponding target computing node for storage; each data processing device deduplicates the original ID stored in itself, determines the uncoded original ID, and sends the number of uncoded original IDs to the main computing node, which is one of the multiple computing nodes; the main computing node determines the encoding corresponding to each computing node based on the number of uncoded original IDs and historical encoding IDs in each computing node. The code id interval is read and sent to the corresponding computing node; wherein the historical code id is the end value of the last code id interval arranged in the previous encoding process; the code id intervals corresponding to multiple distributed computing nodes are continuous, and the starting value of the first code id interval is the next continuous code id of the historical code id, and the number of encodable ids in the code id interval corresponding to each computing node is the same as the number of unencoded original ids corresponding to itself; each data processing device continuously encodes the unencoded original id stored in itself based on the corresponding code id interval to obtain the code id and the mapping relationship between the original id and the code id; each data processing device replaces the original id of the vertex of the point data and / or edge data in the read batch data with the code id based on the mapping relationship between the original id and the code id in all computing nodes to obtain the encoded point data and / or edge data; each computing node respectively stores the point data and / or edge data obtained after their own encoding.

[0016] A fourth aspect of an embodiment of the present application provides an electronic device, comprising: one or more processors; one or more memories; wherein the one or more memories are used to store computer program code, the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the data processing method provided by the first aspect and its possible implementation methods.

[0017] A fifth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores computer execution instructions. When the computer execution instructions are executed on a computer, the computer executes the data processing method provided by the first aspect and its possible implementation methods.

[0018] A sixth aspect of an embodiment of the present application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the data processing method provided in the first aspect and its possible implementation methods.

[0019] Among them, the beneficial effects described in the second to sixth aspects can refer to the beneficial effect analysis of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present invention and do not constitute a limitation on the technical solution of the present invention.

[0021] Figure 1 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;

[0022] Figure 2 A schematic diagram of the structure of a data processing system provided in an embodiment of the present application;

[0023] Figure 3 A method flow of a data processing method provided in an embodiment of the present application Figure 1 ;

[0024] Figure 4 A schematic diagram of determining the mapping relationship between the original ID and the encoded ID provided in an embodiment of the present application;

[0025] Figure 5 A schematic diagram of determining a coding ID provided in an embodiment of the present application;

[0026] Figure 6 A schematic diagram of determining encoded edge data provided by an embodiment of the present application;

[0027] Figure 7 A method flow of a data processing method provided in an embodiment of the present application Figure 2 ;

[0028] Figure 8 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;

[0029] Fig. 9 A schematic diagram of the structure of another data processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0031] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.

[0032] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "connected" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances. In addition, when describing a pipeline, the "connected" and "connection" used in this application have the meaning of conduction. The specific meaning needs to be understood in conjunction with the context.

[0033] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0034] Graph structure data is composed of a series of points (vertices) and edges. Points are the basic units in the graph, representing entities or objects in the graph. Edges are line segments connecting these points, representing the association or relationship between points. In other words, edge data describes the connection relationship between points in the graph, while point data represents each entity in the graph.

[0035] It is understandable that edge data usually contains references (or indices) pointing to the two points it connects, so that the connection relationship between the points can be clearly expressed. At the same time, point data can also contain references to all edges connected to it, so as to facilitate fast access and traversal of the graph structure.

[0036] When using or analyzing a graph data set, it needs to be loaded into a computing environment or storage system. Loading graph data involves reading data sources (such as files, databases, etc.) and converting the data into a format suitable for analysis and processing. This usually includes extracting information about edges and vertices and building appropriate data structures (such as adjacency matrices, adjacency lists, etc.) to store this information.

[0037] If the graph data is already stored in a format suitable for analysis or processing, it may not need to be re-encoded when loading. For example, if the data is already stored in the form of an adjacency matrix or adjacency list, and these formats meet the input requirements of the analysis algorithm or application, then it can be loaded and used directly.

[0038] However, if the original format of the graph structured data is not suitable for analysis or processing, or if there are special requirements for subsequent analysis or application, then re-encoding may be required. For example, if the data is input as streaming data or files, a specific data format or attribute is required for subsequent algorithm analysis and cannot be used directly, then the data needs to be encoded during the loading process for subsequent use.

[0039] In graph structured data, vertices and edges are the core components, and the encoding process mainly involves the representation and transformation of these elements. Specifically, the encoding of graph data may include the following key aspects:

[0040] 1. Vertex encoding: Assign a unique identifier or code to each vertex so that it can be accurately identified and referenced in subsequent processing.

[0041] 2. Edge encoding: For undirected graphs, edges can be simply represented by the encodings of two vertices; for directed graphs, edges need to additionally consider direction information, such as using a combination of the encodings of the source vertex and the target vertex to represent them.

[0042] 3. Attribute encoding: If the vertices and edges in the graph structure data also carry attribute information (such as weights, labels, etc.), then these attributes also need to be encoded accordingly so that they can be associated with the encoding of the vertices and edges.

[0043] In the related art, the data loading process of the graph computing system often takes a lot of time during the entire graph computing process, and there are time performance issues. In order to save loading time, a distributed method can be used to load data, that is, multiple machines or multiple modules are used to start loading at the same time, which will save a lot of loading time. However, when this solution re-encodes the data during the loading process, each machine or each module will encode the graph data it reads separately. This encoding method will cause discontinuous encoding of graph data in multiple devices, which will affect the performance of subsequent graph division and graph computing processes.

[0044] Graph partitioning is the process of dividing graph data into multiple subgraphs or partitions for parallel processing in a distributed environment. If the encoding of the graph data is not continuous, additional operations may be required during the partitioning process to ensure the data integrity of each subgraph or partition. This will increase the complexity of the partitioning and may lead to reduced partitioning efficiency.

[0045] For graph computing algorithms, it is usually necessary to frequently access vertex and edge information. If this data is not stored continuously in memory, the processor may encounter cache misses when accessing this data, which will increase the latency of memory access and thus reduce computing performance. In other words, discontinuous encoding may lead to low efficiency of memory access and cache utilization.

[0046] In distributed graph computing, communication between different computing nodes is inevitable. If the encoding of graph data is not continuous, then additional overhead may be required to ensure the integrity and consistency of the data when transmitting data between computing nodes. For example, additional metadata may need to be sent to indicate the starting position and length of the data.

[0047] Based on this, an embodiment of the present application provides a data processing method, which first divides the graph structure data into blocks to obtain multiple batches of data when loading data, and then reads multiple batches of data in parallel through multiple distributed computing nodes to improve the speed of data reading. After each computing node reads a batch of data, it first determines the target computing node corresponding to the original ID of each vertex in the batch data, and sends it to its corresponding target computing node, so that each computing node corresponds to the original ID of the storage part. After each computing node deduplicates the original ID stored in itself, it determines the uncoded original ID, and then can continuously encode the uncoded original ID stored in itself according to the corresponding encoded ID interval.

[0048] Among them, the coding id intervals corresponding to multiple computing nodes are continuous, and the interval length of the coding id interval corresponding to each computing node is the number of uncoded original ids in the computing node; the starting value of the first coding id interval is the historical coding id, that is, the end value of the last coding id interval in the last encoding. In this way, after each computing node encodes the uncoded original id according to the corresponding coding id interval, the coding ids of the uncoded original ids in each computing node are continuous, and the coding ids stored in multiple computing nodes are also continuous. Then, each of the computing nodes replaces the original identification ids of the vertices of the point data and / or edge data in each batch of data with the coding id based on the mapping relationship between the coding id and the original id in all computing nodes, obtains the encoded point data and / or edge data, and stores them in its own corresponding storage space respectively.

[0049] It can be seen that the data processing method provided in the present application adopts a parallel reading method of multiple distributed computing nodes to load graph structure data, which can improve the loading speed and encoding speed of graph structure data, and when encoding the data, it encodes according to the number of unencoded IDs and historical encoded IDs in each processing, which can ensure the encoding continuity in the same computing node and between multiple computing nodes, thereby improving the performance of subsequent graph partitioning and graph calculation processes.

[0050] In some embodiments, the data processing method provided in the embodiments of the present application can be applied to Figure 1 In the data processing device shown, Figure 1 As shown, the data processing device 10 includes: a plurality of data loaders 101 , a plurality of data parsers 102 and a plurality of data encoders 103 .

[0051] It is understandable that a data loader, a data parser, and a data encoder in this embodiment can be referred to as a computing node, which can be used to process a batch of tasks. Figure 1 The data processing device 10 shown includes three computing nodes and can load and process three batches of data simultaneously.

[0052] In some embodiments, a data loader, a data parser, and a data encoder may be referred to as a data processing module, a data processing module may correspond to a computing node, and each data processing module may process a batch of data.

[0053] In other embodiments, the data processing method provided in the embodiments of the present application can be applied to Figure 2 The data processing system 20 shown in FIG. Figure 2 , the data processing system 20 may include multiple data processing devices 10. Each data processing device 10 may include a data loader, a data parser, and a data encoder, or each data processing device may include multiple data loaders, multiple data parsers, and multiple data encoders. In other words, a data processing device may include one or more computing nodes, and the present application embodiment does not impose any restrictions on this.

[0054] During the data loading process, one or more data loaders can be started in each data processing device in a distributed manner to load a batch of graph structured data (batch data).

[0055] At the same time, as a feasible implementation method, each data loader can divide the file to be read into blocks, and then each thread reads a block file in a concurrent manner to perform concurrent data loading.

[0056] It is understandable that if Figure 1 As shown, the data loader 101 is used to read a batch of graph structure data (batch data) from the data source. The data read from the data source is raw data, that is, in the form of (source vertex id, target vertex id and edge attributes), so the data parser 102 is required to parse the read graph structure data, parse according to the field type in the user-defined schema meta information, and convert each field into a user-defined field type. Then, the vertex id in the graph structure data is re-encoded by the data encoder for subsequent storage and use.

[0057] It should be understood that the data source may be a database, a storage space of a data processing device, or other storage devices that store graph structured data, and this application does not limit this.

[0058] In some embodiments, the data processing method provided by the embodiments of the present application can adopt an asynchronous processing process when loading graph structure data. Specifically, after the data loaders of multiple computing nodes have read batches of data, the batches of data can be placed in the preprocessing tasks corresponding to the data parser, and multiple data loaders can start reading the next batches of data. Similarly, after the data parser has parsed batches of data, it can place the batches of data in the preprocessing tasks corresponding to the data encoder, and can start parsing the next batches of data without waiting for the data encoder to encode it.

[0059] It should be understood that the data processing device 10 in the embodiment of the present application can be an electronic device such as a server, a desktop computer, a tablet computer, a laptop computer, a handheld computer, a mobile phone, a handheld computer, an ultra-mobile personal computer (UMPC), a netbook, a wearable device, etc. The embodiment of the present application does not impose any restrictions on the specific form of the data processing device.

[0060] See also Figure 3 The data processing method provided in the embodiment of the present application comprises the following steps:

[0061] S301. Read graph structure data in parallel through multiple distributed computing nodes.

[0062] The graph structure data includes point data and / or edge data, the point data includes a vertex, and the edge data includes two vertices, a source vertex and a target vertex.

[0063] Graph data structures can very intuitively represent the relationship between entities and provide a wealth of operations and analysis methods. For example, in graph analysis, the attributes of nodes and the relationships between edges can be used to identify patterns, communities, roads, etc. in the graph, thereby revealing the inherent structure and relationship of the data.

[0064] Point data (node ​​data) represents entities or objects in the graph. Each node can have its own attributes or features. These attributes can be numerical, categorical, text, or other data types. In practical applications, nodes can represent various entities, such as users in social networks, intersections or airports in traffic networks, proteins in biological networks, etc.

[0065] Edge data is used to describe the association or relationship between nodes. Each edge can also have its own attributes, such as weight (indicating the strength or distance of the relationship), direction (indicating the directionality of the relationship), etc. In an undirected graph, edges have no direction, and the edges connecting two nodes are bidirectional; in a directed graph, edges have direction, indicating a unidirectional relationship from one node to another. The data structure of edge data is usually: source vertex id, dst vertex id, attribute 1, attribute 2... That is, it includes the source vertex id, the target vertex id, and the edge attributes.

[0066] For example, suppose a directed graph contains four vertices: A, B, C, and D, and the following directed edges: the edge from A to B, and the edge from A to C. Among them, the id of vertex A is 1, the id of vertex B is 2, and the id of vertex C is 3, then the edge from A to B can be represented as 1-2, and the edge from A to C can be represented as 1-3.

[0067] Since graph structured data usually has a large amount of data and is not convenient for subsequent loading and processing, large graph structured data can be divided into multiple smaller sub-graphs or batches of data, so that one computing node can read a batch of data for subsequent processing, storage and query, so as to improve the processing efficiency and scalability of large-scale graph structured data.

[0068] First, the graph data is processed in batches. Batch processing means dividing the entire graph data set into multiple batches (or subsets), and then loading and processing each batch in sequence through multiple computing nodes. Each batch can contain a certain amount of point data and edge data, and its size can be determined based on computing resources, memory limitations, and processing requirements.

[0069] Through batch processing, one computing node can process one batch of data to gradually load and process the graph data, avoiding the memory overflow problem caused by loading the entire large graph data at one time. At the same time, each batch can be processed independently, which is convenient for parallel computing and improves the processing speed. Then, multiple batches of data are read in parallel through multiple computing nodes, that is, by reading multiple batches of data at the same time, parallel reading can significantly reduce the user's waiting time and improve the overall processing speed. At the same time, computing resources can be better utilized to achieve parallel computing, thereby improving the system throughput.

[0070] In some embodiments, since the computing resources of a single device are limited, reading multiple batches of data simultaneously may result in insufficient computing resources. Therefore, the graph structure data may be processed in parallel in a distributed manner, that is, using multiple data processing devices.

[0071] As a feasible implementation method, S301 can be specifically implemented as follows: multiple data processing devices are used to read and parse multiple batches of data in parallel, and one data processing device includes at least one computing node. This allows one data processing device to use multiple computing nodes to read data at the same time, and one computing node can read and parse one or more batches of data, so that the computing power resources of multiple data processing devices can be effectively utilized, and the processing volume and processing capacity of batch data can be multiplied.

[0072] That is to say, the graph structure data is read simultaneously through multiple data processing devices. Since the read data is usually in the format of original data, the format of its edge data is (src point id, dst point id, attribute 1, attribute 2...), it is necessary to parse the read batch data according to the field type in the user-defined schema meta-information, and convert each field into the user-defined field type.

[0073] By reading and parsing multiple batches of graph structured data in parallel using multiple data processing devices, the computing resources of multiple data processing devices can be effectively utilized, the processing efficiency of graph structured data can be improved, and the loading time of graph structured data can be shortened.

[0074] In some embodiments, the graph structure data may also be streaming data that grows infinitely over time, and streaming data generally has the characteristics of real-time, continuity, and infinity. Therefore, when processing streaming data, the streaming data can be directly divided into multiple batches for processing, that is, each computing node processes a batch of data.

[0075] In other embodiments, the graph structure data may also be data stored in a local file or database, and its usual data structure and data volume are fixed and will not change in real time, so each computing node can further adopt a block processing strategy within each batch of data. That is, each batch of data is divided into multiple blocks of data, each block of data contains a certain amount of point data and edge data, and then multiple threads in a computing node process multiple blocks of data in parallel, so that one thread processes one block of data.

[0076] The block data may be continuous, overlapping, or divided according to the structure and attributes of the graph. The present application does not impose any restrictions on the way the block data is divided.

[0077] That is to say, during the data loading process, the batch and block processing strategies are combined to first divide the graph structure data into multiple batches according to certain rules, and then process each batch in blocks. This can better manage memory resources while ensuring processing efficiency, and fully utilize the advantages of parallel computing and distributed computing.

[0078] It can be understood that when multiple block data are read in parallel through multiple computing nodes, in the subsequent encoding process, the block data read in parallel are also encoded, that is, the data read in parallel each time is encoded. The specific encoding process can refer to the encoding process of batch data read in parallel, which will not be repeated here.

[0079] S302. Each computing node determines a target computing node corresponding to the original ID of each vertex in the read batch data, and sends the original ID to the corresponding target computing node for storage.

[0080] In the process of reading batch data, there may be some duplicate vertices in the batch data read by multiple computing nodes. For example, computing node a reads edge data 1-3, and computing node b reads edge data 3-4. They have a common vertex 3, but are not in the same computing node. If computing node a and computing node b encode vertex 3 at the same time, it will cause duplicate encoding, which is not conducive to subsequent use.

[0081] Therefore, in order to facilitate the subsequent encoding of vertex IDs, in the embodiment of the present application, each vertex is made to correspond uniquely to a computing node. After reading the corresponding point data or edge data, a target computing node corresponding to the original ID of the vertex in each batch of data is determined from multiple computing nodes, and the original ID is sent to the corresponding target computing node for storage, so that the vertex is stored in a unique computing node, avoiding the problem of repeated encoding of multiple computing nodes.

[0082] It is understandable that when the same ID is assigned to different elements or objects, data conflicts and confusion will result. The system or user may not be able to accurately distinguish these elements, resulting in incorrect decisions or operations. Therefore, the uniqueness of the ID may be the basis for the stable operation of the system. If the ID is not unique, it may cause instability, errors or failures in the system. In addition, in order to handle non-unique IDs, the system may require additional logic and algorithms to distinguish and identify different elements, which will increase the complexity and computational cost of data processing.

[0083] Therefore, when encoding, it is necessary to avoid the problem of repeated encoding of multiple computing nodes, ensure the stability of system operation, and reduce the complexity and computing cost of data processing.

[0084] It should be understood that the embodiments of the present application do not limit the specific method of determining the target computing node corresponding to the original ID and sending the original ID to the corresponding target computing node. Exemplarily, the target computing node corresponding to the original ID can be determined by hash partitioning, range partitioning, directory partitioning, list partitioning or composite partitioning.

[0085] Among them, hash partitioning refers to performing a hash operation (hash modulus operation) on the original ID, and then assigning the original ID to different computing nodes according to the hash value, which can distribute data more evenly and reduce data skew. Range partitioning refers to partitioning based on the range of the original ID. For example, all original IDs can be divided into several continuous ranges, each corresponding to a computing node. Directory partitioning refers to creating a directory structure and assigning it to different directories (i.e. computing nodes) according to certain characteristics of the ID (such as prefix, suffix, etc.). List partitioning can explicitly specify the list of original IDs contained in each partition. Composite partitioning refers to combining multiple partitioning strategies to perform composite partitioning according to actual needs.

[0086] Exemplarily, the original ID can be sent to the corresponding target computing node through communication methods such as Shuffle communication, Pipe, Named Pipe, Message Queue, Shared Memory, Signals, Semaphores, and Sockets.

[0087] As a feasible implementation method, each computing node determines the target computing node corresponding to the original ID of each vertex in the batch data by hashing the modulus.

[0088] Among them, hash modulus operation is a commonly used data distribution strategy, which can help distributed systems achieve efficient data storage and management. Hash modulus operation can achieve even distribution of data by mapping the hash value to a smaller range by taking the modulus of the modulus operation. In other words, each computing node can be numbered in a certain order, and the original ID of the vertex can be operated by hash modulus to map it to a smaller range, and then it can be matched with the computing node number to obtain the target computing node corresponding to the original ID.

[0089] As a feasible implementation method, the original ID can be sent to the corresponding target computing node through Shuffle communication, so that the target node stores the original ID.

[0090] Shuffle communication is a form of many-to-many communication in the Message Passing Interface (MPI) communication framework, that is, multiple computing nodes send communication messages to each other. In Shuffle communication, data blocks need to be transmitted between different computing nodes. This usually involves network communication, so communication efficiency and stability are crucial to the performance of the entire Shuffle process. In order to optimize Shuffle communication, some strategies are usually adopted, such as data compression, selecting appropriate communication protocols, etc., to reduce communication overhead and improve data transmission efficiency.

[0091] Shuffle communication can distribute the original IDs of different vertices to different computing nodes for processing, which can fully utilize the parallel computing capabilities of multiple computing nodes and multi-core processors to accelerate the computing process. Shuffle communication can reduce unnecessary communication overhead by merging small messages, using compression algorithms, or selecting efficient communication protocols, which can significantly reduce communication delays and bandwidth consumption.

[0092] S303, each computing node performs deduplication processing on the original ID stored in itself, determines the uncoded original ID, and sends the number of the uncoded original ID to the main computing node.

[0093] The main computing node is a computing node among multiple distributed computing nodes. It is understandable that the system can pre-specify a main computing node among multiple distributed computing nodes so that other computing nodes can send their own uncoded original ID numbers to the main computing node.

[0094] After all computing nodes send the original IDs of the vertices in the batch data to the corresponding target computing nodes, each computing node stores a certain amount of original IDs. There will be some duplicate data in these original IDs, which may be sent by the same computing node or different computing nodes. Duplicate original IDs will also cause duplicate encoding during subsequent encoding. Therefore, deduplication processing is required to avoid repeated encoding of the original IDs.

[0095] Since the computing node will also store the original IDs read in history, and the original IDs read in history have been re-encoded, there is a corresponding encoded ID, and there is no need to encode them again. Therefore, it is necessary to determine the unencoded original IDs in the computing node, that is, the original IDs that do not have a corresponding encoded ID, and then encode these unencoded original IDs to obtain their corresponding encoded IDs.

[0096] S304. The main computing node determines the encoding ID interval corresponding to each computing node based on the number of unencoded original IDs and historical encoded IDs in each computing node, and sends the encoding ID interval to the corresponding computing node.

[0097] The historical encoding id is the end value of the last encoding id interval arranged in the previous encoding process, that is, the last encoding id after encoding the batch data previously read in parallel by multiple computing nodes.

[0098] After determining the uncoded original ID in each computing node, the coding ID interval corresponding to each computing node can be determined according to the number of uncoded original IDs in each computing node and the historical coding ID. It should be understood that in order to avoid overlapping or discontinuous coding ID intervals of multiple computing nodes, resulting in repeated or discontinuous coding IDs, the coding ID intervals corresponding to multiple computing nodes can be made continuous.

[0099] At the same time, in order to avoid duplication of the coding id between this coding and the last coding, the starting value of the first coding id interval can be set to the next coding id of the historical coding id, so that the first coding id in this coding process is continuous with the last coding id in the last coding process. In this way, the problem of coding duplication in multiple coding processes can be avoided.

[0100] Moreover, when encoding, the method provided in the embodiment of the present application sets the number of encodable IDs in the encoding ID interval corresponding to each computing node to be the number of unencoded original IDs in the computing node, so that the number of encodable IDs in this encoding process is also continuous.

[0101] For example, assuming that the last encoding id after the last encoding is 2, the starting value of the encoding id interval arranged at the front in this encoding process is 3, the number of unencoded original ids in computing node 1 is 2, and the number of unencoded original ids in computing node 2 is 3, then the encoding id interval corresponding to computing node 1 can be [3,4], that is, the encoding id in computing node 1 is (3,4) two ids; the encoding id interval corresponding to computing node 2 can be [4,6], that is, the encoding id in computing node 2 is (4,5,6) three ids. It can be understood that in the next encoding process, the starting value of the encoding id interval arranged at the front is 7.

[0102] S305. Each computing node continuously encodes the unencoded original ID stored in itself based on the corresponding encoding ID interval to obtain the encoding ID and the mapping relationship between the original ID and the encoding ID.

[0103] It can be understood that the encoding ID interval corresponding to each computing node is equal to the number of unencoded original IDs, so the encoded IDs in the encoding ID interval can be distributed to the unencoded original IDs in the computing node. In this way, in the result of this encoding, the encoded IDs in this computing node are continuous, and the encoded IDs in multiple computing nodes are also continuous.

[0104] Moreover, each computing node will only save part of the mapping relationship between the original ID and the encoded ID, which saves more memory compared to the method in which each computing node saves all the mapping relationships between the original ID and the encoded ID. Especially in large-scale data scenarios, it can save a certain amount of memory and thus improve the efficiency of data processing.

[0105] For example, see Figure 4 , Figure 4 The edge data read by computing node 0 is 1-3, 2-4; the edge data read by computing node 1 is 1-5, 3-7; the edge data read by computing node 2 is 4-6, 2-3. It can be seen that the original ids of the vertices included in computing node 0 are (1, 2, 3, 4), the original ids of the vertices included in computing node 1 are (1, 3, 5, 7); the original ids of the vertices included in computing node 2 are (2, 3, 4, 6). Then determine the target computing node corresponding to the original id in each computing node and send it to the target computing node.

[0106] like Figure 4 As shown in the figure, after each original is sent to the target computing node and deduplication is performed, the original IDs included in computing node 0 are (1, 4, 7), the original IDs included in computing node 1 are (2, 5), and the original IDs included in computing node 2 are (3, 6). It can be seen that there are no duplicate IDs in the original IDs of multiple computing nodes.

[0107] After multiple computing nodes communicate with each other, the encoding id interval corresponding to each computing node can be determined, such as Figure 4As shown, multiple encoding id intervals are continuous, and the interval length of each interval is the number of original ids in the computing node. Then, the original id of each computing node can be re-encoded according to the encoding id interval corresponding to each computing node. Finally, the encoding ids in each computing node are: computing node 0 is [0,1,2], computing node 1 is [3,4], and computing node 2 is [5,6]. Then let each unencoded original id correspond to the encoding id, and the mapping relationship between the original id and the encoding id in computing node 0 can be obtained as follows: (1:0), (4:1), (7:2); the mapping relationship between the original id and the encoding id in computing node 1 is: (2:3), (5:4); the mapping relationship between the original id and the encoding id in computing node 2 is: (3:5), (6:6). In other words, the encoding id corresponding to the original id 1 is 0, the encoding id corresponding to the original id 4 is 1...

[0108] As a possible implementation, see Figure 5 , after sending the original ID to the target computing node and removing duplicates, the number of uncoded original IDs owned by each computing node can be distributed, and the point data offset is obtained as [0,3,5,7]. The meaning of the point data offset is: the difference between two adjacent numbers is the number of original IDs owned by the current computing node, and the previous element is the starting point ID for subsequent encoding of the current computing node. Figure 5 As shown, the point offset range of computing node 0 is [0,3], which means: the encoding id of computing node 0 starts from 0 during encoding, and the maximum number of codes is 3; the encoding id of computing node 1 starts from 3 during encoding, and the maximum number of codes is 2; the encoding id of computing node 2 starts from 5 during encoding, and the maximum number of codes is 2. Then, the original id in each computing node is encoded, and the encoding id in computing node 0 is 0, 1, 2; the encoding id in computing node 1 is 3, 4; and the encoding id in computing node 2 is 5, 6.

[0109] S306. Each computing node replaces the original IDs of the vertices of the point data and / or edge data in the read batch data with the encoded ID based on the mapping relationship between the original IDs and the encoded IDs in all computing nodes to obtain the encoded point data and / or edge data.

[0110] After each computing node continuously encodes the unencoded original ID stored in itself, the original IDs of the vertices in all computing nodes now have corresponding encoded IDs. Therefore, based on the mapping relationship between the original IDs and the encoded IDs in all computing nodes, the original IDs of the vertices of the point data and / or edge data in each batch of data can be replaced with the encoded ID to obtain the encoded point data and / or edge data.

[0111] S307. Each computing node stores the point data and / or edge data obtained after encoding.

[0112] That is to say, each computing node stores the point data and / or edge data it reads in the storage space corresponding to the computing node itself, so that each computing node will save part of the encoded edge data and part of the encoded point data, which can effectively reduce memory usage and balance the memory load.

[0113] It is understandable that when there are multiple threads in a computing node and each thread corresponds to a partition, the block data read by each thread can be encoded and stored in the partition corresponding to the thread, and this application will not go into details.

[0114] As can be seen from S301-S307, the data processing method provided by the embodiment of the present application first divides the graph structure data into blocks to obtain multiple batches of data when loading data, and then reads multiple batches of data in parallel through multiple computing nodes in a distributed manner to improve the speed of data reading. After each computing node reads a batch of data, it first determines the target computing node corresponding to the original ID of each vertex in the batch data, and sends it to its corresponding target computing node, so that each computing node corresponds to the original ID of the storage part. After each computing node deduplicates the original ID stored by itself, it determines the uncoded original ID, and then can continuously encode the uncoded original ID stored by itself according to the corresponding encoded ID interval.

[0115] Among them, the coding id intervals corresponding to multiple computing nodes are continuous, and the interval length of the coding id interval corresponding to each computing node is the number of uncoded original ids in the computing node; the starting value of the first coding id interval is the historical coding id, that is, the end value of the last coding id interval in the last encoding. In this way, after each computing node encodes the uncoded original id according to the corresponding coding id interval, the coding ids of the uncoded original ids in each computing node are continuous, and the coding ids stored in multiple computing nodes are also continuous. Then, each of the computing nodes replaces the original identification ids of the vertices of the point data and / or edge data in each batch of data with the coding id based on the mapping relationship between the coding id and the original id in all computing nodes, obtains the encoded point data and / or edge data, and stores them in its own corresponding storage space respectively.

[0116] It can be seen that the data processing method provided in the present application adopts a parallel reading method of multiple distributed computing nodes to load graph structure data, which can improve the loading speed and encoding speed of graph structure data, and when encoding the data, it encodes according to the number of unencoded IDs and historical encoded IDs in each processing, which can ensure the encoding continuity in the same computing node and between multiple computing nodes, thereby improving the performance of subsequent graph partitioning and graph calculation processes.

[0117] In some embodiments, after each computing node continuously encodes each unencoded original ID, it needs to send its own encoded original ID and the corresponding encoded ID to other computing nodes, so that other computing nodes can use the encoded ID encoded by this computing node. Since it is already known which computing node the original ID in each computing node comes from during the encoding stage, the original ID and the corresponding encoded ID can be sent back to the original computing node.

[0118] As a feasible implementation method, S306 can be specifically implemented as follows:

[0119] S601. Each computing node determines the original computing node corresponding to the uncoded original ID stored in the node.

[0120] The original computing node is the computing node that previously sent the uncoded original ID to the target computing node.

[0121] That is, when each computing node sends the original ID to the target computing node, the computing node is the original computing node, and the target computing node records the original computing node corresponding to the original ID. After encoding, it is determined that there is an unencoded original ID corresponding to the original computing node.

[0122] S602: Send the uncoded original ID and the corresponding coded ID to the corresponding original computing node.

[0123] Since the data read in the original computing node includes these original IDs, the encoded IDs corresponding to these original IDs will need to be used later. Therefore, the unencoded original ID and the corresponding encoded ID need to be sent to the original computing node for use by the original computing node.

[0124] Combination Figure 4 As shown, after receiving the original ID, the original computing node of each original ID can be recorded accordingly to facilitate the subsequent return of the encoded encoded ID.

[0125] S603: Receive the uncoded original ID and the corresponding coded ID sent by other computing nodes.

[0126] Similarly, some of the original IDs in the batch data read by the current target computing node will also be sent to other computing nodes for encoding, so the unencoded original IDs and corresponding encoded IDs sent by other computing nodes will also be received.

[0127] S604: Based on the uncoded original IDs and corresponding coded IDs sent by other computing nodes, and the mapping relationship between the original IDs and corresponding coded IDs stored in the computing nodes themselves, the original IDs of the vertices of the point data and / or edge data in each batch of data are replaced with the corresponding coded IDs.

[0128] The target computing node replaces the original IDs of the vertices in the point data and / or edge data in the initially read batch data based on the unencoded original IDs and the corresponding encoded IDs sent by other computing nodes, and the mapping relationship between the original ID corresponding to the target computing node and the corresponding encoded ID, to obtain the encoded point data and / or edge data.

[0129] For example, see Figure 6 After the data encoding phase is over, each computing node already has the encoding results of some point data, but the partial encoding results cannot map all the edge data in the computing node, so it is necessary to obtain the encoding ID corresponding to other original IDs through communication between multiple computing nodes. Figure 4 As shown in the figure, before encoding, it is known which computing node the original id in each computing node comes from. For example, the point with the coded id of 0 and the original id of 1 in computing node 0 comes from computing node 0 and computing node 1, the point with the original id of 4 comes from computing node 0 and computing node 2, and the point with the original id of 7 comes from computing node 1. Therefore, these encoded point ids can be sent back to the original computing node. After sending the encoding results of each computing node back to the original computing node, each computing node has the encoding results of the points in the original edge. Finally, the original ids of the two vertices of the original edge data are mapped and converted according to the received encoded point id results. At this time, the original edge data 1-3 of computing node 0 is converted to 0-5, and 2-4 is converted to 3-1; the original edge data 1-5 of computing node 1 is converted to 0-4, and 3-7 is converted to 5-2; the original edge data 4-6 of computing node 2 is converted to 1-6, and 2-3 is converted to 3-5.

[0130] It can be seen that the data processing method provided in this embodiment is that after each computing node continuously encodes each unencoded original ID, it sends the self-encoded original ID and the corresponding encoded ID to the original computing node according to the need to send, so that the original computing node can use the encoded ID encoded by this computing node to replace the original ID of the vertex in the point data and / or edge data in the batch data.

[0131] In some embodiments, since the number of vertices in the batch data processed by each computing node may be large and there may be duplication, when the original ID of each vertex is sent to the target computing node, the repeated original ID will be sent multiple times, wasting communication resources.

[0132] As a possible implementation, see Figure 7 The method provided in the embodiment of the present application further includes the following steps before determining the target computing node corresponding to the original ID of the vertex in each batch of data and sending the original ID to the target computing node:

[0133] S701. Each computing node determines a target partition corresponding to each original ID by hashing the modulo method.

[0134] Among them, one computing node corresponds to multiple partitions. In other words, the storage space corresponding to a computing node is divided into multiple areas. Reasonable partitioning can improve the performance of the hard disk and help organize and manage data.

[0135] Exemplarily, when a computing node includes multiple parallel threads, the number of partitions can be determined according to the number of threads, that is, each partition stores data read by the thread.

[0136] S702: Send the original ID to the corresponding target partition through MPI communication.

[0137] Among them, MPI is a remote procedure call (RPC) communication framework, a communication tool that can achieve communication and synchronization between computing nodes through message passing. When a computing node sends a message, it puts the data to be sent into the message and specifies the target computing node of the message. When receiving a message, the computing node waits for the specific message to arrive and extracts the data in the message.

[0138] MPI provides a variety of communication operations, such as point-to-point communication, one-to-one communication, many-to-one communication, and collective communication. These mechanisms can be selected and configured according to different application scenarios, so that data can be easily exchanged and coordinated between computing nodes. MPI communication can maximize the use of the multi-core processing power of distributed systems, allowing multiple computing nodes to process tasks in parallel, thereby greatly improving computing efficiency. MPI has good scalability and can be executed on multiple computing nodes. When it is necessary to process larger-scale data or computing tasks, the number of computing nodes or computers can be simply increased without making a lot of modifications to the program.

[0139] MPI is a standardized message passing interface, so it has good portability. Developers can use MPI to write and run parallel programs on different operating systems and hardware platforms without worrying about the implementation details of the underlying communication mechanism. MPI provides a unified programming model and communication mechanism, which makes system management and maintenance easier. Developers can use MPI to write reusable and maintainable parallel programs, and manage and control the communication and data transmission between multiple computing nodes or computers through a unified interface.

[0140] In summary, MPI communication can efficiently utilize the processing power of multiple computing nodes in distributed processing, and has the advantages of good flexibility, scalability, portability, and easy management and maintenance, which enables MPI to communicate well among multiple distributed computing nodes.

[0141] S703: De-duplicate the original ID in each partition.

[0142] After deduplication, the original ID in each target partition is unique, and the original ID in each computing node is also unique, without duplication. Therefore, when determining the target computing node corresponding to each original ID, there will be no repeated confirmation and repeated sending operations, which can save some communication resources.

[0143] It can be seen that the method provided in this embodiment deduplicates each original ID within the computing node before sending it to the corresponding target computing node, which can avoid a computing node sending a large amount of duplicate data to other computing nodes, save some resources, and improve the efficiency of data loading and encoding.

[0144] In some embodiments, when each thread reads batch data, it can also perform deduplication processing on the original IDs of the vertices in the read batch data, so that there are no duplicate original IDs in the partition corresponding to each thread. In this way, when deduplication is performed between partitions, the number of data communications between multiple threads can be reduced, thereby saving some resources.

[0145] The present application also provides a data processing device, such as Figure 8 As shown, the data processing device 80 includes: a reading module 81, a sending module 82, a deduplication module 83, an encoding module 84 and a storage module 85.

[0146] The reading module 81 is used to read a batch of data obtained by dividing graph structure data; the graph structure data includes point data and / or edge data, the point data includes a vertex, and the edge data includes two vertices, a source vertex and a target vertex;

[0147] The sending module 82 is used to determine a target computing node corresponding to the original ID of each vertex in the read batch data, and send the original ID to the corresponding target computing node for storage.

[0148] The deduplication module 83 is used to deduplicate the original ID stored in itself, determine the uncoded original ID, and send the number of uncoded original IDs to the main computing node, so that the main computing node determines the coding ID interval corresponding to each computing node based on the number of uncoded original IDs and historical coding IDs in each computing node, and sends the coding ID interval to the corresponding computing node; wherein the historical coding id is the end value of the last coding id interval arranged in the previous encoding process; the coding id intervals corresponding to multiple distributed computing nodes are continuous, and the starting value of the front-arranged coding id interval is the next continuous coding id of the historical coding id, and the number of encodable ids in the coding id interval corresponding to each computing node is the same as the number of uncoded original IDs corresponding to itself.

[0149] The encoding module 84 is used to continuously encode the unencoded original ID stored in itself based on the corresponding encoding ID interval to obtain the encoding ID and the mapping relationship between the original ID and the encoding ID.

[0150] The encoding module 84 is also used to replace the original IDs of the vertices of the point data and / or edge data in the read batch data with the encoded IDs based on the mapping relationship between the original IDs and the encoded IDs in all computing nodes to obtain the encoded point data and / or edge data.

[0151] The storage module 85 is used to store the encoded point data and / or edge data.

[0152] The embodiment of the present application also provides a data processing system, including: multiple data processing devices; multiple data processing devices; each data processing device includes one or more computing nodes, and multiple data processing devices read multiple batches of data in parallel through multiple computing nodes; the batch data is obtained by dividing the graph structure data, the graph structure data includes point data and / or edge data, the point data includes a vertex, and the edge data includes two vertices, a source vertex and a target vertex; each data processing device determines a target computing node corresponding to the original identification ID of each vertex in the read batch data, and sends the original ID to the corresponding target computing node for storage; each data processing device deduplicates the original ID stored in itself, determines the uncoded original ID, and sends the number of uncoded original IDs to the main computing node, which is one of the multiple computing nodes; the main computing node determines each computing node based on the number of uncoded original IDs and historical coded IDs in each computing node. The corresponding coding id interval is obtained, and the coding id interval is sent to the corresponding computing node; wherein the historical coding id is the end value of the last coding id interval arranged in the previous encoding process; the coding id intervals corresponding to multiple distributed computing nodes are continuous, and the starting value of the first coding id interval is the next continuous coding id of the historical coding id, and the number of codable ids in the coding id interval corresponding to each computing node is the same as the number of uncoded original ids corresponding to itself; each data processing device continuously encodes the uncoded original id stored in itself based on the corresponding coding id interval to obtain the coding id and the mapping relationship between the original id and the coding id; each data processing device replaces the original ids of the vertices of the point data and / or edge data in the read batch data with the coding id based on the mapping relationship between the original ids and the coding ids in all computing nodes to obtain the encoded point data and / or edge data; each computing node respectively stores the point data and / or edge data obtained after their own encoding.

[0153] Based on multiple computing nodes in multiple data processing devices, the data processing method described in the above embodiments can be executed, such as Figure 3-Figure 7 , and the data processing methods described in S301-S307, S601-S604, and S701-S703.

[0154] The present application also provides a data processing device. Fig. 9The data processing device 10 includes: one or more memories 111, one or more processors 112, a communication bus 113 and a communication interface 114. The processor 112 is connected to the memory 111 via the bus 113; the one or more memories 111 are used to store computer program codes, and the computer program codes include computer instructions; when the one or more processors 112 execute the computer instructions, the data processing device 13 executes the data processing method provided in the above embodiment.

[0155] Optionally, the memory 111 may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc., and the embodiments of the present application do not impose any restrictions on this.

[0156] The processor 112 may be a central processing unit (CPU), a general-purpose processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof, and the embodiments of the present application do not impose any limitation on this.

[0157] The communication bus 113 may be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus. The communication bus 113 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Just one thick line is used, but it does not mean that there is only one bus or one type of communication bus.

[0158] The communication interface 114 uses any transceiver or other device for communicating with other devices or communication networks, such as control systems, radio access networks (RAN), wireless local area networks (WLAN), etc.

[0159] The embodiments of the present application also provide a computer program product including one or more instructions, where the one or more instructions are stored in a memory of a computer device and executed by a processor to complete the various processes of the above embodiments.

[0160] An embodiment of the present application also provides a computer-readable storage medium, which includes computer execution instructions. When the computer execution instructions are executed on a computer, the computer executes the data processing method provided in the above embodiment.

[0161] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0162] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0163] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0164] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0165] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a device (which may be a single-chip microcomputer, etc.) or a processor to execute all or part of the steps of the methods of each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks or optical disks.

[0166] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A data processing method, characterized in that: include: Reading graph structure data in parallel through multiple distributed computing nodes; the graph structure data includes point data and / or edge data, the point data includes a vertex, and the edge data includes two vertices, a source vertex and a target vertex; multiple batches of data; each computing node reads a batch of data obtained by dividing the graph structure data; Each of the computing nodes determines a target computing node corresponding to the original ID of each vertex in the read batch data, and sends the original ID to the corresponding target computing node for storage; Each of the computing nodes performs deduplication processing on the original ID stored in itself, determines the uncoded original ID, and sends the number of the uncoded original ID to the main computing node, which is one of the multiple distributed computing nodes; The master computing node determines the coding id interval corresponding to each computing node based on the number of uncoded original ids and historical coding ids in each computing node, and sends the coding id interval to the corresponding computing node; wherein the historical coding id is the end value of the last coding id interval arranged in the previous encoding process; the coding id intervals corresponding to the multiple distributed computing nodes are continuous, and the starting value of the coding id interval arranged at the front is the next continuous coding id of the historical coding id, and the number of encodable ids in the coding id interval corresponding to each computing node is the same as the number of uncoded original ids corresponding to itself; Each of the computing nodes continuously encodes the unencoded original ID stored in itself based on the corresponding encoding ID interval to obtain the encoding ID and the mapping relationship between the original ID and the encoding ID; Each of the computing nodes replaces the original IDs of the vertices of the point data and / or edge data in the read batch data with the encoded IDs based on the mapping relationship between the original IDs and the encoded IDs in all the computing nodes, so as to obtain the encoded point data and / or edge data; Each of the computing nodes stores the point data and / or edge data obtained after being encoded.

2. The method according to claim 1, characterized in that Each of the computing nodes replaces the original IDs of the vertices of the point data and / or edge data in the read batch data with the encoded ID based on the mapping relationship between the original IDs and the encoded IDs in all the computing nodes to obtain the encoded point data and / or edge data, including: Each computing node determines an original computing node corresponding to an uncoded original ID stored in the computing node; the original computing node is a computing node that sends the uncoded original ID to the current computing node; Sending the unencoded original id and the corresponding encoded id to the corresponding original computing node; Receive the unencoded original ID and the corresponding encoded ID sent by other computing nodes; Based on the mapping relationship between the unencoded original ID and the corresponding encoded ID sent by the other computing nodes, and the original ID and the corresponding encoded ID stored by the other computing nodes, the original ID of the vertex of the point data and / or edge data in each batch of data is replaced with the corresponding encoded ID.

3. The method according to claim 1, characterized in that Before determining the target computing node corresponding to the original ID of each vertex in the batch data and sending the original ID to the target computing node, the method further includes: Each computing node determines a target partition corresponding to each original ID by hashing the modulus; one computing node corresponds to multiple partitions; Send the original ID to the corresponding target partition by means of MPI communication; De-duplicate the original ID in each partition.

4. The method according to claim 1, characterized in that: Each of the computing nodes determines a target computing node corresponding to the original ID of the batch data vertex, and sends the original ID to the corresponding target computing node for storage, including: Each of the computing nodes determines the target computing node corresponding to the original ID of each vertex in the batch data by hashing the modulus; The original ID is sent to the corresponding target computing node for storage by means of Shuffle communication.

5. The method according to claim 1, characterized in that The method of reading graph structure data in parallel through multiple distributed computing nodes includes: A plurality of the batch data are read and parsed in parallel by a plurality of the computing nodes in a plurality of data processing devices, wherein one of the data processing devices includes at least one of the computing nodes.

6. The method according to any one of claims 1 to 4, characterized in that: The method of reading graph structure data in parallel through multiple distributed computing nodes includes: Each of the computing nodes divides the batch data into blocks to obtain at least one block of data; The multiple distributed computing nodes read at least one block of data in parallel, and each computing node reads the block of data in parallel through at least one thread; Each of the computing nodes determines a target computing node corresponding to the original ID of the batch data vertex, and sends the original ID to the corresponding target computing node for storage, specifically: Each of the computing nodes determines a target computing node corresponding to the original ID of each vertex in the block data; The original IDs of the vertices of the point data and / or edge data in each batch of data are replaced with the encoded IDs, specifically: The original IDs of the vertices of the point data and / or edge data in each of the block data are replaced with the encoded IDs.

7. A data processing device, characterized in that: The data processing device is one of a plurality of distributed computing nodes for reading graph structure data in parallel, and the data processing device comprises: A reading module, configured to read a batch of data obtained by dividing the graph structure data; the graph structure data includes point data and / or edge data, the point data includes a vertex, and the edge data includes two vertices, a source vertex and a target vertex; A sending module, used to determine a target computing node corresponding to the original ID of each vertex in the read batch data, and send the original ID to the corresponding target computing node for storage; A deduplication module is used to deduplicate the original ID stored in itself, determine the uncoded original ID, and send the number of uncoded original IDs to the main computing node, so that the main computing node determines the coding ID interval corresponding to each computing node based on the number of uncoded original IDs and historical coding IDs in each computing node, and sends the coding ID interval to the corresponding computing node; wherein the historical coding ID is the end value of the last coding ID interval arranged in the previous encoding process; the coding ID intervals corresponding to the multiple distributed computing nodes are continuous, and the starting value of the front-arranged coding ID interval is the next continuous coding ID of the historical coding ID, and the number of encodable IDs in the coding ID interval corresponding to each computing node is the same as the number of uncoded original IDs corresponding to itself; The encoding module is used to continuously encode the unencoded original ID stored in itself based on the corresponding encoding ID interval to obtain the encoding ID and the mapping relationship between the original ID and the encoding ID; The encoding module is also used to replace the original IDs of the vertices of the point data and / or edge data in the read batch data with the encoded IDs based on the mapping relationship between the original IDs and the encoded IDs in all the computing nodes, so as to obtain the encoded point data and / or edge data; A storage module is used to store the encoded point data and / or edge data.

8. A data processing system, characterized in that: include: multiple data processing devices; Each of the data processing devices includes one or more computing nodes, and the multiple data processing devices read multiple batches of data in parallel through the multiple computing nodes; the batches of data are obtained by dividing graph structure data, the graph structure data includes point data and / or edge data, the point data includes a vertex, and the edge data includes two vertices, a source vertex and a target vertex; Each of the data processing devices determines a target computing node corresponding to the original ID of each vertex in the read batch data, and sends the original ID to the corresponding target computing node for storage; Each of the data processing devices performs deduplication processing on the original IDs stored in itself, determines the uncoded original IDs, and sends the number of the uncoded original IDs to a main computing node, where the main computing node is one of the plurality of computing nodes; The master computing node determines the coding id interval corresponding to each computing node based on the number of uncoded original ids and historical coding ids in each computing node, and sends the coding id interval to the corresponding computing node; wherein the historical coding id is the end value of the last coding id interval arranged in the previous encoding process; the coding id intervals corresponding to the multiple distributed computing nodes are continuous, and the starting value of the coding id interval arranged at the front is the next continuous coding id of the historical coding id, and the number of encodable ids in the coding id interval corresponding to each computing node is the same as the number of uncoded original ids corresponding to itself; Each of the data processing devices continuously encodes the unencoded original ID stored in itself based on the corresponding encoding ID interval to obtain the encoding ID and the mapping relationship between the original ID and the encoding ID; Each of the data processing devices replaces the original IDs of the vertices of the point data and / or edge data in the read batch data with the encoded IDs based on the mapping relationship between the original IDs and the encoded IDs in all the computing nodes, to obtain the encoded point data and / or edge data; Each of the computing nodes stores the point data and / or edge data obtained after being encoded.

9. An electronic device, characterized in that: include: one or more processors; one or more memories; Among them, one or more memories are used to store computer program codes, and the computer program codes include computer instructions. When one or more processors execute the computer instructions, the electronic device executes the data processing method as described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are executed on a computer, the computer executes the data processing method according to any one of claims 1 to 6.