Information recommendation method, device, electronic device and storage medium

By constructing a structure diagram of the pending account and using the trained graph neural network model, the problem of low efficiency in obtaining feature vectors for new users is solved, and efficient feature vector determination is achieved.

CN113761357BActive Publication Date: 2025-08-12TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110491575.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-06
Publication Date
2025-08-12
Estimated Expiration
2041-05-06

AI Technical Summary

Technical Problem

In the prior art, when a new user not included in the user relationship graph appears, it is necessary to retrain the graph embedded network model to obtain its feature vectors, resulting in inefficiency.

Method used

By constructing a structure diagram of the pending account, using the trained graph neural network model, based on the account association relationship in the training set, the feature vector of the new account is directly determined to avoid retraining the network model.

Benefits of technology

Improve the determination efficiency of new account feature vectors, and reduce the consumption of training time and computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113761357B_ABST
    Figure CN113761357B_ABST
Patent Text Reader

Abstract

The present application provides an information recommendation method, device, electronic device, and storage medium, relating to the field of Internet technology. Based on the associations between training accounts in a training set, the present application trains a graph neural network model to be trained. After obtaining the trained graph neural network model, the present application can directly determine the feature vectors of accounts to be processed that do not belong to the training set using the trained graph neural network model, without the need to retrain the network model to determine the feature vectors of the accounts to be processed. This can improve the efficiency of determining the feature vectors of new accounts.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an information recommendation method, device, electronic device, and storage medium. Background Art

[0002] With the development of Internet technology and the popularization of mobile devices, people can use applications installed on their mobile devices for online shopping, video watching, and other entertainment activities. Targeted recommendations of information that may be of interest to users, such as targeted advertising recommendations, have become a key focus for many online platforms.

[0003] When online platforms recommend information to users, they need to base their recommendations on the characteristics of each user. Therefore, they must first obtain each user's feature vector, also known as a user profile. Currently, graph embedding methods can be used to represent this information. Based on a user relationship graph, which represents the relationships between multiple users on an online platform, a graph embedding network model is trained to obtain each user's feature vector. However, when new users appear that are not included in the user relationship graph, the graph embedding network model must be retrained to obtain the new user's feature vector, which is very inefficient. Summary of the Invention

[0004] To solve the technical problems existing in the related art, the embodiments of the present application provide an information recommendation method, device, electronic device and storage medium, which can improve the efficiency of determining the feature vector of a new account.

[0005] In a first aspect, an embodiment of the present application provides an information recommendation method, comprising:

[0006] For accounts to be processed that are not in the training set and have a first-order neighbor relationship with at least one training account in the training set, a structure graph to be processed is constructed based on the association relationships between the training accounts in the training set and the association relationships between the accounts to be processed and the training accounts; a first-order neighbor relationship refers to a direct association relationship between two accounts;

[0007] Using a trained graph neural network model, based on the structure graph to be processed, to determine the feature vector of the account to be processed; the trained graph neural network model is obtained by training the graph neural network model to be trained based on the association relationship between the training accounts;

[0008] Recommend information to the account to be processed based on the feature vector of the account to be processed.

[0009] In a second aspect, an embodiment of the present application provides an information recommendation device, comprising:

[0010] a graph construction unit configured to construct a to-be-processed structure graph for an account to be processed that does not belong to the training set and has a first-order neighbor relationship with at least one training account in the training set, based on association relationships between the training accounts in the training set and association relationships between the account to be processed and the training accounts; the first-order neighbor relationship refers to a direct association relationship between two accounts;

[0011] a feature representation unit configured to determine a feature vector of the account to be processed based on the structure graph to be processed using a trained graph neural network model; the trained graph neural network model is obtained by training the graph neural network model to be trained based on the association relationship between the training accounts in the training set;

[0012] An information recommendation unit is configured to recommend information to the account to be processed based on the feature vector of the account to be processed.

[0013] In an optional embodiment, the graph neural network model includes a first-order graph neural network and a second-order graph neural network; the apparatus further includes a network training unit configured to:

[0014] Constructing an account relationship graph based on the association relationship between the training accounts in the training set;

[0015] Based on the account relationship graph, obtaining a first-order neighbor set and a second-order neighbor set for each training account in the training set, as well as a first-order feature vector and a second-order feature vector for each training account; the first-order feature vector is obtained based on the first-order neighbor set of the corresponding training account, and the first-order feature vector is obtained based on the first-order neighbor set and the second-order neighbor set of the corresponding training account;

[0016] Generate a first-order feature matrix based on the first-order feature vectors of all training accounts in the training set, and generate a second-order feature matrix based on the second-order feature vectors of all training accounts in the training set;

[0017] The graph neural network model to be trained is iteratively trained until the set convergence conditions are met to obtain a trained graph neural network model.

[0018] In an optional embodiment, the network training unit is specifically configured to:

[0019] In one iterative training process, the first-order feature matrix and the first-order neighbor set of the target training account extracted from the training set are input into the first-order graph neural network to be trained to obtain a first-order prediction vector of the target training account;

[0020] Inputting the second-order feature matrix and the first-order neighbor set and the second-order neighbor set of the target training account extracted from the training set into the second-order graph neural network to be trained, to obtain a second-order prediction vector of the target training account;

[0021] Determine a loss value based on the first-order prediction vector and the second-order prediction vector of the target training account, and the first-order feature vector and the second-order feature vector of the target training account;

[0022] According to the loss value, parameters of the first-order graph neural network to be trained and the second-order graph neural network to be trained are adjusted respectively.

[0023] In an optional embodiment, the network training unit is specifically configured to:

[0024] For each training account, perform the following operations respectively:

[0025] In the account relationship graph, obtaining a first-order associated account having a first-order neighbor relationship with one of the training accounts, and generating a first-order neighbor set of the training account based on the obtained first-order associated account;

[0026] In the account relationship graph, a second-order associated account having a second-order neighbor relationship with one of the training accounts is obtained, and a second-order neighbor set of the training account is generated based on the obtained second-order associated account; the second-order associated account does not have a first-order neighbor relationship with the training account, and the second-order associated account and the training account both have a first-order neighbor relationship with a third training account, and the third training account is one of the other training accounts in the training set except the two training accounts;

[0027] A first-order feature vector of the training account is obtained based on each first-order associated account in the first-order neighbor set of the training account, and a second-order feature vector of the training account is obtained based on each second-order associated account in the second-order neighbor set of the training account.

[0028] In an optional embodiment, the network training unit is specifically configured to:

[0029] Determining a first-order divergence loss value based on a probability distribution corresponding to a first-order prediction vector and a probability distribution corresponding to a first-order feature vector of the target training account;

[0030] Determining a second-order divergence loss value based on the probability distribution corresponding to the second-order prediction vector and the probability distribution corresponding to the second-order feature vector of the target training account;

[0031] The loss value is determined according to a weighted sum of the first-order divergence loss value and the second-order divergence loss value.

[0032] In an optional embodiment, the network training unit is specifically configured to:

[0033] Determining a first-order similarity loss value based on the first-order prediction vector of the target training account and the first-order feature vectors of each first-order associated account of the target training account;

[0034] Obtaining prediction feature vectors of each first-order associated account and each second-order associated account of the target training account respectively;

