Model training method, graph data processing method, device, equipment and storage medium

By improving the loss function of the graph neural network model and adding a first loss function component, the problem that graph convolutional networks and graph attention networks cannot capture high-frequency signals is solved, thus improving the accuracy of graph data processing without increasing model complexity.

CN115222044BActive Publication Date: 2025-11-07SHENZHEN TENCENT INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210827890.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-13
Publication Date
2025-11-07
Estimated Expiration
2042-07-13

AI Technical Summary

Technical Problem

Existing graph convolutional networks and graph attention networks cannot capture high-frequency signal components when determining node representation vectors, resulting in consistent classification information and reduced accuracy of downstream tasks, especially in recommendation tasks where accurate recommendations cannot be achieved.

Method used

By improving the loss function of the graph neural network model, a first loss function component is added, including a first regularized term determined by the first adjacency matrix of the complement graph structure trained on the graph structure and a second regularized term determined by the second adjacency matrix of the graph structure trained on the graph structure, forming a joint loss function, and the graph neural network model is trained to capture high-frequency signals.

Benefits of technology

Without increasing the number of model parameters or computational complexity, a graph neural network model capable of simultaneously representing low-frequency and high-frequency signals was trained, improving the accuracy of graph data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115222044B_ABST
    Figure CN115222044B_ABST
Patent Text Reader

Abstract

The application provides a model training method, a graph data processing method, a device, equipment and a storage medium. The method comprises the following steps: obtaining a preset graph neural network model and training data; determining a training representation vector of each training node by using the graph neural network model; determining a complementary graph structure of a training graph structure and a first adjacency matrix of the complementary graph structure, and obtaining a second adjacency matrix of the training graph structure; determining a first loss function component based on the first adjacency matrix, the second adjacency matrix and the training representation vector of each training node; determining a joint loss function based on a second loss function component preset by the graph neural network model and the first loss function component; and training the graph neural network model by using the joint loss function, the training representation vector of each training node and a training label of each training node, so as to obtain a trained graph neural network model. According to the application, the comprehensiveness of the graph neural network model in signal description can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and particularly relates to a graph data processing method and device, equipment and a computer readable storage medium. BACKGROUND

[0002] In recent years, data in a graph structure has become a research hotspot in the field of data mining, such as social networks, citation networks, collaborator networks, knowledge graphs, recommendation systems and the like. The graph data is composed of a plurality of nodes and a plurality of edges connected between the nodes, and a full understanding and use of such data cannot be achieved without generating a representation vector for each node. In related technologies, when a graph convolution network and a graph attention network are used to determine the representation vector of a node, high-frequency signal components cannot be captured, and with an increase in the number of layers, the classification information of different nodes tends to be consistent, thereby causing an over-smoothing problem, which greatly reduces the accuracy of downstream task processing; for example, in recommendation task processing, the same object is recommended to users with large differences, and accurate recommendation cannot be achieved. SUMMARY

[0003] The embodiments of the present application provide a model training method, a graph data processing method, a device, equipment and a storage medium, which can improve the comprehensiveness of neural network model in signal description.

[0004] The technical solutions of the embodiments of the present application are as follows:

[0005] The embodiments of the present application provide a model training method, which comprises the following steps:

[0006] obtaining a preset graph neural network model and training data, wherein the training data comprises a training graph structure and label information of each training node in the training graph structure;

[0007] determining training representation vectors of the training nodes by using the graph neural network model;

[0008] determining a complementary graph structure of the training graph structure and a first adjacency matrix of the complementary graph structure, and obtaining a second adjacency matrix of the training graph structure;

[0009] determining a first loss function component based on the first adjacency matrix, the second adjacency matrix and the training representation vectors of the training nodes;

[0010] determining a joint loss function based on a second loss function component preset by the graph neural network model and the first loss function component;

[0011] training the graph neural network model by using the joint loss function, the training representation vectors of the training nodes and the training labels of the training nodes, to obtain a trained graph neural network model.

[0012] The embodiment of the present application provides a kind of graph data processing method, comprising:

[0013] In response to the received task processing request, the task processing request corresponding to the graph structure data to be processed and the trained graph neural network model are obtained, and the trained graph neural network model is obtained by using the model training method provided by the embodiment of the present application;

[0014] The trained graph neural network model is used to predict the graph structure data, and the representation vector of each node in the graph structure is obtained, which can represent the global feature and local feature of the node;

[0015] Task processing is carried out based on the representation vector of each node, and the processing result is obtained;

[0016] The processing result is output.

[0017] The embodiment of the present application provides a kind of model training device, comprising:

[0018] The first acquisition module is used to acquire the preset graph neural network model and training data, and the training data includes training graph structure and label information of each training node in the training graph structure;

[0019] The first determination module is used to determine the training representation vector of each training node by using the graph neural network model;

[0020] The second determination module is used to determine the first adjacency matrix of the complementary graph structure of the training graph structure and the complementary graph structure, and the second adjacency matrix of the training graph structure is acquired;

[0021] The third determination module is used to determine the first loss function component based on the first adjacency matrix, the second adjacency matrix and the training representation vector of each training node;

[0022] The fourth determination module is used to determine the joint loss function based on the second loss function component preset by the graph neural network model and the first loss function component;

[0023] The first training module is used to train the graph neural network model by using the joint loss function, the training representation vector of each training node and the training label of each training node, and the trained graph neural network model is obtained.

[0024] The embodiment of the present application provides a kind of graph data processing device, comprising:

[0025] The second obtaining module is configured to, in response to the received task processing request, obtain the to-be-processed graph structure data corresponding to the task processing request and a trained graph neural network model, the trained graph neural network model being obtained by using the model training method provided in the embodiments of the present application.

[0026] The first prediction module is configured to perform prediction processing on the graph structure data by using the trained graph neural network model to obtain a representation vector of each node in the graph structure, the representation vector being capable of representing global features and local features of the node.

[0027] The first processing module is configured to perform task processing based on the representation vector of each node to obtain a processing result.

[0028] The result output module is configured to output the processing result.

[0029] The embodiments of the present application provide a computer device, comprising:

[0030] The memory is configured to store executable instructions.

[0031] The processor is configured to execute the executable instructions stored in the memory to implement the model training method or the graph data processing method provided in the embodiments of the present application.

[0032] The embodiments of the present application provide a computer readable storage medium, which stores executable instructions, and is used to cause a processor to execute the model training method or the graph data processing method provided in the embodiments of the present application.

[0033] The embodiments of the present application provide a computer program product, which comprises a computer program or instructions, and the computer program or instructions are executed by a processor to implement the model training method or the graph data processing method provided in the embodiments of the present application.

[0034] The model training method provided in the embodiments of the present application has the following beneficial effects:

[0035] In the training process of the graph neural network model, a high-pass filter does not need to be added at each layer, and the trained graph neural network model does not need to be made to have the ability to express high-frequency signals through the calculation of a high-order polynomial of a Laplacian matrix. Instead, the loss function used to train the graph neural network model is improved without changing the graph neural network model. The first loss function component is added to the preset second loss function component, and the first loss function component includes a first regular subterm determined by training a first adjacency matrix of a complement graph structure corresponding to the graph structure and a second regular subterm determined by training a second adjacency matrix of the complement graph structure corresponding to the graph structure. Since the first regular subterm can represent a high-pass filter, the trained graph neural network model has the ability to express high-frequency signals through the first loss function component. Therefore, without changing the number of model parameters and the computational complexity, the graph neural network model capable of providing low-frequency signal and high-frequency signal components is efficiently trained. BRIEF DESCRIPTION OF DRAWINGS

[0036] Figure 1 is a network architecture schematic diagram of a graph data processing system 100 provided by an embodiment of the present application;

[0037] Figure 2 is a structural schematic diagram of a server 400 provided by an embodiment of the present application;

[0038] Figure 3 is an implementation flow schematic diagram of model training provided by an embodiment of the present application;

[0039] Figure 4 is an implementation flow schematic diagram of a graph data processing method provided by an embodiment of the present application;

[0040] Figure 5 is another implementation flow schematic diagram of a graph data processing method provided by an embodiment of the present application;

[0041] Figure 6 is still another implementation flow schematic diagram of a graph data processing method provided by an embodiment of the present application;

[0042] Figure 7 is a virtual object recommendation interface schematic diagram obtained by using the graph data processing method provided by an embodiment of the present application;

[0043] Figure 8 is an implementation flow schematic diagram of the graph data processing method provided by an embodiment of the present application applied to a game prop recommendation scenario. DETAILED DESCRIPTION

[0044] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings, and the described embodiments should not be regarded as limiting the present application. All other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.

[0045] In the following description, "some embodiments" are referred to, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.

[0046] In the following description, the terms "first\second\third" are only to distinguish similar objects, and do not represent a specific order of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0047] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0048] Before the embodiments of the present application are further described in detail, the terms and phrases involved in the embodiments of the present application are explained, and the terms and phrases involved in the embodiments of the present application are applicable to the following explanations.

[0049] 1) Graph: a data structure composed of vertices and edges, where an edge can only connect two vertices;

