Link prediction method, link prediction model training method and device

By constructing a link prediction model based on gated recurrent units and generative networks, the problem of predicting vertex link relationships in dynamic graphs is solved, enabling efficient reconstruction of dynamic graphs and improving prediction accuracy and adaptability.

CN117114157BActive Publication Date: 2026-06-23BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
Filing Date
2022-05-13
Publication Date
2026-06-23

Smart Images

  • Figure CN117114157B_ABST
    Figure CN117114157B_ABST
Patent Text Reader

Abstract

The disclosure provides a link prediction method, a training method and device of a link prediction model, relates to the field of artificial intelligence, specifically relates to the field of graph neural networks and deep learning technologies, and can be applied to scenarios such as smart cities and intelligent transportation. The specific implementation scheme of the link prediction method is as follows: determining implicit information for a historical moment according to first graph information of a complete graph for a target object at the historical moment; the implicit information represents time-dependent information of the complete graph for the target object; determining posterior distribution information of first embedding information of a plurality of first objects belonging to the target object at a current moment according to the implicit information and second graph information of a reference graph for the target object at the current moment; and determining first complete link information between the plurality of first objects according to the posterior distribution information and the second graph information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence, specifically to the fields of graph neural networks and deep learning, and can be applied to scenarios such as smart cities and intelligent transportation. Background Technology

[0002] With the development of computer and network technologies, deep learning technology has been widely applied in many fields. For example, graph structures can be used to represent multiple objects and their relationships with each other, and deep learning technology can be used to predict these relationships based on the graph structure. Summary of the Invention

[0003] This disclosure provides a method for predicting links, a method for training a link prediction model, an apparatus, an electronic device, and a storage medium, which aim to predict the link relationships between vertices in a dynamic graph and thus reconstruct the dynamic graph.

[0004] According to one aspect of this disclosure, a link prediction method is provided, comprising: determining implicit information for a historical time based on first graph information of a complete graph of a target object at a historical time; the implicit information representing time dependency information of the complete graph of the target object; determining posterior distribution information of first embedding information of a plurality of first objects belonging to the target object at the current time based on the implicit information and second graph information of a reference graph of the target object at the current time; and determining first complete link information between the plurality of first objects based on the posterior distribution information and the second graph information.

[0005] According to another aspect of this disclosure, a training method for a link prediction model is provided, wherein the link prediction model includes an encoder and a decoder; the encoder includes a gated recurrent unit and a first generative network; the training method includes: processing first graph information of a complete graph of a target object at a historical time using the gated recurrent unit to obtain implicit information for the historical time; the implicit information represents the temporal dependency information of the complete graph of the target object; processing the implicit information and second graph information of a reference graph of the target object at the current time using the first generative network to generate posterior distribution information of embedding information of multiple objects belonging to the target object at the current time; processing the posterior distribution information and the second graph information using the decoder to obtain link probability information between the multiple objects; determining a first loss of the link prediction model based on the link probability information; and training the link prediction model based on the first loss.

[0006] According to another aspect of this disclosure, a link prediction apparatus is provided, comprising: an implicit information determination module, configured to determine implicit information for a historical time based on first graph information of a complete graph of a target object at a historical time; the implicit information representing time dependency information of the complete graph of the target object; a posterior distribution determination module, configured to determine posterior distribution information of first embedding information of a plurality of first objects belonging to the target object at the current time based on the implicit information and second graph information of a reference graph of the target object at the current time; and a link information determination module, configured to determine first complete link information between the plurality of first objects based on the posterior distribution information and the second graph information.

[0007] According to another aspect of this disclosure, a training apparatus for a link prediction model is provided, wherein the link prediction model includes an encoder and a decoder; the encoder includes a gated recurrent unit and a first generative network; the training apparatus includes: an implicit information determination module, used to process first graph information of a complete graph of a target object at a historical time using the gated recurrent unit to obtain implicit information for the historical time; the implicit information represents the time dependency information of the complete graph of the target object; a posterior distribution determination module, used to process the implicit information and second graph information of a reference graph of the target object at the current time using the first generative network to generate posterior distribution information of the embedding information of multiple objects belonging to the target object at the current time; a link probability determination module, used to process the posterior distribution information and the second graph information using the decoder to obtain link probability information between the multiple objects; a first loss determination module, used to determine a first loss of the link prediction model based on the link probability information; and a model training module, used to train the link prediction model based on the first loss.

[0008] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the linked prediction method or the training method of the linked prediction model provided in this disclosure.

[0009] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause a computer to execute the link prediction method or the link prediction model training method provided in this disclosure.

[0010] According to another aspect of this disclosure, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the link prediction method or the link prediction model training method provided in this disclosure.

[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0012] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0013] Figure 1 This is a schematic diagram illustrating an application scenario of the link prediction method and the training method and apparatus for the link prediction model according to embodiments of this disclosure.

[0014] Figure 2 This is a flowchart illustrating a link prediction method according to an embodiment of the present disclosure;

[0015] Figure 3 This is a schematic diagram illustrating the principle of a link prediction method according to an embodiment of the present disclosure;

[0016] Figure 4 This is a schematic diagram of the structure of an encoder for determining posterior distribution information according to an embodiment of the present disclosure;

[0017] Figure 5 This is a schematic diagram illustrating the principle of using a decoder to determine link probability information according to an embodiment of this disclosure;

[0018] Figure 6 This is a flowchart illustrating a training method for a link prediction model according to an embodiment of the present disclosure;

[0019] Figure 7 This is a schematic diagram of the structure of the encoder included in the link prediction model during the training phase according to an embodiment of the present disclosure;

[0020] Figure 8 This is a structural block diagram of a prediction device linked according to an embodiment of the present disclosure;

[0021] Figure 9 This is a structural block diagram of a training apparatus for a link prediction model according to embodiments of the present disclosure; and

[0022] Figure 10 This is a block diagram of an electronic device used to implement the link prediction method or link prediction model training method of the embodiments of this disclosure. Detailed Implementation

[0023] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0024] This disclosure provides a link prediction method, which includes an implicit information determination stage, a posterior distribution determination stage, and a link determination stage. In the implicit information determination stage, implicit information for a historical time period is determined based on first graph information of the complete graph of the target object at a historical time; the implicit information represents the time dependency information of the complete graph of the target object. In the posterior distribution determination stage, posterior distribution information of first embedding information of multiple first objects belonging to the target object at the current time is determined based on the implicit information and second graph information of a reference graph of the target object at the current time. In the link determination stage, first complete link information between the multiple first objects is obtained based on the posterior distribution information and the second graph information.

[0025] To facilitate understanding of this disclosure, the technical terms mentioned herein are explained below:

[0026] Variational inference is a class of techniques used to approximate difficult integrals that arise in Bayesian inference and machine learning.

[0027] A graph is represented by G = (V, E), where V contains vertices, each representing an object, and E contains edges connecting two vertices, representing the link between the two objects represented by the two vertices.

[0028] Dynamic graphs are a common graph structure where the structure (vertices and edges) evolves over time.

[0029] An undirected graph is a graph in which the edges connecting two vertices are undirected and do not have a direction.

[0030] A directed graph is a graph in which the edges connecting two vertices are directed edges.