[0035] Determining a second-order similarity loss value based on the second-order prediction vector of the target training account and the prediction feature vectors of each first-order associated account and each second-order associated account of the target training account;

[0036] The loss value is determined according to the first-order divergence loss value, the second-order divergence loss value, and a weighted sum of the first-order similarity loss value and the second-order similarity loss value.

[0037] In an optional embodiment, the network training unit is specifically configured to:

[0038] Inputting the first-order feature vectors of each first-order associated account into the auxiliary training graph neural network to obtain the predicted feature vectors of each first-order associated account;

[0039] The second-order feature vectors of each first-order associated account and the second-order feature vectors of each second-order associated account are respectively input into the auxiliary training graph neural network to obtain the predicted feature vectors of each second-order associated account.

[0040] In an optional embodiment, the feature representation unit is specifically configured to:

[0041] Based on the structure graph to be processed, obtaining a first-order neighbor set and a second-order neighbor set of the account to be processed;

[0042] Based on the first-order feature matrix and the first-order neighbor set of the account to be processed, obtaining a first-order feature vector of the account to be processed through a trained first-order graph neural network;

[0043] Based on the second-order feature matrix and the first-order neighbor set and the second-order neighbor set of the account to be processed, a second-order feature vector of the account to be processed is obtained through a trained second-order graph neural network;

[0044] The first-order feature vector and the second-order feature vector of the account to be processed are concatenated to obtain the feature vector of the account to be processed.

[0045] In an optional embodiment, the graph construction unit is further configured to: for a new account that has a first-order neighbor relationship with the account to be processed and does not belong to the training set, construct a new structure graph based on the association relationship between the new account and each account in the structure graph to be processed and the structure graph to be processed;

[0046] The feature representation unit is further used to: use a trained graph neural network model to determine the feature vector of the new account based on the new structure graph.

[0047] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the information recommendation method of the first aspect is implemented.

[0048] In a fourth aspect, an embodiment of the present application further provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the computer program is executed by the processor, the processor implements the information recommendation method of the first aspect.

[0049] The information recommendation method, device, storage medium and electronic device provided in the embodiments of the present application train the graph neural network model to be trained based on the association relationship between the training accounts in the training set. After obtaining the trained graph neural network model, for the accounts to be processed that do not belong to the training set, the feature vectors of the accounts to be processed can be directly determined through the trained graph neural network model without retraining the network model to determine the feature vectors of the accounts to be processed, thereby improving the efficiency of determining the feature vectors of new accounts. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0051] Figure 1 An application scenario diagram of an information recommendation method provided in an embodiment of the present application;

[0052] Figure 2 A flowchart of a training process for a graph neural network model provided in an embodiment of the present application;

[0053] Figure 3 A schematic diagram of an account relationship diagram corresponding to a training set provided in an embodiment of the present application;

[0054] Figure 4 A schematic diagram of a first-order neighbor set and a second-order neighbor set of a training account provided in an embodiment of the present application;

[0055] Figure 5 A schematic diagram of the training process of a graph neural network model provided in an embodiment of the present application;

[0056] Figure 6 A schematic diagram of the training process of another graph neural network model provided in an embodiment of the present application;

[0057] Figure 7 A flowchart of an information recommendation method provided in an embodiment of the present application;

[0058] Figure 8 A flowchart of a method for determining a characteristic vector of an account provided in an embodiment of the present application;

[0059] Figure 9 A schematic diagram of the training process of another graph neural network model provided in an embodiment of the present application;

[0060] Figure 10 A schematic diagram of a process for determining a characteristic vector of an account provided in an embodiment of the present application;

[0061] Figure 11 A schematic diagram of the structure of an information recommendation device provided in an embodiment of the present application;

[0062] Figure 12 A schematic diagram of the structure of another information recommendation device provided in an embodiment of the present application;

[0063] Figure 13 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0064] Figure 14 A schematic structural diagram of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0065] To make the objectives, technical solutions, and advantages of this application more clear, this application will be further described in detail below with reference to the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.

[0066] It should be noted that the terms "including" and "having" and their variations involved in the documents of this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products or devices.

[0067] The following explains some of the terms used in the embodiments of the present application to facilitate understanding by those skilled in the art.

[0068] (1) Self-supervised learning: An unsupervised learning method with supervised characteristics, a special network model training method. This method does not use manually annotated labeled data as the target for supervised learning, but uses the information contained in the sample itself as the target for supervised learning.

[0069] (2) Node representation: Nodes in a graph structure are represented by vectors using graph embedding and graph neural network techniques. In the embodiment of the present application, the graph structure can be an account relationship graph corresponding to a training set, or a structure graph to be processed that includes accounts to be processed.

[0070] (3) Graph embedding: A technique that maps nodes in a graph structure into vector representations and retains network topology information and node information.

[0071] (4) Graph neural network: A neural network that can process data input in non-Euclidean spaces such as graph structures.

[0072] (5) Graph structure: It can also be called network structure, which includes node set V and edge set E. u∈V and v∈V.

[0073] The word “exemplary” is used hereinafter to mean “serving as an example, example, or illustration.” Any embodiment described as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0074] The terms "first" and "second" are used for descriptive purposes only and should not be construed as explicitly or implicitly indicating relative importance or the number of the technical features indicated. Therefore, features specified as "first" or "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.

[0075] The embodiments of the present application relate to blockchain technology, which is a new application model of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain is essentially a decentralized database, a string of blocks generated by cryptographic methods. Each block records the account information of a batch of users, which is used to verify the validity of their test data (anti-counterfeiting) and generate the next block. Each block in the blockchain includes the hash value of the account information stored in this block (the hash value of this block) and the hash value of the previous block. Each block is connected by the hash value to form a blockchain. In addition, each block in the blockchain can also include information such as the timestamp when the block was generated.

[0076] In an embodiment of the present application, the account information of registered users on the network platform and the association relationship information between each account can be saved in real time on the blockchain. The information recommendation device can obtain the association relationship information between each account from the blockchain and generate an account relationship diagram based on the obtained association relationship information.

[0077] The embodiments of the present application also involve artificial intelligence (AI) and machine learning (ML) technologies. Artificial intelligence is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making. Artificial intelligence technology mainly includes several major directions such as computer vision technology, speech processing technology, and machine learning / deep learning.

[0078] With the research and progress of artificial intelligence technology, artificial intelligence has been studied and applied in many fields, such as common smart homes, image retrieval, video surveillance, video detection, smart speakers, smart marketing, information recommendation, unmanned driving, automatic driving, drones, robots, smart medical care, etc. It is believed that with the development of technology, artificial intelligence will be applied in more fields and play an increasingly important role.

[0079] Machine learning is a multi-disciplinary interdisciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithmic complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their own performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning generally include artificial neural networks, belief networks, graph neural networks, reinforcement learning, transfer learning, inductive learning and other technologies. The embodiments of the present application use graph embedding network models and graph neural network models based on machine learning or deep learning to perform feature vector representation of accounts in the training set or accounts outside the training set.

[0080] In related technologies, before recommending information to a user's corresponding account, a graph embedding network model is typically trained based on an acquired account relationship graph to obtain feature vectors for each account. However, when new accounts that are not included in the account relationship graph appear, the graph embedding network model must be retrained to obtain feature vectors for the new accounts, which is very inefficient. Therefore, embodiments of the present application provide an information recommendation method, apparatus, storage medium, and electronic device.

