A graph data processing method and related apparatus
By performing singular value decomposition on the adjacency matrix of graph data and constructing a graph dictionary, combined with graph neural network training, the problem of inaccurate node representation vectors in graph data is solved, and the execution effect of downstream tasks is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2022-09-22
- Publication Date
- 2026-08-04
AI Technical Summary
In existing technologies, the representation vectors corresponding to nodes in learning graph data are not accurate enough, resulting in poor performance of downstream tasks.
Singular value decomposition is performed on the adjacency matrix of the graph data to determine structural information. A graph dictionary is constructed by combining the initial node features and the Laplacian matrix of the graph data. The graph neural network is then iteratively trained using training sample data until the training termination condition is met, and the node representation vector is determined.
This improves the accuracy of node representation vectors in graph data, thereby enhancing the performance of related downstream tasks.
Smart Images

Figure CN117009584B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a graph data processing method and related apparatus. Background Technology
[0002] A graph is a data structure consisting of a set of nodes and a set of edges, reflecting the relationships between the nodes in that set. Graph data can be symbolically represented as G = (V, E), where V = {v...} i}、|V|=n represents a set of nodes containing n nodes, and E={e i}、|E|=m represents the set of connecting edges that include m connecting edges.
[0003] In practical applications, when applying graph data to related downstream tasks, it is necessary to learn a corresponding representation vector for each node in the graph data. This facilitates the execution of related downstream tasks based on the representation vectors corresponding to the nodes in the graph data, such as friend recommendation tasks and information recommendation tasks.
[0004] However, current methods for learning the representation vectors corresponding to nodes in graph data generally do not achieve ideal results. That is, the representation vectors corresponding to nodes determined by these methods are not accurate enough, and it is difficult to perform related downstream tasks well based on these representation vectors. Summary of the Invention
[0005] This application provides a graph data processing method and related apparatus, which can improve the accuracy of the representation vectors corresponding to nodes in the determined graph data, thereby improving the execution effect of related downstream tasks.
[0006] In view of the above, the first aspect of this application provides a graph data processing method, the method comprising:
[0007] Singular value decomposition is performed on the adjacency matrix of the graph data to obtain the eigenvalue decomposition result, and the structural information of the graph data is determined based on the eigenvalue decomposition result and the adjacency matrix.
[0008] Based on the initial node features of the graph data, the Laplacian matrix of the graph data, and the structural information, construct the graph dictionary corresponding to the graph data;
[0009] Based on the training sample data and the graph dictionary, the graph neural network is iteratively trained until the graph neural network meets the training termination condition.
[0010] The graph neural network determines the representation vector corresponding to each node in the graph data based on the graph dictionary.
[0011] A second aspect of this application provides a graph data processing apparatus, the apparatus comprising:
[0012] The structure determination module is used to perform singular value decomposition on the adjacency matrix of the graph data to obtain the feature decomposition result, and determine the structure information of the graph data based on the feature decomposition result and the adjacency matrix.
[0013] The graph dictionary construction module is used to construct the graph dictionary corresponding to the graph data based on the initial node features of the graph data, the Laplacian matrix of the graph data, and the structural information.
[0014] The model training module is used to iteratively train the graph neural network based on the training sample data and the graph dictionary until the graph neural network meets the training termination condition.
[0015] The vector determination module is used to determine the representation vector corresponding to each node in the graph data based on the graph dictionary through the graph neural network.
[0016] A third aspect of this application provides a computer device, the device comprising a processor and a memory:
[0017] The memory is used to store computer programs;
[0018] The processor is configured to perform the steps of the graph data processing method as described in the first aspect above, according to the computer program.
[0019] A fourth aspect of this application provides a computer-readable storage medium for storing a computer program for performing the steps of the graph data processing method described in the first aspect.
[0020] A fifth aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of the graph data processing method described in the first aspect.
[0021] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0022] This application provides a graph data processing method, which includes: performing Singular Value Decomposition (SVD) on the adjacency matrix of the graph data to obtain the feature decomposition result, and determining the structural information of the graph data based on the feature decomposition result and the adjacency matrix; then, constructing a graph dictionary corresponding to the graph data based on the initial node features, the Laplacian matrix, and the aforementioned structural information; further, iteratively training a graph neural network based on training sample data and the graph dictionary until the graph neural network meets the training termination condition; finally, determining the representation vector corresponding to each node in the graph data based on the graph dictionary using the graph neural network. This method innovatively performs SVD processing on the adjacency matrix of graph data, and determines the structural information of the graph data based on the obtained eigenvalue decomposition results and the adjacency matrix. Then, this structural information, along with the initial node features and Laplacian matrix of the graph data, is introduced into the modeling process of the representation vectors corresponding to the nodes in the graph data. By introducing the structural information of the graph data, the modeling space of the graph neural network can be expanded, enabling the graph neural network to achieve good performance in both homologous and heterologous graph data. In other words, it improves the accuracy of the representation vectors corresponding to the nodes in various types of graph data determined by the graph neural network, thereby improving the execution effect of related downstream tasks based on graph data. Attached Figure Description
[0023] Figure 1 This is a schematic diagram illustrating an application scenario of the graph data processing method provided in the embodiments of this application;
[0024] Figure 2 A schematic flowchart illustrating the graph data processing method provided in an embodiment of this application;
[0025] Figure 3 A schematic diagram illustrating the implementation principle of the method provided in this application embodiment in the scenario of item recommendation or friend recommendation;
[0026] Figure 4 A schematic diagram of the execution architecture of the item recommendation task provided in the embodiments of this application;
[0027] Figure 5 A schematic diagram of the execution architecture of the friend recommendation task provided in the embodiments of this application;
[0028] Figure 6 This is a schematic diagram of the structure of the graph data processing device provided in the embodiments of this application;
[0029] Figure 7 This is a schematic diagram of the structure of the terminal device provided in the embodiments of this application;
[0030] Figure 8 This is a schematic diagram of the server structure provided in an embodiment of this application. Detailed Implementation
[0031] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0032] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0033] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.
[0034] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, as well as machine learning / deep learning, autonomous driving, and intelligent transportation.
[0035] Machine learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instructional learning.
[0036] The solutions provided in this application relate to machine learning technology in artificial intelligence, and are specifically illustrated through the following embodiments:
[0037] The graph data processing method provided in this application can be executed by a computer device with data processing capabilities. This computer device can be a terminal device or a server. Terminal devices include, but are not limited to, mobile phones, computers, smart voice interaction devices, smart home appliances, vehicle terminals, and aircraft. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server.
[0038] To facilitate understanding of the graph data processing method provided in this application embodiment, the following example uses a server as the execution subject of the graph data processing method to illustrate its application scenarios.
[0039] See Figure 1 , Figure 1 This is a schematic diagram illustrating an application scenario of the graph data processing method provided in the embodiments of this application. For example... Figure 1 As shown, this application scenario includes a server 110 and a database 120. The server 110 can access the database 120 via a network, or the database 120 can be integrated into the server 110. The server 110 is used to execute the graph data processing method provided in this embodiment, and the database 120 is used to store graph data.
[0040] In practical applications, server 110 can retrieve graph data from database 120 to execute related downstream tasks. For example, when the downstream task to be executed is a friend recommendation task or item recommendation task corresponding to a game application, server 110 can retrieve graph data related to the game application from database 120. This graph data can be constructed based on item purchase or usage behavior generated through the game application, as well as object social behavior or combat behavior generated through the game application.
[0041] Furthermore, server 110 can perform SVD processing on the adjacency matrix of the retrieved graph data to obtain the eigenvalue decomposition result, and determine the structural information of the graph data based on the eigenvalue decomposition result and the adjacency matrix. Then, server 110 can construct a graph dictionary corresponding to the graph data based on the initial node features of the graph data (usually constructed based on the relevant information of the nodes), the Laplacian matrix of the graph data, and the structural information of the graph data. Subsequently, server 110 can iteratively train the graph neural network used to model the representation vectors corresponding to the nodes based on the training sample data and the graph dictionary until the graph neural network meets the training termination condition. Finally, server 110 can use the graph neural network that has met the training termination condition to determine the representation vector corresponding to each node in the graph data according to the graph dictionary corresponding to the graph data.
[0042] After obtaining the representation vectors corresponding to each node in the graph data, server 110 can execute related downstream tasks based on the representation vectors corresponding to the nodes; for example, it can execute friend recommendation tasks or item recommendation tasks based on the matching degree between the representation vectors corresponding to the nodes in the graph data.
[0043] It should be understood that Figure 1 The application scenarios shown are merely examples. In practical applications, the graph data processing method provided in this application embodiment can also be applied to other scenarios. No limitations are made here on the application scenarios of the graph data processing method provided in this application embodiment.
[0044] The graph data processing method provided in this application will be described in detail below through method embodiments.
[0045] See Figure 2 , Figure 2 This is a schematic flowchart illustrating the graph data processing method provided in an embodiment of this application. For ease of description, the following embodiments will still use a server as the execution subject of the graph data processing method as an example. Figure 2 As shown, the data processing method for this graph includes the following steps:
[0046] Step 201: Perform singular value decomposition on the adjacency matrix of the graph data to obtain the eigenvalue decomposition result, and determine the structural information of the graph data based on the eigenvalue decomposition result and the adjacency matrix.
[0047] In this embodiment, for graph data whose representation vectors for nodes need to be determined, the server can first perform SVD processing on the adjacency matrix of the graph data to obtain the eigenvalue decomposition result. That is, the SVD processing obtains the eigenvalues corresponding to each node in the graph data, as well as the eigenvectors corresponding to each eigenvalue. Then, based on the eigenvalues and corresponding eigenvectors obtained through SVD processing, the adjacency matrix of the graph data is compressed to strengthen the features corresponding to important nodes and weaken the features corresponding to unimportant nodes, thereby obtaining the structural information of the graph data.
[0048] It should be noted that for graph data G=(V,E), where V={v i}, |V|=n represents the set of nodes in the graph data (including n nodes), E={e i}, |E|=m represents the set of connecting edges in the graph data (including m connecting edges). A∈R n×n A i,j ∈{0,1} represents the adjacency matrix of the graph data, if A i,j =0, which means there is no connecting edge between the i-th node and the j-th node in the graph data. If A i,j =1 indicates that there is a connecting edge between the i-th node and the j-th node in the graph data.
[0049] It should be noted that SVD is a widely used algorithm in the field of machine learning, typically used in eigenvalue decomposition within dimensionality reduction algorithms. In this embodiment, the SVD algorithm is used to decompose the adjacency matrix A, yielding A = UΣV T Where Σ is an n×n dimensional matrix, all elements except those on the main diagonal are 0. The elements on the main diagonal of this matrix are called singular values, i.e., eigenvalues in this embodiment. Since A in this embodiment is an n×n dimensional matrix, the adjacency matrix is decomposed using the SVD algorithm, which essentially yields A = WΣW T That is, U and V are the same matrix, and W is also an n×n dimensional matrix, in which each row of elements corresponds to the eigenvalues included in each row of Σ. That is, the element in the i-th row of W is the eigenvector corresponding to the eigenvalues included in the i-th row of Σ. In the embodiments of this application, the eigenvalue decomposition result obtained by performing SVD processing on the adjacency matrix A of the graph data is essentially the eigenvalues included in the above matrix Σ and the eigenvectors included in the above matrix W.
[0050] In one possible implementation, the server can determine the structural information of the graph data in the following way: perform SVD processing on the adjacency matrix of the graph data to obtain n eigenvalues and their corresponding eigenvectors; where n is an integer greater than 1 and represents the number of nodes in the graph data; determine the k largest eigenvalues from the n eigenvalues; where k is an integer greater than 1 and less than n; and use the eigenvectors corresponding to the k eigenvalues to compress the adjacency matrix of the graph data to obtain the structural information of the graph data.
[0051] Specifically, as described above, the server can perform SVD processing on the adjacency matrix A of the graph data to obtain A = WΣW T In this matrix, the n diagonal elements of the n×n matrix Σ are the aforementioned n eigenvalues, and the elements in each row of the n×n matrix W are the eigenvectors corresponding to the aforementioned n eigenvalues. It should be understood that there is a correspondence between the diagonal elements in the i-th row of matrix Σ and the eigenvectors in the i-th row of matrix W; the larger the eigenvalue corresponding to an eigenvector, the higher the importance of that eigenvector.
[0052] The server performs SVD on the adjacency matrix A to obtain n eigenvalues and their corresponding eigenvectors. These n eigenvalues are then arranged in descending order, and the top k eigenvalues (k being an integer greater than 1 and less than n) are determined. Next, the eigenvectors corresponding to these k eigenvalues in matrix W are determined. These eigenvectors are then used to form an n×k dimensional matrix V. This matrix V is used to compress the adjacency matrix A of the graph data, thus obtaining the structural information of the graph data. V∈R n×k .
[0053] Step 202: Construct a graph dictionary corresponding to the graph data based on the initial node features of the graph data, the Laplacian matrix of the graph data, and the structural information.
[0054] After determining the structural information of the graph data, the server can construct the graph dictionary corresponding to the graph data based on the initial node features of the graph data, the Laplacian matrix of the graph data, and the structural information of the graph data. The graph dictionary refers to the spliced feature data obtained by flattening the frequency domain graph neural network and flattening each layer of convolution.
[0055] It should be noted that the initial node features of graph data include the individual initial node features of each node in the graph data. The initial node features of a node can be determined based on the basic features of the entity corresponding to the node. Taking the graph data corresponding to a game application as an example, the graph data includes object nodes corresponding to the users of the game application and item nodes corresponding to the game items provided by the game application to the users. For object nodes, the initial node features can be determined based on the basic attribute information of the users corresponding to the object node (such as the information reserved by the users when registering for the game application, or the behavioral information generated by the users when playing the game application). For item nodes, the initial node features can be determined based on the basic attribute information of the game items corresponding to the item node (such as the type of game item, the damage value it can cause, the defense value, etc.). It should be understood that, for an object node, before determining its corresponding initial node characteristics based on the basic attribute information of its corresponding user object, it is necessary to obtain the authorization permission of the user object. That is, only when the user object grants the server permission to obtain its basic attribute information can the server obtain its basic attribute information and determine the corresponding initial node characteristics accordingly. In other words, the method of obtaining information used to construct graph data in this application embodiment complies with relevant laws and regulations.
[0056] It should be understood that when the method provided in the embodiments of this application is applied to other scenarios, that is, when the method provided in the embodiments of this application processes other types of graph data, the corresponding method can be used to determine the initial node characteristics of the nodes in the graph data. This application does not limit the method of determining the initial node characteristics of the nodes in the graph data in any way.
[0057] It should be noted that the Laplacian matrix L of the graph data is determined based on the node degree matrix D and the adjacency matrix A of the graph data. The node degree matrix D of the graph data is also an n×n matrix, where all elements except those on the main diagonal are 0. That is, the main diagonal element D in the i-th row of the node degree matrix D. ii It equals the n elements A in the i-th row of the adjacency matrix A. ij The sum of (j = 0, 1, ..., n-1). The Laplacian matrix of graph data L = DA, which is obtained by subtracting the adjacency matrix A from the degree matrix D of the graph data. Typically, the Laplacian matrix L of graph data can be normalized to obtain...
[0058] Frequency domain graph neural networks treat the aforementioned feature values as numerical representations of graph data. Training a frequency domain graph neural network essentially involves learning the feature function g(λ) that best adapts to the graph node information X and the label Y included in the training sample data, given the data. This function is also known as a filter. Different frequency domain graph neural networks make different functional assumptions about g(λ) and then learn the parameters within it.
[0059] In related technologies, considering that directly learning the filter g(λ) requires factoring the entire graph data and involves too many parameters, a polynomial function is usually used to approximate a function of arbitrary shape, i.e., the filter g(λ) is expressed by the following formula:
[0060]
[0061] Where K represents the order of the polynomial; the higher the order, the stronger the function's ability to fit arbitrary shapes. In practical applications, the value of K can be set according to actual needs; P k (λ) represents the form of a polynomial function of order k, the simplest of which can be P k (x)=x k θ k The model parameters of the filter g(λ) need to be determined through learning.
[0062] In this embodiment, the polynomial function P in the filter described above can be used as a reference. k (x), the normalized Laplacian matrix after processing graph data. Furthermore, by utilizing the processing results of polynomial functions of various orders on the Laplacian matrix, the initial node features of the graph data are processed to obtain graph data features of various orders. Finally, using the graph data features of various orders and the structural information of the graph data, the graph dictionary corresponding to the graph data is determined.
[0063] That is, the server can process the Laplacian matrix of the graph data based on the i-th order polynomial to obtain the i-th order polynomial processing result. Based on the i-th order polynomial processing result and the initial node characteristics of the graph data, the i-th order graph data characteristics are determined; here, i includes integers greater than or equal to 0 and less than or equal to K, and K is an integer greater than 1. Then, the graph data characteristics from the 0th order to the K-th order, as well as the structural information of the graph data, are concatenated to obtain the graph dictionary corresponding to the graph data.
[0064] Specifically, the server can utilize the i-th order polynomial P i (x) The normalized Laplacian matrix after processing graph data get It should be understood that the i-th order polynomial P is used here. i (x) Processing the normalized Laplace matrix Essentially, it is calculation. Then, the server can calculate The i-th order graph data features are obtained, where X is the initial node feature of the graph data. Since i includes integers greater than or equal to 0 and less than or equal to K, the above calculation process will yield X (corresponding to i equal to 0). (corresponding to i equaling 1) (corresponding to i equaling 2), ... (corresponding to i equaling K), where K can be set according to actual needs, and this application does not impose any restrictions on it. Furthermore, the server can transmit the aforementioned X, and the structural information of the graph data By connecting them in parallel, we can obtain the graph dictionary corresponding to the graph data. Where || represents parallel connection (concat).
[0065] Step 203: Based on the training sample data and the graph dictionary, iteratively train the graph neural network until the graph neural network meets the training termination condition.
[0066] Then, the server can iteratively train the graph neural network for learning the representation vectors corresponding to each node in the graph data based on the pre-acquired training sample data and the graph dictionary constructed in step 202, until the graph neural network meets the training termination condition.
[0067] It should be noted that the training sample data here is usually related to the downstream tasks that will be performed using this graph data, including training labels. Taking the graph data as an example of a game application, this graph data includes object nodes corresponding to users of the game application and item nodes corresponding to game items within the application. If a friend recommendation task for the game application needs to be performed based on this graph data, the training labels included in the training sample data can be object association labels, which characterize whether the objects corresponding to two object nodes in the graph data have a relationship (such as friend relationship, participation in the same game, etc.). Similarly, if an item recommendation task for the game application needs to be performed based on this graph data, the training labels included in the training sample data can be object-item association labels, which characterize whether the objects corresponding to object nodes and the items corresponding to item nodes in the graph data have a relationship (such as purchase relationship, usage relationship, etc.).
[0068] It should be understood that in practical applications, when the downstream task to be performed using graph data is another task, the training labels included in the training sample data can be other labels. This application does not specifically limit the training labels included in the training sample data.
[0069] In one possible implementation, the server can perform iterative training of the graph neural network as follows: In the j-th round of model training, based on the (j-1)-th round model parameters of the graph neural network and the graph dictionary corresponding to the graph data, the j-th round representation vector corresponding to each node in the graph data is determined; then, based on the j-th round representation vector corresponding to each node in the graph data, the training task corresponding to the training sample data is executed to obtain the j-th round task prediction result, and based on the labels included in the training sample data and the j-th round task prediction result, the (j-1)-th round model parameters of the graph neural network are adjusted to obtain the j-th round model parameters of the graph neural network. Here, j is an integer greater than or equal to 1; when j equals 1, the (j-1)-th round model parameters of the graph neural network are the initial model parameters of the graph neural network.
[0070] Specifically, the structure of the graph neural network provided in this application embodiment is as follows:
[0071]
[0072] Here, H includes the representation vector corresponding to each node in the graph data determined by the graph neural network. This refers to the graph dictionary corresponding to the graph data described above, [W0,W1,…,W K W L [W0, W1, ..., W] represents the model parameters of the graph neural network. In this embodiment, step 203 aims to iteratively learn the model parameters [W0, W1, ..., W] of the graph neural network. K W L Furthermore, based on the learned graph neural network model parameters [W0, W1, ..., W...], K W L ], determine the representation vector H corresponding to each node in the graph data.
[0073] It should be noted that the graph neural network model provided in this application embodiment is essentially a planarized version of the frequency domain graph neural network. Each convolutional layer is flattened and unfolded to obtain a graph dictionary, and then a linear mapping weighted average is used to obtain the final representation vector of each node in the graph data.
[0074] Before performing the first round of model training, the server can initialize the model parameters of the graph neural network to obtain the initial model parameters of the graph neural network. Right now In the first round of model training, the server can utilize the initial model parameters configured. The graph neural network, for the graph dictionary constructed in step 202 The data is processed to obtain the first-round representation vector H corresponding to each node in the graph data. (1) ,Right now
[0075]
[0076] Then, the server can use the first-round representation vector H corresponding to the nodes in the graph data. (1) The training task corresponding to the training sample data is executed to obtain the first round of task prediction results. Taking the training task corresponding to the training sample data as a friend recommendation task as an example, assuming that the training sample data includes object association labels, which indicate that there is a friend relationship between the object corresponding to object node 1 and the object corresponding to object node 2 in the graph data, then when the server executes the first round of model training for the graph neural network, it can use the first round representation vectors corresponding to object node 1 and object node 2 in the graph data to calculate the association degree between the object corresponding to object node 1 and the object corresponding to object node 2. Then, based on this association degree and the object association label Y in the training sample data, the prediction results are obtained. s The corresponding correlation is used to calculate the cross-entropy loss function L(H). s (1) ,Y s The gradients of each parameter are obtained by differentiating the model parameters based on this. This allows for the updating of the graph neural network's model parameters, resulting in the first-round model parameters for the graph neural network. Where η is the pre-set learning rate.
[0077] It should be understood that in practical applications, the training task corresponding to the training sample data can also be other tasks. Accordingly, the server can adopt the corresponding method to perform the training task according to the j-th round representation vector corresponding to the node in the graph data. This application does not impose any restrictions on the training task performed by the server when training the graph neural network.
[0078] In this way, the server can iteratively execute the second round of model training, the third round of model training, ..., the Eth round of model training for the graph neural network in the manner described above. Here, E is the preset maximum number of iterations. When the server completes the Eth round of model training for the graph neural network, it can be considered that the trained graph neural network has met the training termination condition.
[0079] It should be understood that in practical applications, the server can also use other methods to measure whether the trained graph neural network meets the training termination condition. For example, the accuracy of the representation vectors corresponding to the nodes determined by the graph neural network can be measured based on the task prediction results of the training task performed based on the j-th round representation vectors corresponding to the nodes in the graph data. Then, based on the measurement results, it can be detected whether the trained graph neural network meets the training termination condition. This application does not impose any limitations on the method of detecting whether the graph neural network meets the training termination condition.
[0080] Step 204: Using the graph neural network and the graph dictionary, determine the representation vector corresponding to each node in the graph data.
[0081] After training the graph neural network, the server can use it to determine the representation vector for each node in the graph data, based on the graph dictionary corresponding to the graph data. In other words, after training the graph neural network, the server will obtain the final model parameters of the graph neural network. That is, [W0] * W1 * ,…,W K * W L * At this point, the server can obtain the representation vector H corresponding to each node in the graph data using the following formula:
[0082]
[0083] The graph data processing method provided in this application innovatively performs SVD processing on the adjacency matrix of the graph data, and determines the structural information of the graph data based on the obtained eigenvalue decomposition result and the adjacency matrix. Then, this structural information, together with the initial node features and Laplacian matrix of the graph data, is introduced into the modeling process of the representation vectors corresponding to the nodes in the graph data. By introducing the structural information of the graph data, the modeling space of the graph neural network can be expanded, enabling the graph neural network to achieve good performance in both homologous and heterologous graph data. That is, it improves the accuracy of the representation vectors corresponding to the nodes in various types of graph data determined by the graph neural network, thereby improving the execution effect of related downstream tasks based on graph data.
[0084] To facilitate a further understanding of the graph data processing method provided in the embodiments of this application, the following is an exemplary description of the method in the context of friend recommendation or item recommendation based on game applications. Figure 3 This is a schematic diagram illustrating the implementation principle of the method provided in this application embodiment in this scenario.
[0085] like Figure 3 As shown, when this application embodiment is applied to a scenario of friend recommendation or item recommendation based on a game application, the server can construct corresponding graph data based on the data recorded in the item purchase and usage database and the data recorded in the object social game relationship database. The graph data includes multiple object nodes, multiple item nodes, connection edges between object nodes, connection edges between item nodes, and connection edges between object nodes and item nodes.
[0086] Specifically, the server can retrieve records of objects purchasing items and using items from the item purchase and usage database. If the records of objects purchasing or using items indicate that object 0 has purchased or used item 0, then a connection edge can be constructed between the object node corresponding to object 0 and the item node corresponding to item 0. If the records of objects purchasing or using items indicate that object 0 has purchased or used item 2, then a connection edge can be constructed between the object node corresponding to object 0 and the item node corresponding to item 2. Conversely, for items that object 0 has not purchased or used, it is not necessary to construct a connection edge between the object node corresponding to object 0 and the item node corresponding to this type of item. The server can also retrieve the social relationships and game relationships of objects from the object social game relationship database. If the social relationship of an object indicates that object 0 and object 1 are friends, or the game relationship of an object indicates that object 0 and object 1 have participated in the same game, then a connection edge can be built between the object nodes corresponding to object 0 and object 1. If the social relationship of an object indicates that object 0 and object 2 are friends, or the game relationship of an object indicates that object 0 and object 2 have participated in the same game, then a connection edge can be built between the object nodes corresponding to object 0 and object 2. Conversely, for other objects that are not friends of object 0 and have not participated in the same game with object 0, it is not necessary to build a connection edge between the object node corresponding to object 0 and the object node corresponding to such objects. The server can also retrieve item usage records from the item purchase and usage database. If the item usage record indicates that item 0 and item 1 were used together in the same game, then a connection edge can be constructed between the item nodes corresponding to item 0 and item 1. If the item usage record indicates that item 0 and item 2 were used together in the same game, then a connection edge can be constructed between the item nodes corresponding to item 0 and item 2. Conversely, for other items that have not been used together with item 0, it is not necessary to construct a connection edge between the item node corresponding to item 0 and the item node corresponding to this type of item.
[0087] Thus, by constructing an object-object-item-item graph data in the above manner, the connecting edges in this graph data can be assigned corresponding weights based on information such as the degree of association between objects, the number of times an object uses an item, and the purchase time. The constructed graph data is represented as G=(V,E), where V=(U,J), U represents the set of object nodes, and J represents the set of item nodes.
[0088] After the server obtains the above graph data, it can... Figure 2 The method shown determines the representation vector corresponding to each object node and each prop node in the graph data.
[0089] Specifically, we can first perform SVD processing on the adjacency matrix A of the graph data to obtain A = WΣWT In this matrix, the n diagonal elements of the n×n matrix Σ are the n eigenvalues, and the elements in each row of the n×n matrix W are the eigenvectors corresponding to the n eigenvalues. Here, n is the total number of object nodes and item nodes in the graph data. Then, the k largest eigenvalues are determined from the n eigenvalues. The eigenvectors corresponding to these k eigenvalues are used to form an n×k matrix V. This matrix V is then used to compress the adjacency matrix A of the graph data to obtain the structural information of the graph data. V∈R n×k .
[0090] Then, the server can construct the graph dictionary corresponding to the graph data. Where X represents the initial node features of the graph data, which includes the initial node features of each object node and each item node in the graph data. The initial node features of an object node can be determined based on the basic attribute information of its corresponding object, and the initial node features of an item node can be determined based on the basic attribute information of the item. To utilize the Laplace matrix of the normalized graph data using the i-th (i = 1, 2, ..., K) order polynomial. The result obtained after processing. || indicates parallel splicing.
[0091] Furthermore, the server can train the graph neural network based on the aforementioned graph dictionary and training sample data until the graph neural network meets the training termination condition. In the scenario of friend recommendation or item recommendation based on game applications, the training sample data used may include at least one of object association tags, object-item association tags, and item association tags; wherein, the object association tag is used to characterize whether the objects corresponding to two object nodes have a first association relationship, such as a friend relationship or a relationship of having participated in the same game battle; the object-item association tag is used to characterize whether the object corresponding to the object node and the item corresponding to the item node have a second association relationship, such as a purchase relationship or a usage relationship; the item association tag is used to characterize whether the items corresponding to two item nodes have a third association relationship, such as a cooperative usage relationship between items.
[0092] In training a graph neural network, in each training round, the graph dictionary corresponding to the graph data is processed using the model parameters determined by the previous training round to obtain the current round's representation vector for each node in the graph data. Then, using the current round's representation vectors of the nodes in the graph data, the training task corresponding to the training sample data is executed, such as a friend recommendation task corresponding to training sample data including object association tags, or an item recommendation task corresponding to training sample data including object item association tags, to obtain the prediction result for the current round's task. Furthermore, based on the prediction result of the current round's task and the training labels included in the training sample data, a cross-entropy loss function is constructed, and the model parameters of the graph neural network are adjusted accordingly. This model training process is repeated until the number of training rounds for the graph neural network reaches the preset maximum number of training iterations, at which point the training of the graph neural network is considered complete, i.e., the graph neural network meets the training termination condition.
[0093] Furthermore, the server can utilize the trained graph neural network to determine the representation vectors corresponding to each object node and each prop node in the graph data, based on the graph dictionary corresponding to the graph data. Of course, in practical applications, the server can also pre-train the graph neural network using the method provided in this application embodiment, based on other training sample data, and then directly utilize the trained graph neural network to determine the representation vectors corresponding to each object node and each prop node included in the graph data of this scene.
[0094] After determining the representation vectors corresponding to each object node and each item node in the graph data, the server can perform an item recommendation task based on these representation vectors. Specifically, for the target object node corresponding to the target object, the server can determine the matching degree between the target object and the items corresponding to each item node based on the representation vector of the target object node and the representation vectors of each item node in the graph data; then, based on the matching degree between the target object and the items corresponding to each item node, the server determines the reference items recommended for the target object.
[0095] Figure 4 This is a schematic diagram of the execution architecture for the item recommendation task provided in an embodiment of this application. Figure 4 As shown, assuming the target object is object 1, for the target object node corresponding to object 1, the server can calculate the matching degree between object 1 and each item based on the representation vector corresponding to the target object node and the representation vectors corresponding to each item node in the graph data. The matching degree calculation can be implemented through a scoring function, for example, through vector inner product and Softmax normalization.
[0096]
[0097] Where, f(u) i i j ) represents the matching degree between the i-th object and the j-th prop, h i h is the representation vector of the object node corresponding to the i-th object in the graph data. j Let h be the representation vector of the item node corresponding to the j-th item in the graph data, where J is the set of item nodes in the graph data, and h is the value of h. k It is the representation vector of any item node in the item node set.
[0098] Furthermore, the server can arrange the items in descending order of matching degree based on the matching degree between the target object and each item, remove the items that the target object already owns, and select the top P reference items with the highest matching degree to recommend to the target object, where P is an integer greater than or equal to 1.
[0099] After determining the representation vectors corresponding to each object node in the graph data, the server can perform a friend recommendation task based on these representation vectors. Specifically, for the target object node corresponding to the target object, the matching degree between the target object and the objects corresponding to each of the other object nodes in the graph data is determined based on the representation vector of the target object node and the representation vectors of each other object node in the graph data. Then, based on the matching degree between the target object and the objects corresponding to each other object node, reference objects recommended to the target object are determined.
[0100] Figure 5 This is a schematic diagram illustrating the execution architecture of the friend recommendation task provided in an embodiment of this application. Figure 5 As shown, assuming the target object is object 1, for the target object node corresponding to object 1, the server can calculate the matching degree between object 1 and other objects based on the representation vector corresponding to the target object node and the representation vectors corresponding to the other object nodes in the graph data. The calculation of the matching degree can also be implemented through a scoring function, for example, through vector inner product and Softmax normalization.
[0101]
[0102] Where, f(u) i i j ) represents the matching degree between the i-th object and the j-th object, h i h is the representation vector of the object node corresponding to the i-th object in the graph data. j Let h be the representation vector of the object node corresponding to the j-th object in the graph data, U be the set of object nodes in the graph data, and h be the representation vector of the object node corresponding to the j-th object in the graph data.k It is the representation vector of any object node in the set of object nodes.
[0103] Furthermore, the server can rank the other objects in descending order of their matching degree based on the matching degree between the target object and each other, remove the friends that the target object already has, and select the top Q reference objects with the highest matching degree to recommend to the target object, where Q is an integer greater than or equal to 1.
[0104] To verify the effectiveness of the graph data processing method provided in this application, two types of identically labeled graph data and two types of dissimilarly labeled graph data were also selected for experiments. It should be noted that identically labeled graph data refers to graph data where neighboring nodes tend to have the same label, while dissimilarly labeled graph data refers to graph data where neighboring nodes tend to have different labels. The identically labeled graph data selected for this application's experiments include Cora and Citeseer, both of which are citation network datasets. In these datasets, nodes represent papers, edges represent citation relationships, and node categories represent the types of papers. The dissimilarly labeled graph data selected for this application's experiments include Squirrel and Chameleon, where nodes represent website pages, edges represent hyperlinks between web pages, and node labels represent network traffic levels. Detailed information on each graph data selected for this application's experiments is shown in Table 1.
[0105] Table 1
[0106] Cora 2708 5278 yes Citeseer 3327 4552 yes Squirrel 5201 198353 no Chameleon 2277 3171 no
[0107] The training process is as follows: For all experimental results, 10 identical random seeds are selected, and the published mean is used as the result. Training lasts for a maximum of 1000 epochs. Training stops when the performance of the graph neural network no longer degrades after 200 training iterations. Accuracy is selected as the performance metric in the experiments.
[0108]
[0109] In the experiment, existing frequency domain graph neural networks ChebNet and GPRGNN, as well as graph neural networks trained using the method provided in the embodiments of this application, were compared. The experimental comparison results are shown in Table 2 below:
[0110] Table 2
[0111] ChebNet 88.5 80.1 51.3 68.3 GPRGNN 88.6 80.1 50.2 67.3 Ours 89.5 81.5 68.4 73.6
[0112] By comparison, it can be found that the graph neural network trained by the method provided in this application outperforms existing frequency domain graph neural networks in terms of performance on both identical and dissimilar graph data. It is evident that by introducing structural information from graph data, this application expands the modeling space of the graph neural network, enabling it to achieve good performance on both identical and dissimilar graph data. This improves the accuracy of the representation vectors corresponding to nodes in various types of graph data determined by the graph neural network, thereby enhancing the execution effect of downstream tasks based on graph data.
[0113] In response to the graph data processing method described above, this application also provides a corresponding graph data processing apparatus so that the above graph data processing method can be applied and implemented in practice.
[0114] See Figure 6 , Figure 6 This is consistent with the above text Figure 2 The diagram shows a schematic of a graph data processing device 600 corresponding to the graph data processing method shown. Figure 6 As shown, the image data processing device 600 includes:
[0115] The structure determination module 601 is used to perform singular value decomposition on the adjacency matrix of the graph data to obtain the feature decomposition result, and determine the structure information of the graph data based on the feature decomposition result and the adjacency matrix.
[0116] The graph dictionary construction module 602 is used to construct a graph dictionary corresponding to the graph data based on the initial node features of the graph data, the Laplacian matrix of the graph data, and the structural information.
[0117] The model training module 603 is used to iteratively train the graph neural network based on the training sample data and the graph dictionary until the graph neural network meets the training termination condition.
[0118] The vector determination module 604 is used to determine the representation vector corresponding to each node in the graph data based on the graph dictionary through the graph neural network.
[0119] Optionally, the structure determination module 601 is specifically used for:
[0120] The adjacency matrix of the graph data is subjected to singular value decomposition to obtain n eigenvalues and the eigenvectors corresponding to each of the n eigenvalues; where n is an integer greater than 1 and n is the number of nodes included in the graph data;
[0121] Determine the k largest feature values among the n feature values; where k is an integer greater than 1 and less than n.
[0122] The adjacency matrix is compressed using the eigenvectors corresponding to the k eigenvalues to obtain the structural information of the graph data.
[0123] Optionally, the graph dictionary construction module 602 is specifically used for:
[0124] The Laplacian matrix of the graph data is processed using an i-th order polynomial to obtain the i-th order polynomial processing result. Based on the i-th order polynomial processing result and the initial node characteristics of the graph data, the i-th order graph data characteristics are determined; i includes integers greater than or equal to 0 and less than or equal to K, where K is an integer greater than 1.
[0125] By concatenating the graph data features from the 0th order to the Kth order and the structural information, a graph dictionary corresponding to the graph data is obtained.
[0126] Optionally, the model training module 603 is specifically used for:
[0127] In the j-th round of model training, based on the (j-1)-th round model parameters of the graph neural network and the graph dictionary, the j-th round representation vector corresponding to each node in the graph data is determined; based on the j-th round representation vector corresponding to each node in the graph data, the training task corresponding to the training sample data is executed to obtain the j-th round task prediction result; based on the labels included in the training sample data and the j-th round task prediction result, the (j-1)-th round model parameters of the graph neural network are adjusted to obtain the j-th round model parameters of the graph neural network.
[0128] Wherein, j is an integer greater than or equal to 1; when j equals 1, the model parameters of the (j-1)th round of the graph neural network are the initial model parameters of the graph neural network.
[0129] Optionally, the graph data includes multiple object nodes, multiple prop nodes, connecting edges between the object nodes, connecting edges between the object nodes and the prop nodes, and connecting edges between the prop nodes;
[0130] The training sample data includes at least one of object association tags, object-item association tags, and item association tags; the object association tags are used to characterize whether the objects corresponding to two object nodes have a first association relationship, the object-item association tags are used to characterize whether the objects corresponding to the object node and the items corresponding to the item node have a second association relationship, and the item association tags are used to characterize whether the items corresponding to two item nodes have a third association relationship.
[0131] Optionally, the device further includes:
[0132] The item recommendation module is used to determine the matching degree between the target object and the items corresponding to each item node in the graph data, based on the representation vector of the target object node and the representation vector of each item node. Based on the matching degree between the target object and the items corresponding to each item node, the module determines the reference items recommended for the target object.
[0133] Optionally, the device further includes:
[0134] The friend recommendation module is used to determine the matching degree between the target object and the objects corresponding to each of the target objects, based on the representation vector of the target object node and the representation vector of each object node in the graph data excluding the target object node; and to determine the reference objects recommended for the target object based on the matching degree between the target object and the objects corresponding to each object node.
[0135] The graph data processing apparatus provided in this application innovatively performs SVD processing on the adjacency matrix of graph data, and determines the structural information of the graph data based on the obtained eigenvalue decomposition result and the adjacency matrix. Then, this structural information, together with the initial node features and Laplacian matrix of the graph data, is introduced into the modeling process of the representation vectors corresponding to the nodes in the graph data. By introducing the structural information of the graph data, the modeling space of the graph neural network can be expanded, enabling the graph neural network to achieve good performance in both homologous and heterologous graph data. That is, it improves the accuracy of the representation vectors corresponding to the nodes in various types of graph data determined by the graph neural network, thereby improving the execution effect of related downstream tasks based on graph data.
[0136] This application also provides a computer device for processing graph data. Specifically, the computer device may be a terminal device or a server. The terminal device and server provided in this application will be described below from the perspective of hardware implementation.
[0137] See Figure 7 , Figure 7 This is a schematic diagram of the structure of the terminal device provided in the embodiments of this application. For example... Figure 7 As shown, for ease of explanation, only the parts related to the embodiments of this application are shown. For specific technical details not disclosed, please refer to the method section of the embodiments of this application. The terminal can be any terminal device including mobile phones, tablets, personal digital assistants (PDAs), point-of-sale (POS) terminals, in-vehicle computers, etc. Taking a computer as an example:
[0138] Figure 7 This is a block diagram illustrating a portion of the structure of a computer associated with the terminal provided in an embodiment of this application. (Reference) Figure 7 The computer includes: a radio frequency (RF) circuit 710, a memory 720, an input unit 730 (including a touch panel 731 and other input devices 732), a display unit 740 (including a display panel 741), a sensor 750, an audio circuit 760 (which can connect to a speaker 761 and a microphone 762), a wireless fidelity (WiFi) module 770, a processor 780, and a power supply 790, etc. Those skilled in the art will understand that... Figure 7 The computer architecture shown does not constitute a limitation on the computer and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0139] The memory 720 can be used to store software programs and modules. The processor 780 executes various computer functions and data processing by running the software programs and modules stored in the memory 720. The memory 720 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer (such as audio data, telephone directory, etc.). In addition, the memory 720 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0140] The processor 780 is the control center of the computer, connecting various parts of the computer through various interfaces and lines. It performs various computer functions and processes data by running or executing software programs and / or modules stored in the memory 720, and by calling data stored in the memory 720. Optionally, the processor 780 may include one or more processing units; preferably, the processor 780 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor 780.
[0141] In this embodiment of the application, the processor 780 included in the terminal is also used to execute the steps of any implementation of the graph data processing method provided in this embodiment of the application.
[0142] See Figure 8 , Figure 8This is a schematic diagram of the structure of a server 800 provided in an embodiment of this application. The server 800 can vary significantly due to different configurations or performance, and may include one or more central processing units (CPUs) 822 (e.g., one or more processors) and memory 832, and one or more storage media 830 (e.g., one or more mass storage devices) for storing application programs 842 or data 844. The memory 832 and storage media 830 can be temporary or persistent storage. The program stored in the storage media 830 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the server. Furthermore, the CPU 822 may be configured to communicate with the storage media 830 and execute the series of instruction operations in the storage media 830 on the server 800.
[0143] Server 800 may also include one or more power supplies 826, one or more wired or wireless network interfaces 850, one or more input / output interfaces 858, and / or one or more operating systems, such as Windows Server. TM Mac OS X TM Unix TM Linux TM FreeBSD TM etc.
[0144] The steps performed by the server in the above embodiments can be based on this Figure 8 The server structure shown.
[0145] The CPU 822 can also be used to execute any of the steps of the graph data processing method provided in the embodiments of this application.
[0146] This application also provides a computer-readable storage medium for storing a computer program that executes any one of the implementation methods of the graph data processing method described in the foregoing embodiments.
[0147] This application also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the implementation methods of the graph data processing method described in the foregoing embodiments.
[0148] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0149] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0150] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0151] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0152] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing computer programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0153] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0154] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A graph data processing method, characterized in that, The method includes: The adjacency matrix of the graph data is subjected to singular value decomposition to obtain eigenvalue decomposition results. The adjacency matrix is then compressed based on the eigenvalue decomposition results to obtain the structural information of the graph data. The graph data includes multiple object nodes, multiple item nodes, connecting edges between the object nodes, connecting edges between the object nodes and the item nodes, and connecting edges between the item nodes. The Laplacian matrix of the graph data is processed using an i-th order polynomial to obtain the i-th order polynomial processing result. Based on the i-th order polynomial processing result and the initial node characteristics of the graph data, the i-th order graph data characteristics are determined; i includes integers greater than or equal to 0 and less than or equal to K, where K is an integer greater than 1. The graph data features from the 0th order to the Kth order, along with the structural information, are concatenated in parallel to obtain the graph dictionary corresponding to the graph data. Based on the training sample data and the graph dictionary, the graph neural network is iteratively trained until the graph neural network meets the training termination condition; the training sample data includes at least one of object association labels, object-item association labels, and item association labels; the object association labels are used to characterize whether the objects corresponding to two object nodes have a first association relationship, the object-item association labels are used to characterize whether the objects corresponding to the object node and the items corresponding to the item node have a second association relationship, and the item association labels are used to characterize whether the items corresponding to two item nodes have a third association relationship. The graph neural network determines the representation vector corresponding to each node in the graph data based on the graph dictionary.
2. The method according to claim 1, characterized in that, The adjacency matrix of the graph data is subjected to singular value decomposition to obtain eigenvalue decomposition results. The adjacency matrix is then compressed based on these eigenvalue decomposition results to obtain the structural information of the graph data, including: The adjacency matrix of the graph data is subjected to singular value decomposition to obtain n eigenvalues and the eigenvectors corresponding to each of the n eigenvalues; where n is an integer greater than 1 and n is the number of nodes included in the graph data; Determine the k largest feature values among the n feature values; where k is an integer greater than 1 and less than n. The adjacency matrix is compressed using the eigenvectors corresponding to the k eigenvalues to obtain the structural information of the graph data.
3. The method according to claim 1, characterized in that, The iterative training of the graph neural network based on the training sample data and the graph dictionary includes: In the j-th round of model training, based on the (j-1)-th round model parameters of the graph neural network and the graph dictionary, the j-th round representation vector corresponding to each node in the graph data is determined; based on the j-th round representation vector corresponding to each node in the graph data, the training task corresponding to the training sample data is executed to obtain the j-th round task prediction result; based on the labels included in the training sample data and the j-th round task prediction result, the (j-1)-th round model parameters of the graph neural network are adjusted to obtain the j-th round model parameters of the graph neural network. Wherein, j is an integer greater than or equal to 1; when j equals 1, the model parameters of the (j-1)th round of the graph neural network are the initial model parameters of the graph neural network.
4. The method according to claim 1, characterized in that, After determining the representation vector corresponding to each node in the graph data using the graph neural network and the graph dictionary, the method further includes: For the target object node corresponding to the target object, the matching degree between the target object and the item corresponding to each item node is determined based on the representation vector corresponding to the target object node and the representation vector corresponding to each item node in the graph data. Based on the matching degree between the target object and the corresponding items of each item node, the recommended reference items for the target object are determined.
5. The method according to claim 1, characterized in that, After determining the representation vector corresponding to each node in the graph data using the graph neural network and the graph dictionary, the method further includes: For the target object node corresponding to the target object, the matching degree between the target object and the objects corresponding to each of the object nodes in the graph data is determined based on the representation vector corresponding to the target object node and the representation vector corresponding to each object node other than the target object node. Based on the matching degree between the target object and the objects corresponding to each object node, the recommended reference objects for the target object are determined.
6. A graph data processing apparatus, characterized in that, The device includes: The structure determination module is used to perform singular value decomposition on the adjacency matrix of the graph data to obtain the eigenvalue decomposition result, and to compress the adjacency matrix according to the eigenvalue decomposition result to obtain the structure information of the graph data; the graph data includes multiple object nodes, multiple prop nodes, connecting edges between the object nodes, connecting edges between the object nodes and the prop nodes, and connecting edges between the prop nodes. The graph dictionary construction module is used to process the Laplacian matrix of the graph data based on the i-th order polynomial to obtain the i-th order polynomial processing result. Based on the i-th order polynomial processing result and the initial node features of the graph data, the i-th order graph data features are determined; i includes integers greater than or equal to 0 and less than or equal to K, and K is an integer greater than 1. The graph data features from the 0th order to the K-th order, along with the structural information, are concatenated in parallel to obtain the graph dictionary corresponding to the graph data. The model training module is used to iteratively train the graph neural network based on the training sample data and the graph dictionary until the graph neural network meets the training termination condition; the training sample data includes at least one of object association labels, object-prop association labels, and prop association labels; the object association labels are used to characterize whether the objects corresponding to two object nodes have a first association relationship, the object-prop association labels are used to characterize whether the objects corresponding to the object nodes and the props corresponding to the prop nodes have a second association relationship, and the prop association labels are used to characterize whether the props corresponding to two prop nodes have a third association relationship. The vector determination module is used to determine the representation vector corresponding to each node in the graph data based on the graph dictionary through the graph neural network.
7. The apparatus according to claim 6, characterized in that, The structure determination module is specifically used for: The adjacency matrix of the graph data is subjected to singular value decomposition to obtain n eigenvalues and the eigenvectors corresponding to each of the n eigenvalues; where n is an integer greater than 1 and n is the number of nodes included in the graph data; Determine the k largest feature values among the n feature values; where k is an integer greater than 1 and less than n. The adjacency matrix is compressed using the eigenvectors corresponding to the k eigenvalues to obtain the structural information of the graph data.
8. A computer device, characterized in that, The device includes a processor and a memory; The memory is used to store computer programs; The processor is configured to execute the graph data processing method according to any one of claims 1 to 5 according to the computer program.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program for performing the graph data processing method according to any one of claims 1 to 5.
10. A computer program product, characterised in that, The method includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the graph data processing method according to any one of claims 1 to 5.