Information processing method and device, equipment and storage medium
By determining and splitting the target processing layer into sub-layers in the graph neural network, and using multiple processing devices to process the sub-layers in parallel, the problem of low reasoning efficiency of traditional graph convolutional networks is solved, and more efficient processing and reasoning process.
Patent Information
- Application Number
- CN202410733370.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2024-10-01
AI Technical Summary
During the inference process, traditional graph convolutional networks have problems such as slow inference speed, heavy workload on processing equipment, and unsatisfactory processing results for data with strong correlation with graph structures.
Determine the target processing layer from multiple processing layers of the graph neural network and split it into independent sub-processing processes, use multiple processing devices to process the sub-processing processes of the sub-layers respectively, and aggregate the results through the summary layer to improve efficiency .
It effectively reduces the workload of the processing equipment, shortens the time-consuming reasoning, and improves the efficiency of reasoning.
Smart Images

Figure CN118734963A_ABST
Abstract
Description
Technical Field
[0001] Example embodiments of the present disclosure generally relate to the field of computers, and more particularly, to information processing methods, apparatuses, devices, and computer-readable storage media. Background Art
[0002] Multi-GPU Inference refers to the model-based reasoning process in the field of deep learning and machine learning, where the reasoning process can be the process of using a trained model to predict or classify new data. The trained model can be a graph neural network (GNNs), etc. How to improve the reasoning efficiency is the focus of attention. Summary of the invention
[0003] In the first aspect of the present disclosure, an information processing method is provided. The method includes: determining a target processing layer from multiple processing layers of a graph neural network, wherein the processing process corresponding to the target processing layer includes multiple independent sub-processing processes; splitting the target processing layer into multiple sub-layers corresponding to the multiple sub-processing processes; using multiple processing devices to process the multiple sub-processing processes corresponding to the multiple sub-layers respectively; and using a summary layer corresponding to the multiple sub-layers to process multiple output results of the multiple processing devices to determine a target output result for the target processing layer.
[0004] In a second aspect of the present disclosure, a device for information processing is provided. The device includes: a first determination module, configured to determine a target processing layer from multiple processing layers of a graph neural network, the processing process corresponding to the target processing layer includes multiple sub-processing processes independent of each other; a splitting module, configured to split the target processing layer into multiple sub-layers corresponding to the multiple sub-processing processes; a first processing module, configured to use multiple processing devices to process the multiple sub-processing processes corresponding to the multiple sub-layers respectively; and a second processing module, configured to use the multiple output results of the multiple processing devices in the summary layer corresponding to the multiple sub-layers to determine the target output result for the target processing layer.
[0005] In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When the instructions are executed by the at least one processing unit, the device executes the method of the first aspect.
[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to implement the method of the first aspect.
[0007] It should be understood that the contents described in this content section are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0009] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;
[0010] Figure 2 A flowchart showing a process of information processing according to some embodiments of the present disclosure;
[0011] Figure 3 An example diagram of a graph convolutional network of some embodiments of the present disclosure is shown;
[0012] Figure 4A An example diagram of a processing process corresponding to a target processing layer of some embodiments of the present disclosure is shown;
[0013] Figure 4B An example diagram of a processing process based on multiple sub-layers and a summary layer in some embodiments of the present disclosure is shown;
[0014] Figure 4C Another example diagram of a processing process based on multiple sub-layers and a summary layer in some embodiments of the present disclosure is shown;
[0015] Figure 5 A schematic structural block diagram of an apparatus for information processing according to some embodiments of the present disclosure is shown;
[0016] Figure 6 A block diagram of an electronic device capable of implementing various embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0017] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0018] It should be noted that the titles of any sections / subsections provided herein are not restrictive. Various embodiments are described throughout this article, and any type of embodiment may be included under any section / subsection. In addition, the embodiments described in any section / subsection may be combined in any manner with any other embodiments described in the same section / subsection and / or different sections / subsections.
[0019] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may be included below. The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may be included below.
[0020] The embodiments of the present disclosure may involve user data, data acquisition and / or use, etc. These aspects are subject to the corresponding laws, regulations and relevant provisions. In the embodiments of the present disclosure, all data collection, acquisition, processing, processing, forwarding, use, etc. are carried out on the premise that the user knows and confirms. Accordingly, when implementing each embodiment of the present disclosure, the type, scope of use, usage scenario, etc. of the data or information that may be involved should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with the relevant laws and regulations. The specific notification and / or authorization method can vary according to the actual situation and application scenario, and the scope of the present disclosure is not limited in this respect.
[0021] In this specification and the embodiments, if personal information processing is involved, it will be processed on the premise of having a legal basis (such as obtaining the consent of the subject of personal information, or it is necessary to perform a contract, etc.), and will only be processed within the scope of regulations or agreements. If a user refuses to process personal information other than the necessary information for basic functions, it will not affect the user's use of basic functions.
[0022] Traditionally, common graph convolutional networks often use single-card reasoning mode, independent data multi-card reasoning mode, and memory optimized multi-card reasoning mode during reasoning. However, these reasoning modes have different problems, such as slow reasoning speed in single-card reasoning mode and heavy workload for processing equipment. Independent data multi-card reasoning mode can only process unrelated data independently, and the processing results for data with strong correlation such as graph structure are not ideal, etc.
[0023] The embodiment of the present disclosure proposes a scheme for information processing. According to the scheme, a target processing layer can be determined from multiple processing layers of a graph neural network, and the processing process corresponding to the target processing layer includes multiple independent sub-processing processes; the target processing layer is split into multiple sub-layers corresponding to the multiple sub-processing processes; multiple processing devices are used to process the multiple sub-processing processes corresponding to the multiple sub-layers respectively; multiple output results of multiple processing devices are processed in the summary layer corresponding to the multiple sub-layers to determine the target output result for the target processing layer.
[0024] Based on this approach, compared to one processing device processing the processing process corresponding to the target processing layer, the embodiment of the present disclosure can use multiple processing devices to respectively process multiple sub-processing processes corresponding to multiple sub-layers, and the processing process processed by each processing device is simpler, which can effectively reduce the workload of the processing device. In addition, each processing device can process simpler processing processes in parallel, which reduces the time consumption of reasoning and improves the efficiency of reasoning.
[0025] Example Environment
[0026] Figure 1 1 is a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. Figure 1 As shown, example environment 100 may include electronic device 110 .
[0027] In the example environment 100 , the electronic device 110 includes a plurality of processing devices. The processing devices may be graphics processing units (GPUs). One GPU may process the reasoning corresponding to one processing layer in the graph neural network 120 .
[0028] In some embodiments, the electronic device 110 may split the target processing layer in the graph neural network 120 into multiple sub-layers, and insert a summary layer corresponding to the multiple sub-layers after the multiple sub-layers, and the summary layer is used to summarize the output results of the multiple sub-layers to determine the target output result for the target processing layer, that is, the output result obtained based on the first graph structure and the target processing layer is the same as the output result obtained based on the first graph structure, multiple sub-layers and the summary layer. The graph neural network 120 can be deployed on the electronic device 110, and can also be deployed on other devices, which will not be elaborated here.
[0029] In some embodiments, the electronic device 110 can be any type of mobile terminal, fixed terminal or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, handheld computers, portable game terminals, VR / AR devices, personal communication systems (PCS) devices, personal navigation devices, personal digital assistants (PDA), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio broadcast receivers, e-book devices, game devices, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. In some embodiments, the electronic device 110 can also support any type of interface for the target user (such as "wearable" circuits, etc.).
[0030] The electronic device 110 may also be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks, and big data and artificial intelligence platforms. The electronic device 110 may include, for example, a computing system / server, such as a mainframe, an edge computing node, a computing device in a cloud environment, and the like.
[0031] It should be understood that the structure and function of the various elements in the environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure.
[0032] Some example embodiments of the present disclosure will be described below with continued reference to the accompanying drawings.
[0033] Example Process
[0034] Figure 2 FIG. 2 is a flowchart showing a process 200 of information processing according to some embodiments of the present disclosure. The process 200 may be implemented at the electronic device 110. Figure 1 Process 200 is described.
[0035] In box 210, the electronic device 110 can determine a target processing layer from multiple processing layers of the graph neural network, and the processing process corresponding to the target processing layer includes multiple sub-processing processes that are independent of each other.
[0036] In some embodiments, the graph neural network can be any appropriate deep learning model for processing graph structures. The graph structure mainly includes nodes and edges. The core idea of the graph neural network is to enable each node to receive and send information from its neighboring nodes through a message passing (or aggregation) mechanism, so that each node can capture and integrate the information of its neighborhood in the graph structure, thereby learning a comprehensive node representation, where the neighboring nodes are other nodes that have a connection relationship with this node, and the two nodes that have a connection relationship are connected through edges in the graph structure.
[0037] In some embodiments, the graph neural network may include multiple processing layers, and each processing layer may correspond to a corresponding processing process.
[0038] In some embodiments, the electronic device 110 can determine a target processing layer from multiple processing layers of the graph neural network, wherein the processing process corresponding to the target processing layer includes multiple sub-processing processes that are independent of each other. These multiple sub-processing processes are summarized based on predetermined rules to form the processing process corresponding to the target processing layer. The target processing layer may also be referred to as a parallelizable layer. Among the multiple processing layers of the graph neural network, other processing layers except the parallelizable layers may be referred to as non-parallelizable layers, that is, layers that do not include multiple sub-processing processes that are independent of each other in batches may be referred to as non-parallelizable layers.
[0039] For example, if the processing process corresponding to a layer is y=x, then this layer does not include multiple independent sub-processes, so this layer is a non-parallel layer. If the processing process corresponding to a layer is z=a*x+c*y, then this layer includes at least two independent sub-processes, so this layer is a parallel layer, where these two sub-processes are z1=a*x, z2=a*x, and z1 and z2 can be summarized as z by adding them.
[0040] In some embodiments, in order to improve reasoning efficiency, the time consumption of the target processing layer is greater than the maximum time consumption corresponding to multiple sub-processes and the time consumption corresponding to the summary.
[0041] In some embodiments, for the processing layer F in a graph neural network, if a given input G(N, E) is provided, the electronic device 110 can split this input G(N, E) into G_0(N_0, E_0), G_1(N_1, E_1),..., G_n(N_n, E_n) according to certain rules. That is, the processing process corresponding to the processing layer F includes multiple independent processing processes. If it can be determined that there is a layer M independent of G(N, E) such that F(G(N, E)) = M(F(G_0(N_0, E_0)), F(G_1(N_1, E_1)),...(G_n(N_n, E_n))), and T(F(G)) < max{T(F(G_i)), i = {0, 1,.., n}} + T(M), where T(F(G)) is the time consumption of the processing process F(G) corresponding to the target processing layer G, T(F(G_i)), i = {0, 1,.., n} are the time consumptions corresponding to each independent processing process, and T(M) is the time consumption corresponding to the summary, then the electronic device 110 can determine that the processing layer F is the target processing layer.
[0042] In some embodiments, the electronic device 110 can determine multiple candidate combinations associated with multiple sub-processing processes. Each candidate combination includes multiple candidate sub-layers and a candidate summary layer. For example, if the processing process corresponding to the target processing layer is z = a * y * (x + b), then the electronic device 110 can at least determine candidate combination 1 and candidate combination 2. In candidate combination 1, there can be two candidate sub-layers and one candidate summary layer. The processing process corresponding to one candidate sub-layer can be x + b, the processing process corresponding to the other candidate sub-layer can be a * y, and the processing process corresponding to the candidate summary layer is to multiply the processing results corresponding to the two candidate sub-layers. In candidate combination 2, there can be two candidate sub-layers. The processing process corresponding to one candidate sub-layer can be a * y * x, and the processing process corresponding to the other candidate sub-layer can be a * y * b. The processing process corresponding to the candidate summary layer is to add the processing results corresponding to the two candidate sub-layers.
[0043] To improve the inference efficiency, the electronic device 110 can determine the target combination from multiple candidate combinations based on the time consumption information corresponding to the multiple candidate combinations.
[0044] In some embodiments, the target time consumption corresponding to the target combination is less than the threshold.
[0045] In other embodiments, the time consumption of the processing process corresponding to the target processing layer can be equal to the sum of the total time consumption corresponding to multiple sub-layers in the target combination and a predetermined time consumption value, wherein the predetermined time consumption value is a value much smaller than the time consumption of the processing process corresponding to the target processing layer, wherein the total time consumption corresponding to multiple sub-layers is the sum of the time consumption corresponding to each sub-layer, that is, T(F(G))=sum{T(F(G_i)),i={0,1,..,n}}+ET, wherein T(F(G)) is the time consumption of the processing process F(G) corresponding to the target processing layer G, T(F(G_i)),i={0,1,..,n} is the time consumption corresponding to each independent processing process, and ET is the predetermined time consumption value.
[0046] In some other embodiments, the target time consumption corresponding to the target combination may also be the shortest time consumption among all candidate combinations.
[0047] In some embodiments, the electronic device 110 may determine the multiple candidate sub-layers included in the target combination as the multiple sub-layers corresponding to the multiple sub-processes. The electronic device 110 may also determine the candidate summary layer corresponding to the target combination as the summary layer corresponding to the multiple sub-layers.
[0048] In block 220 , the electronic device 110 may split the target processing layer into a plurality of sub-layers corresponding to the plurality of sub-processes.
[0049] In some embodiments, during the training stage of the graph neural network, the electronic device 110 may split the target processing layer into multiple sub-layers corresponding to multiple sub-processing processes, that is, the electronic device 110 may split the target processing layer in the graph neural network into these multiple sub-layers and then train the graph neural network.
[0050] In other embodiments, during the reasoning stage of the graph neural network, the electronic device 110 may split the target processing layer into multiple sub-layers corresponding to multiple sub-processing processes, that is, the electronic device 110 may not split the target processing layer in the graph neural network into multiple sub-layers, but may first train the graph neural network, and then during the reasoning stage of the graph neural network, split the target processing layer in the graph neural network into sub-layers corresponding to multiple sub-processing processes, and perform reasoning based on the split graph neural network.
[0051] Figure 3 The example diagram of the graph convolutional network of some embodiments of the present disclosure is shown. Figure 3 Provide explanation.
[0052] by Figure 3 As an example, the electronic device 110 may split the parallel layer in the graph neural network into multiple sub-layers. For example, for the parallel layer 310, the electronic device 110 may split the parallel layer 310 into sub-layer 311, sub-layer 312 and sub-layer 313.
[0053] The electronic device 110 can insert a summary layer after the split sublayers, such as inserting a summary layer 320 after sublayer 311, sublayer 312 and sublayer 313, to support the summary layer 320 to determine the target output results for the parallel layer 310 based on the output results of sublayer 311, sublayer 312 and sublayer 313.
[0054] For the non-parallel layers, the electronic device 110 may not split them, for example, the non-parallel layer 330 is not split.
[0055] In block 230 , the electronic device 110 may utilize multiple processing devices to respectively process multiple sub-processes corresponding to the multiple sub-layers.
[0056] In some embodiments, the plurality of processing devices include a plurality of graphics processing units (GPUs). The plurality of processing devices may be driven by managing one processing device per process or by managing all processing devices with one process.
[0057] In some embodiments, the electronic device 110 may split the first graph structure to be input into the target processing layer into multiple sub-graph structures based on multiple sub-layers and summary layers in the target combination.
[0058] Figure 4A An example diagram of the processing process corresponding to the target processing layer of some embodiments of the present disclosure is shown, Figure 4B The processing example diagram of some embodiments of the present disclosure based on multiple sub-layers and a summary layer is shown. Figure 4A and Figure 4B Provide explanation.
[0059] like Figure 4A As shown, the first graph structure input to the target processing layer 410 is 420, and the processing process corresponding to each node in the first graph structure 420 of the target processing layer 410 is: i =∑ j∈[0,1,2,3],j≠i E ij ×N i For example, where N i is the information corresponding to node i, E ij The first graph structure 420 includes four nodes, namely N0, N1, N2 and N3, wherein any two of the four nodes are connected, such as there is an edge E01 between N0 and N1 and there is an edge E12 between N1 and N2, etc. The electronic device 110 can use the target processing layer 410 and the first graph structure 420 to obtain a graph structure 430 (target output result), wherein U0=E12 in the graph structure 430 01 ×N0+E02 ×N0+E 03 ×N0,U1=E 01 ×N1+E 12 ×N1+E 13 ×N1,U2=E 02 ×N2+E 12 ×N2+E 23 ×2,U3=E 03 ×N3+E 13 ×N3+E 23 ×N3.
[0060] by Figure 4B As an example, the electronic device 110 may split the first graph structure 420 into two sub-graph structures, for example, a sub-graph structure 440 and a sub-graph structure 441, wherein the sub-graph structure 440 only includes the information of N0, N1, N2, N3, edge E01, edge E03, and edge E12. The sub-graph structure 441 only includes the information of N0, N1, N2, N3, edge E02, edge E23, and edge E13.
[0061] The electronic device 110 may utilize multiple processing devices to respectively process multiple sub-processes corresponding to multiple sub-layers, wherein one sub-layer corresponds to processing one sub-graph structure.
[0062] by Figure 4B As an example, the electronic device 110 may split the target processing layer 410 into a sub-layer 450 and a sub-layer 451. The electronic device 110 may input the sub-graph structure 440 into the sub-layer 450, and use a processing device to process the sub-process corresponding to the sub-layer 450 to obtain a graph structure 460. The electronic device 110 may input the sub-graph structure 441 into the sub-layer 451, and use a processing device to process the sub-process corresponding to the sub-layer 451 to obtain a graph structure 461.
[0063] In other embodiments, the electronic device 110 may determine multiple second graph structures to be input into the multiple sublayers based on the processing processes corresponding to the multiple sublayers and the summary layer in the target combination. In some embodiments, for any one of the multiple sublayers, the second graph structure to be output to the target sublayer is obtained after marking the target marking information in the first graph structure to be input into the target processing layer, and the target marking information is used to characterize the information to be processed in the target structure graph in the target sublayer. In some embodiments, the first graph structure includes nodes and edges. The information of the nodes and edges contained in each second graph structure is the same as the information of the nodes and edges contained in the first graph structure, except that the second graph structure is marked with target marking information, wherein the target marking information is used to indicate the nodes to be processed and / or the edges to be processed, so as to indicate that after the second graph structure is subsequently input into the sublayer, the sublayer can determine to perform reasoning based on the nodes to be processed and / or the edges to be processed.
[0064] by Figure 4C As an example, the first graph structure 420 includes four nodes, namely N0, N1, N2 and N3, wherein any two of the four nodes are connected, for example, there is an edge E01 between N0 and N1 and an edge E12 between N1 and N2, etc. The electronic device 110 may determine two second graph structures, such as Figure 4C Graph structures 470 and 471. Both graph structures 470 and 471 contain information about N0, N1, N2, N3, and the existence of a connection relationship between any two of these four nodes. In graph structure 470, information about N0, N1, N2, N3, edge E01, edge E03, and edge E12 may be provided with an identifier 1 to indicate that this information is input to sublayer 450 as a node to be processed or an edge to be processed. In graph structure 471, information about N0, N1, N2, N3, edge E02, edge E23, and edge E13 may be provided with an identifier 1 to indicate that this information is input to sublayer 451 as a node to be processed or an edge to be processed.
[0065] The electronic device 110 may utilize multiple processing devices to respectively process multiple sub-processes corresponding to multiple sub-layers, wherein one sub-layer corresponds to processing one second graph structure.
[0066] by Figure 4C As an example, the electronic device 110 may split the target processing layer 410 into a sub-layer 450 and a sub-layer 451. The electronic device 110 may input the graph structure 470 into the sub-layer 450, and use a processing device to process the sub-process corresponding to the sub-layer 450 to obtain the graph structure 460. The electronic device 110 may input the sub-graph structure 471 into the sub-layer 451, and use a processing device to process the sub-process corresponding to the sub-layer 451 to obtain the graph structure 461.
[0067] In block 240 , the electronic device 110 may process the plurality of output results of the plurality of processing devices in a summary layer corresponding to the plurality of sub-layers to determine a target output result for a target processing layer.
[0068] In some embodiments, the electronic device 110 can insert the summary layer corresponding to the multiple sublayers behind the multiple sublayers, so that the electronic device 110 can use the summary layer corresponding to the multiple sublayers to receive the output results corresponding to the multiple sublayers respectively, and determine the target output result for the target processing layer based on the output results corresponding to the multiple sublayers respectively.
[0069] by Figure 4BAs an example, the electronic device 110 may input the graph structure 461 and the graph structure 460 into the aggregation layer 480 to obtain the graph structure 430 , which is the same as the output result obtained by directly inputting the graph structure 410 into the target processing layer 420 .
[0070] In some embodiments, in order to accurately determine whether the result output by the summary layer is consistent with the output result for the target processing layer, the electronic device 110 can insert a cache module in the summary layer to check whether the results output by the summary layer for the same data are consistent when the single card and multi-card reasoning are performed, so as to determine the data consistency of multi-card reasoning. This cache module can be replaced by end-to-end result verification, or it can be removed when the split graph convolution network is subsequently deployed.
[0071] The present disclosure can obtain the target output result for the target processing layer by splitting the target processing layer into multiple sub-layers and inserting a summary layer, which effectively improves the efficiency of reasoning and reduces the reasoning time. A specific embodiment is described below.
[0072] Take the example that each addition and multiplication takes 1 time, the first graph structure includes 100 vertices, each vertex is connected to each other, that is, there are 4950 edges in total in the first graph structure. If the target processing layer is not split, since each edge calculates two multiplications, N multiplications on each vertex need to calculate N-1 additions, then the electronic device 110 can determine that the total time corresponding to the target processing layer is: 4950×2+(4950×2-100)=19700. If the electronic device 110 splits the target processing layer into two sub-layers, each sub-layer only needs to process half of the edges, and the summary layer also uses addition, the electronic device 110 can determine that the total time determined based on the two sub-layers and the summary layer is: 4950÷2×2+(4950÷×2-100)+100=9900.
[0073] Based on this approach, compared to one processing device processing the processing process corresponding to the target processing layer, the embodiment of the present disclosure can use multiple processing devices to respectively process multiple sub-processing processes corresponding to multiple sub-layers, and the processing process processed by each processing device is simpler, which can effectively reduce the workload of the processing device. In addition, each processing device can process simpler processing processes in parallel, which reduces the time consumption of reasoning and improves the efficiency of reasoning.
[0074] Example devices and equipment
[0075] The embodiments of the present disclosure also provide corresponding devices for implementing the above methods or processes. Figure 51 shows a schematic structural block diagram of an apparatus 500 for information processing according to some embodiments of the present disclosure. The apparatus 500 may be implemented as or included in the electronic device 110 discussed above. Each module / component in the apparatus 500 may be implemented by hardware, software, firmware, or any combination thereof.
[0076] like Figure 5 As shown, the apparatus 500 includes a first determination module 510, configured to determine a target processing layer from multiple processing layers of a graph neural network, wherein the processing process corresponding to the target processing layer includes multiple sub-processing processes independent of each other; a splitting module 520, configured to split the target processing layer into multiple sub-layers corresponding to the multiple sub-processing processes; a first processing module 530, configured to use multiple processing devices to respectively process the multiple sub-processing processes corresponding to the multiple sub-layers; and a second processing module 540, configured to use the summary layer corresponding to the multiple sub-layers to process multiple output results of the multiple processing devices to determine the target output result for the target processing layer.
[0077] In some embodiments, the splitting module 520 is specifically configured to determine multiple candidate combinations associated with multiple sub-processes, each candidate combination including multiple candidate sub-layers; determine a target combination from the multiple candidate combinations based on the time consumption information corresponding to the multiple candidate combinations; and determine the multiple candidate sub-layers included in the target combination as multiple sub-layers corresponding to the multiple sub-processes.
[0078] In some embodiments, each candidate combination further includes a candidate summary layer, and the apparatus 500 further includes: a second determination module configured to determine a candidate summary layer corresponding to the target combination as the summary layer corresponding to the multiple sub-layers.
[0079] In some embodiments, the target duration corresponding to the target combination is less than a threshold.
[0080] In some embodiments, the first processing module 530 is specifically configured to split the first graph structure to be input into the target processing layer into multiple sub-graph structures based on multiple sub-layers and summary layers; and use multiple processing devices to respectively process multiple sub-processing processes corresponding to the multiple sub-layers, where one sub-layer corresponds to processing one sub-graph structure.
[0081] In some embodiments, the first processing module 530 is specifically configured to determine multiple second graph structures to be input into the multiple sublayers based on the processing processes corresponding to the multiple sublayers and the summary layer, wherein for any target sublayer among the multiple sublayers, the second graph structure to be output to the target sublayer is obtained after marking the target marking information in the first graph structure to be input into the target processing layer, and the target marking information is used to characterize the information to be processed in the target structure graph in the target sublayer; and use multiple processing devices to respectively process the multiple sub-processing processes corresponding to the multiple sublayers, wherein one sublayer corresponds to processing a second graph structure.
[0082] In some embodiments, the first graph structure includes nodes and edges, and the target tag information is used to indicate the nodes to be processed and / or the edges to be processed.
[0083] In some embodiments, the splitting module 520 is specifically configured to split the target processing layer into multiple sub-layers corresponding to multiple sub-processing processes during the training phase of the graph neural network; or to split the target processing layer into multiple sub-layers corresponding to multiple sub-processing processes during the reasoning phase of the graph neural network.
[0084] In some embodiments, the plurality of processing devices includes a plurality of graphics processors.
[0085] The units included in the device 500 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units can be implemented using software and / or firmware, such as machine executable instructions stored on a storage medium. In addition to or as an alternative to machine executable instructions, some or all of the units in the device 500 can be implemented at least in part by one or more hardware logic components. As an example and not limitation, exemplary types of hardware logic components that can be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0086] Figure 6 1 shows a block diagram of an electronic device 600 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 6 The electronic device 600 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. Figure 6 The electronic device 600 shown can be used to implement Figure 1 An electronic device 110 is shown.
[0087] like Figure 6As shown, the electronic device 600 is in the form of a general electronic device. The components of the electronic device 600 may include, but are not limited to, one or more processors or processing units 610, a memory 620, a storage device 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. The processing unit 610 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 620. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 600.
[0088] The electronic device 600 typically includes a plurality of computer storage media. Such media may be any accessible media that is accessible to the electronic device 600, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 620 may be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 630 may be a removable or non-removable medium, and may include a machine-readable medium, such as a flash drive, a disk, or any other medium, which may be capable of being used to store information and / or data (e.g., training data for training) and may be accessed within the electronic device 600.
[0089] The electronic device 600 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 6 As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. The memory 620 may include a computer program product 625 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.
[0090] The communication unit 640 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 600 can be implemented with a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 600 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
[0091] The input device 650 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 660 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 600 may also communicate with one or more external devices (not shown) through the communication unit 640 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 600, or communicate with any device that allows the electronic device 600 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).
[0092] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.
[0093] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0094] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0095] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0096] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0097] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.
Claims
1. An information processing method, comprising: Determine a target processing layer from a plurality of processing layers of the graph neural network, wherein the processing process corresponding to the target processing layer includes a plurality of sub-processes that are independent of each other; Splitting the target processing layer into a plurality of sub-layers corresponding to the plurality of sub-processes; Using a plurality of processing devices to respectively process the plurality of sub-processes corresponding to the plurality of sub-layers; The target output result for the target processing layer is determined by processing the multiple output results of the multiple processing devices in the aggregation layer corresponding to the multiple sub-layers.
2. The method according to claim 1, wherein splitting the target processing layer into a plurality of sub-layers corresponding to the plurality of sub-processes comprises: Determining a plurality of candidate combinations associated with the plurality of sub-processes, each candidate combination comprising a plurality of candidate sub-layers; Determine a target combination from the multiple candidate combinations based on the time consumption information corresponding to the multiple candidate combinations; as well as The plurality of candidate sub-layers included in the target combination are determined as the plurality of sub-layers corresponding to the plurality of sub-processes.
3. The method according to claim 2, wherein each candidate combination further comprises a candidate summary layer, the method further comprising: The candidate summary layer corresponding to the target combination is determined as the summary layer corresponding to the multiple sub-layers. The method according to claim 2 , wherein the target time corresponding to the target combination is less than a threshold.
5. The method according to claim 1, wherein using a plurality of processing devices to respectively process the plurality of sub-processes corresponding to the plurality of sub-layers comprises: Based on the multiple sub-layers and the summary layer, splitting the first graph structure to be input to the target processing layer into multiple sub-graph structures; as well as The multiple processing devices are used to respectively process the multiple sub-processes corresponding to the multiple sub-layers, wherein one sub-layer corresponds to processing one sub-graph structure.
6. The method according to claim 1, wherein using a plurality of processing devices to respectively process the plurality of sub-processes corresponding to the plurality of sub-layers comprises: Based on the processing processes corresponding to the multiple sub-layers and the summary layer, multiple second graph structures to be input to the multiple sub-layers are determined, wherein for any target sub-layer among the multiple sub-layers, the second graph structure to be output to the target sub-layer is obtained after marking target marking information in the first graph structure to be input to the target processing layer, and the target marking information is used to characterize the information to be processed in the target structure graph in the target sub-layer; as well as The multiple processing devices are used to respectively process the multiple sub-processes corresponding to the multiple sub-layers, wherein one sub-layer corresponds to processing one second graph structure. 7 . The method according to claim 6 , wherein the first graph structure comprises nodes and edges, and the target marking information is used to indicate nodes to be processed and / or edges to be processed.
8. The method according to claim 1, wherein splitting the target processing layer into a plurality of sub-layers corresponding to the plurality of sub-processes comprises: During the training phase of the graph neural network, splitting the target processing layer into the multiple sub-layers corresponding to the multiple sub-processes; or During the inference phase of the graph neural network, the target processing layer is split into the multiple sub-layers corresponding to the multiple sub-processes.
9. The method of claim 1, wherein the plurality of processing devices comprises a plurality of graphics processors.
10. An apparatus for information processing, comprising: A first determination module is configured to determine a target processing layer from a plurality of processing layers of the graph neural network, wherein the processing process corresponding to the target processing layer includes a plurality of sub-processes that are independent of each other; A splitting module, configured to split the target processing layer into a plurality of sub-layers corresponding to the plurality of sub-processes; A first processing module is configured to respectively process the multiple sub-processes corresponding to the multiple sub-layers using multiple processing devices; as well as The second processing module is configured to utilize the multiple output results of processing the multiple processing devices in the aggregation layer corresponding to the multiple sub-layers to determine the target output result for the target processing layer.
11. An electronic device, comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 9 when executed by the at least one processing unit.
12. A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method according to any one of claims 1 to 9 when executed by a processor.
Citation Information
Patent Citations
Method for realizing neural network model splitting by using multi-core processor and related product
CN110689121A
Method and device for processing information in parallel
CN111177433A
Distributed training method based on hybrid parallelism
CN112464784A
Multiprocessor parallel neural network acceleration method and device, equipment and storage medium
CN112884127A
RNN (Recurrent Neural Network) parallel model and implementation method and system thereof on multi-core CPU (Central Processing Unit)
CN114154616A
Cited By
Information processing method and apparatus, device, and storage medium
WO2025251721A1