[0081] For example, the information recommendation method provided in the embodiment of the present application can be applied to Figure 1 In an application scenario shown in FIG. Figure 1 As shown, the server 100 is communicatively connected to the terminal device 300 via the network 200. The network 200 may be, but is not limited to, a local area network, a metropolitan area network, or a wide area network, and the number of terminal devices 300 connected to the server 100 may be multiple. The terminal device 300 can transmit communication data and messages to and from the server 100 via the network 200.

[0082] The terminal device 300 can be a portable device (e.g., a mobile phone, tablet computer, laptop computer, etc.), or an electronic device such as a computer, smart screen, or personal computer (PC). The terminal device 300 can be installed with various clients, including social application clients, resource interaction clients, game clients, etc., and can display various operation interfaces and various objects in the operation interfaces provided by the installed clients.

[0083] The client is software installed on the terminal device 300, for example, an APP installed on a mobile terminal such as a mobile phone, and is a software resource in the terminal device 300. For example, the terminal device 300 can download the installation package of the client through the network and use the installation package to install the client. After the installation is complete, the client can be run on the terminal device 300.

[0084] The server 100 may be a server corresponding to a network platform that provides services to the client. The server 100 may be a server or a server cluster or distributed system composed of several servers, or a virtualization platform, or a personal computer, a large or medium-sized computer or a computer cluster, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. According to implementation needs, the application scenario in the embodiment of the present application may have any number of terminal devices and servers. The embodiment of the present application does not specifically limit this.

[0085] For example, a social application client is installed on the terminal device 300. A user can register an account on a social networking platform through the social application client. The user can use the registered account to log in to the social networking platform, add other accounts registered on the social networking platform as friends, or be added as friends by other accounts, so as to chat or share information with friends.

[0086] Among them, registered user account information and the relationship information between accounts, such as friend relationship information, can be stored using cloud storage technology. Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as a storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (storage devices are also called storage nodes) in the network through application software or application interfaces to work together to provide external data storage and business access functions.

[0087] In one possible application scenario, to reduce communication latency, servers 100 can be deployed in various regions. Alternatively, for load balancing, different servers 100 can serve the regions corresponding to different terminal devices 300. Multiple servers 100 can share data through blockchain, and multiple servers 100 are equivalent to a data sharing system composed of multiple servers 100. For example, a terminal device 300 located at location a communicates with server 100, while a terminal device 300 located at location b communicates with other servers 100.

[0088] Each server 100 in the data sharing system has a node identifier corresponding to the server 100. Each server 100 in the data sharing system can store the node identifiers of other servers 100 in the data sharing system so that the generated blocks can be broadcast to other servers 100 in the data sharing system based on the node identifiers of other servers 100. Each server 100 can maintain a node identifier list as shown in the following table, and store the server 100 name and node identifier in the node identifier list. The node identifier can be an IP (Internet Protocol, a protocol for interconnecting networks) address or any other information that can be used to identify the node. Table 1 only uses the IP address as an example for illustration.

[0089] Table 1

[0090] Server Name Node ID Node 1 119.115.151.174 Node 2 118.116.189.145 … … Node N 119.124.789.258

[0091] The information recommendation device obtains the association relationship information between each account from the nodes of the above-mentioned blockchain, organizes the obtained accounts into a training set, and generates an account relationship graph corresponding to the training set based on the association relationship between each training account in the training set. Based on the obtained account relationship graph, the graph neural network model to be trained is trained to obtain a trained graph neural network model. After obtaining the trained graph neural network model, for accounts to be processed that do not belong to the training set, the feature vector of the account to be processed can be directly determined using the trained graph neural network model, without the need to retrain the network model to determine the feature vector of the account to be processed, thereby improving the efficiency of determining the feature vector of the new account.

[0092] To further illustrate the technical solutions provided by the embodiments of the present application, this is described in detail below with reference to the accompanying drawings and specific implementation methods. Although the embodiments of the present application provide method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiments of the present application. During the actual processing process or when the device is executed, the method may be executed in the order of the methods shown in the embodiments or drawings or in parallel.

[0093] In one embodiment, the information recommendation method provided in the embodiments of the present application can be performed by an information recommendation device. This information recommendation device can be a server, for example, a server for performing information recommendation, or a server of the aforementioned social platform; it can also be another electronic device with sufficient computing power that can be used for information recommendation. The following embodiments illustrate the information recommendation method using a server as an example.

[0094] This embodiment of the present application proposes a graph neural network model that uses a trained graph neural network model to determine the feature vectors of pending accounts and, based on the feature vectors of pending accounts, recommends information to the pending accounts. To facilitate understanding of this embodiment of the present application, the following describes the training process of the graph neural network model provided in this embodiment of the present application.

[0095] Figure 2 The flowchart of the training process of a graph neural network model provided by the embodiment of the present application is shown. The graph neural network model includes a first-order graph neural network and a second-order graph neural network. Figure 2 As shown, the training process may include the following steps:

[0096] Step S201, obtaining the account relationship diagram corresponding to the training set.

[0097] For example, user account data from a social platform can be obtained as the basis for generating an account relationship graph corresponding to a training set. If the account data contains too many accounts, the resulting account relationship graph may be too large. Due to the limited computing power of the device hardware, it may not be fully loaded and used to train the network model. Therefore, a portion of accounts can be randomly selected from the account data and used as training accounts to form a training set. The associations between the training accounts in the training set can then be obtained from the account data, and the account relationship graph can be constructed based on the associations between the training accounts.

[0098] Specifically, each training account is taken as a node, and edges for connecting different nodes are generated based on the association relationship between each training account. Assume that the training set is V1, and there is a friend relationship between the training account u and the training account v in the training set V1, that is, there is a direct association relationship. Correspondingly, there is a direct association relationship between node u and node v in the account relationship graph, and an edge connecting the two nodes u and node v is set. Referring to the above method, all nodes with direct association relationships are connected through edges to obtain an account relationship graph. All nodes in the account relationship graph constitute a node set, that is, set V1, and all edges in the account relationship graph constitute an edge set E1, which can be expressed as u∈V1 and v∈V1. Figure 3 A schematic diagram of an account relationship diagram is shown. In actual application, the account relationship diagram obtained may be Figure 3 The account relationship diagram shown is more complex.

[0099] Step S202: Based on the obtained account relationship graph, obtain the first-order neighbor set and the second-order neighbor set of each training account in the training set, as well as the first-order feature vector and the second-order feature vector of each training account.

[0100] The first-order neighbor set of a training account includes all training accounts with which it has a first-order neighbor relationship, and the second-order neighbor set of a training account includes all training accounts with which it has a second-order neighbor relationship. A first-order neighbor relationship refers to a direct relationship between two training accounts, while a second-order neighbor relationship refers to a relationship where two training accounts do not have a direct relationship but both have a direct relationship with a third training account. First-order feature vectors are derived based on the first-order neighbor set of a training account, while second-order feature vectors are derived based on both the first-order and second-order neighbor sets of a training account.