[0031] A degree matrix is ​​a diagonal matrix where the diagonal elements represent the degree of each vertex in the graph. The degree of each vertex represents the number of edges connected to that vertex. For a directed graph, the degree of a vertex is divided into its out-degree and in-degree, representing the number of directed edges emanating from the vertex and the number of directed edges pointing to the vertex, respectively. The degree matrix consists of an in-degree diagonal matrix and an out-degree diagonal matrix.

[0032] An adjacency matrix represents the relationships between vertices. Given a graph with N vertices, the size of the adjacency matrix is ​​N*N. For an undirected graph, the adjacency matrix is ​​symmetric. The value of the element in the i-th row and j-th column indicates whether there is a connecting edge between the i-th and j-th vertices. If there is, the value is 1; otherwise, it is 0. For a directed graph, the value of the element in the i-th row and j-th column indicates whether there is a directed edge from the i-th vertex to the j-th vertex. If there is, the value is 1; otherwise, it is 0.

[0033] Graph reconstruction technology refers to techniques for inferring or predicting graph structures. It can infer or predict vertices or edges in a graph.

[0034] A Gated Recurrent Unit (GRU) is a type of recurrent neural network proposed to address issues related to long-term memory and gradients in backpropagation. Its input includes the data X at time t. t and the hidden layer state h at time t-1 t-1 The hidden layer state contains information about the previous vertices.

[0035] The Diffusion Convolutional Gated Recurrent Unit (DCGRU) operates on a similar principle to the GRU, but differs in that the DCGRU uses a diffusion convolution operator instead of matrix multiplication in the GRU.

[0036] The following will combine Figure 1 The application scenarios of the methods and apparatus provided in this disclosure are described.

[0037] Figure 1 This is a schematic diagram illustrating an application scenario of the link prediction method and the training method and apparatus for the link prediction model according to embodiments of this disclosure.

[0038] like Figure 1 As shown, the application scenario 100 of this embodiment may include an electronic device 110, which may be various electronic devices with processing functions, including but not limited to smartphones, tablets, laptops, desktop computers, and servers.

[0039] In this application scenario, the road network 101 can be represented as Figure 102. The vertex set in the graph represents the set of N road detection points in the road network, and the edge set represents the set of links in the road network. It is understood that Figure 102 can also be used to represent social networks, academic paper citation networks, etc. For social networks, the vertex set in the graph represents the set of social accounts in the social network, and the edge set represents the set of follow links between social accounts in the social network. For academic paper citation networks, the vertex set in the graph represents the set of papers in the academic paper citation network, and the edge set represents the set of citation links between papers in the academic paper citation network. It is understood that Figure 102 in this application scenario can be, for example, a directed graph or an undirected graph, and can be a dynamic graph or a static graph.

[0040] Electronic device 110 can, for example, reconstruct Figure 102 to obtain a reconstructed Figure 103. It is understood that Figure 103 is more complete than Figure 102. For example, Figure 103 may have added edges from the edge set or added vertices from the vertex set compared to Figure 102. Electronic device 110 can, for example, predict the connection relationships between all vertices in the graph based on the graph information of Figure 102, and reconstruct Figure 102 based on these connection relationships.

[0041] According to embodiments of this disclosure, as the topology network represented by FIG102 changes over time, the structure of FIG102 also evolves over time. When the electronic device 110 reconstructs FIG102, it can, for example, refer to a graph representing the topology network at a historical moment to model the dynamic change information of the graph, thereby improving the accuracy of the reconstructed FIG103.

[0042] like Figure 1 As shown, application scenario 100 may further include a server 120, and electronic device 110 may communicate with server 120 via a communication network. The network may include wired or wireless communication links. Server 120 may be a background management server supporting the operation of client applications installed on electronic device 110, or it may be any server. Server 120 may maintain a link prediction model 104, and may also send the link prediction model 104 to electronic device 110 in response to a request from electronic device 110. Accordingly, electronic device 110 may use link prediction model 104 to reconstruct Figure 102. Alternatively, electronic device 110 may also send graph information of Figure 102 to server 120, and server 120 may use link prediction model 104 to reconstruct Figure 102.

[0043] According to embodiments of this disclosure, the link prediction model 104 may include a Variational Graph Auto-Encoders (VGAE) model, a Graph Auto-Encoders (GAE) model, etc., and this disclosure does not limit it.

[0044] It should be noted that the link prediction method provided in this disclosure can be executed by the electronic device 110 or by the server 120. Correspondingly, the link prediction device provided in this disclosure can be located in the electronic device 110 or in the server 120. The training method of the link prediction model provided in this disclosure can be executed by the server 120. Correspondingly, the training device of the link prediction model provided in this disclosure can be located in the server 120.

[0045] It should be understood that Figure 1 The number and type of electronic devices 110 and servers 120 shown are merely illustrative. Depending on implementation needs, there may be any number and type of electronic devices 110 and servers 120.

[0046] The following will combine Figure 1 ,pass Figures 2-5 The prediction method for the links provided in this disclosure is described in detail.

[0047] Figure 2 This is a schematic flowchart of a link prediction method according to an embodiment of the present disclosure.

[0048] like Figure 2 As shown, the link prediction method 200 of this embodiment may include operations S210 to S230.

[0049] In operation S210, implicit information for the historical moment is determined based on the first graph information of the complete graph of the target object at the historical moment.

[0050] In operation S220, based on implicit information and the second graph information of the reference graph for the target object at the current time, the posterior distribution information of the first embedding information of multiple first objects belonging to the target object at the current time is determined.

[0051] In operation S230, based on the posterior distribution information and the second graph information, the first complete link information between multiple first objects is determined.

[0052] According to embodiments of this disclosure, the historical timeframe may include at least one timeframe. For each of the at least one timeframe, a complete graph for the target object can be obtained at that timeframe. This complete graph describes the complete link relationships between multiple objects belonging to the target object. For example, if the target object is a road network, then the objects belonging to the target object are road detection points, and the complete graph can describe the set of links in the road network.

[0053] According to embodiments of this disclosure, the graph information of a complete graph may include attribute information of objects represented by each vertex and complete link information between the objects represented by the vertices. The attribute information of an object is determined based on its type. For example, if the object is a road detection point, its attribute information may include traffic flow characteristics, such as speed and flow rate. If the object is a social media account, its attribute information may include the account's level, registration time, and the age and gender of the user. If the object is a research paper, its attribute information may include the paper's publication date, author, and abstract information. Complete link information may, for example, be represented by an adjacency matrix of the complete graph.

[0054] In one embodiment, the graph information of the complete graph may further include, for example, embedding information of objects represented by vertices. This embedding information can be obtained, for example, by performing a convolution operation on the object's attribute information and complete link information. Alternatively, the object's embedding information can be obtained by sampling the distribution of the embedding information based on the object's attribute information and complete link information. The embedding information can be obtained by an encoder in VGAE or GAE.

[0055] According to embodiments of this disclosure, a recurrent neural network can be used to process the first graph information. The hidden layer state output by the recurrent neural network is used as implicit information, which represents the temporal dependency information of the complete graph for the target object. In the graph processing scenario, the recurrent neural network can be, for example, a GRU, a Diffusion Convolutional Recurrent Neural Network (DCRNN), or a DCGRU.