[0050] 2) Graph Neural Network (GNN): refers to using neural networks to learn graph structure data, extract and mine features and patterns in graph structure data, and meet the needs of graph learning tasks such as clustering, classification, prediction, segmentation, and generation;

[0051] 3) Multi-Layer Perceptron (MLP): introduces one to multiple hidden layers between the input layer and the output layer on the basis of a single-layer neural network;

[0052] 4) Graph Convolution Network (GCN): extends the convolution operation from traditional data (images or grids) to graph data. The key is to learn a function that generates a node representation vector by aggregating its own features and neighbor features;

[0053] 5) Graph Attention Network (GAT), a new neural network architecture based on graph-structured data, which uses a hidden self-attention layer to address the shortcomings of previous methods based on graph convolution or its approximation;

[0054] 6) High-frequency signal and low-frequency signal. From the perspective of signal processing, the component of the signal with high frequency change over time is called high-frequency signal, and the component with low frequency change over time is called low-frequency signal. Generally, low-frequency signal reflects the global characteristics of the signal, and high-frequency signal reflects the local characteristics of the signal. Considering both can describe the whole signal more comprehensively.

[0055] In order to better understand the graph data processing method provided by the embodiments of the present application, first, the graph data processing method in the related art is described.

[0056] The mathematical representation of graph data is as follows: graph data Among them represents the node set, ε = {e i}, |ε| = M represents the edge set, A ∈ R N×N ,A ij ∈ {0, 1} represents the adjacency matrix, represents the node degree matrix, L = D-A represents the Laplacian matrix of the graph structure, and the normalized form is generally used The frequency component corresponding to the graph structure is the normalized Laplacian matrix, and the eigenvector is Λ = {λ i} ∈ [0, 2], X = R N×d represents the initial representation of the node, Y train represents the known sample label.

[0057] The graph convolutional network defines that the convolution calculation of each layer is to replace the representation of the center node with the average representation of all neighbor nodes of the center node. The graph attention network introduces an attention mechanism to replace the direct average calculation in the graph convolutional network with a weighted summation of neighbor nodes with attention weights between nodes. GraphSAGE proposes to sample a fixed number of neighbors for each node, thereby reducing the computational complexity of the model. However, the mainstream graph neural network models currently generally only retain the low-frequency components of the graph signal at each layer, which can be regarded as a low-pass filter. Through the superposition of such a low-pass filter, the learned node representation vector of each node tends to be consistent, which seriously affects the results of downstream tasks, which is generally referred to as the problem of over-smoothing. On the other hand, these low-pass filters are more suitable for homophily graphs, that is, adjacent nodes tend to have the same label, and the performance of these methods is not ideal for graphs in which adjacent nodes tend to have inconsistent labels, that is, heterophily data.

[0058] Based on this, the embodiment of the present application provides a graph data processing method, which can provide high-frequency signal components for the graph neural network regarded as a low-pass filter, and can not introduce additional training parameters on the basis of the original model. For all graph neural networks, the graph data processing method provided by the embodiment of the present application can be a general plug-in, which can be efficiently deployed in the existing network architecture and applied to large-scale data scenarios.

[0059] The embodiment of the present application provides a graph data processing method, device, equipment and computer readable storage medium, which can improve the accuracy of graph data processing. The following describes an exemplary application of the electronic device provided by the embodiment of the present application. The electronic device provided by the embodiment of the present application can be implemented as a notebook computer, a tablet computer, a desktop computer, a set-top box, a mobile device (for example, a mobile phone, a portable music player, a personal digital assistant, a dedicated message device, a portable game device) and various types of user terminals. It can also be implemented as a server. The following describes an exemplary application when the device is implemented as a server.

[0060] Referring to Figure 1 , Figure 1 is a network architecture schematic diagram of the graph data processing system 100 provided by the embodiment of the present application, as Figure 1 shown, the system includes a terminal 200, a network 300, a server 400 and a database 500. The terminal 200 connects the server 400 through the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.

[0061] The graph data processing method provided in the embodiments of the present application can be applied to various scenarios, such as recommendation of purchased items, video recommendation, music recommendation, prop recommendation in games, matching between game players, and the like. In the embodiments of the present application, the scenario of recommending props for a player is taken as an example for illustration.

[0062] The terminal 200 can be installed with clients of various application programs, such as a game application program, a shopping application program, a video watching application program, and the like. The application program can be an application program that needs to be downloaded and installed, or an application program (applet) that can be used immediately after being clicked, and the embodiments of the present application do not limit this. In the embodiments of the present application, the game application program can be any application program that can provide a virtual environment, and a virtual object operated by a user in the virtual environment can perform activities in the virtual environment. For example, the game application program can be a massively multiplayer online role-playing (MMORP) game, a third-person shooting game (TPS), a first-person shooting game (FPS), and the like. The server stores game match data of a plurality of players, such as a virtual object selected and used in a match process, a prop selected and used, match data in a game match process, a match result, and the like. The server 400 obtains prop information selected or used by a player from the database 500, establishes a graph structure based on the prop information selected or used by the player, determines the graph structure as graph structure data to be processed, and then obtains a trained graph neural network model. The loss function in the training process of the trained graph neural network model at least includes a first loss function component capable of enhancing a high-frequency signal. Then, the trained graph neural network model is used to perform prediction processing on the graph structure data, to obtain a representation vector of each node in the graph structure. The representation vector can represent global features and local features of the node. After the player starts the game application program client and before starting a game match, the player can select a virtual object and a prop in a game match process. When the player triggers an operation instruction for selecting a game prop, the player sends a recommendation request to the server. The server determines the recommendation request as a task processing request. Then, in response to the task processing request, the server performs corresponding processing on the nodes based on the representation vectors of the nodes, to obtain a processing result. In the prop recommendation scenario, the processing result includes the top N prop information matched with the player. Then, the processing result (that is, the top N prop information) is sent to the terminal 200. The terminal 200 displays the processing result (that is, the top N prop information) in a display interface of the terminal 200. Then, the terminal 200 responds to receiving a selection operation on one or more props, determines the one or more props as props selected for this game match, and starts the game match.

[0063] In some embodiments, the server 400 can be a standalone physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms. The terminal 200 can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted intelligent terminal, and the like, but is not limited thereto. The terminal and the server can be connected directly or indirectly through wired or wireless communication, and the present application is not limited in this embodiment.

[0064] Referring to Figure 2 , Figure 2 The structural schematic diagram of the server 400 provided in the present application embodiment is shown in Figure 2 The server 400 shown in the structural schematic diagram includes at least one processor 410, at least one network interface 420, a bus system 430, and a memory 440. The various components in the server 400 are coupled together through the bus system 430. It can be understood that the bus system 430 is used to realize the connection and communication between the components. The bus system 430 includes not only a data bus, but also a power bus, a control bus, and a status signal bus. However, for the purpose of clear illustration, all kinds of buses are marked as the bus system 430 in the Figure 2 .

[0065] The processor 410 can be an integrated circuit chip with signal processing capability, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0066] The memory 440 can be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 440 can optionally include one or more storage devices that are physically located away from the processor 410.

[0067] The memory 440 includes volatile memory or non-volatile memory, and can also include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), and the volatile memory can be random access memory (RAM). The memory 440 described in the present application embodiment is intended to include any suitable type of memory.

[0068] In some embodiments, the memory 440 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or superset of the same, examples of which are illustrated below.

[0069] The operating system 441 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks.

[0070] The network communication module 442 is used to communicate with other computing devices via one or more (wired or wireless) network interfaces 420, examples of which include Bluetooth, Wireless Fidelity (WiFi), and Universal Serial Bus (USB), and the like.

[0071] In some embodiments, the device provided by the embodiments of the present application can be realized in software, Figure 2 A model training device 443 stored in the memory 440 is shown, which can be software in the form of programs and plug-ins, including the following software modules: a first acquisition module 4431, a first determination module 4432, a second determination module 4433, a third determination module 4434, a fourth determination module 4435, and a first training module 4436. These modules are logical, and thus can be combined or further split according to the functions implemented. The functions of each module will be described below.

[0072] In other embodiments, the device provided by the embodiments of the present application can be realized in hardware, as an example, the device provided by the embodiments of the present application can be a processor in the form of hardware decoding processor, which is programmed to execute the model training method provided by the embodiments of the present application, for example, the processor in the form of hardware decoding processor can use one or more application specific integrated circuits (ASIC, Application Specific Integrated Circuit), DSP, programmable logic device (PLD, Programmable Logic Device), complex programmable logic device (CPLD, Complex Programmable Logic Device), field programmable gate array (FPGA, Field-Programmable Gate Array) or other electronic elements.

[0073] The method for processing graph data provided by the embodiments of the present application will be described in conjunction with the exemplary application and implementation of the server provided by the embodiments of the present application.

[0074] Before the method for processing graph data provided by the embodiments of the present application is described, the artificial intelligence and several branches of the artificial intelligence and the branch involved in the molecular classification method based on artificial intelligence provided by the embodiments of the present application are first described.

[0075] Artificial intelligence (AI) is the use of digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science, which attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that the machines have the functions of perception, reasoning and decision-making.

[0076] Artificial intelligence technology is a comprehensive discipline, involving a wide range of fields, both hardware and software technologies. Artificial intelligence basic technologies generally include sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology and machine learning / deep learning and other directions. The method provided by the embodiments of the present application mainly relates to the research direction of machine learning.