[0101] For example, Figure 4 As shown, for node u in the account relationship graph, there is a direct association relationship between node u and node v1 and node v2 in the account relationship graph, that is, training account u is a first-order neighbor relationship with training account v1 and training account v2, then the first-order neighbor set of training account u is Including training account v1 and training account v1. There is no direct association between node u and node t1, but both node u and node t1 have a direct association with the third node, node v1. Therefore, there is a second-order neighbor relationship between training account u and training account t1. Similarly, the training accounts that have a second-order neighbor relationship with training account u also include training account t2, training account t3 and training account t4. Then the second-order neighbor set of training account u is Including training account t1, training account t2, training account t3 and training account t4.

[0102] Specifically, taking the training account u in the training set as an example, the process of obtaining the first-order feature vector and the second-order feature vector of the training account is described. The process includes the following steps:

[0103] Step 1: In the account relationship graph, obtain the first-order associated accounts that have a first-order neighbor relationship with the training account u, and generate the first-order neighbor set of the training account u based on the obtained first-order associated accounts.

[0104] For example, in Figure 4 In , the first-order associated accounts of training account u include training account v1 and training account v1, then the first-order neighbor set of training account u includes training account v1 and training account v2.

[0105] Step 2: In the account relationship graph, obtain the second-order associated accounts that have a second-order neighbor relationship with the training account u, and generate the second-order neighbor set of the training account u based on the obtained second-order associated accounts.

[0106] Among them, the second-order associated account does not have a first-order neighbor relationship with the training account u, but the second-order associated account and the training account u both have a first-order neighbor relationship with the third training account, and the third training account is one of the other training accounts in the training set except the above two training accounts.

[0107] For example, in Figure 4 , the second-order associated accounts of training account u are training account t1, training account t2, training account t3 and training account t4, then the second-order neighbor set of training account u includes training account t1, training account t2, training account t3 and training account t4.

[0108] Step 3: Based on the first-order associated accounts in the first-order neighbor set of training account u, obtain the first-order feature vector of training account u And based on each first-order associated account in the first-order neighbor set of training account u and each second-order associated account in the second-order neighbor set, obtain the second-order feature vector of training account u

[0109] For example, the first-order neighbor set and second-order neighbor set of the training account u, or the association relationship graph consisting of the training account u and its corresponding first-order associated accounts and second-order associated accounts, can be input into a trained graph embedding network model, and the first-order feature vector and second-order feature vector of the training account u can be obtained based on the graph embedding network model. The graph embedding network model can adopt the LINE (Large-scale Information Network Embedding) model. The LINE model can map the nodes in the graph structure into a vector space based on the density of their association relationships, projecting them to similar positions, thereby obtaining a vector representation.

[0110] For each training account in the training set, the above steps can be performed separately to obtain the first-order feature vector and second-order feature vector of each training account.

[0111] Step S203: Generate a first-order feature matrix based on the first-order feature vectors of all training accounts in the training set, and generate a second-order feature matrix based on the second-order feature vectors of all training accounts in the training set.

[0112] For example, assuming that the training set includes M training accounts, and the first-order feature vector and second-order feature vector of each training account are both N-dimensional vectors, then the first-order feature matrix generated based on the first-order feature vectors of all training accounts in the training set is an M*N matrix, and the second-order feature matrix generated based on the second-order feature vectors of all training accounts in the training set is also an M*N matrix.

[0113] Step S204: extract target training accounts from the training set.

[0114] One or more target training accounts are randomly selected from the training accounts included in the training set to train the first-order graph neural network and the second-order graph neural network in the graph neural network model.

[0115] In step S205 , the first-order feature matrix and the first-order neighbor set of the target training account are input into the first-order graph neural network to be trained to obtain the first-order prediction vector of the target training account.

[0116] In step S206 , the second-order feature matrix, and the first-order neighbor set and second-order neighbor set of the target training account are input into the second-order graph neural network to be trained to obtain the second-order prediction vector of the target training account.

[0117] Step S207 : determining a loss value based on the first-order prediction vector and the second-order prediction vector of the target training account, and the first-order feature vector and the second-order feature vector of the target training account.

[0118] Take the target training account as training account u as an example. Figure 5 As shown, in the above step S202, the first-order feature vector of the training account u is obtained and the second-order eigenvector The first-order feature vector and the second-order feature vector of the training account u are concatenated as the graph embedding feature vector of the training account u, which is expressed as The first-order neighbor set of the target training account u and the first-order characteristic matrix H 1 Input the first-order graph neural network f to be trained 1 , get the first-order prediction vector of the target training account u Among them, the first-order characteristic matrix H 1 It is generated based on the first-order feature vectors of all training accounts in the training set. The second-order neighbor set of the target training account u and the second-order characteristic matrix H 2 Input the first-order graph neural network f to be trained 2 , get the second-order prediction vector of the target training account u Among them, the second-order characteristic matrix H 2 It is generated based on the second-order feature vectors of all training accounts in the training set.

[0119]

[0120]

[0121] The above formula indicates that the first-order prediction vector of the target training account u is is the first-order graph neural network f to be trained 1 The output of the target training account u is the second-order prediction vector is the second-order graph neural network f to be trained 2 Output.

[0122] In some embodiments, when training a graph neural network model, the first-order divergence loss value can be determined based on the probability distribution corresponding to the first-order prediction vector of the target training account and the probability distribution corresponding to the first-order eigenvector; the second-order divergence loss value can be determined based on the probability distribution corresponding to the second-order prediction vector of the target training account and the probability distribution corresponding to the second-order eigenvector; and the loss value can be determined based on the weighted sum of the first-order divergence loss value and the second-order divergence loss value.

[0123] The prediction vector and feature vector are converted into probability distribution using the softmax function. The loss function is the KL (Kullback-Leibler, divergence) value, which can be expressed as:

[0124]

[0125]

[0126] Among them, O1 is the first-order divergence loss value, O2 is the second-order divergence loss value, and D KL Represents a loss function that determines the loss value based on the difference between the probability distribution corresponding to the prediction vector and the probability distribution corresponding to the feature vector.

[0127] In one embodiment, the loss value J(G)=O1+O2. That is, the weights corresponding to the first-order divergence loss value and the second-order divergence loss value are the same and can both be regarded as 1.

[0128] In other embodiments, in order to further improve the accuracy of feature representation of the graph neural network model, it is expected that the feature vector representation predicted by the graph neural network model can still maintain the first-order and second-order similarities. When training the graph neural network model, in addition to using the first-order divergence loss value and the second-order divergence loss value, the first-order similarity loss value and the second-order similarity loss value are also introduced.

[0129] Let’s take the target training account as training account u as an example. Figure 6 As shown, the first-order feature vector of the training account u is obtained and the second-order eigenvector The first-order neighbor set of the target training account u and the first-order characteristic matrix H 1 Input the first-order graph neural network f to be trained 1, get the first-order prediction vector of the target training account u The first-order neighbor set of the target training account u The second-order neighbor set of the target training account u and the second-order characteristic matrix H 2 Input the first-order graph neural network f to be trained 2 , get the second-order prediction vector of the target training account u

[0130] Get each first-order associated account of the target training account u respectively and each second-order associated account t Specifically, the first-order feature vectors of each first-order associated account v of the target training account u can be respectively Input auxiliary training graph neural network f c , get the predicted feature vector of each first-order associated account v The second-order feature vectors of each first-order associated account v of the target training account u are and the second-order eigenvector of each second-order associated account t Input auxiliary training graph neural network f c , get the predicted feature vector of each second-order associated account t Among them, auxiliary training graph neural network f c With the first-order graph neural network f 1 and a first-order graph neural network f 2 They can have the same network structure, but only the network parameters are different.