[0056] After obtaining the implicit information, an encoder can be used to encode the implicit information and the second graph information of the reference graph for the target object at the current time, thereby obtaining the posterior distribution information. It is understood that this posterior distribution information represents the posterior distribution of the embedded information given the second graph information. The reference graph for the target object can, for example, represent the observed topological network. Considering the influence of observation accuracy, the link information between the multiple first objects represented by the reference graph of the target object may be incomplete. This embodiment can predict the link information between the multiple first objects based on the determined posterior distribution information to complete the observed link information. The second graph information may include the attribute information of each of the multiple objects belonging to the target object at the current time and the observed reference link information between the multiple objects. This observed reference link information can be represented by the adjacency matrix of the reference graph.

[0057] For example, setting the current time as time t, and assuming that the posterior distribution information follows a Gaussian distribution, this embodiment can fuse implicit information with the attribute information of multiple objects in the second graph information, and use the fused information as the data X at time t. t Then the data X t The adjacency matrix of the reference graph is input to the encoder of VAGE or GAE described above. The encoder outputs the mathematical expectation and standard deviation of the posterior distribution information, thereby obtaining a Gaussian distribution representing the distribution of the embedded information, which is used as the posterior distribution information.

[0058] According to embodiments of this disclosure, after obtaining the posterior distribution information, this embodiment can input the posterior distribution information and the second graph information into a VAGE or GAE decoder. The decoder first samples the posterior distribution information based on the second graph information to obtain the embedding vector representations of multiple first objects. Then, the probability of an edge existing between two vertices is calculated based on the sampled embedding vectors. Based on this probability, the first complete link information between the multiple first objects can be obtained. For example, if the probability of an edge existing between two vertices is greater than or equal to a probability threshold, it can be determined that the two first objects represented by those two vertices have a link relationship; otherwise, it is determined that the two first objects represented by those two vertices do not have a link relationship. The probability threshold can be set according to actual needs, for example, it can be any value such as 0.6 or 0.7, and this disclosure does not limit it.

[0059] Based on the embodiments of this disclosure, since implicit information representing time-dependent information is also considered when determining the posterior distribution information, the change of graph structure over time can be taken into account when predicting the link information between multiple first objects. This allows the link prediction method provided by this embodiment to be used to predict the edges between vertices in a dynamic graph for reconstructing the dynamic graph.

[0060] It is understandable that after obtaining the first complete link information between multiple first objects, the graph for the target object at the current moment can be reconstructed to obtain the complete graph for the target object at the current moment. The graph information of the complete graph for the target object at the current moment can also be obtained, which is similar to the first graph information described above.

[0061] Figure 3 This is a schematic diagram illustrating the principle of a link prediction method according to an embodiment of the present disclosure.

[0062] According to embodiments of this disclosure, a recurrent neural network that determines implicit information can be integrated into an encoder to achieve end-to-end prediction of links.

[0063] like Figure 3 As shown, in implementing the link prediction method, this embodiment 300 can first convert multiple road network maps 301 collected at multiple times and arranged in chronological order into a graph structure, thereby obtaining graph G. (1) G (2) ... G (t) 302. Where t is the current time. Before acquiring the road network map at time t, graph G can be... (1) As a complete graph of historical moments, graph G is obtained using a link prediction method. (2) The embedding information of the mid-vertex will be used to define the graph G. (1) Figure G (2) As a complete graph of historical moments, graph G is obtained using a link prediction method. (3) The embedding information of the mid-vertex is obtained, and so on, to obtain graph G. (2) Figure G (3) ... Figure G (t-1) The embedding information of each vertex in the graph G. Thus, for graph G... (t) We obtained the information from the first image.

[0064] Subsequently, this embodiment can use Figure G (1) G (2) ... G (t) The graph information 302 is input into the encoder 310, which is constructed based on a deep neural network. The posterior distribution information 303 is obtained from the output of the encoder 310. After obtaining the posterior distribution information 303, this posterior distribution information and the graph G are then compared. (t) The graph information is input into the decoder 320, which is constructed based on a deep neural network. The decoder 320 outputs a link probability matrix, and the adjacency matrix A representing the first complete link information can be obtained from this link probability matrix. (t) 304. The element in the i-th row and j-th column of the link probability matrix represents the graph G. (t)The probability value of a link between the i-th vertex and the j-th vertex in the graph is given. Based on this link probability matrix, the graph G at the current time can be obtained. (t) The adjacency matrix A represents the first complete link information between multiple first objects, represented by multiple vertices. For example, if the value of the element in the i-th row and j-th column of the link probability matrix is ​​greater than or equal to a probability threshold, then the adjacency matrix A representing the first complete link information... (t) In graph 304, the element in the i-th row and j-th column has a value of 1, otherwise it has a value of 0. Based on this first complete link information, we can analyze the graph G at the current moment. (t) Reconstruct the graph to obtain the graph. 305.

[0065] According to embodiments of this disclosure, a DCGRU can be used, for example, to process the first graph information to obtain implicit information for the last moment in the historical time. Let h be the initial state of the hidden layer for the DCGRU. (0) ,Should Set as an all-zero matrix, where N is the number of vertices in the graph, and d can be equal to the dimension of the attribute information of the object represented by the vertex, so as to facilitate calculation. It is understood that d can also be different from the dimension of the attribute information. During the calculation process, the attribute information can be aligned with the implicit information through mapping. DCGRU can, for example, calculate the implicit information for the last time step in an iterative manner. For example, for the current time step t, the last time step is time step (t-1). The formula for iterative calculation can be shown in the following formula (1):

[0066] h (t-1) =DCGRU(A (t-1) [X] (t-1) Z (t-1) ], h (t-2) ). Formula (1)

[0067] Among them, X (t-1) For graph G (t-1 The vertices in Z represent the attribute information of the objects. (t-1) For graph G (t-1) The embedding information of the object represented by the middle vertex, h (t-2) h (t-1) These are the implicit information for time (t-2) and time (t-1), respectively. [x] (t-1) Z (t -1) ] indicates that for x (t-1) and Z (t-1) The splicing calculation.

[0068] This embodiment uses DCGRU to process the information in the first graph. Compared with GRU, it uses the diffuse convolution operator when updating gates, resetting gates and memory units, which makes the spatial dependency performance intuitively explained and effectively calculated, thus improving the expressive power of the obtained implicit information.

[0069] In one embodiment, when processing the first graph information using DCGRU, for example, a mapping function can be first used to process the second attribute information and the second embedded information in the first graph information to obtain processed attribute information and processed embedded information. Then, the processed attribute information and processed embedded information are concatenated to obtain first concatenated information. The predetermined initial values ​​of this first concatenated information, the second complete link information, and the implicit information (i.e., the initial state of the aforementioned hidden layer state is h) are then used. (0) The DCGRU is input, and the DCGRU outputs the implicit information at the last moment. In this embodiment, when the DCGRU calculates the implicit information for the last moment in an iterative manner, the formula for the iterative calculation is expressed as the following formula (2):

[0070] h (t-1) =DCGRU(A (t-1) , [f X (X (t-1) ), f Z (Z (t-1) )], h (t-2) ). Formula (2)

[0071] Among them, f X and f Z This represents any mapping function, such as the mapping function used in a fully connected network (FCN). This embodiment can use a fully connected network to process the second attribute information and the second embedding information.