[0077] Machine learning (ML) is a multi-disciplinary subject, involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It is a subject that studies how computers simulate or implement human learning behavior to acquire new knowledge or skills, and reorganize existing knowledge structure to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental approach to making computers intelligent, and its applications are widespread in various fields of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and rule-based learning.

[0078] The embodiments of the present application provide a model training method, which is applied to an electronic device. The electronic device can be a terminal or a server. In the embodiments of the present application, the electronic device is taken as a server for example. Referring to Figure 3 , Figure 3 is a schematic diagram of the implementation process of the model training method provided by the embodiments of the present application. The steps of the model training method provided by the embodiments of the present application will be described below. Figure 3

[0079] In step S101, a preset graph neural network model and training data are obtained.​

[0080] Here, the training data includes a training graph structure and label information of each training node in the training graph structure. The label information of the training node can be category information of the training node. For example, when the training node is multimedia information, the label information of the training node can be the category of the multimedia information. If the multimedia information is music, the label information thereof can be rock, light music, pop music, etc. If the multimedia information is a video, the label information thereof can be suspense, romance, education, etc. When the training node is a virtual object, the label information of the training node can be a warrior, an assassin, a shooter, an assistant, a wizard, a tank, etc.

[0081] In the embodiments of the present application, the training graph structure types of the graph neural network models corresponding to different task processing requests are different. For example, when the task processing request is a multimedia recommendation request, the training graph structure is a user-multimedia data interaction graph; when the task processing request is a player matching request, the training graph structure is a player-player interaction graph; and when the task processing request is a prop recommendation request, the training graph structure is a player-prop interaction graph.

[0082] The preset graph neural network model can be a graph convolutional neural network model or a graph attention neural network model, and the model parameters are default parameter values.

[0083] In step S102, the training representation vectors of the training nodes are determined by using the graph neural network model.

[0084] In actual application, in the implementation of this step, first, the attribute information of each training node is obtained, and the feature vectors of the training nodes are determined based on the attribute information of the training nodes; then, the second adjacency matrix of the training graph structure is determined, and the feature vectors of the training nodes and the second adjacency matrix of the training graph structure are encoded by using the graph neural network model to obtain the training representation vectors of the training nodes.

[0085] The attribute information of the training node at least includes the identifier of the training node. When the training node is a user, the attribute information of the training node can further include gender, age, region, user level, etc. Further, when the user is a player user, the user level can be a game level. When the user is a video, shopping, or multimedia corresponding user, the user level can be a member level. When the training node is a virtual object (for example, a game prop), the attribute information of the training node can further include the function of the virtual object, the player level that can select the virtual object, the attack power of the virtual object, etc. When the training node is multimedia data, the attribute information of the training node can include the type, language, and performer information of the multimedia data. When the training node is an actual object, the attribute information of the training node can include the material and price of the object, etc.

[0086] The feature vector of each training node can be determined based on the attribute information of the training node.

[0087] The training representation vector of each training node can be obtained by encoding the feature vector of each training node and the second adjacency matrix of the training graph structure using the graph neural network model.

[0088] In step S103, a second adjacency matrix of the training graph structure is obtained, and a complementary graph structure of the training graph structure and a first adjacency matrix of the complementary graph structure are determined.

[0089] The complementary graph structure of the training graph structure includes each training node in the training graph structure, but the connection edges in the complementary graph structure do not exist in the training graph structure. That is, the complementary graph structure does not have the same connection edges as the training graph structure. The complementary graph structure of the training graph structure can be determined by determining the non-neighbor node set of each training node based on the second adjacency matrix of the training graph structure, and then randomly selecting a preset number of target nodes from the non-neighbor node set of each training node to establish the connection edges between each training node and the corresponding target node, thereby forming the complementary graph structure.

[0090] Since the graph structure is represented by two arrays, one is a one-dimensional array used to store vertex information in the graph structure, and in the embodiments of the present application, the vertex information can be the node identifier of the training node. The other is a two-dimensional array, i.e., an adjacency matrix, used to store the information of the edges in the graph structure. For an undirected graph structure, if the i-th vertex and the j-th vertex have a connection edge, then the element in the i-th row and the j-th column of the adjacency matrix and the element in the j-th row and the i-th column of the adjacency matrix are 1, and if the i-th vertex and the j-th vertex do not have a connection edge, then the element in the i-th row and the j-th column of the adjacency matrix and the element in the j-th row and the i-th column of the adjacency matrix are 0. In the embodiments of the present application, since the training graph structure is known, the second adjacency matrix of the training graph structure can be directly obtained.

[0091] For the complementary graph structure, the non-neighbor node set of each training node can be determined based on the second adjacency matrix of the training graph structure. Then, the target node corresponding to each training node is determined from the non-neighbor node set of each training node, at which time the nodes having connection edges with each training node in the complementary graph structure are determined, and thus the first adjacency matrix of the complementary graph structure can be determined.

[0092] determining a non-neighbor node set of each training node based on the second adjacency matrix of the training graph structure, in which, in the second adjacency matrix, the nodes corresponding to 0 in each i-th row are the non-neighbor node set of the i-th training node.

[0093] For example, there are ten training nodes, V1, V2, V3, V4, V5, V6, V7, V8, V9, and V10. The first row of the second adjacency matrix is [1, 1, 1, 0, 0, 1, 0, 1, 0, 0], and the non-neighbor node set of the first training node is {V4, V5, V7, V9, V10}. Assuming that the preset number is 3, that is, three target nodes are determined from the neighbor node set, for example, the target nodes are V5, V7, and V9, and the first row of the first adjacency matrix of the complementary graph structure is [0, 0, 0, 0, 1, 0, 1, 0, 1, 0].

[0094] In step S104, a first loss function component is determined based on the first adjacency matrix, the second adjacency matrix, and the training representation vector of each training node.

[0095] In the embodiments of the present application, the first loss function component includes a first regular subterm and a second regular subterm, wherein the first regular subterm is determined by using the first adjacency matrix and the training representation vector of each training node, and the second regular subterm is determined by using the second adjacency matrix and the training representation vector of each training node. After the first regular subterm and the second regular subterm are determined, the first regular subterm and the second regular subterm are weighted and summed by using the weight coefficient (first hyperparameter) of the first regular subterm and the weight coefficient (second hyperparameter) of the second regular subterm, to obtain the first loss function component.

[0096] Since the first loss function component includes the first regular subterm determined by the first adjacency matrix using the complement graph structure and the training representation vector of each training node, the second regular subterm determined by the second adjacency matrix using the original training graph structure can narrow the distance between two training nodes having a connection relationship in the training graph structure, and through the constraint of the second regular subterm, the graph signal after passing through the graph neural network model can be more smooth, and from the frequency domain, it is equivalent to low-pass filtering the graph signal, so the second regular subterm can represent a low-pass filter, and the first regular subterm determined by the first adjacency matrix using the complement graph structure can narrow the distance between two training nodes having a connection relationship on the complement graph structure, and the two training nodes having a connection relationship on the complement graph structure do not have a connection relationship on the original training graph structure, so the distance between the two training nodes not having a connection relationship on the training graph structure is narrowed, and contrary to the second regular subterm, using the first regular subterm is equivalent to high-pass filtering the graph signal, so the first regular subterm can represent a high-pass filter.

[0097] In step S105, a joint loss function is determined based on the second loss function component and the first loss function component preset by the graph neural network model.

[0098] In the embodiments of the present application, the second loss function component preset by the graph neural network model can be a cross-entropy function, or other types of loss functions, such as an L1 loss function, a KL distance loss function, etc. In the embodiments of the present application, the second loss function component is taken as the cross-entropy function as an example. Since the convergence speed of the cross-entropy loss function is faster, the update rate of the model parameters can be accelerated, and the training time of the pre-trained model can be reduced.

[0099] In the implementation of this step, a preset regular term coefficient can be obtained, which is a weight coefficient of the first loss function component, and then the joint loss function is determined based on the following formula (1-2)

[0100]

[0101] wherein, is the second loss function component preset by the graph neural network model, and γ is a regular term coefficient, is the first loss function component.

[0102] In step S106, the graph neural network model is trained using the joint loss function, the training representation vector of each training node, and the training label of each training node, to obtain a trained graph neural network model.

[0103] Through the steps S101 to S106, in the training process of the graph neural network model, a high-pass filter does not need to be added at each layer as in the related art, and the trained graph neural network model does not need to be made to have the ability to express high-frequency signals through the calculation of a high-order polynomial of a Laplacian matrix. Instead, the loss function used to train the graph neural network model is improved without changing the graph neural network model. The first loss function component is added to the preset second loss function component, and the first loss function component includes the first regular subterm determined by training the first adjacency matrix of the complement graph structure corresponding to the training graph structure and the second regular subterm determined by training the second adjacency matrix of the complement graph structure corresponding to the training graph structure. Since the first regular subterm can represent a high-pass filter, the trained graph neural network model has the ability to express high-frequency signals through the first loss function component. Therefore, without changing the number of model parameters and the computational complexity, the graph neural network model that can provide low-frequency signal and high-frequency signal components is efficiently trained.