[0131] The first-order prediction vector of the target training account u And the first-order feature vectors of each first-order associated account v of the target training account u Determine the first-order similarity loss value. For example, for the first-order similarity between the target training account u and each first-order associated account v, set the joint probability p1(u,v) between the nodes to be:

[0132]

[0133] Then the first-order similarity loss value O3 can be expressed as:

[0134]

[0135] The second-order prediction vector of target training account u And the predicted feature vectors of each first-order associated account v of the target training account and the predicted feature vector of each second-order associated account t Determine the second-order similarity loss value.

[0136] For example, given a node u, the conditional probability p2(v|u) of generating a context node v is:

[0137]

[0138] Among them, the context of node v is represented by By auxiliary training graph neural network f c Generate. From this, we can get the second-order similarity loss value O4:

[0139]

[0140] In order to reduce computational complexity, the embodiment of the present application adopts a contrastive learning method to determine the second-order similarity loss value based on the second-order similarity of the first-order associated accounts and the second-order similarity of the second-order associated accounts, that is:

[0141]

[0142] Where E is the expectation and σ is the sigmoid function.

[0143] When calculating O4, you can also use a random negative sample set to replace the second-order neighbor set of the target training account

[0144] After obtaining the first-order similarity loss value and the second-order similarity loss value, the total loss value is determined according to the weighted sum of the first-order divergence loss value, the second-order divergence loss value, the first-order similarity loss value, and the second-order similarity loss value.

[0145] In one embodiment, the total loss value J(G) = O1 + O2 + O3 + O4. That is, the weights corresponding to the first-order divergence loss value, the second-order divergence loss value, the first-order similarity loss value, and the second-order similarity loss value are the same and can all be regarded as 1.

[0146] Step S208, determine whether the set convergence condition is met; if yes, execute step S210; if not, execute step S209.

[0147] In one embodiment, it can be determined whether the loss value is within a set range. If it is within the set range, it means that the graph neural network model has converged, that is, the set convergence conditions have been met, and the graph neural network model has been trained; if it is not within the set range, it means that the set convergence conditions are not met, and the graph neural network model has not been trained.

[0148] Step S209 : Adjust the parameters of the first-order graph neural network to be trained and the second-order graph neural network to be trained respectively according to the loss value.

[0149] If the set convergence condition is not met, the parameters of the first-order graph neural network to be trained and the second-order graph neural network to be trained are adjusted according to the loss value, and then the process returns to step S204.

[0150] Step S210 : Using the first-order graph neural network and the second-order graph neural network with current parameters as the trained first-order graph neural network and the second-order graph neural network.

[0151] The graph neural network model trained by the above method can be used to represent the feature vector of the data outside the training set to be processed. Based on this, the embodiment of the present application provides an information recommendation method, such as Figure 7 As shown, the method includes the following steps:

[0152] Step S701: For an account to be processed that does not belong to the training set and has a first-order neighbor relationship with at least one training account in the training set, a structure graph to be processed is constructed based on the association relationships between the training accounts in the training set and the association relationships between the account to be processed and the training accounts in the training set.

[0153] For accounts on the social networking platform that do not yet have feature vectors, if the account to be processed has a first-order neighbor relationship with any one or more training accounts in the training set, that is, there is a direct correlation between the two, such as a friend relationship, then the graph neural network model obtained by the above training can be used to determine the feature vector of the account to be processed.

[0154] First, we need to construct a graph structure containing the accounts to be processed. Specifically, we determine the relationships between the accounts to be processed and each training account in the training set. Based on the account relationship graph corresponding to the training set, we add nodes corresponding to the accounts to be processed. Based on the relationships between the accounts to be processed and each training account in the training set, we establish edges between the nodes corresponding to the accounts to be processed and other nodes, thereby obtaining a graph of the structure to be processed. The account relationship graph represents the relationships between the training accounts in the training set.

[0155] Step S702: Using the trained graph neural network model, based on the structure graph to be processed, determine the feature vector of the account to be processed.

[0156] The trained graph neural network model is obtained by training the to-be-trained graph neural network model based on the associations between the training accounts in the training set; in other words, the to-be-trained graph neural network model is trained based on the account relationship graph corresponding to the training set. The specific training process has been described in detail above. Based on the structure graph to be processed, the first-order neighbor set and second-order neighbor set of the to-be-processed account are obtained. The specific process for obtaining the first-order neighbor set and second-order neighbor set of the to-be-processed account can be found in the process for determining the first-order neighbor set and second-order neighbor set of the training account u above and will not be repeated here. The first-order feature matrix corresponding to the training set and the first-order neighbor set of the to-be-processed account are input into the trained first-order graph neural network to obtain the first-order feature vector of the to-be-processed account output by the first-order graph neural network. The second-order feature matrix corresponding to the training set and the first-order neighbor set and second-order neighbor set of the to-be-processed account are input into the trained second-order graph neural network to obtain the second-order feature vector of the to-be-processed account. The first-order and second-order feature vectors of the to-be-processed account are concatenated to obtain the feature vector of the to-be-processed account.

[0157] Step S703: recommend information to the account to be processed based on the feature vector of the account to be processed.

[0158] The information recommendation method provided in the embodiment of the present application, after obtaining the trained graph neural network model, can directly determine the feature vector of the account to be processed that does not belong to the training set through the trained graph neural network model, without the need to retrain the network model to determine the feature vector of the account to be processed, thereby improving the efficiency of determining the feature vector of the new account.

[0159] In some embodiments, the above-mentioned information recommendation method may further include: using a trained graph neural network model to determine the characteristic vector of the account to be processed based on the structure graph to be processed, and then, for new accounts that have a first-order neighbor relationship with the account to be processed and do not belong to the training set, the trained graph neural network model may also be used to determine the characteristic vector of the new account based on the association relationship between the new account and each account in the structure graph to be processed.

[0160] Specifically, for new accounts that have a first-order neighbor relationship with the account to be processed and are not part of the training set, a new structure graph can be constructed based on the associations between the new account and each account in the structure graph to be processed and the structure graph to be processed. Using the trained graph neural network model, a feature vector for the new account is determined based on the new structure graph, and information is recommended to the new account based on the feature vector.

[0161] The embodiment of the present application only requires training a graph neural network model, without manually labeling sample labels. It can learn and predict the node representations of out-of-sample nodes outside the training set and in-sample nodes in the training set in a self-supervised manner based on the first-order neighbor information and second-order neighbor information, thus getting rid of the trouble of re-training a new graph embedding model from scratch and greatly improving efficiency.

[0162] In some embodiments, if it is necessary to determine whether there are multiple accounts to be processed by the feature vector, the Figure 8 For example, if the account data of a user is obtained from a social platform and the number of accounts in the account data is too large, a portion of the accounts can be randomly selected from the account data to form a training set. Figure 2 The training method shown above can be used to train the graph neural network model. The remaining accounts, that is, accounts outside the training set, can be used as pending accounts to form a pending account set. Figure 8 The method shown in the figure infers the feature vector of the account to be processed, which specifically includes the following steps:

[0163] Step S801: extract a target account from the set of accounts to be processed.

[0164] Step S802, determine whether the target account exists in the training set; if yes, execute step S807; if not, execute step S803.

[0165] This training set is used to train the graph neural network model.

[0166] Step S803, determine whether the target account has a first-order associated account included in the training set; if so, execute step S804; if not, return to execute step S801.

[0167] Step S804: remove the target account from the set of accounts to be processed, and add the target account to the training set. Based on the association relationship between the accounts in the new training set, a new account relationship graph is constructed.

[0168] Step S805: Use the trained graph neural network model to determine the feature vector of the target account based on the new account relationship graph.

[0169] Step S806, determine whether the pending account set is empty; if so, end; if not, return to step S801.

[0170] If the pending account set is empty, determine to obtain the feature vectors of all accounts in the pending account set and end the entire process. Otherwise, return to step S801 and proceed to the next round of feature vector representation process.

[0171] Step S807: query the feature vector set corresponding to the training set to obtain the feature vector of the target account.

[0172] If the target account exists in the training set, the feature vector of the target account can be found from the feature vector set corresponding to the training set.

[0173] Based on the above process, if the account data contains too many accounts, for an account set with a large amount of account data, some of the accounts can be selected first, and the selected accounts can be used as training accounts to form a training set. The training set is used to train the graph neural network model to be trained, and the feature vector representation of each training account in the training set is obtained. After obtaining the trained graph neural network model, the feature vector representation of each training account in the training set is obtained. Figure 8 The method shown in the figure gradually obtains the feature vectors of each account that does not belong to the training set, which can solve the problem of being unable to load training due to the large training account set network.

[0174] The information recommendation method provided in the embodiments of the present application eliminates the need for manual labeling of training data when training a graph neural network model. Instead, a self-supervised training method is employed to train an inductive graph neural network model based on the node and edge sets corresponding to the account relationship graph. After obtaining the trained graph neural network model, the feature vectors of pending accounts that do not belong to the training set can be directly determined using the trained graph neural network model, thereby gradually expanding the existing node representation.

[0175] In some embodiments, the training process of the above-mentioned graph neural network model can be carried out using Figure 9 The schematic diagram shown is represented. Figure 9 The dots in the diagram represent the nodes in the account relationship graph corresponding to the training set, that is, the nodes corresponding to the accounts in the training set. The edges in the account relationship graph represent the first-order neighbor relationship between the two training accounts connected by the edge. The LINE model can be used to determine the feature vectors of each node. Based on the account relationship graph corresponding to the training set, the auxiliary training graph neural network f is used. c , for the first-order graph neural network f 1 and the second-order graph neural network f 2 During the training process, according to the first-order graph neural network f 1 , second-order graph neural network f 2 and auxiliary training graph neural network f c The output of , and the output of the LINE model, determine the loss value of the loss function.

[0176] The process of determining the feature vector of the account to be processed can be done by Figure 10 The schematic diagram shown is represented. Figure 10The dots in the figure represent the nodes corresponding to the accounts in the training set, and the triangles represent the nodes corresponding to the accounts outside the training set, that is, the nodes corresponding to the accounts to be processed that do not belong to the training set. Based on the accounts to be processed and the accounts in the training set, the structure diagram to be processed is constructed using the trained first-order graph neural network f 1 and the second-order graph neural network f 2 , the feature vector of the account to be processed can be determined.

[0177] and Figure 7 The information recommendation method illustrated is based on the same inventive concept. In an embodiment of the present application, an information recommendation device is also provided. This device can be deployed in a server or other electronic device. Since this device corresponds to the information recommendation method of the present application and solves a problem based on similar principles, the implementation of this device can be referenced to the implementation of the aforementioned method, and any repetitions will not be repeated here.

[0178] Figure 11 A schematic diagram of the structure of an information recommendation device provided in an embodiment of the present application is shown in FIG. Figure 11 As shown, the information recommendation device includes a graph construction unit 1101 , a feature representation unit 1102 and an information recommendation unit 1103 .

[0179] A graph construction unit 1101 is configured to construct a structure graph for processing, for an account to be processed that does not belong to the training set and has a first-order neighbor relationship with at least one training account in the training set, based on the association relationships between the training accounts in the training set and the association relationships between the account to be processed and the training accounts in the training set; a first-order neighbor relationship refers to a direct association relationship between two accounts;

[0180] Feature representation unit 1102 is configured to determine a feature vector of an account to be processed based on the structure graph to be processed using a trained graph neural network model; the trained graph neural network model is obtained by training the graph neural network model to be trained based on the associations between training accounts in the training set;

[0181] The information recommendation unit 1103 is configured to recommend information to the account to be processed based on the feature vector of the account to be processed.

[0182] In an optional embodiment, the graph neural network model includes a first-order graph neural network and a second-order graph neural network. Figure 12 As shown, the above-mentioned information recommendation device may further include a network training unit 1201, which is used to:

[0183] Based on the association between each training account in the training set, an account relationship graph is constructed;

[0184] Based on the account relationship graph, obtain the first-order neighbor set and second-order neighbor set of each training account in the training set, as well as the first-order feature vector and second-order feature vector of each training account; the first-order feature vector is obtained based on the first-order neighbor set of the corresponding training account, and the first-order feature vector is obtained based on the second-order neighbor set of the corresponding training account;

[0185] Generate a first-order feature matrix based on the first-order feature vectors of all training accounts in the training set, and generate a second-order feature matrix based on the second-order feature vectors of all training accounts in the training set;

[0186] The graph neural network model to be trained is iteratively trained until the set convergence conditions are met to obtain a trained graph neural network model.

[0187] In an optional embodiment, the network training unit 1201 is specifically configured to:

[0188] In an iterative training process, the first-order feature matrix and the first-order neighbor set of the target training account extracted from the training set are input into the first-order graph neural network to be trained to obtain the first-order prediction vector of the target training account;

[0189] The second-order feature matrix and the first-order neighbor set and second-order neighbor set of the target training account extracted from the training set are input into the second-order graph neural network to be trained to obtain the second-order prediction vector of the target training account;

[0190] Determine a loss value based on the first-order prediction vector and the second-order prediction vector of the target training account and the first-order feature vector and the second-order feature vector of the target training account;

[0191] According to the loss value, the parameters of the first-order graph neural network to be trained and the second-order graph neural network to be trained are adjusted respectively.

[0192] In an optional embodiment, the network training unit 1201 is specifically configured to:

[0193] For each training account, perform the following operations:

[0194] In the account relationship graph, a first-order associated account having a first-order neighbor relationship with one of the training accounts is obtained, and a first-order neighbor set of the training account is generated based on the obtained first-order associated account;

[0195] In the account relationship graph, a second-order associated account having a second-order neighbor relationship with one of the training accounts is obtained, and a second-order neighbor set of the training account is generated based on the obtained second-order associated account; the second-order associated account does not have a first-order neighbor relationship with the training account, and the second-order associated account and the training account both have a first-order neighbor relationship with a third training account, and the third training account is one of the other training accounts in the training set except the two training accounts;

[0196] A first-order feature vector of a training account is obtained based on each first-order associated account in a first-order neighbor set of a training account, and a second-order feature vector of a training account is obtained based on each second-order associated account in a second-order neighbor set of a training account.

