WO2023040468A1 - 分布式图学习架构的数据存取方法及装置 - Google Patents
分布式图学习架构的数据存取方法及装置 Download PDFInfo
- Publication number
- WO2023040468A1 WO2023040468A1 PCT/CN2022/107761 CN2022107761W WO2023040468A1 WO 2023040468 A1 WO2023040468 A1 WO 2023040468A1 CN 2022107761 W CN2022107761 W CN 2022107761W WO 2023040468 A1 WO2023040468 A1 WO 2023040468A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- graph
- node
- nodes
- mirror
- data access
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0608—Saving storage space on storage systems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0875—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with dedicated cache, e.g. instruction or stack
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9024—Graphs; Linked lists
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/0644—Management of space entities, e.g. partitions, extents, pools
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0656—Data buffering arrangements
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/067—Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0683—Plurality of storage devices
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
Definitions
- the embodiments of this specification generally relate to the field of graph data processing, and in particular, relate to a data access method and a data access device for a distributed graph learning architecture.
- the graph learning architecture In the graph learning architecture, if the graph nodes used are very large-scale graph nodes, the graph learning architecture needs to be deployed as a distributed graph learning architecture, and the graph nodes are distributed to each distribution in the graph learning architecture through the graph partitioning algorithm. graphic learning device.
- the graph nodes When the graph nodes are distributed to each distributed graph learning device, there will be critical nodes among the distributed graph nodes. Part of the neighbor nodes of the critical node are stored in the graph learning device where the critical node is located, and the rest of the neighbor nodes of the critical node are stored in other graph learning devices.
- the graph learning device where the critical node is located needs to store the node data of the critical node, and the node data of the critical node needs to be mapped to the graph learning device where the remaining neighbor nodes of the critical node are located, that is, the critical node’s
- the graph learning devices where the rest of the neighbor nodes are located need to store the mapping information of the node data of the critical nodes.
- the graph nodes stored in graph learning devices can be called Master nodes
- the node data of Master nodes can be called Master data
- the node data mapped to graph nodes in other graph learning devices can be called Mirror data (mirror data) of graph nodes. data).
- the graph nodes mapped to other graph learning devices may also be referred to as Mirror nodes (mirror nodes).
- the embodiments of this specification provide a data access method and a data access device for a graph distributed learning framework.
- a public buffer is set at the graph learning device with the Mirror node, which is used to cache the node data of the Mirror node that needs to be used when performing graph learning.
- the graph nodes at the graph learning device are grouped, and the multiple graph node groups obtained have priority when mirror data is accessed, and the priority of each graph node group is Levels are determined based on graph node dependencies. According to the priority of graph node grouping, cache space is allocated for the mirror nodes that each graph node group depends on from the public buffer of the graph learning device.
- the graph nodes are grouped into graph node groups with access priorities determined based on the graph node dependencies, and based on the access priority, each graph node is allocated from the set public buffer Groups allocate buffer space. After the cache space allocation for the graph nodes is completed, the data access process is initiated to other graph learning devices.
- the stored Mirror node data is cached in the allocated cache space for graph learning, so that there is no need to store data in each mirror node.
- a complete backup of Master data is stored in the graph learning device, thereby improving the storage space utilization rate of the graph learning device.
- a data access method for a distributed graph learning architecture is executed by a first graph learning device having a mirror node of the distributed graph learning architecture , the data access method includes: performing node grouping on the graph nodes at the first graph learning device to obtain a plurality of graph node groups with priorities, and the priority of the graph node groups is determined based on graph node dependencies , the graph node dependency is used to reflect the dependency of the graph node with respect to the mirror node during graph learning; based on the graph node dependency, determine the mirror node that each graph node group depends on; according to the graph node grouping Priority, from the public buffer of the first graph learning device, allocate cache space for the mirror nodes that each graph node group depends on; for the graph nodes that have completed the cache space allocation, the corresponding The second graph learning device where the graph node is located initiates a data access process; and caches the graph node data returned in response to the data access process in the allocated
- performing node grouping on the graph nodes at the first graph learning device to obtain a plurality of graph node groups with priorities may include: grouping the graph nodes based on graph node dependencies Sorting the graph nodes at the first graph learning device; and grouping the graph nodes at the first graph learning device according to the graph node sorting result to obtain multiple graph node groups with priority.
- initiating the data access process to the second graph learning device where the corresponding graph node of the mirror node on which the graph node depends may include:
- the graph node group that has completed the cache space allocation initiates a data access process to the second graph learning device where the corresponding graph node of the mirror node on which the graph node group depends is located.
- the graph node dependency is generated when graph node data of the distributed graph learning architecture is partitioned.
- each graph node group has a configurable group size.
- sorting the graph nodes at the first graph learning device based on the graph node dependencies includes: determining each of the graph nodes at the first graph learning device based on the graph node dependencies The number of mirror nodes that the graph nodes depend on; and sorting the graph nodes at the first graph learning device according to the number of mirror nodes that each graph node depends on.
- the graph nodes having the same number of mirror nodes have the same sorting, and the graph nodes at the first graph learning device are grouped according to the sorting result of the graph nodes
- the grouping priority of the graph nodes is determined according to the number of mirror nodes belonging to the grouped graph node group among the mirror nodes it depends on.
- the sequential allocation of cache space for the image nodes that each graph node group depends on may be Including: for each graph node group, check whether the mirror node on which the graph node group depends is allocated cache space; Nodes allocate cache space.
- initiating a data access process to the second graph learning device where the corresponding graph node of the mirror node on which the graph node group depends may include : For the graph node group that has completed the cache space allocation, check whether the cache space of each mirror node that the graph node group depends on caches graph node data; and for mirror nodes that do not cache graph node data, the corresponding The second graph learning device where the graph node is located initiates a data access process.
- the data access method may further include: in response to the first graph learning device completing the graph learning and training of each graph node in the graph node group, releasing the graph node group Cache space allocated by all mirror nodes that depend on it.
- the data access method may further include: in response to the first graph learning device completing the graph learning and training of each graph node grouped by the graph node, according to the graph node dependency The relationship determines whether there is an undependent mirror node in the mirror nodes that the graph node group depends on, and the mirror node that does not depend on includes mirror nodes that are not dependent on the graph node group that has not been completed in the graph learning process; When there is a non-dependent mirror node among the mirror nodes, the cache space allocated for the non-dependent mirror node is released.
- the graph learning process of the distributed graph learning architecture is a hierarchical iterative learning process
- the step of allocating cache space of the mirror node the step of initiating the data access process
- the caching step of graph node data is executed cyclically until the hierarchical iterative learning process is completed.
- a data access device for a distributed graph learning architecture the data access device is applied to the first graph with mirror nodes of the distributed graph learning architecture
- the learning device includes: a node grouping unit, which performs node grouping on the graph nodes at the first graph learning device to obtain a plurality of graph node groups with priorities, and the priority of the graph node groups Determined based on the graph node dependency, the graph node dependency is used to reflect the graph node's dependency on the mirror node during graph learning; the mirror node determination unit, based on the graph node dependency, determines that each graph node group depends on The mirror node of each graph node; the cache space allocation unit, according to the priority of the graph node grouping, from the public buffer of the first graph learning device, allocate cache space for the mirror nodes that each graph node group depends on; the data access unit , for the graph node that has completed the cache space allocation, initiate a data access process to the second graph learning
- the data access device may further include: a graph node sorting unit that sorts the graph nodes at the first graph learning device based on the graph node dependencies, so The node grouping unit performs node grouping on the graph nodes at the first graph learning device according to the graph node sorting result of the graph node sorting unit to obtain multiple graph node groups with priority.
- a graph node sorting unit that sorts the graph nodes at the first graph learning device based on the graph node dependencies, so The node grouping unit performs node grouping on the graph nodes at the first graph learning device according to the graph node sorting result of the graph node sorting unit to obtain multiple graph node groups with priority.
- the data access unit for the group of graph nodes for which cache space allocation has been completed, initiates to the second graph learning device where the corresponding graph node of the mirror node on which the graph node group depends is located. data access process.
- the data access device may further include: a dependency storage unit, which stores the graph node dependencies generated when the graph node data of the distributed graph learning architecture is partitioned. relation.
- the node grouping unit groups the at least two graph nodes into the same graph node group.
- the graph node sorting unit may include: a module for determining the number of mirror nodes, based on graph node dependencies, to determine the image nodes on which each graph node at the first graph learning device depends. The node number of the nodes; and the graph node sorting module, sorting the graph nodes at the first graph learning device according to the node number of the image nodes on which each graph node depends.
- the graph nodes having the same number of mirror nodes have the same sorting, and the graph nodes at the first graph learning device are grouped according to the sorting result of the graph nodes , for the graph nodes with the same sorting, the node grouping unit determines the grouping priority of the graph nodes according to the number of mirror nodes belonging to the grouped graph node group among the mirror nodes it depends on, and according to the grouping priority of the graph nodes Make node grouping.
- the cache space allocation unit may include: a cache space allocation check module, for each graph node group, checks whether the mirror node on which the graph node group depends is allocated cache space; and The cache space allocation module is configured to allocate cache space to the mirror node from the common buffer of the first graph learning device for the mirror node that has not been allocated cache space.
- the data access unit may include: a data cache checking module, checking whether the cache space of each mirror node on which the graph node group depends has cached graph node data; The fetching module initiates a data access process to the second graph learning device where the corresponding graph node of the mirror node is located for a mirror node that has no graph node data cached.
- the data access device may further include: a cache space release unit, which releases Cache space allocated for all mirror nodes that this graph node group depends on.
- the data access device may further include: an independent mirror node checking unit, in response to the completion of the graph learning training of each graph node of the graph node group by the first graph learning device Determining, according to the graph node dependency relationship, whether there is a non-dependent mirror node in the mirror nodes on which the graph node group depends, and the non-dependent mirror nodes include mirror nodes that are not dependent on graph node groups whose graph learning process is not completed; and
- the cache space release unit is configured to release the cache space allocated for the non-dependent mirror nodes when there are non-dependent mirror nodes among the mirror nodes on which the graph node group depends.
- a data access device for a distributed graph learning architecture including: at least one processor, a memory coupled to the at least one processor, and a memory stored in the A computer program in a memory, the at least one processor executes the computer program to implement the data access method for the distributed graph learning architecture as described above.
- a computer-readable storage medium storing executable instructions that, when executed, cause a processor to perform the above-mentioned distributed graph learning architecture. Data access method.
- a computer program product including a computer program, the computer program is executed by a processor to implement the above data access method for a distributed graph learning architecture.
- Figure 1 shows an example schematic diagram of a distributed graph learning architecture.
- Figure 2 shows an example flowchart of a graph node partitioning process.
- Figure 3 shows an example schematic diagram of the graph learning process.
- Fig. 4 shows an example flowchart of a data access method for a distributed graph learning architecture according to an embodiment of the present specification.
- 5A-5B show an exemplary diagram of graph node distribution and a corresponding graph node dependency table according to an embodiment of the present specification.
- FIG. 6 shows an example flowchart of a graph node sorting process according to an embodiment of the specification.
- Fig. 7 shows an example flow chart of a cache space allocation process according to an embodiment of the specification.
- FIG. 8 shows an example flowchart of a data access process according to an embodiment of the specification.
- Fig. 9 shows an example block diagram of a data access device for a distributed graph learning architecture according to an embodiment of the present specification.
- Fig. 10 shows an example block diagram of a graph node sorting unit according to an embodiment of the present description.
- Fig. 11 shows an example block diagram of a cache space allocation unit according to an embodiment of the present specification.
- FIG. 12 shows an example block diagram of a data access unit according to an embodiment of the present specification.
- Fig. 13 shows a schematic diagram of an example of a data access device implemented based on a computer system for a distributed graph learning architecture according to an embodiment of the present specification.
- the term “comprising” and its variants represent open terms meaning “including but not limited to”.
- the term “based on” means “based at least in part on”.
- the terms “one embodiment” and “an embodiment” mean “at least one embodiment.”
- the term “another embodiment” means “at least one other embodiment.”
- the terms “first”, “second”, etc. may refer to different or the same object. The following may include other definitions, either express or implied. Unless the context clearly indicates otherwise, the definition of a term is consistent throughout the specification.
- the graph learning architecture is an architecture for graph learning based on graph node data.
- graph learning may include, for example, graph learning model training based on graph node data.
- Graph node data includes graph node and edge data.
- the graph nodes include node attribute data
- the edge data includes edge attribute data.
- Node attribute data and edge attribute data may be business-related.
- node attribute data may include age, education, address, occupation, and so on.
- the edge attribute data may include the relationship between nodes, that is, the relationship between people, such as the relationship between classmates/colleagues, etc.
- the graph learning architecture if the graph nodes used are very large-scale graph nodes, it is necessary to deploy the graph learning architecture as a distributed graph learning architecture, and use the graph partitioning algorithm to disperse the graph node data to each node in the graph learning architecture. Distributed graph learning on-device. After the graph nodes are distributed to each distributed graph learning device, for a critical node, it is necessary to store the Master node of the critical node in the graph learning device where the critical node is located, and store the other graph learning devices where the rest of the neighbor nodes of the critical node are located. Create a Mirror node of this critical node.
- FIG. 1 shows an example schematic diagram of a distributed graph learning architecture 100 .
- the distributed graph learning architecture 100 may include more than 2 graph learning devices.
- examples of graph learning devices may include, but are not limited to, various graphics processing devices, such as GPU devices, CPU devices, and the like.
- graph learning device 110-1 has graph nodes A, B, C and D
- graph learning device 110-2 has graph node E and F
- the graph learning device 110-2 also has a mirror node (Mirror node) D' of the graph node D.
- the real graph nodes A, B, C, D, E, and F of the distributed graph learning architecture 100 may be referred to as Master nodes
- the created mirror node D' may be referred to as Mirror nodes.
- graph nodes A and D have neighbor node relationships with graph node B
- graph nodes B, C, E, and F have neighbor node relationships with graph node D.
- FIG. 2 shows an example flowchart of a graph node partitioning process 200 .
- a hash (HASH) value of each graph node of the distributed graph learning architecture is determined.
- a HASH calculation may be performed on part or all of the graph node data of the graph node to determine the HASH value.
- the graph node data of a graph node may include, for example, a node ID of a graph node, node attribute data and/or edge attribute data of a graph node.
- the node ID of the graph node can be used to perform HASH calculation to determine the HASH value.
- graph node partitioning is performed based on the determined HASH values of each graph node. For example, as shown in Figure 1, assuming that the hash value of graph nodes A, B, C and D is 1, graph nodes A, B, C and D are partitioned to graph learning device 110-1, graph nodes E and F If the HASH value is 2, the graph nodes E and F are partitioned to the graph learning device 110-2.
- edge data partitioning is performed based on destination nodes of each edge.
- the destination node of edge AB is graph node B, and graph node B is partitioned to graph learning device 110-1, then edge AB is partitioned to graph learning device 110-1.
- the start node A of the edge AB is also in the graph learning device 110-1, there is no critical problem in the edge AB.
- the destination node of edge DE is graph node E, and graph node E is on graph learning device 110-2, so edge DE is partitioned to graph learning device 110-2.
- the start node D of the edge DE is partitioned to the graph learning device 110-1, there is a critical problem in the edge DE.
- the graph learning process is usually a gatter-apply-scatter hierarchical process, and the number of layers represents the depth of the graph learning model.
- the following takes the 2-layer graph learning model as an example to illustrate the graph learning training process of the distributed graph learning architecture shown in FIG. 1 .
- the level of the graph learning model can also be referred to as the model depth of the graph learning model, that is, the number of hops of neighbor nodes that a node can influence.
- Figure 3 shows an example schematic diagram of the graph learning process. In Fig. 3, only the graph learning process of the first layer is shown.
- the initial values of graph nodes A, B, C, D, E, and F are A(0), B(0), C(0), D(0), E(0) and F(0), respectively.
- the values E(0) and F(0) of the graph nodes E and F are aggregated to the Mirror node D'.
- the aggregation operation can be concat (splicing), or other neural network operations such as add and pooling.
- values B(0) and C(0) of graph nodes B and C are aggregated to graph node D.
- the aggregated value obtained by graph node D (that is, the aggregated value of B(0) and C(0) and the aggregated value of E(0) and F(0)) is compared with the D(0 ) is aggregated to obtain D(1), and the obtained D(1) represents the data of graph node D in the second layer. Calculate the rest of graph nodes B in the same way to get A(1), B(1), C(1), E(1) and F(1).
- the graph node D aggregates the values B(1), C(1), E(1) and F(1) of the neighbor nodes B, C, E and F, and then combines the aggregated values with the graph
- the D(0) of node D itself is aggregated to obtain the data D(2) of graph node D in the third layer.
- the Mirror node D' is the neighbor node of the graph nodes E and F, so when performing the aggregation calculation of the graph nodes E and F, it is necessary to send D(1) from the graph node D to the Mirror node D'.
- the embodiments of this specification provide a data access solution.
- a common buffer is set at the graph learning device with the Mirror node for caching the Mirror data of the Mirror node needed for graph learning.
- the graph nodes at the graph learning device are grouped, and the obtained multiple graph node groups have priorities determined based on graph node dependencies when mirror data is accessed. class. According to the priority of graph node grouping, cache space is allocated for the mirror nodes that each graph node group depends on from the public buffer of the graph learning device.
- the graph nodes by grouping the graph nodes into groups of graph nodes with access priorities determined based on the graph node dependencies, and based on the access priority, from the set common buffer for each graph Nodes are grouped to allocate cache space.
- the graph node After the graph node completes the cache space allocation, it initiates the data access process to other graph learning devices, and the stored Mirror node data is cached in the allocated cache space for graph learning, so that there is no need to store data in the graph where each Mirror node is located.
- the storage space (memory) of the learning device permanently stores a complete backup of the Master data, thereby improving the storage space utilization rate of the graph learning device.
- FIG. 4 shows an example flowchart of a data access method 400 for a distributed graph learning architecture according to an embodiment of the present specification.
- the data access method 400 shown in FIG. 4 is executed by the first graph learning device with Mirror nodes in the distributed graph learning architecture. Compared with the first graph learning device, the remaining graph learning devices in the distributed graph learning architecture are called the second graph learning device.
- node grouping is performed on the graph nodes at the first graph learning device to obtain multiple graph node groups with priorities.
- the priority of each graph node grouping is determined based on graph node dependencies.
- the priority can be used to indicate the cache space allocation priority of the graph node group, or used to indicate the data access priority of the graph node group.
- the higher the priority of the graph node group the earlier the cache space is allocated or the graph node data is accessed for each Mirror node in the graph node group.
- the first priority has the highest priority
- the second priority is the second, and so on. The higher the priority number, the lower the priority.
- each graph node grouping has a prescribed size grouping size.
- the group size of the graph node group can be represented by the number of nodes in the graph node group.
- the group size of each graph node group may be 64 nodes.
- the group size of each graph node group can be the same or different.
- the grouping size of individual graph node groupings may be configurable.
- the graph node dependency is used to reflect the graph node's dependency on the Mirror node during graph learning.
- graph node E needs to use the graph node data of Mirror node B' when performing graph learning, then graph node E has a dependency on Mirror node B'.
- graph node dependencies may be pre-generated when graph-partitioning graph node data of a distributed graph learning architecture. In another example, graph node dependencies may also be generated during data access.
- FIG. 5A shows an exemplary schematic diagram of graph node distribution according to an embodiment of the present specification.
- graph node E has a dependency on Mirror node B'
- graph node F has a dependency on Mirror nodes D' and H'
- graph node G has a dependency on Mirror nodes B' and C' Dependencies
- graph node I has dependencies on Mirror nodes D' and H'.
- FIG. 5B shows an exemplary schematic diagram of graph node dependencies corresponding to the graph node distribution shown in FIG. 5A .
- the graph node dependencies are illustrated as a graph node dependency table, the first column of which shows graph nodes A-I, and the first row shows Mirror nodes B', C', D' and H'.
- a value of "0" in the graph node dependencies indicates that there is no dependency, and a value of "1" indicates that there is a dependency.
- the graph node dependencies may also be represented by other suitable representation forms, for example, graph node dependency graphs and the like.
- the graph nodes at the first graph learning device may be randomly grouped. Then, count the number of Mirror nodes that the graph nodes contained in each graph node group depend on based on graph node dependencies, and determine the priority of each graph node group according to the counted number of Mirror nodes in each graph node group.
- the graph nodes at the first graph learning device may be sorted based on graph node dependencies. Then, the graph nodes at the first graph learning device are grouped according to the graph node sorting result to obtain multiple graph node groups with priorities. In this case, the priority of the graph node group can be determined according to the node ordering of the graph nodes of the graph node group. The node order of any graph node in the graph node group with high priority is not lower than the node rank of all graph nodes in the graph node group with low priority.
- FIG. 6 shows an example flow diagram of a graph node ordering process 600 according to an embodiment of the specification.
- the first graph learning device is graph learning device 110 - 2
- the number of Mirror nodes on which graph node E depends is 1
- the number of Mirror nodes on which graph node F depends is 2.
- the graph nodes can be sorted in ascending order of the number of mirror nodes they depend on, that is, the smaller the number of mirror nodes that a graph node depends on, the graph node sort higher.
- the Mirror node that graph node E depends on is B'
- the Mirror nodes that graph node F depends on are D' and H', so that graph node E>graph node F. It should be noted that, for graph nodes having the same number of mirror nodes, they have the same sorting when sorting the graph nodes.
- graph nodes that depend on the same Mirror node are grouped into the same graph node group as much as possible.
- at least two graph nodes are grouped into the same graph node group if at least two graph nodes having the same dependent mirror node can be grouped into the same graph node group.
- both graph nodes F and I depend on Mirror nodes D' and H', then graph nodes F and I are grouped into the same graph node group, unless the graph node group is not large enough to accommodate both Graph nodes F and I, and the grouping priorities of the graph nodes already accommodated in the graph node group are all superior to graph nodes F and I.
- the graph nodes belonging to the grouped graph nodes in the dependent mirror nodes can be grouped The number of mirror nodes determines the grouping priority of graph nodes. Then, node grouping is performed on the graph nodes having the same ranking based on the determined grouping priority of the graph nodes.
- graph nodes G, F, and I all depend on 2 Mirror nodes, then graph nodes G, F, and I have the same ordering.
- the grouping priority of graph nodes is determined according to the number of Mirror nodes belonging to the grouped graph node group among the Mirror nodes on which graph nodes G, F, and I depend.
- the grouping priority of the graph node G is higher than Grouping priorities for graph nodes F and I.
- each graph node group depends. Specifically, for each graph node group, based on the graph node dependency, determine the Mirror node that each graph node in the graph node group depends on. Then, the obtained set of Mirror nodes is used as the Mirror nodes on which the graph node group depends.
- the cache space can be allocated sequentially by graph node group.
- corresponding cache space may also be allocated in parallel for the graph node groups based on the priority of the graph node groups. For example, several graph node groups may be selected each time according to the priority of the graph node groups, and then cache space is allocated for the graph nodes in the selected graph node groups.
- the size of the public buffer of the first graph learning device is configurable.
- the size of the public buffer needs to be able to store node data of the maximum number of neighbor nodes of the Master node in the distributed graph learning architecture.
- the size of the public buffer needs to be able to store node data of at least 4 graph nodes. Assuming that the amount of node data of each graph node is fixed, the size of the public buffer can be represented by the number of graph nodes.
- FIG. 7 shows an example flowchart of a cache space allocation process 700 according to an embodiment of the present specification.
- buffer space is allocated to each Mirror node of the first priority graph node group from the public buffer of the first graph learning device.
- the operations from 720 to 780 are cyclically executed, and each cycle corresponds to a cache space allocation operation for a graph node group.
- 720 it is judged whether there is a Mirror node that has allocated cache space among the Mirror nodes on which the current graph node group depends. If there is a Mirror node with allocated cache space, at 730, remove the Mirror node with allocated cache space from the dependent Mirror nodes, and determine the cache space required by the remaining Mirror nodes as the cache space required for the current graph node group. Then, proceed to 750. If there is no Mirror node with allocated cache space, then at 740, determine the cache space required by all the Mirror nodes on which the graph node group depends, and use it as the cache space required by the current graph node group. Then, proceed to 750.
- the remaining cache space of the public buffer is not less than the cache space required by the current graph node group, at 760, allocate cache space for the Mirror nodes on which the current graph node group depends. Specifically, when there are Mirror nodes that have allocated cache space, cache space is allocated for the remaining Mirror nodes in the current graph node group. When there is no Mirror node with allocated cache space, allocate cache space for all Mirror nodes that the current graph node group depends on.
- FIG. 7 is only an implementation example of the cache space. In other embodiments of this specification, various modifications may be made to the example shown in FIG. 7 , for example, some steps in FIG. 7 may be removed or steps may be added to the example in FIG. 7 .
- a data access process for the graph node that has completed the cache space allocation, initiate a data access process to the second graph learning device where the corresponding graph node of the Mirror node that the graph node depends on is located.
- a data access request can be initiated to the second graph learning device where the corresponding graph node of the Mirror node on which the graph node depends is located.
- the second graph learning device acquires corresponding graph node data in response to the data access request, and returns the acquired graph node data to the first graph learning device.
- data access is performed in units of graph nodes.
- a data access process may be initiated to the second graph learning device where the corresponding graph node of the Mirror node on which the graph node group depends is located for the graph node group that has completed cache space allocation.
- data access is performed in units of graph node groups.
- FIG. 8 shows an example flowchart of a data access process 800 according to an embodiment of the specification.
- FIG. 8 is only an exemplary embodiment of the data access process.
- the embodiment shown in FIG. 8 may be modified, for example, the cache space check step and its corresponding processing steps may not be included, but the data access process may be initiated directly.
- each graph node in the graph node group can use its own graph
- the node data and the graph node data of the dependent Mirror node are used to perform the graph learning process.
- the first graph learning device it is monitored whether the graph learning process of each graph node in the graph node group is completed. If it is not monitored that the graph learning process of each graph node grouped by the graph node is completed, continue monitoring.
- Dependent Mirror nodes include mirror nodes that are not dependent on graph node groups that are not completed by the graph learning process. If it is determined that there is no undependent Mirror node, go to step 490 .
- step 490 it is determined whether there are layers that are not graph-learned. If there is a layer for which no graph learning is performed, return to step 430 and execute the next loop process. If there are no layers that are not graph-learned, the process ends.
- the cache space allocated for all the Mirror nodes that the graph node group depends on can be released directly, without the above-mentioned 470 Does not rely on the Mirror node determination process.
- a data access method for a distributed graph learning architecture has been described above with reference to FIGS. 1 to 8 .
- graph nodes are grouped into groups of graph nodes with access priorities determined based on the graph node dependencies, and based on the access priority, each graph is allocated from the set public buffer Nodes are grouped to allocate cache space. After the graph node completes the cache space allocation, it initiates the data access process to other graph learning devices, and the stored Mirror node data is cached in the allocated cache space for graph learning.
- the data access operation for the graph node group can provide the graph of the at least two graph nodes Mirror data required for the learning process, thereby improving the graph learning efficiency of the distributed graph learning architecture.
- the grouping priority of the graph nodes is determined according to the number of Mirror nodes belonging to the grouped graph node group among the mirror nodes that depend on it, and based on the determined The grouping priority of the graph node is used to group the graph nodes with the same order, so that the graph node data of the mirror node that has been accessed can be used by the dependent graph nodes earlier for graph learning, and after completion After the graph is learned, the cache space of the Mirror data is released, thereby improving the utilization rate of the storage space of the first graph learning device.
- the first graph learning device completes the graph learning and training of each graph node of the graph node group, releases the cache space allocated for all Mirror nodes that the graph node group depends on, so that the released The cache space can be allocated to the Mirror nodes of other graph node groups, thereby improving the cache space utilization of the common buffer.
- FIG. 9 shows an example block diagram of a data access device 900 for a distributed graph learning architecture according to an embodiment of the present specification.
- the data access device 900 is applied to a first graph learning device with a Mirror node in a distributed graph learning architecture.
- the data access device 900 includes a node grouping unit 910 , a mirror node determination unit 920 , a cache space allocation unit 930 , a data access unit 940 and a data cache unit 950 .
- the node grouping unit 910 is configured to group the graph nodes at the first graph learning device to obtain a plurality of graph node groups with priorities, and the priority of each graph node group is determined based on graph node dependencies.
- the operation of the node grouping unit 910 may refer to the operation described above with reference to 410 of FIG. 4 .
- the mirror node determining unit 920 is configured to determine the Mirror node on which each graph node group depends based on graph node dependencies. For operations of the mirror node determining unit 920, reference may be made to the operations described above with reference to 420 of FIG. 4 .
- the cache space allocation unit 930 is configured to sequentially allocate cache space for the Mirror nodes on which each graph node group depends from the common buffer of the first graph learning device according to the priority of the graph node group.
- For operations of the cache space allocating unit 930 reference may be made to the operations described above with reference to 430 in FIG. 4 .
- the data access unit 940 is configured to initiate a data access process to the second graph learning device where the corresponding graph node of the Mirror node on which the graph node depends is located for the graph node that has completed the cache space allocation.
- the operation of the data access unit 940 may refer to the operation described above with reference to 440 of FIG. 4 .
- the data cache unit 950 is configured to cache the graph node data returned in response to the data access process in the allocated cache space.
- graph node dependencies may be pre-generated when graph-partitioning graph node data of a distributed graph learning architecture.
- the data access device 900 may further include a dependency storage unit (not shown).
- the dependency storage unit is configured to store graph node dependencies generated when graph node data of the distributed graph learning architecture is partitioned.
- the node grouping unit 910 when performing node grouping on the graph nodes at the first graph learning device, if at least two graph nodes with the same dependent mirror node can be grouped into the same graph node group, the node grouping unit 910 will At least two graph nodes are grouped into the same graph node group.
- the data access device 900 may further include a graph node sorting unit (not shown).
- the graph node sorting unit is configured to sort the graph nodes at the first graph learning device based on graph node dependencies. Then, the node grouping unit 910 performs node grouping on the graph nodes at the first graph learning device based on the graph node sorting result.
- FIG. 10 shows an example block diagram of a graph node sorting unit 1000 according to an embodiment of the specification.
- the graph node sorting unit 1000 includes a mirror node number determination module 1010 and a graph node sorting module 1020 .
- the mirror node number determination module 1010 is configured to determine the number of Mirror nodes that each graph node at the first graph learning device depends on based on graph node dependencies. For operations of the mirror node number determining module 1010, reference may be made to the operations described above with reference to 610 in FIG. 6 .
- the graph node sorting module 1020 is configured to sort the graph nodes at the first graph learning device according to the number of Mirror nodes on which each graph node depends. Operations of the graph node sorting module 1020 may refer to the operations described above with reference to 620 of FIG. 6 .
- the node grouping unit 910 groups the graph nodes belonging to the grouped graph nodes according to the dependent Mirror nodes The number of Mirror nodes determines the grouping priority of the graph nodes, and the nodes are grouped according to the grouping priority of the graph nodes.
- FIG. 11 shows an example block diagram of a cache space allocation unit 1100 according to an embodiment of the present specification.
- the cache space allocation unit 1100 may include a cache space allocation check module 1110 and a cache space allocation module 1120 .
- the cache space allocation checking module 1110 is configured to check, for each graph node group, whether the Mirror node on which the graph node group depends is allocated a cache space.
- the cache space allocation module 1120 is configured to allocate cache space to the Mirror node from the public buffer of the first graph learning device for the Mirror node that has not been allocated cache space.
- the cache space allocating unit 1100 may further include a cache required space determination module (not shown) and a cache judgment module (not shown).
- the cache required space determination module is configured to determine the cache space required by the graph node group according to the check result of the cache space allocation check module 1110 . Specifically, when the inspection result of the cache space allocation checking module 1110 indicates that there are Mirror nodes that have allocated cache space, the cache required space determination module removes the Mirror nodes that have allocated cache space from the Mirror nodes that the graph node group depends on , and determine the cache space required by the remaining Mirror nodes as the cache space required by the graph node group.
- the cache space required by the cache space determination module determines the cache space required by all Mirror nodes that the graph node group depends on as the graph node group Required cache space.
- the cache judging module is configured to judge whether the cache space can be allocated for the graph node group according to the remaining cache space of the public buffer and the cache space required by the graph node group. When the remaining cache space of the public buffer is not less than the cache space required by the graph node group, the cache judging module determines that the cache space can be allocated for the graph node group. When the remaining cache space of the common buffer is less than the cache space required by the graph node group, the cache judging module determines that no cache space can be allocated for the graph node group.
- the cache space allocation module 1120 is configured to, when the cache judgment module determines that the cache space can be allocated for the graph node group, from the public buffer of the first graph learning device for the Mirror node of the unallocated cache space that the graph node group depends on Allocate cache space.
- FIG. 12 shows an example block diagram of a data access unit 1200 according to an embodiment of the specification.
- the data access unit 1200 may include a data cache checking module 1210 and a data access module 1220 .
- the data cache checking module 1210 is configured to check whether the cache space of each Mirror node on which the graph node group depends has graph node data cached for the graph node group for which the cache space allocation has been completed. For operations of the data cache checking module 1210, reference may be made to the operations described above with reference to 810 of FIG. 8 .
- the data access module 1220 is configured to initiate a data access process to the second graph learning device where the corresponding graph node of the Mirror node is located for a Mirror node that has no graph node data cached.
- the operation of the data access module 1220 may refer to the operation described above with reference to 830 of FIG. 8 .
- the data access device 900 may further include a cache space release unit (not shown).
- the cache space release unit releases the cache space allocated for all Mirror nodes that the graph node group depends on.
- the data access apparatus 900 may further include an independent mirror node checking unit (not shown) and a cache space releasing unit (not shown).
- the non-dependent mirror node checking unit is configured to respond to the first graph learning device completing the graph learning training of each graph node of the graph node group, and determine whether there is an unreliable mirror node in the mirror node on which the graph node group depends according to the graph node dependencies.
- Dependent on Mirror nodes the non-dependent Mirror nodes include Mirror nodes that are not dependent on groups of graph nodes whose graph learning process has not been completed.
- the cache space release unit is configured to release the cache space allocated for the non-dependent Mirror node when there is a non-dependent Mirror node among the Mirror nodes on which the graph node group depends.
- the data access method and data access device for the distributed graph learning architecture are described.
- the above data access device can be implemented by hardware, or by software or a combination of hardware and software.
- FIG. 13 shows a schematic diagram of a computer system-based data access device 1300 for a distributed graph learning architecture according to an embodiment of the present specification.
- the data access device 1300 may include at least one processor 1310, memory (for example, non-volatile memory) 1320, memory 1330 and communication interface 1340, and at least one processor 1310, memory 1320, memory 1330 and the communication interface 1340 are connected together via a bus 1360 .
- At least one processor 1310 executes at least one computer-readable instruction (ie, the elements implemented in software described above) stored or encoded in a memory.
- computer-executable instructions are stored in the memory, which when executed cause at least one processor 1310 to: perform node grouping on the graph nodes at the first graph learning device to obtain a plurality of graph node groups with priority , the priority of each graph node group is determined based on the graph node dependency, which is used to reflect the graph node's dependency on the mirror node during graph learning; based on the graph node dependency, determine the mirror node; according to the priority of graph node grouping, allocate cache space for the mirror nodes that each graph node group depends on from the public buffer of the first graph learning device; for the graph nodes that have completed the cache space allocation, send The second graph learning device where the corresponding graph node of the dependent image node is located initiates a data access process; and caches the graph node data returned in response to the data access process in the allocated cache space.
- a program product such as a machine-readable medium (eg, a non-transitory machine-readable medium) is provided.
- the machine-readable medium may have instructions (that is, the aforementioned elements implemented in software), which, when executed by the machine, cause the machine to perform the various operations and operations described above in conjunction with FIGS. 1-12 in various embodiments of this specification.
- Function Specifically, a system or device equipped with a readable storage medium can be provided, on which a software program code for realizing the functions of any one of the above embodiments is stored, and the computer or device of the system or device can The processor reads and executes the instructions stored in the readable storage medium.
- the program code read from the readable medium itself can realize the function of any one of the above-mentioned embodiments, so the machine-readable code and the readable storage medium storing the machine-readable code constitute the core of the present invention. part.
- Examples of readable storage media include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tape, non- Volatile memory card and ROM.
- the program code can be downloaded from a server computer or cloud via a communication network.
- a computer program product includes a computer program, and when the computer program is executed by a processor, the processor executes the above described in conjunction with FIGS. 1-12 in various embodiments of this specification. Various operations and functions.
- the execution order of each step is not fixed, and can be determined as required.
- the device structures described in the above embodiments may be physical structures or logical structures, that is, some units may be realized by the same physical entity, or some units may be realized by multiple physical entities, or may be realized by multiple physical entities. Certain components in individual devices are implemented together.
- the hardware units or modules may be implemented mechanically or electrically.
- a hardware unit, module, or processor may include permanently dedicated circuitry or logic (such as a dedicated processor, FPGA, or ASIC) to perform the corresponding operations.
- the hardware unit or processor may also include programmable logic or circuits (such as a general-purpose processor or other programmable processors), which can be temporarily set by software to complete corresponding operations.
- the specific implementation mechanical way, or a dedicated permanent circuit, or a temporary circuit
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Databases & Information Systems (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Medical Informatics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Artificial Intelligence (AREA)
- Image Generation (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本说明书的实施例提供用于分布式图学习架构的数据存取方法及装置。在该数据存取方法中,将第一图学习设备处的图节点分组为多个具有优先级的图节点分组,各个图节点分组的优先级基于图节点依赖关系确定,图节点依赖关系用于反映图节点在图学习时相对于镜像节点的依赖性。基于图节点依赖关系,确定各个图节点分组所依赖的镜像节点;并根据图节点分组的优先级,从第一图学习设备的公共缓冲区中为各个图节点分组所依赖的镜像节点分配缓存空间。针对完成缓存空间分配的图节点,向该图节点所依赖的镜像节点的对应图节点所在的第二图学习设备发起数据存取过程;以及将所获取的图节点数据缓存在所分配的缓存空间中。
Description
本说明书实施例通常涉及图数据处理领域,尤其涉及用于分布式图学习架构的数据存取方法及数据存取装置。
在图学习架构中,如果所使用的图节点是超大规模图节点,则需要将图学习架构部署为分布式图学习架构,并且通过图分区算法来将图节点分散到图学习架构中的各个分布式图学习设备上。在图节点被分散到各个分布式图学习设备时,所分散的图节点中会存在临界节点。临界节点的部分邻居节点存储在该临界节点所在的图学习设备中,并且该临界节点的其余邻居节点存储在其它图学习设备中。
在进行图学习时,临界节点所在的图学习设备需要存储临界节点的节点数据,并且临界节点的节点数据需要被映射到该临界节点的其余邻居节点所在的图学习设备,即,该临界节点的其余邻居节点所在的图学习设备需要存储临界节点的节点数据的映射信息。图学习设备中存储的图节点可以称为Master节点,Master节点的节点数据可以称为Master数据,以及被映射到其它图学习设备中的图节点的节点数据可以称为图节点的Mirror数据(镜像数据)。在这种情况下,被映射到其它图学习设备中的图节点也可以称为Mirror节点(镜像节点)。
在上述图节点数据存取方式下,在Master节点的Master数据发生数据更新时,需要同步更新分布在其它图学习设备中的所有Mirror数据,以确保Master节点与其Mirror节点之间的数据一致性。按照这种处理方式,需要在各个Mirror节点所在的图学习设备的内存中存储Master数据的完整备份,从而造成图学习设备的内存空间浪费。
发明内容
鉴于上述,本说明书的实施例提供用于图分布学习架构的数据存取方法及数据存取装置。在该数据存取方案中,在具有Mirror节点的图学习设备处设置公共缓冲区,用于缓存在进行图学习时需要使用的Mirror节点的节点数据。在存取用于图学习的Mirror数据时,对图学习设备处的图节点进行节点分组,所得到的多个图节点分组在进行Mirror数据存取时具有优先级,并且各个图节点分组的优先级基于图节点依赖关系确定。根据图节点分组的优先级,从图学习设备的公共缓冲区中为各个图节点分组所依赖的镜像节点分配缓存空间。然后,针对完成缓存空间分配的图节点,向该图节点所依赖的镜像节点的对应图节点所在的图学习设备发起数据存取过程,由此拉取对应的图节点数据并缓存在所分配的缓存空间中。
利用上述数据存取方案,将图节点分组为具有基于图节点依赖关系确定出的存取优先级的各个图节点分组,并且基于存取优先级来从所设置的公共缓冲区中为各个图节点分组分配缓存空间。在为图节点完成缓存空间分配后,才向其它图学习设备发起数据存 取过程,所存储的Mirror节点数据缓存在所分配的缓存空间中以供图学习使用,从而无需在各个Mirror节点所在的图学习设备中存储Master数据的完整备份,由此提升图学习设备的存储空间利用率。
根据本说明书实施例的一个方面,提供一种用于分布式图学习架构的数据存取方法,所述数据存取方法由所述分布式图学习架构的具有镜像节点的第一图学习设备执行,所述数据存取方法包括:对所述第一图学习设备处的图节点进行节点分组,得到多个具有优先级的图节点分组,所述图节点分组的优先级基于图节点依赖关系确定,所述图节点依赖关系用于反映图节点在图学习时相对于镜像节点的依赖性;基于所述图节点依赖关系,确定各个图节点分组所依赖的镜像节点;根据所述图节点分组的优先级,从所述第一图学习设备的公共缓冲区中为各个图节点分组所依赖的镜像节点分配缓存空间;针对完成缓存空间分配的图节点,向该图节点所依赖的镜像节点的对应图节点所在的第二图学习设备发起数据存取过程;以及将响应于所述数据存取过程而返回的图节点数据缓存在所分配的缓存空间中。
可选地,在上述方面的一个示例中,对所述第一图学习设备处的图节点进行节点分组,得到多个具有优先级的图节点分组可以包括:基于图节点依赖关系对所述第一图学习设备处的图节点进行排序;以及根据图节点排序结果对所述第一图学习设备处的图节点进行节点分组,得到多个具有优先级的图节点分组。
可选地,在上述方面的一个示例中,针对完成缓存空间分配的图节点,向该图节点所依赖的镜像节点的对应图节点所在的第二图学习设备发起数据存取过程可以包括:针对完成缓存空间分配的图节点分组,向该图节点分组所依赖的镜像节点的对应图节点所在的第二图学习设备发起数据存取过程。
可选地,在上述方面的一个示例中,所述图节点依赖关系在对所述分布式图学习架构的图节点数据进行图分区时生成。
可选地,在上述方面的一个示例中,各个图节点分组具有可配置的分组大小。
可选地,在上述方面的一个示例中,在根据图节点排序结果对所述第一图学习设备处的图节点进行节点分组时,如果具有相同依赖镜像节点的至少两个图节点可被分组到同一图节点分组中,则将所述至少两个图节点分组到同一图节点分组。
可选地,在上述方面的一个示例中,基于图节点依赖关系对所述第一图学习设备处的图节点进行排序包括:基于图节点依赖关系,确定所述第一图学习设备处的各个图节点所依赖的镜像节点的节点数目;以及根据各个图节点所依赖的镜像节点的节点数目,对所述第一图学习设备处的图节点进行排序。
可选地,在上述方面的一个示例中,所具有的镜像节点的节点数目相同的图节点具有相同的排序,在根据图节点排序结果对所述第一图学习设备处的图节点进行节点分组时,针对具有相同排序的图节点,根据所依赖的镜像节点中属于已分组图节点分组的镜像节点的数目确定图节点的分组优先级。
可选地,在上述方面的一个示例中,根据所述图节点分组的优先级,从所述第一图学习设备的公共缓冲区中为各个图节点分组所依赖的镜像节点顺序分配缓存空间可以包括:针对各个图节点分组,检查该图节点分组所依赖的镜像节点是否被分配缓存空间;以及对于未分配缓存空间的镜像节点,从所述第一图学习设备的公共缓冲区中为该镜像 节点分配缓存空间。
可选地,在上述方面的一个示例中,针对完成缓存空间分配的图节点分组,向该图节点分组所依赖的镜像节点的对应图节点所在的第二图学习设备发起数据存取过程可以包括:针对完成缓存空间分配的图节点分组,检查该图节点分组所依赖的各个镜像节点的缓存空间是否缓存有图节点数据;以及对于未缓存有图节点数据的镜像节点,向该镜像节点的对应图节点所在的第二图学习设备发起数据存取过程。
可选地,在上述方面的一个示例中,所述数据存取方法还可以包括:响应于所述第一图学习设备完成图节点分组的各个图节点的图学习训练,释放为该图节点分组所依赖的所有镜像节点分配的缓存空间。
可选地,在上述方面的一个示例中,所述数据存取方法还可以包括:响应于所述第一图学习设备完成图节点分组的各个图节点的图学习训练,根据所述图节点依赖关系确定该图节点分组所依赖的镜像节点中是否存在未依赖镜像节点,所述未依赖镜像节点包括未被图学习过程未完成的图节点分组依赖的镜像节点;以及在该图节点分组所依赖的镜像节点中存在未依赖镜像节点时,释放为所述未依赖镜像节点分配的缓存空间。
可选地,在上述方面的一个示例中,所述分布式图学习架构的图学习过程是分层迭代学习过程,所述镜像节点的缓存空间分配步骤、所述数据存取过程的发起步骤以及所述图节点数据的缓存步骤被循环执行,直到所述分层迭代学习过程完成。
根据本说明书的实施例的另一方面,提供一种用于分布式图学习架构的数据存取装置,所述数据存取装置应用于所述分布式图学习架构的具有镜像节点的第一图学习设备,所述数据存取装置包括:节点分组单元,对所述第一图学习设备处的图节点进行节点分组,得到多个具有优先级的图节点分组,所述图节点分组的优先级基于图节点依赖关系确定,所述图节点依赖关系用于反映图节点在图学习时相对于镜像节点的依赖性;镜像节点确定单元,基于所述图节点依赖关系,确定各个图节点分组所依赖的镜像节点;缓存空间分配单元,根据所述图节点分组的优先级,从所述第一图学习设备的公共缓冲区中为各个图节点分组所依赖的镜像节点分配缓存空间;数据存取单元,针对完成缓存空间分配的图节点,向该图节点所依赖的镜像节点的对应图节点所在的第二图学习设备发起数据存取过程;以及数据缓存单元,将响应于所述数据存取过程而返回的图节点数据缓存在所分配的缓存空间中。
可选地,在上述方面的一个示例中,所述数据存取装置还可以包括:图节点排序单元,基于所述图节点依赖关系对所述第一图学习设备处的图节点进行排序,所述节点分组单元根据所述图节点排序单元的图节点排序结果对所述第一图学习设备处的图节点进行节点分组,得到多个具有优先级的图节点分组。
可选地,在上述方面的一个示例中,所述数据存取单元针对完成缓存空间分配的图节点分组,向该图节点分组所依赖的镜像节点的对应图节点所在的第二图学习设备发起数据存取过程。
可选地,在上述方面的一个示例中,所述数据存取装置还可包括:依赖关系存储单元,存储在对所述分布式图学习架构的图节点数据进行图分区时生成的图节点依赖关系。
可选地,在上述方面的一个示例中,在根据图节点排序结果对所述第一图学习设备处的图节点进行节点分组时,如果具有相同依赖镜像节点的至少两个图节点可被分组到 同一图节点分组中,则所述节点分组单元将所述至少两个图节点分组到同一图节点分组。
可选地,在上述方面的一个示例中,所述图节点排序单元可以包括:镜像节点数目确定模块,基于图节点依赖关系,确定所述第一图学习设备处的各个图节点所依赖的镜像节点的节点数目;以及图节点排序模块,根据各个图节点所依赖的镜像节点的节点数目,对所述第一图学习设备处的图节点进行排序。
可选地,在上述方面的一个示例中,所具有的镜像节点的节点数目相同的图节点具有相同的排序,在根据图节点排序结果对所述第一图学习设备处的图节点进行节点分组时,针对具有相同排序的图节点,所述节点分组单元根据所依赖的镜像节点中属于已分组图节点分组的镜像节点的数目确定图节点的分组优先级,并根据图节点的分组优先级进行节点分组。
可选地,在上述方面的一个示例中,所述缓存空间分配单元可以包括:缓存空间分配检查模块,针对各个图节点分组,检查该图节点分组所依赖的镜像节点是否被分配缓存空间;以及缓存空间分配模块,对于未分配缓存空间的镜像节点,从所述第一图学习设备的公共缓冲区中为该镜像节点分配缓存空间。
可选地,在上述方面的一个示例中,所述数据存取单元可以包括:数据缓存检查模块,检查该图节点分组所依赖的各个镜像节点的缓存空间是否缓存有图节点数据;以及数据存取模块,对于未缓存有图节点数据的镜像节点,向该镜像节点的对应图节点所在的第二图学习设备发起数据存取过程。
可选地,在上述方面的一个示例中,所述数据存取装置还可以包括:缓存空间释放单元,响应于所述第一图学习设备完成图节点分组的各个图节点的图学习训练,释放为该图节点分组所依赖的所有镜像节点分配的缓存空间。
可选地,在上述方面的一个示例中,所述数据存取装置还可以包括:未依赖镜像节点检查单元,响应于所述第一图学习设备完成图节点分组的各个图节点的图学习训练,根据所述图节点依赖关系确定该图节点分组所依赖的镜像节点中是否存在未依赖镜像节点,所述未依赖镜像节点包括未被图学习过程未完成的图节点分组依赖的镜像节点;以及缓存空间释放单元,在该图节点分组所依赖的镜像节点中存在未依赖镜像节点时,释放为所述未依赖镜像节点分配的缓存空间。
根据本说明书的实施例的另一方面,提供一种用于分布式图学习架构的数据存取装置,包括:至少一个处理器,与所述至少一个处理器耦合的存储器,以及存储在所述存储器中的计算机程序,所述至少一个处理器执行所述计算机程序来实现如上所述的用于分布式图学习架构的数据存取方法。
根据本说明书的实施例的另一方面,提供一种计算机可读存储介质,其存储有可执行指令,所述指令当被执行时使得处理器执行如上所述的用于分布式图学习架构的数据存取方法。
根据本说明书的实施例的另一方面,提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行来实现上述的用于分布式图学习架构的数据存取方法。
图1示出了分布式图学习架构的示例示意图。
图2示出了图节点分区过程的示例流程图。
图3示出了图学习过程的示例示意图。
图4示出了根据本说明书的实施例的用于分布式图学习架构的数据存取方法的示例流程图。
图5A-图5B示出了根据本说明书的实施例的图节点分布以及对应的图节点依赖表的示例示意图。
图6示出了根据本说明书的实施例的图节点排序过程的示例流程图。
图7示出了根据本说明书的实施例的缓存空间分配过程的示例流程图。
图8示出了根据本说明书的实施例的数据存取过程的示例流程图。
图9示出了根据本说明书的实施例的用于分布式图学习架构的数据存取装置的示例方框图。
图10示出了根据本说明书的实施例的图节点排序单元的示例方框图。
图11示出了根据本说明书的实施例的缓存空间分配单元的示例方框图。
图12示出了根据本说明书的实施例的数据存取单元的示例方框图。
图13示出了根据本说明书的实施例的基于计算机系统实现的用于分布式图学习架构的数据存取装置的示例示意图。
现在将参考示例实施方式讨论本文描述的主题。应该理解,讨论这些实施方式只是为了使得本领域技术人员能够更好地理解从而实现本文描述的主题,并非是对权利要求书中所阐述的保护范围、适用性或者示例的限制。可以在不脱离本说明书内容的保护范围的情况下,对所讨论的元素的功能和排列进行改变。各个示例可以根据需要,省略、替代或者添加各种过程或组件。例如,所描述的方法可以按照与所描述的顺序不同的顺序来执行,以及各个步骤可以被添加、省略或者组合。另外,相对一些示例所描述的特征在其它例子中也可以进行组合。征在其它例子中也可以进行组合。征在其它例子中也征在其它例子中也可以进行组合。
如本文中使用的,术语“包括”及其变型表示开放的术语,含义是“包括但不限于”。术语“基于”表示“至少部分地基于”。术语“一个实施例”和“一实施例”表示“至少一个实施例”。术语“另一个实施例”表示“至少一个其他实施例”。术语“第一”、“第二”等可以指代不同的或相同的对象。下面可以包括其他的定义,无论是明确的还是隐含的。除非上下文中明确地指明,否则一个术语的定义在整个说明书中是一致的。
图学习架构是基于图节点数据进行图学习的架构。在本说明书中,图学习例如可以包括基于图节点数据的图学习模型训练等。图节点数据包括图节点和边数据。图节点包括节点属性数据,以及边数据包括边属性数据。节点属性数据和边属性数据可以与业务相关。比如,对于社交网络场景,节点属性数据可以包括年龄、学历、住址、职业等。边属性数据可以包括节点与节点之间的关系,即,人与人之间的关系,比如,同学/同事 关系等。
在图学习架构中,如果所使用的图节点是超大规模图节点,则需要将图学习架构部署为分布式图学习架构,并且通过图分区算法来将图节点数据分散到图学习架构中的各个分布式图学习设备上。在图节点被分散到各个分布式图学习设备后,对于临界节点,需要在其所在图学习设备中存储该临界节点的Master节点,并且在该临界节点的其余邻居节点所在的其它图学习设备中创建该临界节点的Mirror节点。
图1示出了分布式图学习架构100的示例示意图。在图1的示例中,示出了2个图学习设备110-1和110-2。在其它实施例中,分布式图学习架构100可以包括多于2个图学习设备。在本说明书中,图学习设备的示例例如可以包括但不限于各种图形处理设备,比如,GPU设备、CPU设备等。
如图1所示,在对分布式图学习架构100的图节点进行图分区后,图学习设备110-1具有图节点A、B、C和D,以及图学习设备110-2具有图节点E和F。此外,图学习设备110-2还具有图节点D的镜像节点(Mirror节点)D’。在本说明书中,分布式图学习架构100所具有的真实图节点A、B、C、D、E和F可以称为Master节点,以及所创建的镜像节点D’可以称为Mirror节点。在图1的示例中,图节点A和D与图节点B之间具有邻居节点关系,以及图节点B、C、E和F与图节点D之间具有邻居节点关系。
图2示出了图节点分区过程200的示例流程图。
如图2所示,在210,确定分布式图学习架构的各个图节点的哈希(HASH)值。例如,可以对图节点的部分或全部图节点数据进行HASH计算来确定出HASH值。图节点的图节点数据例如可以包括图节点的节点ID、图节点的节点属性数据和/或边属性数据。例如,可以使用图节点的节点ID进行HASH计算来确定出HASH值。
在220,基于所确定出的各个图节点的HASH值进行图节点分区。例如,如图1所示,假设图节点A、B、C和D的HASH值是1,则将图节点A、B、C和D分区到图学习设备110-1,图节点E和F的HASH值是2,则将图节点E和F分区到图学习设备110-2。
在230,在完成图节点分区后,基于各条边的目的节点进行边数据分区。例如,边AB的目的节点是图节点B,并且图节点B被分区到图学习设备110-1,则边AB被分区到图学习设备110-1。而且,由于边AB的起始节点A也在图学习设备110-1,所以边AB不存在临界问题。边DE的目的节点是图节点E,并且图节点E在图学习设备110-2上,所以边DE被分区到图学习设备110-2。而且,由于边DE的起始节点D被分区到图学习设备110-1,所以边DE存在临界问题。
在230,在如上完成边数据分区后,针对具有临界问题的边,需要在该具有临界问题的边的目的节点所在的图学习设备上为其起始节点创建Mirror节点。例如,针对具有临界问题的边DE,在图学习设备110-2上为图节点D创建Mirror节点D’。
图学习过程通常是gatter-apply-scatter分层过程,分层层数表示图学习模型的深度。下面以2层图学习模型为例来说明图1中示出的分布式图学习架构的图学习的训练过程。这里,图学习模型的层次也可以称为图学习模型的模型深度,即,节点可以影响到的邻居节点的跳数。图3示出了图学习过程的示例示意图。在图3中,仅仅示出了第一层的图学习过程。
假设图节点A、B、C、D、E和F的初始值值分别是A(0)、B(0)、C(0)、D(0)、E(0)和F(0)。在第一层,首先,在图学习设备110-2,将图节点E和F的值E(0)和F(0)汇聚到Mirror节点D’。接着,将Mirror节点D’的汇聚值汇聚到其对应的图节点D。在本说明书中,汇聚操作可以是concat(拼接),也可以是add,pooling等其他神经网络操作。在图学习设备110-1,将图节点B和C的值B(0)和C(0)汇聚到图节点D。然后,将图节点D所得到的汇聚值(即,B(0)和C(0)的汇聚值以及E(0)和F(0)的汇聚值)与图节点D本身具有的D(0)进行汇聚得到D(1),所得到的D(1)表示图节点D在第二层的数据。按照同样的方式对其余图节点B进行计算,得到A(1)、B(1)、C(1)、E(1)和F(1)。
在第二层,按照上述方式,图节点D汇聚邻居节点B、C、E和F的值B(1)、C(1)、E(1)和F(1),再将汇聚值与图节点D本身具有的D(0)进行汇聚,得到图节点D在第三层的数据D(2)。在进行第二层训练时,Mirror节点D’是图节点E和F的邻居节点,由此在进行图节点E和F的汇聚计算时,需要将D(1)从图节点D发送给Mirror节点D’。
在常规图节点数据存取方式下,在Master节点的Master数据发生数据更新时,如果该Master节点具有对应的Mirror节点,则需要同步更新分布在其它图学习设备中的对应Mirror节点的Mirror数据,以确保Master节点与其Mirror节点之间的数据一致性。按照这种处理方式,需要在各个Mirror节点所在图学习设备中存储Master数据的完整备份,从而造成图学习设备的存储空间浪费。
鉴于上述,本说明书的实施例提供一种数据存取方案。在该数据存取方案中,在具有Mirror节点的图学习设备处设置公共缓冲区,用于缓存图学习需要使用的Mirror节点的Mirror数据。在存取用于图学习的Mirror数据时,对该图学习设备处的图节点进行节点分组,所得到的多个图节点分组在进行Mirror数据存取时具有基于图节点依赖关系确定出的优先级。根据图节点分组的优先级,从图学习设备的公共缓冲区中为各个图节点分组所依赖的镜像节点分配缓存空间。然后,针对完成缓存空间分配的图节点,向该图节点所依赖的镜像节点的对应图节点所在的图学习设备发起数据存取过程,由此拉取对应的图节点数据并缓存在所分配的缓存空间中。
利用上述数据存取方案,通过将图节点分组为具有基于图节点依赖关系确定出的存取优先级的各个图节点分组,并且基于存取优先级来从所设置的公共缓冲区中为各个图节点分组分配缓存空间。此外,在图节点完成缓存空间分配后,向其它图学习设备发起数据存取过程,所存储的Mirror节点数据缓存在所分配的缓存空间中以供图学习使用,从而无需在各个Mirror节点所在图学习设备的存储空间(内存)中持久性地存储Master数据的完整备份,由此提升图学习设备的存储空间利用率。
图4示出了根据本说明书的实施例的用于分布式图学习架构的数据存取方法400的示例流程图。图4中示出的数据存取方法400由分布式图学习架构中的具有Mirror节点的第一图学习设备执行。相对于第一图学习设备,分布式图学习架构中的其余图学习设备称为第二图学习设备。
如图4所示,在410,对第一图学习设备处的图节点进行节点分组,得到多个具有优先级的图节点分组。各个图节点分组的优先级基于图节点依赖关系确定。在本说明书中,优先级可以用于指示图节点分组的缓存空间分配优先级,或者用于指示图节点分组的数据存取优先级。图节点分组的优先级越高,越先为该图节点分组中的各个Mirror 节点分配缓存空间或存取图节点数据。在本说明书中,第一优先级的优先级最高,第二优先级次之,如此类推。优先级的数字越大,优先级越低。
在一个示例中,各个图节点分组具有规定大小的分组大小。这里,图节点分组的分组大小可以利用图节点分组所具有的节点个数来表征。例如,各个图节点分组的分组大小可以为64个节点。各个图节点分组的分组大小可以相同,也可以不同。在另一示例中,各个图节点分组的分组大小可以是可配置的。
在本说明书中,图节点依赖关系用于反映图节点在图学习时相对于Mirror节点的依赖性。例如,图节点E在进行图学习时需要使用Mirror节点B’的图节点数据,则图节点E对Mirror节点B’具有依赖关系。在一个示例中,图节点依赖关系可以在对分布式图学习架构的图节点数据进行图分区时预先生成。在另一示例中,图节点依赖关系也可以在进行数据存取时生成。
图5A示出了根据本说明书的实施例的图节点分布的示例示意图。对于图5A中示出的图节点分布,图节点E对Mirror节点B’具有依赖关系,图节点F对Mirror节点D’和H’具有依赖关系,图节点G对Mirror节点B’和C’具有依赖关系,以及图节点I对Mirror节点D’和H’具有依赖关系。
图5B示出了图5A中示出的图节点分布所对应的图节点依赖关系的示例示意图。在图5B的示例中,图节点依赖关系被例示为图节点依赖表,该图节点依赖表的第一列示出了图节点A-I,以及第一行示出了Mirror节点B’、C’、D’和H’。图节点依赖关系中的值“0”表示不存在依赖关系,以及值“1”表示存在依赖关系。在其它实施例中,图节点依赖关系也可以采用其它合适的表征形式来表征,比如,图节点依赖关系图等。
在一些实施例中,在进行图节点分组时,可以对第一图学习设备处的图节点进行随机分组。然后,基于图节点依赖关系统计各个图节点分组中包含的图节点所依赖的Mirror节点的节点数目,并根据所统计的各个图节点分组的Mirror节点数目确定各个图节点分组的优先级。
在一些实施例中,在进行图节点分组时,可基于图节点依赖关系对第一图学习设备处的图节点进行图节点排序。然后,根据图节点排序结果对第一图学习设备处的图节点进行节点分组,得到多个具有优先级的图节点分组。在这种情况下,图节点分组的优先级可根据该图节点分组所具有的图节点的节点排序确定。优先级高的图节点分组中的任何一个图节点的节点排序不低于优先级低的图节点分组中的所有图节点的节点排序。
图6示出了根据本说明书的实施例的图节点排序过程600的示例流程图。
如图6所示,在610,基于图节点依赖关系,确定第一图学习设备处的各个图节点所依赖的Mirror节点的节点数目。例如,如图5A所示,第一图学习设备为图学习设备110-2,图节点E所依赖的Mirror节点的节点数目为1,以及图节点F所依赖的Mirror节点的节点数目为2。
在620,根据各个图节点所依赖的Mirror节点的节点数目,对第一图学习设备处的图节点进行排序。例如,在一个示例中,可以按照所依赖的Mirror节点的节点数目从小到大的顺序来进行图节点排序,即,图节点所依赖的Mirror节点的节点个数越少,图节点的图节点排序越高。例如,对于图节点E和F,图节点E所依赖的Mirror节点为B’,以及图节点F所依赖的Mirror节点为D’和H’,从而图节点E>图节点F。要说明的是, 对于所具有的镜像节点的节点数目相同的图节点,在进行图节点排序时具有相同的排序。例如,图节点G、F和I所依赖的Mirror节点的节点数目相同(都为2),图节点G、F和I的排序相同,即,图节点G=图节点F=图节点I。
在一些实施例中,在根据图节点排序结果对第一图学习设备处的图节点进行节点分组时,尽可能将依赖相同Mirror节点的图节点分组到同一图节点分组。换言之,如果具有相同依赖镜像节点的至少两个图节点可被分组到同一图节点分组中,则将该至少两个图节点分组到同一图节点分组。例如,在图5A中示出的示例中,图节点F和I都依赖Mirror节点D’和H’,则将图节点F和I分组到同一图节点分组,除非该图节点分组不足以同时容纳图节点F和I,并且该图节点分组中已经容纳的图节点的分组优先级都优于图节点F和I。
在一些实施例中,在根据图节点排序结果对第一图学习设备处的图节点进行节点分组时,针对具有相同排序的图节点,可以根据所依赖的镜像节点中属于已分组图节点分组的镜像节点的数目确定图节点的分组优先级。然后,基于确定出的图节点的分组优先级来对该具有相同排序的图节点进行节点分组。
例如,在图5A中示出的示例中,图节点G、F和I都依赖2个Mirror节点,则图节点G、F和I具有相同排序。在对图节点G、F和I进行节点分组时,根据图节点G、F和I所依赖的Mirror节点中属于已分组图节点分组的Mirror节点的数目确定图节点的分组优先级。具体地,图节点G所依赖的2个Mirror节点B’和C’中存在1个Mirror节点B’属于具有更高优先级的图节点分组中的图节点(图节点E)的对应Mirror节点,以及图节点F和I所依赖的2个Mirror节点D’和H’中不存在属于具有更高优先级的图节点分组中的图节点的对应Mirror节点,则图节点G的分组优先级优于图节点F和I的分组优先级。在进行节点分组时,优先分组图节点G。
回到图4,在如上对第一图学习设备处的图节点进行节点分组后,在420,基于图节点依赖关系,确定各个图节点分组所依赖的Mirror节点。具体地,对于每个图节点分组,基于图节点依赖关系,确定该图节点分组中的各个图节点所依赖的Mirror节点。然后,将所得到的Mirror节点集合作为该图节点分组所依赖的Mirror节点。
在430,根据图节点分组的优先级,从第一图学习设备的公共缓冲区中为各个图节点分组所依赖的Mirror节点分配缓存空间。在一些实施例中,可以基于图节点分组的优先级,逐图节点分组顺序进行缓存空间的分配。在另一些实施例中,也可以基于图节点分组的优先级,为图节点分组并行分配对应的缓存空间。比如,可以按照图节点分组的优先级,每次选择若干个图节点分组,然后为所选择出的图节点分组中的图节点分配缓存空间。
在本说明书中,第一图学习设备的公共缓冲区的大小是可配置的。在一个示例中,公共缓冲区的大小需要能够存储分布式图学习架构中的Master节点的最大邻居数个邻居节点的节点数据。例如,对于图1中示出的分布式图节点架构,图节点D的邻居节点数最多,其邻居节点数为4,则公共缓冲区的大小需要至少能够存储4个图节点的节点数据。假设每个图节点的节点数据的数据量固定,则公共缓冲的大小可以利用图节点的节点个数来表征。
图7示出了根据本说明书的实施例的缓存空间分配过程700的示例流程图。
如图7所示,在710,针对第一图学习设备处的图节点,从第一图学习设备的公共缓冲区中为第一优先级的图节点分组的各个Mirror节点分配缓存空间。接着,从第二优先级的图节点分组开始,循环执行720到780的操作,每次循环过程对应一个图节点分组的缓存空间分配操作。
具体地,在720,判断当前图节点分组所依赖的Mirror节点中是否存在已分配缓存空间的Mirror节点。如果存在已分配缓存空间的Mirror节点,则在730,从所依赖的Mirror节点中去除已分配缓存空间的Mirror节点,并且确定剩余Mirror节点所需缓存空间,作为当前图节点分组所需缓存空间。然后,进行到750。如果不存在已分配缓存空间的Mirror节点,则在740,确定该图节点分组所依赖的所有Mirror节点所需缓存空间,作为当前图节点分组所需缓存空间。然后,进行到750。
在750,判断第一图学习设备的公共缓冲区的剩余缓存空间是否不小于当前图节点分组所需缓存空间。如果公共缓冲区的剩余缓存空间小于当前图节点分组所需缓存空间,则缓存空间分配过程结束。
如果公共缓冲区的剩余缓存空间不小于当前图节点分组所需缓存空间,在760,为当前图节点分组所依赖的Mirror节点分配缓存空间。具体地,在存在已分配缓存空间的Mirror节点时,为当前图节点分组的剩余Mirror节点分配缓存空间。在不存在已分配缓存空间的Mirror节点时,为当前图节点分组所依赖的所有Mirror节点分配缓存空间。
在770,判断是否存在未进行缓存空间分配的图节点分组。如果不存在未进行缓存空间分配的图节点分组,则缓存空间分配过程结束。
如果存在未进行缓存空间分配的图节点分组,则在780,从未进行缓存空间分配的图节点分组中选出优先级最高的图节点分组,作为下一循环过程的当前图节点分组。然后,流程返回到720,执行下一循环过程。
要说明的是,图7中示出的仅仅是缓存空间的一个实现示例。在本说明书的其它实施例中,可以对图7中示出的示例进行各种修改,例如,可以去除图7中的部分步骤或者向图7的示例中增加步骤。
回到图4,在40,针对完成缓存空间分配的图节点,向该图节点所依赖的Mirror节点的对应图节点所在的第二图学习设备发起数据存取过程。在一些实施例中,可在每个图节点或若干图节点完成缓存空间分配后,向该图节点所依赖的Mirror节点的对应图节点所在的第二图学习设备发起数据存取请求。第二图学习设备响应于数据存取请求来获取对应的图节点数据,并且将所获取的图节点数据返回给第一图学习设备。在这种数据存取过程中,以图节点为单位进行数据存取。在一些实施例中,可针对完成缓存空间分配的图节点分组,向该图节点分组所依赖的Mirror节点的对应图节点所在的第二图学习设备发起数据存取过程。在这种数据存取过程中,以图节点分组为单位进行数据存取。
图8示出了根据本说明书的实施例的数据存取过程800的示例流程图。
如图8所示,在810,针对完成缓存空间分配的图节点分组,检查该图节点分组所依赖的各个Mirror节点的缓存空间,并且在820,判断各个Mirror节点的缓存空间是否缓存有图节点数据。
如果存在其缓存空间未缓存有图节点数据的Mirror节点,则在830,向该Mirror节点的对应图节点所在的第二图学习设备发起数据存取过程。如果不存在其缓存空间未缓 存有图节点数据的Mirror节点,则在840,不发起数据存取过程。
要说明的是,图8示出的仅仅是数据存取过程的一个例示实施例。在其它实施例中,可以对图8中示出的实施例进行修改,例如,可以不包括缓存空间检查步骤及其相应处理步骤,而是直接发起数据存取过程。
回到图4,在从第二图学习设备获取响应于所述数据存取过程而获取的图节点数据后,在450,将所获取的Mirror节点的图节点数据缓存在为该Mirror节点分配的缓存空间中。
一旦针对图节点分组所依赖的所有Mirror节点的图节点数据获取过程完成,并且所有Mirror节点的图节点数据被缓存到对应的缓存空间中,该图节点分组中的各个图节点可以使用各自的图节点数据以及所依赖的Mirror节点的图节点数据来执行图学习过程。
在460,在第一图学习设备处,监测该图节点分组的各个图节点的图学习过程是否都执行完毕。如果未监测到该图节点分组的各个图节点的图学习过程都执行完毕,则继续监测。
如果监测到该图节点分组的各个图节点的图学习过程都执行完毕,则在470,根据图节点依赖关系,确定该图节点分组所依赖的Mirror节点中是否存在未依赖Mirror节点,所述未依赖Mirror节点包括未被图学习过程未完成的图节点分组依赖的Mirror节点。如果确定不存在未依赖Mirror节点,则进行到490。
如果确定存在未依赖Mirror节点,则在480,释放分配给未依赖Mirror节点的缓存空间。然后,进行到490。
在490,判断是否存在未进行图学习的分层。如果存在未进行图学习的分层,则返回到430,执行下一循环过程。如果不存在未进行图学习的分层,则流程结束。
在一些实施例中,响应于第一图学习设备完成图节点分组的各个图节点的图学习训练,可以直接释放为该图节点分组所依赖的所有Mirror节点分配的缓存空间,而无需上述470的未依赖Mirror节点确定过程。
如上参照图1到图8描述了根据本说明书的实施例的用于分布式图学习架构的数据存取方法。在上述数据存取方法中,将图节点分组为具有基于图节点依赖关系确定出的存取优先级的各个图节点分组,并且基于存取优先级来从所设置的公共缓冲区中为各个图节点分组分配缓存空间。在图节点完成缓存空间分配后,才向其它图学习设备发起数据存取过程,所存储的Mirror节点数据缓存在所分配的缓存空间中以供图学习使用。利用上述数据存取方法,无需在各个Mirror节点所在的图学习设备的存储空间中持久性地存储Master数据的完整备份,由此提升图学习设备的存储空间利用率。
此外,利用上述数据存取方法,通过将依赖相同Mirror节点的至少两个图节点分组到同一图节点分组,从而使得针对该图节点分组的数据存取操作可以提供该至少两个图节点的图学习过程所需的Mirror数据,由此提升分布式图学习架构的图学习效率。
此外,利用上述数据存取方法,通过针对具有相同排序的图节点,根据所依赖的镜像节点中属于已分组图节点分组的Mirror节点的数目确定图节点的分组优先级,并且基于确定出的图节点的分组优先级来对该具有相同排序的图节点进行节点分组,从而使得已经存取的Mirror节点的图节点数据可以较早地被所依赖的图节点使用来进行图学习,并且在完成图学习后释放该Mirror数据的缓存空间,从而可以提升第一图学习设备的存 储空间利用率。
利用上述数据存取方法,通过在为图节点分组所依赖的Mirror节点分配缓存空间时,检查该图节点分组所依赖的Mirror节点中是否存在已分配缓存空间的Mirror节点,并且仅仅为未分配缓存空间的Mirror节点分配缓存空间,由此提升第一图学习设备的公共缓冲区的缓存空间利用率。
利用上述数据存取方法,通过在向第二图学习设备发起数据存取过程时,检查图节点分组所依赖的Mirror节点的缓存空间是否缓存有图节点数据,并且在缓存空间缓存有节点数据时,针对该Mirror节点不发起数据存取过程,由此提升Mirror数据的数据存取效率。
利用上述数据存取方法,通过在第一图学习设备完成图节点分组的各个图节点的图学习训练后,释放为该图节点分组所依赖的所有Mirror节点分配的缓存空间,可以使得所释放的缓存空间可以分配给其余图节点分组的Mirror节点,从而提升公共缓冲区的缓存空间利用率。
利用上述数据存取方法,通过在第一图学习设备完成图节点分组的各个图节点的图学习训练后,仅仅释放为该图节点分组所依赖的所有Mirror节点中的未依赖Mirror节点分配的缓存空间,可以使得其它未完成图学习的图节点分组在进行图学习时,可以从缓存空间中获取所依赖的Mirror节点的Mirror数据,无需再次向第二图学习设备发起数据存取过程,同时释放未依赖Mirror节点的缓存空间,以供分配给其余图节点分组的Mirror节点,从而提升公共缓冲区的缓存空间利用率。
图9示出了根据本说明书的实施例的用于分布式图学习架构的数据存取装置900的示例方框图。数据存取装置900应用于分布式图学习架构的具有Mirror节点的第一图学习设备。如图9所示,数据存取装置900包括节点分组单元910、镜像节点确定单元920、缓存空间分配单元930、数据存取单元940和数据缓存单元950。
节点分组单元910被配置为对第一图学习设备处的图节点进行节点分组,得到多个具有优先级的图节点分组,各个图节点分组的优先级基于图节点依赖关系确定出。节点分组单元910的操作可以参照上面参照图4的410描述的操作。镜像节点确定单元920被配置为基于图节点依赖关系,确定各个图节点分组所依赖的Mirror节点。镜像节点确定单元920的操作可以参考上面参照图4的420描述的操作。
缓存空间分配单元930被配置为根据图节点分组的优先级,从第一图学习设备的公共缓冲区中为各个图节点分组所依赖的Mirror节点顺序分配缓存空间。缓存空间分配单元930的操作可以参考上面参照图4的430描述的操作。
数据存取单元940被配置为针对完成缓存空间分配的图节点,向该图节点所依赖的Mirror节点的对应图节点所在的第二图学习设备发起数据存取过程。数据存取单元940的操作可以参考上面参照图4的440描述的操作。
数据缓存单元950被配置为将响应于数据存取过程而返回的图节点数据缓存在所分配的缓存空间中。数据缓存单元950的操作可参考上面参照图4的450描述的操作。
在一个示例中,图节点依赖关系可以在对分布式图学习架构的图节点数据进行图分区时预先生成。相应地,数据存取装置900还可以包括依赖关系存储单元(未示出)。所述依赖关系存储单元被配置为存储在对分布式图学习架构的图节点数据进行图分区 时生成的图节点依赖关系。
在一个示例中,在对第一图学习设备处的图节点进行节点分组时,如果具有相同依赖镜像节点的至少两个图节点可被分组到同一图节点分组中,则节点分组单元910将该至少两个图节点分组到同一图节点分组。
在一个示例中,数据存取装置900还可包括图节点排序单元(未示出)。图节点排序单元被配置为基于图节点依赖关系对第一图学习设备处的图节点进行排序。然后,节点分组单元910基于图节点排序结果对第一图学习设备处的图节点进行节点分组。
图10示出了根据本说明书的实施例的图节点排序单元1000的示例方框图。如图10所示,图节点排序单元1000包括镜像节点数目确定模块1010和图节点排序模块1020。
镜像节点数目确定模块1010被配置为基于图节点依赖关系,确定第一图学习设备处的各个图节点所依赖的Mirror节点的节点数目。镜像节点数目确定模块1010的操作可以参考上面参照图6的610描述的操作。
图节点排序模块1020被配置为根据各个图节点所依赖的Mirror节点的节点数目,对第一图学习设备处的图节点进行排序。图节点排序模块1020的操作可以参考上面参照图6的620描述的操作。
在一个示例中,在进行图节点排序时,所具有的Mirror节点的节点数目相同的图节点具有相同的排序。相应地,在根据图节点排序结果对第一图学习设备处的图节点进行节点分组时,针对具有相同排序的图节点,节点分组单元910根据所依赖的Mirror节点中属于已分组图节点分组的Mirror节点的数目确定图节点的分组优先级,并根据图节点的分组优先级进行节点分组。
图11示出了根据本说明书的实施例的缓存空间分配单元1100的示例方框图。如图11所示,缓存空间分配单元1100可以包括缓存空间分配检查模块1110和缓存空间分配模块1120。缓存空间分配检查模块1110被配置为针对各个图节点分组,检查该图节点分组所依赖的Mirror节点是否被分配缓存空间。缓存空间分配模块1120被配置为对于未分配缓存空间的Mirror节点,从第一图学习设备的公共缓冲区中为该Mirror节点分配缓存空间。
缓存空间分配单元1100还可包括缓存所需空间确定模块(未示出)和缓存判断模块(未示出)。所述缓存所需空间确定模块被配置为根据缓存空间分配检查模块1110的检查结果,确定图节点分组所需缓存空间。具体地,在缓存空间分配检查模块1110的检查结果指示存在已分配缓存空间的Mirror节点时,所述缓存所需空间确定模块从图节点分组所依赖的Mirror节点中去除已分配缓存空间的Mirror节点,并且将剩余Mirror节点所需缓存空间确定为该图节点分组所需缓存空间。在缓存空间分配检查模块1110的检查结果指示不存在已分配缓存空间的Mirror节点时,所述缓存所需空间确定模块将图节点分组所依赖的所有Mirror节点所需缓存空间确定为该图节点分组所需缓存空间。
所述缓存判断模块被配置为根据公共缓冲区的剩余缓存空间以及图节点分组所需缓存空间,判断是否可以为图节点分组分配缓存空间。在公共缓冲区的剩余缓存空间不小于图节点分组所需缓存空间时,所述缓存判断模块确定可以为图节点分组分配缓存空间。在公共缓冲区的剩余缓存空间小于图节点分组所需缓存空间时,所述缓存判断模块确定不可为图节点分组分配缓存空间。缓存空间分配模块1120被配置为在所述缓存判 断模块确定可以为图节点分组分配缓存空间时,从第一图学习设备的公共缓冲区中为图节点分组所依赖的未分配缓存空间的Mirror节点分配缓存空间。
图12示出了根据本说明书的实施例的数据存取单元1200的示例方框图。如图12所示,数据存取单元1200可以包括数据缓存检查模块1210和数据存取模块1220。
数据缓存检查模块1210被配置为针对完成缓存空间分配的图节点分组,检查该图节点分组所依赖的各个Mirror节点的缓存空间是否缓存有图节点数据。数据缓存检查模块1210的操作可以参考上面参照图8的810描述的操作。
数据存取模块1220被配置为对于未缓存有图节点数据的Mirror节点,向该Mirror节点的对应图节点所在的第二图学习设备发起数据存取过程。数据存取模块1220的操作可以参考上面参照图8的830描述的操作。
此外,可选地,在一个示例中,数据存取装置900还可以包括缓存空间释放单元(未示出)。响应于第一图学习设备完成图节点分组的各个图节点的图学习训练,所述缓存空间释放单元释放为该图节点分组所依赖的所有Mirror节点分配的缓存空间。
此外,可选地,在一个示例中,数据存取装置900还可以包括未依赖镜像节点检查单元(未示出)和缓存空间释放单元(未示出)。所述未依赖镜像节点检查单元被配置为响应于第一图学习设备完成图节点分组的各个图节点的图学习训练,根据图节点依赖关系确定该图节点分组所依赖的Mirror节点中是否存在未依赖Mirror节点,所述未依赖Mirror节点包括未被图学习过程未完成的图节点分组依赖的Mirror节点。所述缓存空间释放单元被配置为在该图节点分组所依赖的Mirror节点中存在未依赖Mirror节点时,释放为该未依赖Mirror节点分配的缓存空间。
如上参照图1到图12,对根据本说明书实施例的用于分布式图学习架构的数据存取方法和数据存取装置进行了描述。上面的数据存取装置可以采用硬件实现,也可以采用软件或者硬件和软件的组合来实现。
图13示出了根据本说明书的实施例的基于计算机系统实现的用于分布式图学习架构的数据存取装置1300的示意图。如图13所示,数据存取装置1300可以包括至少一个处理器1310、存储器(例如,非易失性存储器)1320、内存1330和通信接口1340,并且至少一个处理器1310、存储器1320、内存1330和通信接口1340经由总线1360连接在一起。至少一个处理器1310执行在存储器中存储或编码的至少一个计算机可读指令(即,上述以软件形式实现的元素)。
在一个实施例中,在存储器中存储计算机可执行指令,其当执行时使得至少一个处理器1310:对第一图学习设备处的图节点进行节点分组,得到多个具有优先级的图节点分组,各个图节点分组的优先级基于图节点依赖关系确定,图节点依赖关系用于反映图节点在图学习时相对于镜像节点的依赖性;基于图节点依赖关系,确定各个图节点分组所依赖的镜像节点;根据图节点分组的优先级,从第一图学习设备的公共缓冲区中为各个图节点分组所依赖的镜像节点分配缓存空间;针对完成缓存空间分配的图节点,向该图节点所依赖的镜像节点的对应图节点所在的第二图学习设备发起数据存取过程;以及将响应于数据存取过程而返回的图节点数据缓存在所分配的缓存空间中。
应该理解,在存储器中存储的计算机可执行指令当执行时使得至少一个处理器1310进行本说明书的各个实施例中以上结合图1-图12描述的各种操作和功能。
根据一个实施例,提供了一种比如机器可读介质(例如,非暂时性机器可读介质)的程序产品。机器可读介质可以具有指令(即,上述以软件形式实现的元素),该指令当被机器执行时,使得机器执行本说明书的各个实施例中以上结合图1-图12描述的各种操作和功能。具体地,可以提供配有可读存储介质的系统或者装置,在该可读存储介质上存储着实现上述实施例中任一实施例的功能的软件程序代码,且使该系统或者装置的计算机或处理器读出并执行存储在该可读存储介质中的指令。
在这种情况下,从可读介质读取的程序代码本身可实现上述实施例中任何一项实施例的功能,因此机器可读代码和存储机器可读代码的可读存储介质构成本发明的一部分。
可读存储介质的实施例包括软盘、硬盘、磁光盘、光盘(如CD-ROM、CD-R、CD-RW、DVD-ROM、DVD-RAM、DVD-RW、DVD-RW)、磁带、非易失性存储卡和ROM。可选择地,可以由通信网络从服务器计算机上或云上下载程序代码。
根据一个实施例,提供一种计算机程序产品,该计算机程序产品包括计算机程序,该计算机程序当被处理器执行时,使得处理器执行本说明书的各个实施例中以上结合图1-图12描述的各种操作和功能。
本领域技术人员应当理解,上面公开的各个实施例可以在不偏离发明实质的情况下做出各种变形和修改。因此,本公开的保护范围应当由所附的权利要求书来限定。
需要说明的是,上述各流程和各系统结构图中不是所有的步骤和单元都是必须的,可以根据实际的需要忽略某些步骤或单元。各步骤的执行顺序不是固定的,可以根据需要进行确定。上述各实施例中描述的装置结构可以是物理结构,也可以是逻辑结构,即,有些单元可能由同一物理实体实现,或者,有些单元可能分由多个物理实体实现,或者,可以由多个独立设备中的某些部件共同实现。
以上各实施例中,硬件单元或模块可以通过机械方式或电气方式实现。例如,一个硬件单元、模块或处理器可以包括永久性专用的电路或逻辑(如专门的处理器,FPGA或ASIC)来完成相应操作。硬件单元或处理器还可以包括可编程逻辑或电路(如通用处理器或其它可编程处理器),可以由软件进行临时的设置以完成相应操作。具体的实现方式(机械方式、或专用的永久性电路、或者临时设置的电路)可以基于成本和时间上的考虑来确定。
上面结合附图阐述的具体实施方式描述了示例性实施例,但并不表示可以实现的或者落入权利要求书的保护范围的所有实施例。在整个本说明书中使用的术语“示例性”意味着“用作示例、实例或例示”,并不意味着比其它实施例“优选”或“具有优势”。出于提供对所描述技术的理解的目的,具体实施方式包括具体细节。然而,可以在没有这些具体细节的情况下实施这些技术。在一些实例中,为了避免对所描述的实施例的概念造成难以理解,公知的结构和装置以框图形式示出。
本公开内容的上述描述被提供来使得本领域任何普通技术人员能够实现或者使用本公开内容。对于本领域普通技术人员来说,对本公开内容进行的各种修改是显而易见的,并且,也可以在不脱离本公开内容的保护范围的情况下,将本文所定义的一般性原理应用于其它变型。因此,本公开内容并不限于本文所描述的示例和设计,而是与符合本文公开的原理和新颖性特征的最广范围相一致。
Claims (27)
- 一种用于分布式图学习架构的数据存取方法,所述数据存取方法由所述分布式图学习架构的具有镜像节点的第一图学习设备执行,所述数据存取方法包括:对所述第一图学习设备处的图节点进行节点分组,得到多个具有优先级的图节点分组,所述图节点分组的优先级基于图节点依赖关系确定,所述图节点依赖关系用于反映图节点在图学习时相对于镜像节点的依赖性;基于所述图节点依赖关系,确定各个图节点分组所依赖的镜像节点;根据所述图节点分组的优先级,从所述第一图学习设备的公共缓冲区中为各个图节点分组所依赖的镜像节点分配缓存空间;针对完成缓存空间分配的图节点,向该图节点所依赖的镜像节点的对应图节点所在的第二图学习设备发起数据存取过程;以及将响应于所述数据存取过程而返回的图节点数据缓存在所分配的缓存空间中。
- 如权利要求1所述的数据存取方法,其中,对所述第一图学习设备处的图节点进行节点分组,得到多个具有优先级的图节点分组包括:基于图节点依赖关系对所述第一图学习设备处的图节点进行排序;以及根据图节点排序结果对所述第一图学习设备处的图节点进行节点分组,得到多个具有优先级的图节点分组。
- 如权利要求1所述的数据存取方法,其中,针对完成缓存空间分配的图节点,向该图节点所依赖的镜像节点的对应图节点所在的第二图学习设备发起数据存取过程包括:针对完成缓存空间分配的图节点分组,向该图节点分组所依赖的镜像节点的对应图节点所在的第二图学习设备发起数据存取过程。
- 如权利要求1所述的数据存取方法,其中,所述图节点依赖关系在对所述分布式图学习架构的图节点数据进行图分区时生成。
- 如权利要求2所述的数据存取方法,其中,各个图节点分组具有可配置的分组大小。
- 如权利要求5所述的数据存取方法,其中,在根据图节点排序结果对所述第一图学习设备处的图节点进行节点分组时,如果具有相同依赖镜像节点的至少两个图节点可被分组到同一图节点分组中,则将所述至少两个图节点分组到同一图节点分组。
- 如权利要求2所述的数据存取方法,其中,基于图节点依赖关系对所述第一图学习设备处的图节点进行排序包括:基于图节点依赖关系,确定所述第一图学习设备处的各个图节点所依赖的镜像节点的节点数目;以及根据各个图节点所依赖的镜像节点的节点数目,对所述第一图学习设备处的图节点进行排序。
- 如权利要求7所述的数据存取方法,其中,所具有的镜像节点的节点数目相同的图节点具有相同的排序,在根据图节点排序结果对所述第一图学习设备处的图节点进行节点分组时,针对具有相同排序的图节点,根据所依赖的镜像节点中属于已分组图节点分组的镜像节点的数 目确定图节点的分组优先级。
- 如权利要求1所述的数据存取方法,其中,根据所述图节点分组的优先级,从所述第一图学习设备的公共缓冲区中为各个图节点分组所依赖的镜像节点分配缓存空间包括:针对各个图节点分组,检查该图节点分组所依赖的镜像节点是否被分配缓存空间;以及对于未分配缓存空间的镜像节点,从所述第一图学习设备的公共缓冲区中为该镜像节点分配缓存空间。
- 如权利要求3所述的数据存取方法,其中,针对完成缓存空间分配的图节点分组,向该图节点分组所依赖的镜像节点的对应图节点所在的第二图学习设备发起数据存取过程包括:针对完成缓存空间分配的图节点分组,检查该图节点分组所依赖的各个镜像节点的缓存空间是否缓存有图节点数据;以及对于未缓存有图节点数据的镜像节点,向该镜像节点的对应图节点所在的第二图学习设备发起数据存取过程。
- 如权利要求3所述的数据存取方法,还包括:响应于所述第一图学习设备完成图节点分组的各个图节点的图学习训练,释放为该图节点分组所依赖的所有镜像节点分配的缓存空间。
- 如权利要求3所述的数据存取方法,还包括:响应于所述第一图学习设备完成图节点分组的各个图节点的图学习训练,根据所述图节点依赖关系确定该图节点分组所依赖的镜像节点中是否存在未依赖镜像节点,所述未依赖镜像节点包括未被图学习过程未完成的图节点分组依赖的镜像节点;以及在该图节点分组所依赖的镜像节点中存在未依赖镜像节点时,释放为所述未依赖镜像节点分配的缓存空间。
- 如权利要求1所述的数据存取方法,其中,所述分布式图学习架构的图学习过程是分层迭代学习过程,所述镜像节点的缓存空间分配步骤、所述数据存取过程的发起步骤以及所述图节点数据的缓存步骤被循环执行,直到所述分层迭代学习过程完成。
- 一种用于分布式图学习架构的数据存取装置,所述数据存取装置应用于所述分布式图学习架构的具有镜像节点的第一图学习设备,所述数据存取装置包括:节点分组单元,对所述第一图学习设备处的图节点进行节点分组,得到多个具有优先级的图节点分组,所述图节点分组的优先级基于图节点依赖关系确定,所述图节点依赖关系用于反映图节点在图学习时相对于镜像节点的依赖性;镜像节点确定单元,基于所述图节点依赖关系,确定各个图节点分组所依赖的镜像节点;缓存空间分配单元,根据所述图节点分组的优先级,从所述第一图学习设备的公共缓冲区中为各个图节点分组所依赖的镜像节点分配缓存空间;数据存取单元,针对完成缓存空间分配的图节点,向该图节点所依赖的镜像节点的对应图节点所在的第二图学习设备发起数据存取过程;以及数据缓存单元,将响应于所述数据存取过程而返回的图节点数据缓存在所分配的缓 存空间中。
- 如权利要求14所述的数据存取装置,还包括:图节点排序单元,基于所述图节点依赖关系对所述第一图学习设备处的图节点进行排序,所述节点分组单元根据所述图节点排序单元的图节点排序结果对所述第一图学习设备处的图节点进行节点分组,得到多个具有优先级的图节点分组。
- 如权利要求14所述的数据存取装置,其中,所述数据存取单元针对完成缓存空间分配的图节点分组,向该图节点分组所依赖的镜像节点的对应图节点所在的第二图学习设备发起数据存取过程。
- 如权利要求14所述的数据存取装置,还包括:依赖关系存储单元,存储在对所述分布式图学习架构的图节点数据进行图分区时生成的图节点依赖关系。
- 如权利要求15所述的数据存取装置,其中,在根据图节点排序结果对所述第一图学习设备处的图节点进行节点分组时,如果具有相同依赖镜像节点的至少两个图节点可被分组到同一图节点分组中,则所述节点分组单元将所述至少两个图节点分组到同一图节点分组。
- 如权利要求15所述的数据存取装置,其中,所述图节点排序单元包括:镜像节点数目确定模块,基于图节点依赖关系,确定所述第一图学习设备处的各个图节点所依赖的镜像节点的节点数目;以及图节点排序模块,根据各个图节点所依赖的镜像节点的节点数目,对所述第一图学习设备处的图节点进行排序。
- 如权利要求19所述的数据存取装置,其中,所具有的镜像节点的节点数目相同的图节点具有相同的排序,在根据图节点排序结果对所述第一图学习设备处的图节点进行节点分组时,针对具有相同排序的图节点,所述节点分组单元根据所依赖的镜像节点中属于已分组图节点分组的镜像节点的数目确定图节点的分组优先级,并根据图节点的分组优先级进行节点分组。
- 如权利要求14所述的数据存取装置,其中,所述缓存空间分配单元包括:缓存空间分配检查模块,针对各个图节点分组,检查该图节点分组所依赖的镜像节点是否被分配缓存空间;以及缓存空间分配模块,对于未分配缓存空间的镜像节点,从所述第一图学习设备的公共缓冲区中为该镜像节点分配缓存空间。
- 如权利要求16所述的数据存取装置,其中,所述数据存取单元包括:数据缓存检查模块,检查该图节点分组所依赖的各个镜像节点的缓存空间是否缓存有图节点数据;以及数据存取模块,对于未缓存有图节点数据的镜像节点,向该镜像节点的对应图节点所在的第二图学习设备发起数据存取过程。
- 如权利要求16所述的数据存取装置,还包括:缓存空间释放单元,响应于所述第一图学习设备完成图节点分组的各个图节点的图 学习训练,释放为该图节点分组所依赖的所有镜像节点分配的缓存空间。
- 如权利要求16所述的数据存取装置,还包括:未依赖镜像节点检查单元,响应于所述第一图学习设备完成图节点分组的各个图节点的图学习训练,根据所述图节点依赖关系确定该图节点分组所依赖的镜像节点中是否存在未依赖镜像节点,所述未依赖镜像节点包括未被图学习过程未完成的图节点分组依赖的镜像节点;以及缓存空间释放单元,在该图节点分组所依赖的镜像节点中存在未依赖镜像节点时,释放为所述未依赖镜像节点分配的缓存空间。
- 一种用于分布式图学习架构的数据存取装置,包括:至少一个处理器,与所述至少一个处理器耦合的存储器,以及存储在所述存储器中的计算机程序,所述至少一个处理器执行所述计算机程序来实现如权利要求1到13中任一所述的用于分布式图学习架构的数据存取方法。
- 一种计算机可读存储介质,其存储有可执行指令,所述指令当被执行时使得处理器执行如权利要求1到13中任一所述的用于分布式图学习架构的数据存取方法。
- 一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行来实现如权利要求1到13中任一所述的用于分布式图学习架构的数据存取方法。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US18/571,944 US20240289015A1 (en) | 2021-09-17 | 2022-07-26 | Data access of distributed graph learning architecture |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111091203.2 | 2021-09-17 | ||
| CN202111091203.2A CN113568586B (zh) | 2021-09-17 | 2021-09-17 | 用于分布式图学习架构的数据存取方法及装置 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023040468A1 true WO2023040468A1 (zh) | 2023-03-23 |
Family
ID=78173766
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/107761 Ceased WO2023040468A1 (zh) | 2021-09-17 | 2022-07-26 | 分布式图学习架构的数据存取方法及装置 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US20240289015A1 (zh) |
| CN (2) | CN113568586B (zh) |
| WO (1) | WO2023040468A1 (zh) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113568586B (zh) * | 2021-09-17 | 2021-12-17 | 支付宝(杭州)信息技术有限公司 | 用于分布式图学习架构的数据存取方法及装置 |
| CN113835899B (zh) * | 2021-11-25 | 2022-02-22 | 支付宝(杭州)信息技术有限公司 | 针对分布式图学习的数据融合方法及装置 |
| CN114817411B (zh) * | 2022-06-23 | 2022-11-01 | 支付宝(杭州)信息技术有限公司 | 分布式图学习方法和装置 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040215883A1 (en) * | 2003-08-01 | 2004-10-28 | Oracle International Corporation | Partitioned shared cache |
| CN103493029A (zh) * | 2011-02-28 | 2014-01-01 | 甲骨文国际公司 | 通用高速缓存管理系统 |
| US20160103845A1 (en) * | 2014-10-09 | 2016-04-14 | Robin Systems, Inc. | Enhanced Handling Of Intermediate Data Generated During Distributed, Parallel Processing |
| CN110795221A (zh) * | 2019-04-19 | 2020-02-14 | 成都海光集成电路设计有限公司 | 缓存管理方法、缓存控制器及处理器、存储介质 |
| CN111191080A (zh) * | 2019-08-22 | 2020-05-22 | 腾讯科技(深圳)有限公司 | 一种数据处理的方法及装置 |
| CN113568586A (zh) * | 2021-09-17 | 2021-10-29 | 支付宝(杭州)信息技术有限公司 | 用于分布式图学习架构的数据存取方法及装置 |
Family Cites Families (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US12045693B2 (en) * | 2017-11-22 | 2024-07-23 | Amazon Technologies, Inc. | Packaging and deploying algorithms for flexible machine learning |
| US11354601B2 (en) * | 2018-03-16 | 2022-06-07 | Ricoh Company, Ltd. | Learning classification device and learning classification method |
| CN111444309B (zh) * | 2019-01-16 | 2023-04-14 | 阿里巴巴集团控股有限公司 | 用于对图进行学习的系统 |
| CN110751275B (zh) * | 2019-08-03 | 2022-09-02 | 北京达佳互联信息技术有限公司 | 图训练系统、数据访问方法及装置、电子设备、存储介质 |
| CN113392863A (zh) * | 2020-03-13 | 2021-09-14 | 深圳云天励飞技术有限公司 | 一种机器学习训练数据集的获取方法、获取装置及终端 |
| CN112333234B (zh) * | 2020-09-23 | 2021-09-24 | 清华大学 | 分布式机器学习训练方法、装置、电子设备及存储介质 |
| CN112748879B (zh) * | 2020-12-30 | 2023-03-10 | 中科曙光国际信息产业有限公司 | 数据获取方法、系统、装置、计算机设备和存储介质 |
| CN112418447B (zh) * | 2021-01-22 | 2021-04-13 | 北京瑞莱智慧科技有限公司 | 提供机器学习服务的系统、方法、介质和设备 |
-
2021
- 2021-09-17 CN CN202111091203.2A patent/CN113568586B/zh active Active
- 2021-09-17 CN CN202111491705.4A patent/CN114217743B/zh active Active
-
2022
- 2022-07-26 US US18/571,944 patent/US20240289015A1/en active Pending
- 2022-07-26 WO PCT/CN2022/107761 patent/WO2023040468A1/zh not_active Ceased
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040215883A1 (en) * | 2003-08-01 | 2004-10-28 | Oracle International Corporation | Partitioned shared cache |
| CN103493029A (zh) * | 2011-02-28 | 2014-01-01 | 甲骨文国际公司 | 通用高速缓存管理系统 |
| US20160103845A1 (en) * | 2014-10-09 | 2016-04-14 | Robin Systems, Inc. | Enhanced Handling Of Intermediate Data Generated During Distributed, Parallel Processing |
| CN110795221A (zh) * | 2019-04-19 | 2020-02-14 | 成都海光集成电路设计有限公司 | 缓存管理方法、缓存控制器及处理器、存储介质 |
| CN111191080A (zh) * | 2019-08-22 | 2020-05-22 | 腾讯科技(深圳)有限公司 | 一种数据处理的方法及装置 |
| CN113568586A (zh) * | 2021-09-17 | 2021-10-29 | 支付宝(杭州)信息技术有限公司 | 用于分布式图学习架构的数据存取方法及装置 |
| CN114217743A (zh) * | 2021-09-17 | 2022-03-22 | 支付宝(杭州)信息技术有限公司 | 用于分布式图学习架构的数据存取方法及装置 |
Non-Patent Citations (1)
| Title |
|---|
| DING, XIN: "Performance Optimization of Distributed Graph Computation Framework Based on BSP Model", INFORMATION &TECHNOLOGY, CHINA MASTER'S THESES FULL-TEXT DATABASE, 31 March 2014 (2014-03-31), CN, pages 1 - 53, XP009544626 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114217743B (zh) | 2024-05-31 |
| CN113568586A (zh) | 2021-10-29 |
| CN113568586B (zh) | 2021-12-17 |
| CN114217743A (zh) | 2022-03-22 |
| US20240289015A1 (en) | 2024-08-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2023040468A1 (zh) | 分布式图学习架构的数据存取方法及装置 | |
| CN106325998B (zh) | 一种基于云计算的应用部署的方法和装置 | |
| WO2022141859A1 (zh) | 图像检测方法、装置、电子设备及存储介质 | |
| CN109194707A (zh) | 分布式图嵌入的方法及装置 | |
| CN107003834B (zh) | 行人检测设备和方法 | |
| CN112052083B (zh) | 云端gpu的显存调度方法、装置、电子设备及存储介质 | |
| WO2022134471A1 (zh) | 区块链节点的管理方法、装置、计算机设备和存储介质 | |
| CN107133228A (zh) | 一种数据重分布的方法及装置 | |
| CN111371856A (zh) | 云计算任务调度方法、装置、云计算系统及服务器 | |
| CN112436992A (zh) | 基于图卷积网络的虚拟网络映射方法及装置 | |
| CN108897858A (zh) | 分布式集群索引分片的评估方法及装置、电子设备 | |
| US10853370B2 (en) | Devices and/or methods to provide a query response based on ephemeral data | |
| CN110908587B (zh) | 一种用于存储时序数据的方法及其装置 | |
| CN106227466A (zh) | 一种数据段迁移方法及系统 | |
| CN109961516A (zh) | 表面获取方法、装置及非暂态电脑可读取记录媒体 | |
| CN104572687A (zh) | 微博传播的关键用户识别方法和装置 | |
| WO2018107361A1 (zh) | 镜像处理方法以及计算设备 | |
| CN105912404A (zh) | 一种基于磁盘的大规模图数据中寻找强连通分量的方法 | |
| HK40062604B (zh) | 用於分布式图学习架构的数据存取方法及装置 | |
| HK40062604A (zh) | 用於分布式图学习架构的数据存取方法及装置 | |
| CN110019870B (zh) | 基于内存图像集群的图像检索方法及系统 | |
| CN114090470B (zh) | 数据预加载装置及其预加载方法、存储介质和计算机设备 | |
| CN116390058A (zh) | 车联网数据查找方法、装置、设备、介质和产品 | |
| CN114138484A (zh) | 资源分配方法、装置以及介质 | |
| CN116304212A (zh) | 一种数据处理系统、方法、设备及存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22868845 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 18571944 Country of ref document: US |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22868845 Country of ref document: EP Kind code of ref document: A1 |