[0104] In some embodiments, the step S103 of determining the complement graph structure of the training graph structure can be implemented by the following steps:

[0105] In step S1031, based on the second adjacency matrix of the training graph structure, a non-neighbor node set of each training node in the training graph structure is determined.

[0106] The second adjacency matrix of the training graph structure can represent the connection relationship between each training node. If the ith training node and the jth training node have a connection edge, the element of the ith row and the jth column of the second adjacency matrix and the element of the jth row and the ith column of the second adjacency matrix are 1. That is, the ith row of the second adjacency matrix of the training graph structure represents the connection relationship between the ith training node and each training node. When determining the non-neighbor node set of the ith training node in the training graph structure, the nodes corresponding to the value 0 in the ith row of the second adjacency matrix are put into the non-neighbor node set.

[0107] In step S1032, a preset number of target non-neighbor nodes are determined from the non-neighbor node set of each training node.

[0108] In implementation, the step can be randomly selecting a preset number of target non-adjacent nodes from the non-adjacent node set of each training node. The preset number N is determined based on the element number of the non-adjacent node set of each training node. In implementation, the preset number N can be a random integer value less than or equal to the minimum value of the element number. The preset number N can be a value obtained by subtracting a first preset integer value from the minimum value of the element number. For example, the first preset integer value can be 1, and then the preset number N is a value obtained by subtracting 1 from the minimum value. In addition, the preset number N can also be the minimum value of the element number.

[0109] Suppose the preset number N is 2, then the step is to randomly select two target non-adjacent nodes from the non-adjacent node set of each training node.

[0110] In step S1033, the respective training nodes and the respective target non-adjacent nodes are connected to form a complementary graph structure of the training graph structure.

[0111] Through the above steps S1031 to S1033, the non-adjacent node set of each training node is first determined, and then a preset number of target non-adjacent nodes are randomly determined from the non-adjacent node set of each training node. Then, the respective training nodes and the corresponding non-adjacent nodes are connected, thereby forming a complementary graph structure of the training graph structure, which provides a data basis for subsequently determining a first loss function component capable of enhancing a high-frequency signal.

[0112] In some embodiments, the first loss function component includes a first regularization sub-item and a second regularization sub-item. Correspondingly, the above step S104 of "determining a first loss function component based on the first adjacency matrix, the second adjacency matrix, and the training representation vectors of the respective training nodes" can be implemented by the following steps:

[0113] In step S1041, a first hyperparameter and a second hyperparameter are obtained.

[0114] Here, the first hyperparameter is a weight coefficient of the first regularization sub-item, and the second hyperparameter is a weight coefficient of the second regularization sub-item. The first hyperparameter and the second hyperparameter can be understood as model parameters that need to be adjusted during model training.

[0115] In step S1042, the product of the first adjacency coefficient corresponding to the i-th row and the j-th column of the first adjacency matrix, the training vector of the i-th training node, and the transpose of the training vector of the j-th training node is summed to obtain a first regularization sub-item capable of representing a high-pass filter.

[0116] Wherein, i = 1, 2, …, M, j = 1, 2, …, M, and M is the total number of nodes in the training graph structure.

[0117] In implementation, the first regular subterm capable of representing the high-pass filter can be determined by determining a first regular subterm capable of representing the high-pass filter, wherein, is a first adjacency coefficient corresponding to the ith row and the jth column of the first adjacency matrix, i is a training vector of the ith training node, is a transpose of a training vector of the jth training node.

[0118] Step S1043, summing the product of the second adjacency coefficient corresponding to the ith row and the jth column of the second adjacency matrix, the training vector of the ith training node, and the transpose of the training vector of the jth training node, to obtain a second regular subterm capable of representing the low-pass filter.

[0119] In implementation, the second regular subterm capable of representing the low-pass filter can be obtained by obtaining a second regular subterm capable of representing the low-pass filter, wherein, A ij is a second adjacency coefficient corresponding to the ith row and the jth column of the second adjacency matrix, i is a training vector of the ith training node, is a transpose of a training vector of the jth training node.

[0120] Step S1044, weighting and summing the first regular subterm and the second regular subterm using the first hyperparameter and the second hyperparameter to obtain a first loss function component.

[0121] In implementation, the first loss function component can be determined by formula (1-1):

[0122]

[0123] wherein, α is the first hyperparameter, and β is the second hyperparameter.

[0124] By the steps S1041 to S1044, the first regular subterm determined by the first adjacency matrix and the training representation vectors of the training nodes, the second regular subterm determined by the second adjacency matrix and the training representation vectors of the training nodes, and the first loss function component determined based on the first regular subterm and the second regular subterm can be determined. Since the first regular subterm can represent a high-pass filter and the second regular subterm can represent a low-pass filter, the trained graph neural network model can not only have the representation ability of low-frequency signals but also have the representation ability of high-frequency signals through the first loss function component. Further, since the low-frequency signals reflect the global features of the training nodes and the high-frequency signals reflect the local features of the training nodes, the difference between the predicted node features of the graph structure can be ensured through the trained graph neural network model, the over-smoothing problem caused by the node vectors of the nodes tending to be consistent can be avoided, and thus the accuracy of the downstream task processing can be improved.

[0125] In some embodiments, the step S106 of training the graph neural network model by using the joint loss function, the training representation vectors of the training nodes, and the training labels of the training nodes to obtain the trained graph neural network model can be implemented by the following steps:

[0126] In the step S1061, the training representation vectors of the training nodes are predicted by using the graph neural network model to obtain the prediction information of the training nodes.

[0127] In the embodiments of the present application, after obtaining the training representation vectors of the training nodes, the training representation vectors of the training nodes are predicted by using the classification module of the graph neural network model. The classification module can be a fully connected layer or any other suitable classifier (for example, a decision tree, a Bayesian classifier, a support vector machine, etc.). Through the classification module, the prediction information of the training nodes can be obtained.

[0128] In the step S1062, a loss value is determined based on the prediction information of the training nodes, the label information of the training nodes, and the joint loss function.

[0129] In the embodiments of the present application, the loss value can represent the difference between the prediction information of the training nodes and the corresponding label information. In the implementation of this step, the prediction information of the training nodes and the label information of the training nodes are substituted into the joint loss function, and the loss value is determined.

[0130] In the step S1063, when it is determined that the joint loss function does not converge according to the loss value, the parameters of the graph neural network model are adjusted based on the joint loss function until the trained graph neural network model is obtained.

[0131] When the loss value tends to a constant, it can be determined that the loss function converges, that is, when the difference between the loss value and the constant is less than a preset difference threshold, it is determined that the joint loss function converges; when the difference between the loss value and the constant is greater than or equal to the difference threshold, it is determined that the joint loss function does not converge, at which time the training of the graph neural network model needs to be continued. When it is determined that the joint loss function does not converge, the parameters of the graph neural network model can be adjusted based on the joint loss function using an Adam optimization algorithm or an exponentially decreasing stochastic gradient descent algorithm, and then the loss value is calculated again. When it is determined based on the loss value that the joint loss function converges, the trained graph neural network model is obtained.

[0132] In some embodiments, after obtaining the trained graph neural network model through the above steps S101 to S106, it can also be determined whether the trained graph neural network model reaches the evaluation index, and the training of the graph neural network model is continued when the evaluation index is not reached:

[0133] Step S107, obtaining test data.

[0134] The test data includes test graph structure and label information of each test node in the test graph structure. The node type of the test graph structure is the same as that of the training graph structure.

[0135] Step S108, using the trained graph neural network model to perform prediction processing on the test graph structure to obtain prediction information of each test node in the test graph structure.

[0136] Step S110, determining an evaluation index value of the trained graph neural network model based on the prediction information of each test node and the corresponding label information.

[0137] In the embodiments of the present application, the evaluation index can be accuracy, recall rate, etc.

[0138] Step S111, determining that the evaluation index value is less than a preset index threshold, and obtaining training data again.

[0139] The training data includes training graph structure and label information of each training node in the training graph structure.

[0140] In some embodiments, when the evaluation index value is greater than or equal to the index threshold, it is determined that the trained graph neural network model reaches the evaluation passing standard, at which time the trained graph neural network model does not need to be continuously trained.

[0141] Step S112, the trained graph neural network model is further trained using the training data until the evaluation index value of the re-trained graph neural network model reaches the index threshold.

[0142] In the implementation of this step, the trained graph neural network model is used to perform prediction processing on the training graph structure to obtain prediction information of each training node, and then a loss value is determined based on the prediction information of each training node, the label information of each training node, and the joint loss function. Further, when it is determined based on the loss value that the joint loss function has not converged, the parameters of the graph neural network model are adjusted using the Adam optimization algorithm or the gradient descent method until the evaluation index value of the re-trained graph neural network model reaches the index threshold.

[0143] Through the above steps S107 to S112, the performance index of the initially trained graph neural network model can be evaluated after the initially trained graph neural network model is obtained, and an evaluation index value is obtained. When it is determined that the evaluation index value does not reach the preset index threshold, it indicates that the performance index of the initially trained graph neural network model does not meet the standard. At this time, new training data is obtained again, and the graph neural network model is further trained until the evaluation index of the trained graph neural network model reaches the index threshold. In this way, the accuracy of graph data processing using the trained graph neural network model can be ensured.