[0197] In an optional embodiment, the network training unit 1201 is specifically configured to:

[0198] Determine the first-order divergence loss value based on the probability distribution corresponding to the first-order prediction vector and the probability distribution corresponding to the first-order feature vector of the target training account;

[0199] Determine the second-order divergence loss value based on the probability distribution corresponding to the second-order prediction vector and the probability distribution corresponding to the second-order feature vector of the target training account;

[0200] The loss value is determined based on the weighted sum of the first-order divergence loss value and the second-order divergence loss value.

[0201] In an optional embodiment, the network training unit 1201 is specifically configured to:

[0202] Determine the first-order similarity loss value based on the first-order prediction vector of the target training account and the first-order feature vectors of each first-order associated account of the target training account;

[0203] Obtain the predicted feature vectors of each first-order associated account and each second-order associated account of the target training account respectively;

[0204] Determine the second-order similarity loss value based on the second-order prediction vector of the target training account and the predicted feature vectors of each first-order associated account and each second-order associated account of the target training account;

[0205] The loss value is determined according to the weighted sum of the first-order divergence loss value, the second-order divergence loss value, the first-order similarity loss value and the second-order similarity loss value.

[0206] In an optional embodiment, the network training unit 1201 is specifically configured to:

[0207] The second-order feature vectors of each first-order associated account are input into the auxiliary training graph neural network to obtain the predicted feature vectors of each first-order associated account;

[0208] The second-order feature vectors of each second-order associated account are respectively input into the auxiliary training graph neural network to obtain the predicted feature vectors of each second-order associated account.

[0209] In an optional embodiment, the feature representation unit 1102 is specifically configured to:

[0210] Based on the structure graph to be processed, obtain the first-order neighbor set and the second-order neighbor set of the account to be processed;

[0211] Based on the first-order feature matrix and the first-order neighbor set of the account to be processed, the first-order feature vector of the account to be processed is obtained through the trained first-order graph neural network;

[0212] Based on the second-order feature matrix and the first-order and second-order neighbor sets of the account to be processed, the second-order feature vector of the account to be processed is obtained through the trained second-order graph neural network.

[0213] The first-order eigenvector and the second-order eigenvector of the account to be processed are concatenated to obtain the eigenvector of the account to be processed.

[0214] In an optional embodiment, the graph construction unit 1101 is further configured to: for a new account that has a first-order neighbor relationship with the account to be processed and does not belong to the training set, construct a new structure graph based on the association relationship between the new account and each account in the structure graph to be processed and the structure graph to be processed;

[0215] The feature representation unit 1102 is further used to: use the trained graph neural network model to determine the feature vector of the new account based on the new structure graph.

[0216] Based on the same inventive concept as the above method embodiment and device embodiment, an electronic device is also provided in the embodiment of the present application. The electronic device can be an information recommendation device, such as a server, or an electronic device such as a computer. In one embodiment, the structure of the electronic device can be as follows: Figure 13 As shown, it includes a memory 101 , a communication module 103 and one or more processors 102 .

[0217] Memory 101 is used to store computer programs executed by processor 102. Memory 101 may mainly include a program storage area and a data storage area. The program storage area may store an operating system and programs required for running instant messaging functions, while the data storage area may store various instant messaging messages and operating instruction sets.

[0218] Memory 101 may be a volatile memory, such as random-access memory (RAM); a non-volatile memory, such as read-only memory, flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 101 may be a combination of the above memories.

[0219] The processor 102 may include one or more central processing units (CPUs) or digital processing units, etc. The processor 102 is configured to implement the above-mentioned information recommendation method when calling the computer program stored in the memory 101 .

[0220] The communication module 103 is used to communicate with the terminal device and other electronic devices. If the electronic device is a server, the server can collect account information of each account through the communication module 103.

[0221] The specific connection medium between the memory 101, the communication module 103 and the processor 102 is not limited in the embodiment of the present application. Figure 11 In the embodiment, the memory 101 and the processor 102 are connected via a bus 104. The bus 104 is connected to the processor 102 via a bus 104. Figure 11 The connections between the other components are shown in bold lines, which are only for illustration and are not intended to be limiting. The bus 104 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Figure 13 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0222] In another embodiment, the structure of the electronic device can be as follows Figure 14 As shown, the memory 101 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 1011 and / or a cache memory 1012 , and may further include a read-only memory (ROM) 1013 .

[0223] The memory 101 may also include a program / utility 1015 having a set (at least one) of program modules 1014, including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include an implementation of a network environment.

[0224] The electronic device can also communicate with one or more external devices 110 (e.g., a keyboard, a pointing device, etc.), one or more devices that enable a user to interact with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication can occur via an input / output (I / O) interface 105. Furthermore, the communication module 103 can be a network adapter, and the electronic device can also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via the network adapter. As shown, the communication module 103 communicates with other modules of the electronic device via a bus 104. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0225] In some possible implementations, various aspects of the information recommendation method provided by the present application may also be implemented in the form of a program product, which includes program code. When the program product is run on a computer device, the program code is used to enable the computer device to perform the steps of the information recommendation method according to various exemplary embodiments of the present application described above in this specification. For example, the computer device may perform the following steps: Figure 7 The flow of the information recommendation method in steps S701 to S703 is shown.

[0226] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0227] The program product for the information recommendation method of the embodiment of the present application can be a portable compact disc read-only memory (CD-ROM) and include program code, and can be run on a computing device. However, the program product of the present application is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0228] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0229] Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0230] The program code for performing the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

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

[0232] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0233] In addition, all functional units in the embodiments of the present application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the above-mentioned integrated units can be implemented in the form of hardware or in the form of hardware plus software functional units.

[0234] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. An information recommendation method, characterized in that: Servers used for social platforms, including: For accounts to be processed that do not belong to the training set and have a first-order neighbor relationship with at least one training account in the training set, a node corresponding to the account to be processed is added to the account relationship graph corresponding to the training set, and based on the association relationships between the training accounts in the training set and the association relationships between the account to be processed and the training accounts, edges are established between the node corresponding to the account to be processed and other nodes to construct a structure graph to be processed; the first-order neighbor relationship refers to a direct association relationship between two accounts; the training accounts in the training set are some accounts selected from the account data of the social platform; the accounts to be processed are other accounts in the account data except for the some accounts; Determining the feature vector of the account to be processed based on the structure graph to be processed using a trained graph neural network model; the trained graph neural network model is obtained by training the graph neural network model to be trained based on the association relationship between the training accounts in the training set; recommending information to the account to be processed based on the feature vector of the account to be processed; The graph neural network model includes a first-order graph neural network and a second-order graph neural network; the trained graph neural network model is trained in the following manner: Constructing an account relationship graph based on the association relationship between the training accounts in the training set; Based on the account relationship graph, obtaining a first-order neighbor set and a second-order neighbor set for each training account in the training set, as well as a first-order feature vector and a second-order feature vector for each training account; the first-order feature vector is obtained based on the first-order neighbor set of the corresponding training account, and the second-order feature vector is obtained based on the first-order neighbor set and the second-order neighbor set of the corresponding training account; Generate a first-order feature matrix based on the first-order feature vectors of all training accounts in the training set, and generate a second-order feature matrix based on the second-order feature vectors of all training accounts in the training set; The graph neural network model to be trained is iteratively trained until the set convergence conditions are met to obtain a trained graph neural network model; An iterative training process includes: Inputting the first-order feature matrix and the first-order neighbor set of the target training account extracted from the training set into the first-order graph neural network to be trained to obtain a first-order prediction vector of the target training account; Inputting the second-order feature matrix and the first-order neighbor set and the second-order neighbor set of the target training account extracted from the training set into the second-order graph neural network to be trained to obtain a second-order prediction vector of the target training account; Determine a loss value based on the first-order prediction vector and the second-order prediction vector of the target training account, and the first-order feature vector and the second-order feature vector of the target training account; According to the loss value, parameters of the first-order graph neural network to be trained and the second-order graph neural network to be trained are adjusted respectively.