[0072] This embodiment processes attribute and embedding information using a mapping function before calculating implicit information, aligning the attribute and embedding information and improving the expressive power of the learned implicit information. This makes the link prediction method of this embodiment more robust.

[0073] The following will combine Figures 4-5 The encoder and decoder used in implementing the prediction method for the link are described in detail.

[0074] Figure 4 This is a schematic diagram of the structure of an encoder for determining posterior distribution information according to an embodiment of the present disclosure.

[0075] like Figure 4As shown, in this embodiment, the encoder 410 for determining posterior distribution information includes at least a generator network 411 and a DCGRU 412. The DCGRU 412 is used to determine the posterior distribution information based on the method described above, according to Figure G. (1) G (2) ... G (t) Graph G in 401 is a complete graph (1) G (2) ... G (t-1) The implicit information h for time (t-1) is obtained by iteratively calculating the information in the first graph. (t-1) .

[0076] In obtaining implicit information h (t-1) Then, the implicit information h can be... (t-1) And Figure G as a reference figure (t) The second graph information is input into the generator network 411. The generator network 411 can first be used to process the first attribute information X in the second graph information. (t) and implicit information h (t-1) The data is then spliced ​​together to obtain the second spliced ​​information. Subsequently, based on the second spliced ​​information and the reference link information A' in the second image information... (t) Mathematical expectation of generating posterior distribution information 402 and standard deviation 403. Based on this mathematical expectation 402 known standard deviation 403 gives the posterior distribution 404.

[0077] In one embodiment, such as Figure 4 As shown, the generator network 411 may include a first generator sub-network 4111 and a second generator sub-network 4112. Both the first generator sub-network 4111 and the second generator sub-network 4112 may employ a Diffusion Convolutional Neural Network (DCNN). It is understood that the two generator sub-networks may also employ simpler networks such as Feedforward Neural Networks (FNN) to improve processing efficiency. However, it is understood that using a more complex network such as DCNN as the generator sub-network can improve the accuracy of the generated posterior distribution and avoid network overfitting.

[0078] It is understandable that the generative network 411 may also include, for example, a splicing subnetwork for processing the first attribute information and the implicit information h. (t-1)The two concatenations are then combined to obtain the second concatenation information. For example, in this embodiment, the second concatenation information and the reference link information can be input into the first generating sub-network 4111, which then generates the mathematical expectation of the posterior distribution information. 402. Simultaneously, the second splicing information and reference linking information can be input into the second generating sub-network 4112, which generates the standard deviation of the posterior distribution information. 403. Specifically, the first generating subnetwork 4111 can generate the mathematical expectation using the following formula (3). 402, the second generating subnetwork 4112 can use the following formula (4) to generate the standard deviation. 403:

[0079]

[0080]

[0081] According to embodiments of this disclosure, when determining posterior distribution information, implicit information for each object can be determined based on its attribute information, embedding information, and complete link information at a historical time. Subsequently, posterior distribution information for the embedding information of each object is determined based on its attribute information at the current time, its implicit information, and its reference link information at the current time. It is understood that the methods for determining the implicit information of each object and the methods for determining the posterior distribution information of the embedding information of each object are similar to those described above. For example, for the i-th object among N objects, the posterior distribution information of the i-th object can be represented by the following formula (5):

[0082]

[0083] in, This represents the embedding information of the i-th object. This represents the mathematical expectation for the i objects. This represents the standard deviation for the i-th object. This indicates the degree of deviation of each value from the mean; diag() represents the covariance matrix, where the values ​​of the main diagonal elements are the variances of each value, and the values ​​of the remaining elements in the m-th row and n-th column correspond to the covariances of the m-th and n-th values.

[0084] Based on this, the posterior distribution information of the first embedding information of multiple first objects can be represented by the following formula (6):

[0085]

[0086] It is understood that this embodiment is essentially a modification of Figure G.(t) and implicit information h (t-1) Use the observation results to determine the posterior distribution information.

[0087] According to embodiments of this disclosure, in Figure G (t) In the case of a directed graph, when determining the posterior distribution information, we can first refer to graph G. (t) The reference link information in the second graph information is used to determine the in-degree and out-degree information for multiple first objects. For example, the in-degree information can be represented by the in-degree diagonal matrix described above, and the out-degree information can be represented by the out-degree diagonal matrix described above. After obtaining the out-degree and in-degree information, the second splicing information, reference link information, in-degree information, and out-degree information can be input into the first generating sub-network 4111 to generate the mathematical expectation of the posterior distribution information. The second splicing information, reference link information, in-degree information, and out-degree information are then input into the second generating sub-network 4112 to generate the standard deviation of the posterior distribution information. Through this embodiment, the reconstruction of a dynamic directed graph can be achieved, and dynamic changing information can be effectively modeled.

[0088] For example, for the i-th object among N objects, the formula for generating the subnetwork can be expressed as the following formula (7):

[0089]

[0090] Among them, W l,out and W l,in It is a learnable parameter, D in D out These are the in-degree diagonal matrix and the out-degree diagonal matrix, respectively. φ represents the activation function, such as the sigmoid activation function, and L represents the number of propagation steps. The number of propagation steps can be any value greater than 1, such as 2, and this disclosure does not limit this value.

[0091] Figure 5 This is a schematic diagram illustrating the principle of using a decoder to determine link probability information according to an embodiment of this disclosure.

[0092] like Figure 5 As shown, in this embodiment 500, when determining link probability information, the embedding information of multiple first objects can be determined firstly based on posterior distribution information, thereby obtaining multiple first embedding information. For example, the posterior distribution information can be sampled based on reference link information and the first attribute information of each first object to obtain the embedding information of each first object. The N first embedding information of N first objects can be represented as an embedding matrix Z, for example. (t) The embedding matrix Z is represented by 510. (t) The vector formed by each row of elements in the vector represents the embedding information of a first object.

[0093] Subsequently, this embodiment 500 can determine the first complete link information between the multiple first objects based on the multiple first embedding information. For example, this embodiment 500 can take the embedding matrix Z. (t) The vector formed by the elements of the i-th row in 510 yields the embedding information 511 of the i-th object among the N first objects, and the embedding matrix Z can also be obtained. (t) The vector formed by the elements of the j-th row in 510 yields the embedding information 512 of the j-th object among the N first objects. Subsequently, the similarity between embedding information 511 and embedding information 512 is used to represent the probability that the i-th object and the j-th object have a link relationship. For example, the inner product of the two embedding information can be used to represent the similarity. If this probability is greater than or equal to a probability threshold, then the i-th object and the j-th object are determined to have a link relationship. This embodiment can pair the N first objects to obtain multiple object pairs. The above method is used to determine whether the two first objects in each object pair have a link relationship. All determined link relationships and the information of the two objects linked by the link relationships can constitute the first complete link information.

[0094] For example, a link probability matrix can be constructed based on the probability of all object pairs having a link relationship. This link probability matrix has a size of N*N, and the probability that the i-th object and the j-th object have a link relationship is the value of the element in the i-th row and j-th column of the link probability matrix. Based on this adjacency probability matrix, an adjacency matrix A representing the first complete link information can be obtained. (t) 520. The adjacency matrix A (t) The size of 520 is also N*N. When the value of the element in the i-th row and j-th column of the link probability matrix is ​​greater than or equal to the probability threshold, the adjacency matrix A... (t) The value of the element in the i-th row and j-th column of 520 is 1.