[0144] Based on the foregoing embodiments, the embodiments of the present application provide a graph data processing method, applied to an electronic device, which can be a server, Figure 4 An implementation flow diagram of the graph data processing method provided by the embodiments of the present application is provided as follows. Figure 4 The steps of the graph data processing method provided by the embodiments of the present application are described.

[0145] Step S201, in response to the received task processing request, obtaining the to-be-processed graph structure data corresponding to the task processing request and the trained graph neural network model.

[0146] In the embodiments of the present application, before performing the graph data processing method provided by the embodiments of the present application, the server can construct a graph structure according to historical data stored in a database, and then obtain graph structure data. The graph structure data can include node information in the graph structure, and connection edge information between nodes, wherein the connection edge information can include vertex node identifiers of the connection edges, and can also include weights of the connection edges. Taking the construction of a graph structure between players and props as an example, in implementation, records of players purchasing props can be queried and obtained from a purchase database, and records of players using props can be queried and obtained from game data. The players and the props are regarded as nodes, and the purchase / use relationship is regarded as an edge between the nodes, to construct a player-prop interaction graph. Taking the construction of a graph structure between players and players as another example, in implementation, player information in each game can be queried and obtained from game data, the players are regarded as nodes, and the game relationship is regarded as an edge between the nodes, to construct a player-player interaction graph. When constructing a graph structure between users and multimedia data, first, viewing or listening records, download records, like records, and collection records of the users can be obtained, the users and the multimedia data are regarded as nodes, and the viewing / download / like / collection relationship is regarded as an edge between the nodes, to construct a user-multimedia data interaction graph. Different connection edges based on different connection relationships can have different weights, for example, if the connection relationship between the user and the multimedia data is viewing, downloading or collecting, the weight can be 2, and if the connection relationship between the user and the multimedia data is liking, the weight can be 1.

[0147] Different task processing requests correspond to different graph structures, for example, when the task processing request is a prop recommendation request, the graph structure corresponding to the task processing request is a player-prop graph structure, and when the task processing request is a player matching request, the graph structure corresponding to the task processing request is a player-player graph structure.

[0148] In the embodiments of the present application, the graph neural network model can be a graph convolutional neural network model or a graph attention neural network model, and the trained graph neural network model is obtained by using the first loss function component included in the joint loss function in the training process. The trained graph neural network model not only has the ability to represent low-frequency signals, but also learns high-frequency signal representation, thereby having the ability to represent high-frequency signals.

[0149] In step S202, the trained graph neural network model is used to perform prediction processing on the graph structure data to obtain representation vectors of nodes in the graph structure.

[0150] In the embodiments of the present application, the trained graph neural network model includes a first loss function component capable of enhancing high-frequency signals in the joint loss function in the training process. The first loss function component can narrow the distance between the representations of nodes between edges that do not exist in the graph data. Such a first loss function component implicitly represents a high-pass filter, which can impose a constraint on the representation learned by the graph neural network model to express high-frequency signals. High-frequency signals can reflect the local features of the training nodes, and low-frequency signals can reflect the global features of the training nodes. Therefore, after the graph structure data is processed by the trained graph neural network model, the representation vector of the node can represent both the global features and the local features of the node, improving the data comprehensiveness of the representation vector of the node.

[0151] In step S203, task processing is performed based on the representation vectors of the nodes to obtain a processing result.

[0152] The task processing request can be a classification request or a recommendation request. In actual application, different implementation manners can be used based on different types of task processing requests. When the task processing request is a recommendation request, a target node corresponding to the task processing request is first determined, and then the matching degree score between the target node and each other node in the graph structure except the target node is determined based on the representation vectors of the nodes, and the top N node information with the highest matching degree is determined as the processing result. When the task processing request is a classification request, a classifier is used to perform prediction processing on the representation vectors of the nodes to obtain a class probability vector of each node, and the class information of each node is determined based on the class probability vector of each node, and the class information of each node is the processing result.

[0153] In step S204, the processing result is output.

[0154] In the embodiments of the present application, the server outputs the processing result, which can be sent to the terminal corresponding to the task processing request. After receiving the processing result, the terminal displays the processing result on the display device of the terminal and performs subsequent operations based on the processing result.

[0155] In the graph data processing method provided in the embodiments of the present application, after obtaining the to-be-processed graph structure data, a trained graph neural network model is first obtained, the loss function of the trained graph neural network model in the training process at least includes a first loss function component capable of enhancing high-frequency signals, then the trained graph neural network model is used to perform prediction processing on the graph structure data, to obtain the representation vector of each node in the graph structure, the representation vector can represent the global feature and the local feature of the node; in response to the received task processing request, the task processing is performed based on the representation vector of each node, to obtain and output the processing result. Since the loss function of the trained neural network model in the training process includes the first loss function component capable of enhancing high-frequency signals, the trained graph neural network model not only has the ability to represent the original low-frequency signals but also has the ability to represent high-frequency signals, that is, the representation vector of the node obtained by using the trained neural network model can not only represent the global feature of the node but also ensure the local feature, thereby improving the data richness and comprehensiveness of the node representation vector, and further improving the accuracy of the processing result when the task processing is performed by using the representation vector of the node.

[0156] Based on the above embodiments, the embodiments of the present application provide a graph data processing method, applied to Figure 1 the network structure shown in the figure, Figure 5 is another implementation flow diagram of the graph data processing method provided in the embodiments of the present application. The following describes each step of the graph data processing method provided in the embodiments of the present application. Figure 5 The embodiments of the present application provide a graph data processing method.

[0157] In step S301, the terminal starts the game client in response to the operation instruction of starting the game client, and presents the game interface.

[0158] In the embodiments of the present application, the game client can be a game application client, and the operation instruction of opening the client can be an instruction generated based on the user clicking or touching the game application icon in the terminal display screen.

[0159] In step S302, the terminal receives the operation instruction of selecting the props triggered through the game interface.

[0160] Before the game match, the player can select one or more virtual props according to the game level of the player or the skills that the player wants to release in the game, or select the virtual props according to the virtual object selected by the player.

[0161] In step S303, the terminal sends a task processing request to the server in response to the operation instruction.

[0162] The task processing request is used to request the server to provide selectable props for the terminal, and thus in the embodiment of the application, the task processing request is a recommendation request. The server can be a server corresponding to the game client.

[0163] In step S304, the server acquires the graph structure data to be processed and the trained graph neural network model in response to the task processing request.

[0164] In a game scenario, players can have various requirements, such as matching players belonging to different camps, or matching friendly players belonging to the same camp, or matching suitable props, or requesting recommended virtual objects, and so on. Therefore, different graph structures can be constructed in the server according to different requirements, such as a player-prop graph structure, a player-player graph structure, a player-virtual object graph structure, and so on. In the embodiment of the application, when the server receives a task processing request, the graph structure corresponding to the type of the task processing request is determined as the graph structure to be processed based on the type of the task processing request.

[0165] The loss function used in the training process of the trained graph neural network model at least includes a first loss function component capable of enhancing high-frequency signals.

[0166] In step S305, the server performs prediction processing on the graph structure data by using the trained graph neural network model to obtain a representation vector of each node in the graph structure.

[0167] Since the loss function used in the training process of the graph neural network model includes a first loss function component capable of enhancing high-frequency signals, the trained graph neural network model can represent high-frequency signals, so that the node representation vector obtained by using the trained graph neural network model can represent global features and local features of the node, thereby improving the data comprehensiveness of the node representation vector.

[0168] In step S306, the server determines a target node based on the task processing request.

[0169] In the embodiment of the application, the task processing request carries identification information of a player corresponding to the terminal, and the identification information can be used to determine the target node in the graph structure.

[0170] In step S307, the server determines a matching degree score between the target node and other nodes in the graph structure data based on the representation vectors of the nodes.

[0171] In implementation, the representation vector of the target node and the representation vectors of the other nodes in the graph structure data can be calculated by inner product, and then normalized to obtain the matching degree score between the target node and the other nodes.

[0172] In some embodiments, the distances between the representation vector of the target node and the representation vectors of the respective other nodes can also be determined, and then the respective distances are utilized to determine the matching degree scores between the target node and the other nodes.

[0173] In step S308, the server determines, as the matching objects of the target node, the other nodes whose matching degree scores with the target node are greater than the preset matching threshold.

[0174] In step S309, the server sorts the matching objects according to the matching degree scores to obtain a sorting result, and determines the sorting result as a processing result.

[0175] In the embodiments of the present application, the matching objects are sorted according to the matching degree scores from high to low to obtain a sorting result, and the sorting result is determined as the final processing result.

[0176] In step S310, the server sends the processing result to the terminal.

[0177] In step S311, the terminal displays the processing result in a display interface of the terminal.

[0178] Since the processing result has been sorted according to the matching degree scores from high to low, when the terminal displays the processing result, the matching objects corresponding to the props are also displayed in the order of the matching degree scores from high to low, so that the player can preferentially view the props with high matching degrees.

[0179] In step S312, the terminal receives a selection operation on the processing result and determines a target prop to be selected and used.