2. The method according to claim 1, characterized in that The obtaining of the first-order neighbor set and the second-order neighbor set of each training account in the training set, as well as the first-order feature vector and the second-order feature vector of each training account, includes: For each training account, perform the following operations respectively: In the account relationship graph, obtaining a first-order associated account having a first-order neighbor relationship with one of the training accounts, and generating a first-order neighbor set of the training account based on the obtained first-order associated account; In the account relationship graph, a second-order associated account having a second-order neighbor relationship with one of the training accounts is obtained, and a second-order neighbor set of the training account is generated based on the obtained second-order associated account; the second-order associated account does not have a first-order neighbor relationship with the training account, and the second-order associated account and the training account both have a first-order neighbor relationship with a third training account, and the third training account is one of the other training accounts in the training set except the two training accounts; A first-order feature vector of the training account is obtained based on each first-order associated account in the first-order neighbor set of the training account, and a second-order feature vector of the training account is obtained based on each second-order associated account in the second-order neighbor set of the training account.

3. The method according to claim 1, characterized in that The determining of the loss value according to the first-order prediction vector and the second-order prediction vector of the target training account and the first-order feature vector and the second-order feature vector of the target training account includes: Determining a first-order divergence loss value based on a probability distribution corresponding to a first-order prediction vector and a probability distribution corresponding to a first-order feature vector of the target training account; Determining a second-order divergence loss value based on the probability distribution corresponding to the second-order prediction vector and the probability distribution corresponding to the second-order feature vector of the target training account; The loss value is determined according to a weighted sum of the first-order divergence loss value and the second-order divergence loss value.

4. The method according to claim 3, characterized in that The determining the loss value according to a weighted sum of the first-order divergence loss value and the second-order divergence loss value includes: Determining a first-order similarity loss value based on the first-order prediction vector of the target training account and the first-order feature vectors of each first-order associated account of the target training account; Obtaining prediction feature vectors of each first-order associated account and each second-order associated account of the target training account respectively; Determining a second-order similarity loss value based on the second-order prediction vector of the target training account and the prediction feature vectors of each first-order associated account and each second-order associated account of the target training account; The loss value is determined according to the first-order divergence loss value, the second-order divergence loss value, a weighted sum of the first-order similarity loss value and the second-order similarity loss value.

5. The method according to claim 4, characterized in that The step of respectively obtaining the predicted feature vectors of each first-order associated account and each second-order associated account of the target training account includes: Inputting the first-order feature vectors of each first-order associated account into the auxiliary training graph neural network to obtain the predicted feature vectors of each first-order associated account; The first-order feature vectors of each first-order associated account and the second-order feature vectors of each second-order associated account are respectively input into the auxiliary training graph neural network to obtain the predicted feature vectors of each second-order associated account.

6. The method according to any one of claims 1 to 5, characterized in that The method of using a trained graph neural network model to determine the feature vector of the account to be processed based on the structure graph to be processed includes: Based on the structure graph to be processed, obtaining a first-order neighbor set and a second-order neighbor set of the account to be processed; Based on the first-order feature matrix and the first-order neighbor set of the account to be processed, obtaining a first-order feature vector of the account to be processed through a trained first-order graph neural network; Based on the second-order feature matrix and the first-order neighbor set and the second-order neighbor set of the account to be processed, a second-order feature vector of the account to be processed is obtained through a trained second-order graph neural network; The first-order feature vector and the second-order feature vector of the account to be processed are concatenated to obtain the feature vector of the account to be processed.

7. The method according to any one of claims 1 to 5, characterized in that After determining the feature vector of the account to be processed based on the structure graph to be processed using the trained graph neural network model, the method further includes: For a new account that has a first-order neighbor relationship with the account to be processed and does not belong to the training set, a trained graph neural network model is used to determine the feature vector of the new account based on the association relationship between the new account and each account in the structure graph to be processed.

8. An information recommendation device, characterized in that: Servers used for social platforms, including: A graph construction unit is configured to add, on the basis of the account relationship graph corresponding to the training set, nodes corresponding to the accounts to be processed that do not belong to the training set and have a first-order neighbor relationship with at least one training account in the training set, and to establish edges between the nodes corresponding to the accounts to be processed and other nodes based on the association relationships between the training accounts in the training set and the association relationships between the accounts to be processed and the training accounts, so as to construct a structure graph to be processed; the first-order neighbor relationship refers to a direct association relationship between two accounts, and the account relationship graph is used to characterize the association relationships between the training accounts in the training set; wherein the training accounts in the training set are some accounts selected from the account data of the social platform; and the accounts to be processed are other accounts in the account data except for the some accounts; a feature representation unit configured to determine a feature vector of the account to be processed based on the structure graph to be processed using a trained graph neural network model; the trained graph neural network model is obtained by training the graph neural network model to be trained based on the association relationship between the training accounts in the training set; an information recommendation unit, configured to recommend information to the account to be processed based on the feature vector of the account to be processed; The graph neural network model includes a first-order graph neural network and a second-order graph neural network; the device also includes a network training unit for: Constructing an account relationship graph based on the association relationship between the training accounts in the training set; Based on the account relationship graph, obtaining a first-order neighbor set and a second-order neighbor set for each training account in the training set, as well as a first-order feature vector and a second-order feature vector for each training account; the first-order feature vector is obtained based on the first-order neighbor set of the corresponding training account, and the first-order feature vector is obtained based on the first-order neighbor set and the second-order neighbor set of the corresponding training account; Generate a first-order feature matrix based on the first-order feature vectors of all training accounts in the training set, and generate a second-order feature matrix based on the second-order feature vectors of all training accounts in the training set; The graph neural network model to be trained is iteratively trained until the set convergence conditions are met to obtain a trained graph neural network model; The network training unit is specifically used to: In one iterative training process, the first-order feature matrix and the first-order neighbor set of the target training account extracted from the training set are input into the first-order graph neural network to be trained to obtain a first-order prediction vector of the target training account; Inputting the second-order feature matrix and the first-order neighbor set and the second-order neighbor set of the target training account extracted from the training set into the second-order graph neural network to be trained to obtain a second-order prediction vector of the target training account; Determine a loss value based on the first-order prediction vector and the second-order prediction vector of the target training account, and the first-order feature vector and the second-order feature vector of the target training account; According to the loss value, parameters of the first-order graph neural network to be trained and the second-order graph neural network to be trained are adjusted respectively.

9. A computer-readable storage medium storing a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the computer program is executed by the processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Information pushing method and device based on graph network

    CN112069398A

  • Graph neural network training method and device

    CN112085172A