[0095] In one embodiment, when determining the first complete link information, for example, a fully connected layer can be used to process multiple first embedded information pieces separately to obtain multiple processed embedded information pieces. Subsequently, based on the similarity relationships between the multiple processed embedded information pieces, the first complete link information between the multiple first objects is determined. The similarity relationship between two processed embedded information pieces can be represented by the inner product of the two processed embedded information pieces, or by Jaccard similarity, etc., and this disclosure does not limit this. This embodiment, by first processing the embedded information using a fully connected layer, can normalize and align the embedded information, and at the same time improve the accuracy of the obtained similarity relationships.

[0096] To facilitate the implementation of the link prediction method provided in this disclosure, this disclosure also provides a training method for the link prediction model, which will be combined with the following... Figures 6-7 The training method is described in detail.

[0097] Figure 6 This is a flowchart illustrating a training method for a link prediction model according to an embodiment of the present disclosure.

[0098] like Figure 6 As shown, the training method 600 for the link prediction model in this embodiment may include operations S610 to S650. The link prediction model may, for example, include an encoder and a decoder. The encoder may include a GRU and a first generative network.

[0099] In operation S610, a gated loop unit processes the first graph information of the complete graph of the target object at a historical time point to obtain implicit information for that historical time point. This implicit information represents the time dependency information of the complete graph of the target object.

[0100] The implementation of operation S610 is similar to that of operation S210 described above. This embodiment, for example, can acquire complete and reference images at multiple times. Any time other than the earliest time among the multiple times is taken as the current time, and the time preceding that arbitrary time is taken as a historical time.

[0101] Alternatively, this embodiment can also treat each moment as the current moment and the previous moment of each moment as a historical moment. In this way, this embodiment can construct a training sample from the reference image of the current moment and the complete images of the historical moments, resulting in a total of T training samples for T moments. For the k-th moment in chronological order among the T moments, a training sample can be constructed from the reference image of the k-th moment and the complete images of the (k-1) preceding moments. It is understood that for the earliest moment among the T moments, the reference image of that earliest moment constitutes a training sample. When determining the posterior distribution information of that earliest moment, the implicit information considered can be the predetermined initial value h of the implicit information described above. (0) .

[0102] In operation S620, a first generator network processes the implicit information and the second graph information of the reference graph for the target object at the current time to generate the posterior distribution information of the embedding information of multiple objects belonging to the target object at the current time. The implementation of operation S620 is similar to that of operation S220 described above. The first generator network may include the first generator sub-network, the second generator sub-network, and the splicing sub-network described above. The posterior distribution information is represented by the expected value generated by the first generator sub-network and the standard deviation generated by the second generator sub-network.

[0103] In operation S630, a decoder is used to process the posterior distribution information and the second graph information to obtain the link probability information between multiple objects.

[0104] According to embodiments of this disclosure, the implementation of operation S630 is similar to the method of obtaining the link probability matrix in the implementation of operation S230 described above. The link probability matrix can be used to represent the link probability information, and this disclosure does not limit this approach. In one embodiment, an adjacency matrix A representing the first complete link information can also be used, given the embedding information of multiple objects. (t) The probability distribution can be used to represent the link probability information. This probability distribution can, for example, be represented by p(A... (t) |Z (t) It is represented by ) based on Z. (t) By sampling this probability distribution, the link probability matrix can be obtained.

[0105] In operation S640, the first loss of the link prediction model is determined based on the link probability information.

[0106] When operating the S650, the link prediction model is trained based on the first loss.

[0107] According to embodiments of this disclosure, a cross-entropy loss function can be used to calculate the first loss. For example, the first loss can be represented by the negative of the logarithm of the probability distribution. In one embodiment, the expected value of the logarithm of the probability distribution can also be used to represent the first loss.

[0108] In one embodiment, as described above, when multiple training samples are obtained, a link probability information can be obtained for each training sample. When determining the first loss, the sum of the multiple link probability information for the multiple training samples can be calculated first, and then the first loss can be determined based on the sum of the multiple link probability information. For example, in this embodiment, the first loss can be calculated using the following formula (8):

[0109]

[0110] This disclosure embodiment can train a link prediction model with the objective of minimizing the first loss. For example, the minimum gradient algorithm can be used to train the link prediction model. It is understood that L1 in formula (8) can be understood as the reconstruction error, which can be intuitively understood as the reconstruction error using reference graph G. (t) and implicit information h (t-1) Obtain embedded information Z (t) Then use Z (t) Reconstruct the graph so that the reconstructed graph is as close as possible to the reference graph. Since q(Z) (t) |A' (t) X (t) h (t-1) Probabilistic driving can be understood as driving based on a given reference map G. (t) It can be derived from q(Z)(t) |A' (t) X (t) h (t-1) Z was sampled from (t) Then use Z (t) To calculate log p(A) (t) |Z (t) If log p(A) (t) |Z (t) If Z is large enough, then it means that the given Z (t) The reference graph G is obtained from the reconstructed conditional probability. (t) The probability is relatively high, which means that the graph can be reconstructed relatively well.

[0111] In one embodiment, variational inference can also be used to obtain the Evidence Lower Bound (ELBO), setting the prior distribution information of the embedded information as a predetermined Gaussian distribution. The lower bound of this observation can be expressed, for example, by the following formula (9):

[0112]

[0113] Accordingly, the loss of the link prediction model can be expressed in formula (9). The negative number is used to represent this. This embodiment can be expressed by maximizing the value in formula (9). The goal is to minimize The negative number is used as the target to train the link prediction model.

[0114] Figure 7 This is a schematic diagram of the structure of the encoder included in the link prediction model during the training phase according to an embodiment of the present disclosure.

[0115] In one embodiment, when using an observation lower bound to represent the loss of the link prediction model, the prior distribution can be determined, for example, based on the first graph information of the complete graph at historical time points, instead of using a predetermined prior distribution. This helps to improve the model's generalization and predictive capabilities.

[0116] like Figure 7 As shown, in this embodiment, when training the link prediction model, a second generator network can be added to the encoder of the link prediction model to generate prior distribution information. Specifically, in this embodiment, the encoder 710 includes a first generator network 711, a DCGRU 712, and a second generator network 713. Similar to the above description, the DCGRU 712 is used to employ the method described above to generate prior distribution information based on graph G. (1) G (2) ... G (t) Graph G in 701 is a complete graph(1) G (2) ... G (t-1) The implicit information h for time (t-1) is obtained by iteratively calculating the information in the first graph. (t-1) The first generator network 711 is used to generate the mathematical expectation of the posterior distribution information. 702 and standard deviation 703. Based on this mathematical expectation 702 and standard deviation 703 gives the posterior distribution 704.

[0117] In obtaining the implicit information h for time (t-1) (t-1) Subsequently, this embodiment can employ a second generator network 713 to process the implicit information h. (t-1) This process yields the prior distribution information 707 of the embedded information at the current moment. Due to the implicit information h... (t-1) Since it is calculated iteratively based on the complete graph at historical moments, this prior distribution information is essentially the distribution information of the embedded information under the condition of the first graph information. This prior distribution information can, for example, be p(Z) (t) |A (<t) X (<t) The second generator network can be represented as a forward propagation network, for example. It is understood that, in this embodiment, similar to the expected value and standard deviation of the posterior distribution, an expected value and a standard deviation can be generated for the embedding information of each object. For example, for the i-th object among N objects, the expected value 705 and standard deviation 706 of the prior distribution of the embedding information can be generated, for example, using the following formulas (10) and (11), respectively:

[0118]

[0119]

[0120] After obtaining the expected value 705 and standard deviation 706 of the prior distribution, the prior distribution information of the embedding information of the i-th object can be represented by the following formula (12):

[0121]

[0122] Accordingly, the prior distribution information of the embedding information of N objects can be calculated using the following formula (13):

[0123]

[0124] In one embodiment, such as Figure 7As shown, the second generating network 713 can include two generating subnetworks, which are used to generate the mathematical expectation and standard deviation of the distribution information, respectively. These will not be elaborated further here.

[0125] After obtaining the prior and posterior distribution information of the embedding information of multiple objects, a second loss for the link prediction model can be determined based on the difference between the prior and posterior distribution information. For example, in this embodiment, the second loss can be positively correlated with the difference between the prior and posterior distribution information; the greater the difference, the greater the second loss. Subsequently, the link prediction model is trained based on this second loss. For example, the link prediction model can be trained with the objective of minimizing the difference between the prior and posterior distribution information.

[0126] It is understandable that when multiple training samples as described above are obtained, prior distribution information and posterior distribution information at a certain time can be obtained based on each training sample. For T time points, a total of T prior distribution information and T posterior distribution information can be obtained. This embodiment can determine the difference between the prior distribution information and the posterior distribution information of the embedded information at each time point, and take this difference as the difference for each time point. Finally, the second loss is determined based on the sum of the T differences for T time points. It is understandable that the difference between the two distribution information can be represented by KL divergence. By replacing the second term on the right side of the equation (9) described above with the second loss of this embodiment, the overall loss of the linked prediction model can be obtained, for example, by using the following formula (14):

[0127]

[0128] Based on the link prediction method provided in this disclosure, this disclosure also provides a link prediction apparatus. The following will be combined with... Figure 8 The device is described in detail.

[0129] Figure 8 This is a structural block diagram of a prediction device linked according to an embodiment of the present disclosure.

[0130] like Figure 8 As shown, the link prediction device 800 of this embodiment may include an implicit information determination module 810, a posterior distribution determination module 820, and a link information determination module 830.

[0131] The implicit information determination module 810 is used to determine implicit information for a historical time based on the first graph information of the complete graph of the target object at a historical time. The implicit information represents the time dependency information of the complete graph of the target object. In one embodiment, the implicit information determination module 810 can be used to perform the operation S210 described above, which will not be repeated here.

[0132] The posterior distribution determination module 820 is used to determine the posterior distribution information of the first embedding information of multiple first objects belonging to the target object at the current time, based on the implicit information and the second graph information of the reference graph for the target object at the current time. In one embodiment, the posterior distribution determination module 820 can be used to perform the operation S220 described above, which will not be repeated here.

[0133] The link information determination module 830 is used to determine the first complete link information between multiple first objects based on the posterior distribution information and the second graph information. In one embodiment, the link information determination module 830 can be used to perform the operation S230 described above, which will not be repeated here.

[0134] According to embodiments of this disclosure, the second graph information includes, at the current moment: first attribute information of each of the plurality of first objects and reference link information between the plurality of first objects. The first graph information includes, at each historical moment in at least one historical moment: second attribute information of each of the plurality of second objects belonging to the target object, second complete link information between the plurality of second objects, and second embedding information of each of the plurality of second objects.

[0135] According to an embodiment of this disclosure, the implicit information determination module 810 is used to process the first graph information using a diffusion convolution gated loop unit to obtain implicit information for the last moment in the historical time.

[0136] According to an embodiment of this disclosure, the implicit information determination module 810 includes: a mapping processing submodule, used to process the second attribute information and the second embedded information respectively using a mapping function to obtain processed attribute information and processed embedded information; a first splicing submodule, used to splice the processed attribute information and the processed embedded information to obtain first spliced ​​information; and an implicit information determination submodule, used to input the first spliced ​​information, the second complete link information and the predetermined initial value of the implicit information into a diffusion convolution gated recurrent unit to obtain implicit information for the last moment in the historical time.

[0137] According to an embodiment of this disclosure, the posterior distribution determination module 820 includes: a second splicing submodule, used to splice the first attribute information and implicit information to obtain second spliced ​​information; and a numerical generation submodule, used to generate the mathematical expectation and standard deviation of the posterior distribution information using a generative network based on the second splicing information and reference link information.

[0138] According to embodiments of this disclosure, the numerical generation submodule includes: a degree information determination unit, configured to determine in-degree information and out-degree information for multiple first objects based on reference link information; an expectation generation unit, configured to input second splicing information, reference link information, in-degree information, and out-degree information into a first generation subnetwork included in the generation network to generate a mathematical expectation of the posterior distribution information; and a standard deviation generation unit, configured to input second splicing information, reference link information, in-degree information, and out-degree information into a second generation subnetwork included in the generation network to generate a standard deviation of the posterior distribution information.

[0139] According to an embodiment of this disclosure, the link information determination module 830 includes: an embedding information obtaining submodule, configured to determine the embedding information of each of a plurality of first objects based on posterior distribution information, thereby obtaining a plurality of first embedding information; and a link information determining submodule, configured to determine the first complete link information between the plurality of first objects based on the plurality of first embedding information.

[0140] According to an embodiment of this disclosure, the link information determination submodule includes: an embedding information processing unit, configured to process multiple first embedding information using a fully connected layer to obtain multiple processed embedding information; and a link information determination unit, configured to determine first complete link information between multiple first objects based on the similarity relationship between the multiple processed embedding information.

[0141] Based on the training method of the link prediction model provided in this disclosure, this disclosure also provides a training device for the link prediction model, which will be described below in conjunction with... Figure 9 The device is described in detail.

[0142] Figure 9 This is a structural block diagram of a training apparatus for a link prediction model according to an embodiment of the present disclosure.

[0143] like Figure 9 As shown, the training device 900 for the link prediction model in this embodiment may include an implicit information determination module 910, a posterior distribution determination module 920, a link probability determination module 930, a first loss determination module 940, and a model training module 950. The link prediction model includes an encoder and a decoder; the encoder includes a gated recurrent unit and a first generative network.

[0144] The implicit information determination module 910 is used to process the first graph information of the complete graph of the target object at a historical time using a gated loop unit to obtain implicit information for that historical time. The implicit information represents the time dependency information of the complete graph of the target object. In one embodiment, the implicit information determination module 910 can be used to perform the operation S610 described above, which will not be repeated here.

[0145] The posterior distribution determination module 920 is used to process the implicit information and the second graph information of the reference graph for the target object at the current time using the first generator network, to generate posterior distribution information of the embedding information of multiple objects belonging to the target object at the current time. In one embodiment, the posterior distribution determination module 920 can be used to perform the operation S620 described above, which will not be repeated here.

[0146] The link probability determination module 930 is used to process the posterior distribution information and the second graph information using a decoder to obtain link probability information between multiple objects. In one embodiment, the link probability determination module 930 can be used to perform the operation S630 described above, which will not be repeated here.