[0180] In step S313, the terminal receives an operation instruction to start a game session and starts the game session.

[0181] In step S314, the terminal obtains game session data from the server and sends game session data generated based on a player operation to the server.

[0182] After obtaining the game session data from the server, the terminal loads and displays a virtual scene including a virtual object and a graphical control displaying a graphical visual area of the virtual object in the virtual scene. Here, the virtual scene can refer to an image frame including a game scene, and the virtual object can include an object controlled by a user and an object controlled by a machine. Then, the player controls the virtual object corresponding to the player to move or release a skill through the terminal, and sends corresponding game session data to the server.

[0183] In the graph data processing method provided in the embodiments of the present application, when a terminal starts a game client and triggers a request for selecting a prop, the terminal sends a task processing request to a server. The server, in response to the task processing request, first acquires a graph structure to be processed and a trained graph neural network model, then performs prediction processing on the graph structure data by using the trained graph neural network model to obtain a representation vector of each node in the graph structure, determines a target node corresponding to the task processing request, then determines a matching degree score of the target node and other nodes in the graph structure, and finally obtains a processing result based on the matching degree score and sends the processing result to the terminal, so that the terminal selects a target prop based on the processing result and starts a game match process. Since the loss function of the trained neural network model in the training process includes a first loss function component capable of enhancing high-frequency signals, the trained graph neural network model not only has the ability to represent original low-frequency signals but also has the ability to represent high-frequency signals, that is, the representation vector of the node obtained by using the trained neural network model can not only represent the global features of the node but also guarantee the local features, thereby improving the data richness and comprehensiveness of the node representation vector, and further ensuring the accuracy of the matching degree score when the matching degree score between different nodes is determined based on the representation vector of the node, thereby improving the accuracy of the task processing result.

[0184] In the above embodiments, the task processing request is taken as an example for recommendation request. In some embodiments, when the task processing request is a classification request, the above step S203 can be implemented by the following steps:

[0185] Step S2031, performing prediction processing on the representation vector of each node by using a trained classifier to obtain a class probability vector of each node.

[0186] The trained classifier can be a fully connected layer in the graph neural network structure, or an independent classifier. The class probability vector can represent the probability or confidence that the node belongs to each class.

[0187] Step S2032, determining the classification result of each node based on the class probability vector of each node.

[0188] In implementation, the class corresponding to the highest probability in the class probability vector of the node can be determined as the classification result of the node.

[0189] Step S2033, determining the classification result of each node as the processing result.

[0190] In the embodiment in which steps S2031 to S2033 are located, the trained classifier is used to perform classification processing based on the representation vectors of the nodes, to obtain classification results of the nodes. Since the representation vectors of the nodes can represent not only the global features but also the local features, the accuracy of the classification results can be ensured.

[0191] In the following, an exemplary application of the embodiment of the present application in an actual application scenario will be described.

[0192] The embodiment of the present application provides a graph data processing method which can efficiently provide high-frequency signal components. In implementation, first, hidden layer representation vectors of each node are obtained through an original graph neural network, then high random sampling is performed on the structure of the original graph, and then Laplace regularization (i.e., narrowing the representation distance between adjacent nodes) is performed on the sampled graph structure, to impose a constraint on the learned representation vectors to express high-frequency signals. Finally, the obtained representation vectors are used in a node classification task, and a cross-entropy loss function of a training set is calculated to update parameters of the original graph neural network, to train the graph neural network, so that the trained graph neural network has the ability to represent not only the original low-frequency signals but also high-frequency signals.

[0193] The graph data processing method provided by the embodiment of the present application can be widely applied to all graph neural networks, and efficiently model high-frequency components of graph signals. Compared with related technologies, the graph data processing method provided by the embodiment of the present application does not increase additional computational complexity, and is a flexible plug-in.

[0194] The graph data processing method provided by the embodiment of the present application and the implementation scheme of the graph data processing method as a plug-in applied to an existing graph neural network are described below. Figure 6 Another implementation process of the graph data processing method provided by the embodiment of the present application is shown in FIG. 6, which includes the following steps. Figure 6

[0195] In step S601, original graph data is obtained.

[0196] In step S602, an adjacency matrix and feature vectors of nodes are determined based on the original graph data.

[0197] In step S603, a graph neural network encoder is used to encode the adjacency matrix and the feature vectors of the nodes, to obtain representation vectors of the nodes.

[0198] In step S604, supplementary graph data is determined based on the original graph data.

[0199] The supplementary graph data includes edges that do not exist in the original graph data.

[0200] ​Step S605, the supplementary graph data is sampled.

[0201] Step S606, the graph neural network model is trained in a supervised and unsupervised manner.

[0202] wherein the parameters of the backbone graph neural network are updated supervisedly (supervised constrain) based on the representation vectors of the nodes by using a loss function such as cross entropy, so as to train the graph neural network, and the existing graph neural network is enhanced by constructing a regular unsupervised constraint (unsupervised CLAR).

[0203] Input: graph data wherein represents a node set, and ε = {e i}, |ε| = M represents an edge set, A ∈ R N×N , ij A ∈ {0, 1} represents an adjacency matrix, represents a node degree matrix, L = D - A represents a Laplacian matrix of the graph structure, and a graph neural network is taken as a backbone of the graph data processing method provided in the embodiments of the present application, and it is assumed that a graph convolution network f GCN (X, A) is selected; the multiple s of the negative sampled edges = 2; and the coefficient γ of the regular term.

[0204] The representation vector H = f GCN (X, A)X = RNxdYtrain of the node is obtained by using the graph neural network, then random sampling is performed on the graph structure ε, in order to ensure the balance of the graph structure, s edges that do not exist are sampled for each existing edge, and the graph structure ε s is obtained. Then, the graph structure εs obtained by sampling is regularized according to formula (1-1):

[0205]

[0206] wherein α and β are hyperparameters. A s represents the adjacency matrix corresponding to the graph structure εs obtained by sampling, which means that the distance between the node representations of the edges that do not exist in the original graph is narrowed, and such a regular term (corresponding to the first loss function component in other embodiments) implicitly represents a high-pass filter. Since the regular term in the original graph represents a low-pass filter, the edges that do not exist are the complement of the original graph, and the regular term in the complement graph represents a high-pass filter.

[0207] In this way, the training target of the whole task is shown in formula (1-2), which is converted into the classification task of the original graph neural network plus the regular term:

[0208]

[0209] wherein is the training target of the original graph neural network model, which can be expressed by formula (1-3):

[0210]

[0211] g(·) is generally cross-entropy.

[0212] The training process can be trained by using the Adam optimizer, so as to update the parameters of f GCN The backbone network can adopt a two-layer network, the hidden layer representation dimension is uniformly set to 32, and the optimal result searched from [0, 1, 2] is adopted for γ.

[0213] The graph data processing method provided in the embodiments of the present application can be applied to a general model architecture and is not limited to a specific application scenario. In any graph structure data, the representation vector learned by the embodiments of the present application has more rich representation ability and can provide better user representation vector for downstream tasks. As long as the data of the graph structure can be constructed, the graph neural network can help to obtain valuable node vector representation to help the completion of downstream tasks. For example, in the game player recommendation scene, the user-user game history information between players is known, and a user-user game graph can be constructed; or in the game prop recommendation scene, the purchase or use records between players and props are known, and a player-item graph is constructed; or in the virtual object recommendation scene, the user-virtual object graph is constructed through the game history information of the player, and then the player / item / virtual object representation vector obtained by the graph data method provided in the embodiments of the present application can obtain the matching score value between the user and the user, or the user and the item, or the user and the virtual object through a scoring function. Through the sorting of the value, the friend / item / virtual object recommendation result of the user can be provided.

[0214] Figure 7 The virtual object recommendation interface schematic diagram obtained by using the graph data processing method provided in the embodiments of the present application is shown in the interface as shown in FIG. 8. Figure 7 On the interface, each virtual object (hero) suitable for the player is shown in order of the matching degree with the player, so that the player can quickly select the virtual object used in the game match.

[0215] The application process of the graph data processing method provided in the embodiments of the present application is described below by taking the game player prop recommendation scene as an example. In the case that the prop information purchased by the player and the prop information used by the player are known, the player and the user representation vector can be obtained by using the graph data processing method provided in the embodiments of the present application, so as to determine the matching score between the player and the user, and to recommend the prop to the game player.

[0216] Figure 8 The figure data processing method provided by the embodiments of the present application is applied to the implementation process of the game prop recommendation scene. The following will be described in combination with Figure 8 The implementation process will be described.

[0217] In step S801, the records of the player purchasing the props are queried and obtained from the purchase database, and the records of the player using the props are queried and obtained from the game data.

[0218] In step S802, the player and the prop are regarded as nodes, and the relationship of purchasing / using is regarded as the edge between the nodes, so as to construct the player-prop interaction graph.

[0219] The edge in the graph can be given a weight by using the number of times of using or the time of purchasing and other information, and the default is 1. The constructed graph structure is All the nodes include user nodes and item nodes:

[0220] In step S803, the obtained graph data is input into the graph neural network, so as to obtain the representation vector H of each node.