[0147] The first loss determination module 940 is used to determine the first loss of the link prediction model based on the link probability information. In one embodiment, the first loss determination module 940 can be used to perform the operation S640 described above, which will not be repeated here.

[0148] The model training module 950 is used to train the link prediction model based on the first loss. In one embodiment, the model training module 950 may be used to perform the operation S650 described above, which will not be repeated here.

[0149] According to embodiments of this disclosure, the apparatus 900 may further include a time determination module, configured to determine, for a plurality of times, each time as the current time and the previous time of each time as a historical time. The aforementioned link probability information is probability information for the current time. The aforementioned first loss determination module 940 may be configured to: determine a first loss based on the sum of multiple link probability information for multiple times.

[0150] According to embodiments of this disclosure, the encoder further includes a second generative network encoder. The apparatus 900 may further include: a prior distribution acquisition module, used to process implicit information using the second generative network to obtain prior distribution information of the embedded information at the current time; and a second loss determination module, used to determine a second loss of the link prediction model based on the difference between the prior distribution information and the posterior distribution information. The model training module is further used to train the link prediction model based on the second loss.

[0151] According to embodiments of this disclosure, the apparatus 900 may further include a time determination module, configured to determine, for a plurality of times, each time as the current time and the previous time of each time as a historical time. The second loss determination module may include: a difference determination submodule, configured to, for each of the plurality of times, determine the difference between the prior distribution information and the posterior distribution information of the embedded information at each time, as the difference for each time; and a loss determination submodule, configured to determine a second loss of the linked prediction model based on the sum of the multiple differences for the plurality of times.

[0152] It should be noted that the collection, storage, use, processing, transmission, provision, disclosure, and application of user personal information in this disclosed technical solution comply with relevant laws and regulations, necessary confidentiality measures have been taken, and it does not violate public order and good morals. In this disclosed technical solution, user authorization or consent has been obtained before acquiring or collecting user personal information.

[0153] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0154] Figure 10 A schematic block diagram of an example electronic device 1000 is shown, which can be used to implement a link prediction method or a link prediction model training method for embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0155] like Figure 10 As shown, device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in read-only memory (ROM) 1002 or a computer program loaded from storage unit 1008 into random access memory (RAM) 1003. The RAM 1003 may also store various programs and data required for the operation of device 1000. The computing unit 1001, ROM 1002, and RAM 1003 are interconnected via bus 1004. Input / output (I / O) interface 1005 is also connected to bus 1004.

[0156] Multiple components in device 1000 are connected to I / O interface 1005, including: input unit 1006, such as keyboard, mouse, etc.; output unit 1007, such as various types of monitors, speakers, etc.; storage unit 1008, such as disk, optical disk, etc.; and communication unit 1009, such as network card, modem, wireless transceiver, etc. Communication unit 1009 allows device 1000 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0157] The computing unit 1001 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1001 performs the various methods and processes described above, such as linked prediction methods or linked prediction model training methods. For example, in some embodiments, the linked prediction methods or linked prediction model training methods can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 1008. In some embodiments, part or all of the computer program can be loaded and / or installed on device 1000 via ROM 1002 and / or communication unit 1009. When the computer program is loaded into RAM 1003 and executed by the computing unit 1001, one or more steps of the linked prediction methods or linked prediction model training methods described above can be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured by any other suitable means (e.g., by means of firmware) to perform a link prediction method or a link prediction model training method.

[0158] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0159] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0160] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0161] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0162] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0163] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is established by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service system, addressing the shortcomings of traditional physical hosts and VPS (Virtual Private Server, or simply "VPS") services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.

[0164] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0165] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for predicting links, comprising: Based on the first graph information of the complete graph of the target object at a historical moment, determine the implicit information for the historical moment; The implicit information represents the time dependency information of the complete graph for the target object; Based on the implicit information and the second graph information of the reference graph for the target object at the current time, determine the posterior distribution information of the first embedding information of multiple first objects belonging to the target object at the current time; as well as Based on the posterior distribution information and the second graph information, the first complete link information between the plurality of first objects is determined; The second graph information includes, at the current moment: the first attribute information of each of the plurality of first objects and the reference link information between the plurality of first objects; The first graph information includes, at least one historical moment, the following at each historical moment: second attribute information of each of the multiple second objects belonging to the target object, second complete link information between the multiple second objects, and second embedding information of each of the multiple second objects; The step of determining the implicit information for the historical moment based on the first graph information of the complete graph of the target object at the historical moment includes: The first graph information is processed using a diffusion convolution gated recurrent unit to obtain implicit information for the last moment in the historical time.

2. The method according to claim 1, wherein, The step of processing the first graph information using a diffusing convolution gated recurrent unit to obtain implicit information for the last moment in the historical time includes: The second attribute information and the second embedded information are processed using mapping functions to obtain processed attribute information and processed embedded information. By concatenating the processed attribute information and the processed embedded information, first concatenation information is obtained; and The predetermined initial values ​​of the first splicing information, the second complete linking information, and the implicit information are input into the diffusion convolution gated recurrent unit to obtain the implicit information for the last moment in the historical time.

3. The method according to claim 1, wherein, The step of determining the posterior distribution information of the first embedding information of the multiple first objects belonging to the target object at the current time, based on the implicit information and the second graph information of the reference graph for the target object at the current time, includes: By concatenating the first attribute information and the implicit information, a second concatenated information is obtained; and Based on the second splicing information and the reference link information, a generative network is used to generate the mathematical expectation and standard deviation of the posterior distribution information.

4. The method according to claim 3, wherein, The step of generating the expected value and standard deviation of the posterior distribution information using a generative network based on the second splicing information and the reference linking information includes: Based on the reference link information, determine the in-degree and out-degree information for the plurality of first objects; The second concatenation information, the reference link information, the in-degree information, and the out-degree information are input into the first generator subnetwork included in the generator network to generate the mathematical expectation of the posterior distribution information; and The second splicing information, the reference link information, the in-degree information, and the out-degree information are input into the second generating subnetwork included in the generating network to generate the standard deviation of the posterior distribution information.

5. The method according to claim 1, wherein, Determining the first complete link information between the plurality of first objects based on the posterior distribution information and the second graph information includes: Based on the posterior distribution information, the embedding information of each of the plurality of first objects is determined, thereby obtaining a plurality of first embedding information; and Based on the plurality of first embedded information, first complete link information between the plurality of first objects is determined.

6. The method according to claim 5, wherein, The step of determining the first complete link information between the plurality of first objects based on the plurality of first embedding information includes: A fully connected layer is used to process multiple pieces of the first embedded information to obtain multiple processed embedded information; and Based on the similarity relationships between the multiple processed embedded information, the first complete link information between the multiple first objects is determined.