[0221] The graph data processing method provided by the embodiments of the present application mainly enhances the structure of the graph neural network, improves the expression ability of the high-frequency information, and thus improves the representation ability of the graph neural network.

[0222] In step S804, the matching degree between the player and all the global items is calculated based on the obtained representation vector of each node.

[0223] In the implementation, this step is completed by a scoring function. The most direct implementation can be shown in formula (1-4) by vector inner product and Softmax normalization:

[0224]

[0225] In step S805, all the props are sorted based on the matching score between the props and the player, all the props already owned by the player are removed, and the top K props are selected for recommendation.

[0226] In the actual application, the top K props of the matching score can be arranged and displayed from high to low according to the matching score.

[0227] In the embodiments of the present application, the above GCN represents a graph convolutional network, GAT (graph attention network), and SAGE (GraphSAGE). The + represents the graph data method provided in the embodiments of the present application using the network as the backbone network. In addition, the two-layer polynomial frequency domain graph neural method ChebNet and GPRGNN with unified computational complexity are compared. The data sets selected are the citation network (homogeneous data set) Cora, CiteSeer and PubMed; the Wikipedia web page hyperlink graph (heterogeneous data set) Squirrel, Chameleon and Actor. For all data sets, the data set is randomly divided into 0.6, 0.2, 0.6 training, validation and testing ratios, and the average results of 50 random divisions are published. The maximum number of training iterations is set to 1000, and the training is stopped when the loss function value of the 50 validation sets no longer decreases. For all experimental results, the accuracy Accuracy is selected as the index, which can be determined by formula (1-5):

[0228]

[0229] Table 1, node classification task effect comparison

[0230]

[0231]

[0232] As can be seen from Table 1, in the node classification task, the graph data processing method provided in the embodiments of the present application has a very obvious improvement on the homogeneous data set, especially on the heterogeneous data set, which shows that the high-pass filter provided by the graph data processing method provided in the embodiments of the present application can help to obtain better node representation.

[0233] In addition, Table 2 also provides the effect of the graph data processing method provided in the embodiments of the present application on the over-smoothing problem. On the Cora data set, using the graph convolutional neural network as the backbone model, the more difficult data division method of selecting 20 training samples for each class is adopted, and the classification results of 2, 4, 6 and 8 layers are compared. The results show that when the backbone graph neural network (taking the graph convolutional neural network as an example) is stacked for multiple layers, the graph data processing method provided in the embodiments of the present application can greatly avoid the performance degradation of the model due to the over-smoothing problem.

[0234] Table 2, comparison of the number of graph neural network layers

[0235] 2 4 6 8 GCN 82.25 77.14 58.10 37.26 GCN+ 82.45 77.23 63.57 50.75

[0236] It can be understood that, in the embodiments of the present application, the content related to user information, such as the attribute information of the node and the like, when the embodiments of the present application are applied to specific products or technologies, needs to obtain the permission or consent of the user, and the collection, use and processing of the related data needs to comply with the relevant laws, regulations and standards of the country and region.

[0237] The following continues to illustrate an exemplary structure of the implementation of the model training apparatus 443 as a software module provided by the embodiments of the present application. In some embodiments, as shown in FIG. 4B, the software module stored in the model training apparatus 443 of the memory 440 can include: Figure 2

[0238] The first obtaining module 4431 is configured to obtain a preset graph neural network model and training data, wherein the training data includes a training graph structure and label information of each training node in the training graph structure.

[0239] The first determining module 4432 is configured to determine a training representation vector of each training node by using the graph neural network model.

[0240] The second determining module 4433 is configured to determine a complementary graph structure of the training graph structure and a first adjacency matrix of the complementary graph structure, and obtain a second adjacency matrix of the training graph structure.

[0241] The third determining module 4434 is configured to determine a first loss function component based on the first adjacency matrix, the second adjacency matrix and the training representation vector of each training node.

[0242] The fourth determining module 4435 is configured to determine a joint loss function based on a second loss function component preset by the graph neural network model and the first loss function component.

[0243] The first training module 4436 is configured to train the graph neural network model by using the joint loss function, the training representation vector of each training node and the training label of each training node, to obtain a trained graph neural network model.

[0244] In some embodiments, the first determining module 4432 is further configured to:

[0245] obtain attribute information of each training node, and determine a feature vector of each training node based on the attribute information of each training node;

[0246] perform encoding processing on the feature vector of each training node and the second adjacency matrix by using the graph neural network model, to obtain the training representation vector of each training node.

[0247] ​In some embodiments, the second determining module 4433 is further configured to:

[0248] determine a non-neighbor node set of each training node in the training graph structure based on a second adjacency matrix of the training graph structure;

[0249] determine a preset number of target non-neighbor nodes from the non-neighbor node set of each training node;

[0250] connect each training node and the respective target non-neighbor node to form a complementary graph structure of the training graph structure.

[0251] In some embodiments, the first loss function component includes a first regularization subterm and a second regularization subterm, and the third determining module 4434 is further configured to:

[0252] obtain a first hyperparameter and a second hyperparameter;

[0253] perform summation processing on a product of a first adjacency coefficient corresponding to an i-th row and a j-th column of the first adjacency matrix, a training vector of an i-th training node, and a transpose of a training vector of a j-th training node to obtain a first regularization subterm capable of representing a high-pass filter;

[0254] perform summation processing on a product of a second adjacency coefficient corresponding to an i-th row and a j-th column of the second adjacency matrix, a training vector of an i-th training node, and a transpose of a training vector of a j-th training node to obtain a second regularization subterm capable of representing a low-pass filter;

[0255] perform weighted summation on the first regularization subterm and the second regularization subterm using the first hyperparameter and the second hyperparameter to obtain the first loss function component.

[0256] In some embodiments, the first training module 4436 is further configured to:

[0257] perform prediction processing on the training representation vector of each training node using the graph neural network model to obtain prediction information of each training node;

[0258] determine a loss value based on the prediction information of each training node, the training label of each training node, and the joint loss function;

[0259] when it is determined according to the loss value that the joint loss function has not converged, adjust parameters of the graph neural network model based on the joint loss function until a trained graph neural network model is obtained.

[0260] In some embodiments, the apparatus further includes:

[0261] The third obtaining module is configured to obtain test data, wherein the test data comprises a test graph structure and label information of each test node in the test graph structure.

[0262] The second prediction module is configured to perform prediction processing on the test graph structure by using the trained graph neural network model to obtain prediction information of each test node in the test graph structure.

[0263] The fifth determination module is configured to determine an evaluation index value of the trained graph neural network model based on the prediction information of each test node and the corresponding label information.

[0264] The fourth obtaining module is configured to determine that the evaluation index value is less than a preset index threshold value, and obtain training data again.

[0265] The second training module is configured to continue training the trained graph neural network model by using the training data until an evaluation index value of the retrained graph neural network model reaches the index threshold value.

[0266] It should be noted that the description of the model training apparatus in the embodiments of the present application is similar to the description of the above method embodiments, and has similar beneficial effects to the method embodiments. For technical details not disclosed in the present apparatus embodiments, please refer to the description of the method embodiments of the present application for understanding.

[0267] In some embodiments, the graph data processing apparatus provided by the embodiments of the present application can be realized in a software manner, and can be software in the form of programs and plug-ins, etc., including the following software modules: the second obtaining module, the first prediction module, the first processing module and the result output module. These modules are logical, and therefore can be combined or further split according to the functions to be realized. The functions of each module are described below.

[0268] The second obtaining module is configured to obtain, in response to a received task processing request, graph structure data to be processed corresponding to the task processing request and a trained graph neural network model, wherein the trained graph neural network model is obtained by using the model training method provided by the embodiments of the present application.

[0269] The first prediction module is configured to perform prediction processing on the graph structure data by using the trained graph neural network model to obtain a representation vector of each node in the graph structure, wherein the representation vector can represent global features and local features of the node.

[0270] The first processing module is configured to perform task processing based on the representation vector of each node to obtain a processing result.

[0271] The result output module is configured to output the processing result.

[0272] In some embodiments, when the task processing request is a recommendation request, the first processing module is further configured to:

[0273] determine a target node based on the task processing request;

[0274] determine a matching score between the target node and other nodes in the graph structure data based on the representation vectors of the nodes;

[0275] determine, as matching objects of the target node, the other nodes having a matching score greater than a preset matching threshold with the target node;

[0276] determine the matching objects as the processing result.

[0277] In some embodiments, when the task processing request is a classification request, the first processing module is further configured to:

[0278] perform prediction processing on the representation vectors of the nodes by using the trained classifier to obtain a category probability vector of each node;

[0279] determine a classification result of each node based on the category probability vector of the node;

[0280] determine the classification result of each node as the processing result.

[0281] It should be noted that the description of the embodiments of the present application for the graph data processing apparatus is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the present apparatus embodiments, please refer to the description of the method embodiments of the present application for understanding.

[0282] The embodiments of the present application provide a computer program product or a computer program, which 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 the processor executes the computer instructions to enable the computer device to perform the model training method or the graph data processing method described above.

[0283] The embodiments of the present application provide a computer readable storage medium storing executable instructions, wherein the executable instructions are stored in the computer readable storage medium. When the executable instructions are executed by a processor, the processor will execute the model training method or the graph data processing method provided by the embodiments of the present application, for example, the model training method shown in Figure 3 , the graph data processing method shown in Figure 4 , and Figure 5 .