7. A training method for a link prediction model, wherein, The link prediction model includes an encoder and a decoder; the encoder includes a gated recurrent unit and a first generative network; the method includes: The gated loop unit is used to process the first graph information of the complete graph of the target object at a historical time to obtain implicit information for the historical time; the implicit information represents the time dependency information of the complete graph of the target object. The first generative network is used to process the implicit information and the second graph information of the reference graph for the target object at the current time to generate the posterior distribution information of the embedding information of multiple objects belonging to the target object at the current time; The decoder is used to process the posterior distribution information and the second graph information to obtain the link probability information between the multiple objects; The first loss of the link prediction model is determined based on the link probability information; and The link prediction model is trained based on the first loss; The second graph information includes, at the current moment: the first attribute information of each of the plurality of first objects and the reference link information between the plurality of first objects; The first graph information includes, at least one historical moment, the following at each historical moment: second attribute information of each of the multiple second objects belonging to the target object, second complete link information between the multiple second objects, and second embedding information of each of the multiple second objects; The implicit information obtained for the historical moment includes: The first graph information is processed using a diffusion convolution gated recurrent unit to obtain implicit information for the last moment in the historical time.

8. The method according to claim 7, further comprising: For multiple moments, each of the multiple moments is determined as the current moment, and the previous moment of each moment is the historical moment; Wherein, the link probability information is probability information specific to the current time moment; determining the first loss of the link prediction model based on the link probability information includes: The first loss is determined by summing multiple link probability information for the multiple time points.

9. The method according to claim 7, wherein, The encoder further includes a second generative network; the method further includes: The implicit information is processed using the second generative network to obtain the prior distribution information of the embedded information at the current time. Based on the difference between the prior distribution information and the posterior distribution information, a second loss of the link prediction model is determined; and The link prediction model is trained based on the second loss.

10. The method of claim 9, further comprising: For multiple moments, each of the multiple moments is determined as the current moment, and the previous moment of each moment is the historical moment; The step of determining the second loss of the link prediction model based on the difference between the prior distribution information and the posterior distribution information includes: For each of the plurality of time points, the difference between the prior distribution information and the posterior distribution information of the embedded information at each time point is determined as the difference for each time point; and The second loss of the link prediction model is determined based on the sum of multiple differences at the multiple time points.

11. A link prediction device, comprising: The implicit information determination module is used to determine the implicit information for the historical moment based on the first graph information of the complete graph of the target object at the historical moment; The implicit information represents the time dependency information of the complete graph for the target object; The posterior distribution determination module is used to determine the posterior distribution information of the first embedding information of multiple first objects belonging to the target object at the current time, based on the implicit information and the second graph information of the reference graph for the target object at the current time. as well as The link information determination module is used to determine the first complete link information between the plurality of first objects based on the posterior distribution information and the second graph information; The second graph information includes, at the current moment: the first attribute information of each of the plurality of first objects and the reference link information between the plurality of first objects; The first graph information includes, at least one historical moment, the following at each historical moment: second attribute information of each of the multiple second objects belonging to the target object, second complete link information between the multiple second objects, and second embedding information of each of the multiple second objects; The implicit information determination module is used for: The first graph information is processed using a diffusion convolution gated recurrent unit to obtain implicit information for the last moment in the historical time.

12. The apparatus according to claim 11, wherein, The implicit information determination module includes: The mapping processing submodule is used to process the second attribute information and the second embedding information respectively using a mapping function to obtain the processed attribute information and the processed embedding information; The first splicing submodule is used to splice the processed attribute information and the processed embedded information to obtain first splicing information; and The implicit information determination submodule is used to input the first splicing information, the second complete linking information, and the predetermined initial value of the implicit information into the diffusion convolution gated recurrent unit to obtain the implicit information for the last moment in the historical time.

13. The apparatus according to claim 11, wherein, The posterior distribution determination module includes: The second splicing submodule is used to splice the first attribute information and the implicit information to obtain the second splicing information; and The numerical generation submodule is used to generate the mathematical expectation and standard deviation of the posterior distribution information using a generative network based on the second splicing information and the reference link information.

14. The apparatus according to claim 13, wherein, The numerical generation submodule includes: The degree information determination unit is used to determine the in-degree information and out-degree information for the plurality of first objects based on the reference link information; The expectation generation unit is configured to input the second splicing information, the reference link information, the in-degree information, and the out-degree information into the first generation subnetwork included in the generation network, and generate the mathematical expectation of the posterior distribution information; and The standard deviation generation unit is used to input the second splicing information, the reference link information, the in-degree information, and the out-degree information into the second generation sub-network included in the generation network to generate the standard deviation of the posterior distribution information.

15. The apparatus according to claim 11, wherein, The link information determination module includes: An embedding information acquisition submodule is used to determine the embedding information of each of the plurality of first objects based on the posterior distribution information, thereby obtaining a plurality of first embedding information; and The link information determination submodule is used to determine the first complete link information between the plurality of first objects based on the plurality of first embedded information.

16. The apparatus according to claim 15, wherein, The link information determination submodule includes: An embedded information processing unit is configured to process multiple pieces of the first embedded information using a fully connected layer to obtain multiple processed embedded information; and The link information determination unit is used to determine the first complete link information between the multiple first objects based on the similarity relationship between the multiple processed embedded information.

17. A training apparatus for a link prediction model, wherein, The link prediction model includes an encoder and a decoder; the encoder includes a gated recurrent unit and a first generative network; the device includes: The implicit information determination module is used to process the first graph information of the complete graph of the target object at a historical time using the gated loop unit to obtain implicit information for the historical time; the implicit information represents the time dependency information of the complete graph of the target object. The posterior distribution determination module is used to process the implicit information and the second graph information of the reference graph for the target object at the current time using the first generator network to generate posterior distribution information of the embedding information of multiple objects belonging to the target object at the current time; The link probability determination module is used to process the posterior distribution information and the second graph information using the decoder to obtain the link probability information between the multiple objects. The first loss determination module is used to determine the first loss of the link prediction model based on the link probability information; and The model training module is used to train the link prediction model based on the first loss; The second graph information includes, at the current moment: the first attribute information of each of the plurality of first objects and the reference link information between the plurality of first objects; The first graph information includes, at least one historical moment, the following at each historical moment: second attribute information of each of the multiple second objects belonging to the target object, second complete link information between the multiple second objects, and second embedding information of each of the multiple second objects; The implicit information determination module is further used for: The first graph information is processed using a diffusion convolution gated recurrent unit to obtain implicit information for the last moment in the historical time.

18. The apparatus of claim 17, further comprising: A time determination module is used to determine each of the multiple times as the current time, and the previous time of each time as the historical time; Wherein, the link probability information is probability information for the current time moment; the first loss determination module is used to: determine the first loss based on the sum of multiple link probability information for the multiple time moments.

19. The apparatus according to claim 17, wherein, The encoder further includes a second generation network; the apparatus further includes: A prior distribution acquisition module is used to process the implicit information using the second generator network to obtain the prior distribution information of the embedded information at the current time; and The second loss determination module is used to determine the second loss of the link prediction model based on the difference between the prior distribution information and the posterior distribution information. The model training module is further used to train the link prediction model based on the second loss.

20. The apparatus of claim 19, further comprising: A time determination module is used to determine each of the multiple times as the current time, and the previous time of each time as the historical time; The second loss determination module includes: The difference determination submodule is used to determine, for each of the plurality of time points, the difference between the prior distribution information and the posterior distribution information of the embedded information at each time point, as the difference for each time point; and The loss determination submodule is used to determine a second loss of the linked prediction model based on the sum of multiple differences for the multiple time points.

21. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 10.

22. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 10.

23. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 10.