[0284] In some embodiments, the computer-readable storage media can be a memory such as a FRAM, ROM, PROM, EPROM, EEPROM, flash memory, a magnetic surface memory, an optical disk, or a CD-ROM, etc.; or various devices including one or any combination of the above memories.

[0285] In some embodiments, the executable instructions can be in the form of programs, software, software modules, scripts, or code, written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0286] By way of example, the executable instructions can or can not correspond to a file in a file system, can be stored in a part of a file that holds other programs or data, e.g., one or more scripts stored in a hypertext markup language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files, e.g., files that store one or more modules, sub programs, or code portions.

[0287] By way of example, the executable instructions can be deployed to be executed on one computer, or on multiple computers that are located at one site, or that are distributed across multiple sites and are interconnected by a communication network.

[0288] The above description is only some embodiments of the present application, and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement and improvement made within the spirit and scope of the present application shall be included in the protection scope of the present application.

Claims

1. A model training method, characterized in that, The method is applied to a recommended scene of a game prop, and the method comprises the following steps: obtaining a preset graph neural network model and training data, wherein the training data comprises training graph structure and label information of each training node in the training graph structure, the training node corresponds to a player or a prop, and an edge between the training nodes represents a relationship of use or purchase of the prop by the player; determining a training representation vector of each training node by using the graph neural network model, wherein when the training node corresponds to the player, the training representation vector is determined based on attribute information of the player; and when the training node corresponds to the prop, the training representation vector is determined based on attribute information of the prop; determining a complementary graph structure of the training graph structure and a first adjacency matrix of the complementary graph structure, and obtaining a second adjacency matrix of the training graph structure; determining a first loss function component based on the first adjacency matrix, the second adjacency matrix and the training representation vector of each training node; determining a joint loss function based on a second loss function component of the graph neural network model and the first loss function component; training the graph neural network model by using the joint loss function, the training representation vector of each training node and a training label of each training node, to obtain a trained graph neural network model, wherein the trained graph neural network model is used for processing a recommendation request of the prop.

2. The method of claim 1, wherein, The method further comprises the following steps: obtaining attribute information of each training node, and determining a feature vector of each training node based on the attribute information of each training node; encoding the feature vector of each training node and the second adjacency matrix by using the graph neural network model, to obtain the training representation vector of each training node.

3. The method of claim 1, wherein, The method further comprises the following steps: determining a non-neighbor node set of each training node based on the second adjacency matrix of the training graph structure; determining a preset number of target non-neighbor nodes from the non-neighbor node set of each training node; connecting each training node and the corresponding target non-neighbor node, to form the complementary graph structure of the training graph structure.

4. The method of claim 1, wherein, The first loss function component comprises a first regularization subitem and a second regularization subitem, and the first loss function component is determined based on the first adjacency matrix, the second adjacency matrix and the training representation vector of each training node, comprising the following steps: obtaining a first hyperparameter and a second hyperparameter; performing summation processing on a product of a first adjacency coefficient corresponding to an i-th row and a j-th column of the first adjacency matrix, a training vector of the i-th training node and a transpose of a training vector of the j-th training node, to obtain the first regularization subitem which can represent a high-pass filter; performing summation processing on a product of a second adjacency coefficient corresponding to the i-th row and the j-th column of the second adjacency matrix, the training vector of the i-th training node and the transpose of the training vector of the j-th training node, to obtain the second regularization subitem which can represent a low-pass filter; The first loss function component is obtained by performing a weighted sum on the first regular subterm and the second regular subterm using the first hyperparameter and the second hyperparameter.

5. The method as claimed in claim 1, wherein, The training of the graph neural network model based on the joint loss function, the training representation vectors of the training nodes and the training labels of the training nodes, to obtain a trained graph neural network model, comprises: The training representation vectors of the training nodes are predicted by using the graph neural network model to obtain prediction information of the training nodes; A loss value is determined based on the prediction information of the training nodes, the training labels of the training nodes and the joint loss function; When it is determined that the joint loss function has not converged according to the loss value, the parameters of the graph neural network model are adjusted based on the joint loss function until a trained graph neural network model is obtained.

6. The method according to any one of claims 1 to 5, characterized in that, The method further comprises: Obtaining test data, the test data comprising a test graph structure and label information of each test node in the test graph structure; The test graph structure is predicted by using the trained graph neural network model to obtain prediction information of each test node in the test graph structure; An evaluation index value of the trained graph neural network model is determined based on the prediction information of each test node and the corresponding label information; When the evaluation index value is determined to be less than a preset index threshold, the training data is obtained again; The trained graph neural network model is further trained using the training data until the evaluation index value of the retrained graph neural network model reaches the index threshold.

7. A graph data processing method, comprising: The method further comprises: In response to the received task processing request, the task processing request corresponding to the to-be-processed graph structure data and the trained graph neural network model are obtained, and the trained graph neural network model is obtained by using the model training method of any one of claims 1 to 6; The graph structure data is predicted by using the trained graph neural network model to obtain a representation vector of each node in the graph structure, and the representation vector can represent the global feature and the local feature of the node; Task processing is performed based on the representation vector of each node to obtain a processing result; The processing result is output.

8. The method of claim 7, wherein, When the task processing request is a recommendation request, the task processing based on the representation vector of each node to obtain a processing result comprises: A target node is determined based on the task processing request; A matching degree score between the target node and other nodes in the graph structure data is determined based on the representation vector of each node; Other nodes with a matching degree score greater than a preset matching threshold with the target node are determined as matching objects of the target node; The matching objects are determined as the processing result.

9. The method of claim 7, wherein, When the task processing request is a classification request, the task processing based on the representation vector of each node to obtain a processing result comprises: The representation vector of each node is predicted by using a trained classifier to obtain a category probability vector of each node; determine a classification result of each node based on the category probability vector of the node; determine the classification result of each node as the processing result.

10. An apparatus for training a graph neural network model, comprising: The device is applied to a recommended scene of a game prop, and the device comprises: a first obtaining module, configured to obtain a preset graph neural network model and training data, the training data comprising a training graph structure and label information of each training node in the training graph structure, wherein the training node corresponds to a player or a prop, and an edge between the training nodes represents a relationship of use or purchase of the prop by the player; a first determining module, configured to determine a training representation vector of each training node by using the graph neural network model, wherein when the training node corresponds to the player, the training representation vector is determined based on attribute information of the player; and when the training node corresponds to the prop, the training representation vector is determined based on attribute information of the prop; a second determining module, configured to determine a complementary graph structure of the training graph structure and a first adjacency matrix of the complementary graph structure, and obtain a second adjacency matrix of the training graph structure; a third determining module, configured to determine a first loss function component based on the first adjacency matrix, the second adjacency matrix and the training representation vector of each training node; a fourth determining module, configured to determine a joint loss function based on a second loss function component preset for the graph neural network model and the first loss function component; a first training module, configured to train the graph neural network model by using the joint loss function, the training representation vector of each training node and a training label of each training node, to obtain a trained graph neural network model, wherein the trained graph neural network model is used to process a recommendation request of the prop.

11. The apparatus of claim 10, wherein, The first determining module is specifically configured to: obtain attribute information of each training node, and determine a feature vector of each training node based on the attribute information of each training node; perform encoding processing on the feature vector of each training node and the second adjacency matrix by using the graph neural network model, to obtain the training representation vector of each training node.

12. The apparatus of claim 10, wherein, The second determining module is specifically configured to: determine a non-neighbor node set of each training node in the training graph structure based on the second adjacency matrix of the training graph structure; determine a preset number of target non-neighbor nodes from the non-neighbor node set of each training node; connect each training node and the respective target non-neighbor node, to form the complementary graph structure of the training graph structure.

13. A graph data processing apparatus, comprising: The device comprises: a second obtaining module, configured to obtain, in response to a received task processing request, to-be-processed graph structure data corresponding to the task processing request and a trained graph neural network model, the trained graph neural network model being obtained by training by using the model training method in any one of claims 1 to 6. The first prediction module is configured to perform prediction processing on the graph structure data by using the trained graph neural network model to obtain a representation vector of each node in the graph structure, the representation vector being capable of representing global features and local features of the node. The first processing module is configured to perform task processing based on the representation vector of each node to obtain a processing result. The result output module is configured to output the processing result.

14. A computer device, comprising: The computer device comprises: a memory configured to store executable instructions; a processor configured to execute the executable instructions stored in the memory to implement the training method of the graph neural network model according to any one of claims 1 to 6, or the graph data processing method according to any one of claims 7 to 9.

15. A computer-readable storage medium storing executable instructions, the instructions being executable by a processor to cause the processor to perform operations comprising: The executable instructions are executed by the processor to implement the training method of the graph neural network model according to any one of claims 1 to 6, or the graph data processing method according to any one of claims 7 to 9.

16. A computer program product comprising computer programs or instructions, characterized in that, The computer program or instructions are executed by the processor to implement the training method of the graph neural network model according to any one of claims 1 to 6, or the graph data processing method according to any one of claims 7 to 9.