Method, device, equipment and readable storage medium for generating analysis results

By embedding the heterogeneous graph structure and semantic aspects as hidden variables, the problem of limited number of metapaths in the existing technology is solved, and more accurate node feature updates and efficient execution of downstream tasks are achieved.

CN111967271BActive Publication Date: 2025-04-25PEKING UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010839225.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-19
Publication Date
2025-04-25
Estimated Expiration
2040-08-19

AI Technical Summary

Technical Problem

In the prior art, the number of manually defined metapaths is limited and cannot cover the potential complex node semantic correlation, resulting in a lack of node feature expression and poor update accuracy.

Method used

By embedding the initial node features as random variables and semantic aspects as hidden variables, heterogeneous graph features are generated, including updating semantic features and updating node features, thereby improving the update accuracy of node features.

Benefits of technology

This method can obtain more accurate node features and semantic features, improve the update efficiency of node features, and improve the accuracy of task execution in downstream tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111967271B_ABST
    Figure CN111967271B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and readable storage medium for generating analysis results, and relates to the field of machine learning. The method includes: obtaining a heterogeneous graph structure of a target heterogeneous graph, wherein the heterogeneous graph structure includes node data and edge data; determining the initial node features corresponding to the node data, and the semantic aspects corresponding to the edge data; using the heterogeneous graph structure as a random variable and the semantic aspects as hidden variables, embedding the initial node features, and obtaining the heterogeneous graph features of the target heterogeneous graph, wherein the heterogeneous graph features include updated semantic features and updated node features. Using the semantic aspects as hidden variables, the heterogeneous graph is embedded, and the implicit semantics is obtained from the heterogeneous graph, thereby updating the node feature vector and the semantic feature vector, avoiding updating the node features by setting the meta-path, improving the updating efficiency of the node features, and achieving higher execution accuracy in the generation of downstream analysis results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of machine learning, and in particular to a method, device, equipment and readable storage medium for generating analysis results. Background Art

[0002] Graph embedding is an algorithm that converts an attribute graph into a vector or a vector set. A heterogeneous graph is a graph data structure that contains multiple types of nodes and multiple types of edges. That is, heterogeneous graph embedding refers to an algorithm that represents the structure and semantic information of a heterogeneous graph as a node vector. The updated node features finally obtained in the embedding space satisfy that semantically related nodes are close to each other, and semantically unrelated nodes are far away from each other.

[0003] In the related technology, heterogeneous graphs are embedded by setting meta-paths, where meta-paths are used to represent node type sequences with specific semantic meanings. They are predefined by developers based on domain knowledge, and meta-paths are used to guide random walks on heterogeneous graphs to obtain positive samples that conform to the meta-paths and negative samples that do not conform to the meta-paths. The positive samples and negative samples are input into the feature embedding model to update the node features.

[0004] However, due to the limited number of manually defined meta-paths, some potential and complex node semantic correlations cannot be covered, resulting in inadequate node feature expression and poor update accuracy of node features. Summary of the invention

[0005] The embodiment of the present application provides a method, device, equipment and readable storage medium for generating analysis results, which can improve the update accuracy of node features. The technical solution is as follows:

[0006] In one aspect, a method for generating an analysis result is provided, the method comprising:

[0007] Acquire a heterogeneous graph structure of a target heterogeneous graph, wherein the heterogeneous graph structure includes node data and edge data;

[0008] Determining initial node features corresponding to the node data and semantic aspects corresponding to the edge data;

[0009] Taking the heterogeneous graph structure as a random variable and the semantic aspect as a hidden variable, embedding the initial node feature to obtain the heterogeneous graph feature of the target heterogeneous graph, wherein the heterogeneous graph feature includes an updated semantic feature and an updated node feature;

[0010] The update semantic features and the update node features are analyzed to generate analysis results corresponding to the node data.

[0011] In another aspect, a device for generating an analysis result is provided, the device comprising:

[0012] An acquisition module, used for acquiring a heterogeneous graph structure of a target heterogeneous graph, wherein the heterogeneous graph structure includes node data and edge data, wherein the node data corresponds to initial node features, and the edge data corresponds to semantic aspects;

[0013] A determination module, configured to determine initial node features corresponding to the node data and semantic aspects corresponding to the edge data;

[0014] An embedding module, used to embed the initial node features with the heterogeneous graph structure as a random variable and the semantic aspect as a hidden variable to obtain the heterogeneous graph features of the target heterogeneous graph, wherein the heterogeneous graph features include updated semantic features and updated node features;

[0015] The analysis module is used to analyze the update semantic features and the update node features to generate analysis results corresponding to the node data.

[0016] On the other hand, a computer device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a method for generating an analysis result as described in any of the above-mentioned embodiments of the present application.

[0017] On the other hand, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement a method for generating analysis results as described in any of the above-mentioned embodiments of the present application.

[0018] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method for generating an analysis result described in any of the above embodiments.

[0019] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0020] Taking the heterogeneous graph structure as the random variable and the semantic aspect as the hidden variable, the heterogeneous graph is embedded and the implicit semantics is obtained from the heterogeneous graph to update the node feature vector and the semantic feature vector, so as to obtain more accurate node feature vectors and semantic feature vectors, and avoid updating the node features by setting the meta-path, thereby improving the updating efficiency of the node features and achieving higher task execution accuracy in downstream prediction tasks. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0022] Figure 1 It is a schematic diagram of extracting node features of a heterogeneous graph by setting a meta-path in a related technology provided by an exemplary embodiment of the present application;

[0023] Figure 2 It is a schematic diagram of extracting node features of a heterogeneous graph by a heterogeneous graph attention network in a related technology provided by an exemplary embodiment of the present application;

[0024] Figure 3 It is a schematic diagram of the framework of an overall solution provided by an exemplary embodiment of the present application;

[0025] Figure 4 is a flow chart of a method for generating analysis results provided by an exemplary embodiment of the present application;

[0026] Figure 5 is a flow chart of a method for generating analysis results provided by another exemplary embodiment of the present application;

[0027] Figure 6 is a flow chart of a method for generating analysis results provided by another exemplary embodiment of the present application;

[0028] Figure 7 is a structural block diagram of a device for generating analysis results provided by an exemplary embodiment of the present application;

[0029] Figure 8 is a structural block diagram of a device for generating analysis results provided by another exemplary embodiment of the present application;

[0030] Fig. 9 It is a structural block diagram of a server provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0031] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0032] First, a brief introduction is given to the terms involved in the embodiments of this application:

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

[0034] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0035] Machine Learning (ML): It is a multi-disciplinary interdisciplinary subject, involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and teaching learning.

[0036] Heterogeneous Graph: Also known as Heterogeneous Information Network, it is a graph data structure that contains multiple types of nodes and multiple types of edges. Schematically, taking the application scenario of the recommendation system as an example, the entities in the recommendation system include user accounts, dynamics posted by users, and recommended content uploaded by advertisers; the associations between entities include the friendship between user accounts, and the interaction between user accounts and dynamics (such as likes, reposts, dynamic mentions of accounts, etc.). For the above recommendation system, the entities are expressed through nodes in the heterogeneous graph, and the associations between entities are expressed through edges between nodes in the heterogeneous graph.

[0037] Graph Embedding: It is an algorithm that converts an attribute graph into a vector or a vector set. Heterogeneous Graph Embedding (HGE) refers to an algorithm that represents the structure and semantic information of a heterogeneous graph as a node vector. The updated node features obtained in the embedding space satisfy the requirement that semantically related nodes are close to each other, and semantically unrelated nodes are far away from each other.

[0038] In the related art, heterogeneous graphs are embedded by setting a meta-path, where a meta-path refers to a sequence of node types with a specific semantic meaning. For example, a meta-path "APC" is set in a paper citing a heterogeneous graph network, which indicates that the paper written by the author was published at an academic conference. In the related art, heterogeneous graph embedding methods based on meta-paths include the following two categories:

[0039] First, we use meta-paths to randomly walk on heterogeneous graphs, and use predefined meta-paths as conditional filters. The samples that match the meta-paths are used as positive samples, and the samples that do not match the meta-paths are used as negative samples. The positive and negative samples are input into the feature embedding model, and the updated nodes are output.

[0040] For illustration, please refer to Figure 1, taking the paper citation heterogeneous graph 100 as an example, in which there are set institution nodes 110, author nodes 120, paper nodes 130 and academic conference nodes 140, a random walk is performed on the heterogeneous graph 100 according to the predefined meta-path 150, and multiple positive sample sequences are sampled from the input heterogeneous graph 100, encoded and input into the Skip-Gram model 160. The Skip-Gram model 160 predicts the probability of the occurrence of the context node of the node, that is, the probability of the selected node and its neighbor's nodes "co-occurring", so that the probability of node co-occurrence in the positive sample sequence is as large as possible. Similarly, the model will randomly sample multiple negative samples from the heterogeneous graph 100, and also input them into the Skip-Gram model 160, so that the probability of node co-occurrence in the negative samples is as small as possible. Through this constraint, the updated node features meet the conditions that semantically related nodes are close to each other and semantically irrelevant nodes are far away from each other in the embedding space.

[0041] Second, the meta-path is used as prior information to guide the graph neural network to learn the weights of the neighboring nodes corresponding to the central node, and the node features are weighted according to the weights during aggregation to obtain the updated nodes.

[0042] For illustration, please refer to Figure 2 Taking the Heterogeneous Graph Attention Network (HAN) as an example, learning is performed at two levels: node level 210 and semantic level 220. The attention mechanism at the node level 210 mainly learns the weights between the node and its neighboring nodes, and the attention mechanism at the semantic level 220 mainly learns the weights based on different meta-paths.

[0043] However, due to the limited number of manually defined meta-paths, some potential and complex node semantic correlations cannot be covered, resulting in inadequate node feature expression and poor update accuracy of node features.

[0044] In combination with the above-mentioned noun introduction, the application scenarios involved in the embodiments of the present application are illustrated by way of example:

[0045] Taking the application scenario of the recommendation system as an example, the entities in the recommendation system include user accounts, dynamics posted by users, and recommended content uploaded by advertisers; the associations between entities include the friendship between user accounts, and the interaction between user accounts and dynamics (such as likes, reposts, dynamic mentions of accounts, etc.). For the above recommendation system, the entities therein are expressed through nodes in a heterogeneous graph, and the associations between entities are expressed through edges between nodes in the heterogeneous graph. Through the method for generating analysis results provided in an embodiment of the present application, the update node features and update semantic features corresponding to the heterogeneous graph of the above recommendation system are obtained, and the update node features and update semantic features imply the semantic information and structural information contained in the heterogeneous graph of the recommendation system.

[0046] After determining the heterogeneous graph features, the heterogeneous graph features are applied to content recommendation. Schematically, an association prediction is performed on the first node corresponding to the user account and the second node corresponding to the candidate recommended content according to the heterogeneous graph features to obtain an association prediction result, which is used to indicate the user account's predicted interest in the candidate recommended content. Optionally, when performing association prediction, the heterogeneous graph features are used as input parameters and input into a content recommendation model, which is a machine learning model obtained by pre-selected training. The content recommendation model is used to perform association prediction on the first node and the second node to obtain an association prediction result, and outputs the target recommended content recommended to the target user account. The content recommendation model is a pre-trained neural network model.

[0047] Optionally, the heterogeneous graph features include updated node features and semantic features between nodes, and the content recommendation model is used to determine the correlation between the first node and the second node based on the updated node features and semantic features, and determine the candidate recommended content with a higher correlation and associated with the target user account as the target recommended content based on the correlation.

[0048] In the above examples, the application in the recommendation system is used as an example for explanation. The method for generating analysis results provided in the present application can also be applied to other scenarios in which heterogeneous graphs are embedded to obtain updated node features and semantic features, and the updated features are applied to downstream tasks. The embodiments of the present application are not limited to this.

[0049] For illustration, please refer to Figure 3 , which shows a schematic diagram of the framework of the overall solution provided by an exemplary embodiment of the present application, such as Figure 3 As shown, taking the setting of two semantic aspect types as an example, for the heterogeneous graph 300, the structure of the heterogeneous graph 300 is used as a random variable, the semantic aspect 310 is used as a hidden variable, and the initial node features of the heterogeneous graph 300 are embedded. Also, the semantic aspect 320 is used as a hidden variable to embed the initial node features of the heterogeneous graph 300, and updated node features and semantic features are obtained.

[0050] Combined with the above-mentioned noun introduction and application scenarios, the method for generating the analysis results provided by this application is described, taking the application of this method in a server as an example. Figure 4 As shown, the method includes:

[0051] Step 401, obtaining a heterogeneous graph structure of a target heterogeneous graph, wherein the heterogeneous graph structure includes node data and edge data.

[0052] In one example, a heterogeneous graph structure is expressed as Among them, ν represents the node set of the heterogeneous graph, that is, the node data of the heterogeneous graph, ε represents the edge set of the heterogeneous graph, that is, the edge data, and the mapping of each node is given by ν→T, T represents the type of node, and the type of each edge is determined by the mapping ψ:ε→R, R represents the type of edge. For heterogeneous graphs, |T|+|R|>2.

[0053] Step 402, determining initial node features corresponding to the node data and semantic aspects corresponding to the edge data.

[0054] Among them, the initial node feature corresponds to the attribute data of each node, and the attribute data includes the node type and node name corresponding to the node. Schematically, the target heterogeneous graph is a recommendation system network, which includes node A, the node type corresponding to node A is a user account, and the node name corresponding to node A is "00123", which is used to represent the account identifier of the user account.

[0055] The semantic aspect corresponds to the association between nodes in the heterogeneous graph. For example, taking the movie recommendation system as an example, the node types include: 1. user account; 2. movie name; 3. movie category; 4. director; 5. starring. The semantic aspect includes: movies watched by the user account, movie categories liked by the user account, directors liked by the user account, actors liked by the user account, etc.

[0056] The initial eigenvector is expressed as X∈R |ν|×din , where |ν| represents the number of nodes, d in Represents the dimension of the initial feature vector of the input.

[0057] The semantic aspect is expressed as A (aspect), and the semantic aspect also corresponds to a semantic quantity, which is used to indicate the number of semantic aspect types indicated by the edge data, that is, the semantic quantity is specified according to a priori conditions.

[0058] Step 403, using the heterogeneous graph structure as a random variable and the semantic aspect as a hidden variable, embedding the initial node features to obtain the heterogeneous graph features of the target heterogeneous graph.

[0059] In an exemplary embodiment, a heterogeneous graph structure is input into a probabilistic graph generation model, with the heterogeneous graph structure as a random variable and the semantic aspect as a hidden variable, and the initial node features are embedded through the probabilistic graph generation model.

[0060] When the heterogeneous graph structure is input into the probabilistic graph generation model, the initial node features and the above-mentioned semantic quantity are input into the probabilistic graph generation model, so that the probabilistic graph generation model updates the initial node features in combination with the input content.

[0061] Probabilistic Graphical Models (PGMs) are a mathematical tool that uses graph structures to represent probability distributions, where the nodes of the probability graph represent random variables and the edges of the graph represent the dependencies between random variables.

[0062] Heterogeneous graph features include updating semantic features and updating node features.

[0063] Among them, the probabilistic graph generation model also corresponds to generation model parameters. In response to the generation model parameters being trained parameters, the initial node features are directly embedded through the probabilistic graph generation model to obtain updated semantic features and updated node features; in response to the generation model parameters being untrained parameters, it is necessary to first iteratively adjust the model parameters according to the heterogeneous graph structure.

[0064] The process of generating updated node features and semantic features by the probabilistic graph generation model is expressed as the following formula 1:

[0065] Formula 1: p φ (G, A, X) = p φ (G│A,X)p φ (A|X)p(X)

[0066] Among them, φ represents the generation model parameters of the probabilistic graph generation model, and the distribution of the initial node feature X is non-parametric. In the formalization of the above generation process, it is assumed that the heterogeneous graph is generated by the input initial node features and semantic latent variables, that is, the joint probability distribution of G, A, and X is expanded by the chain rule, and the initial node feature X and the unobserved semantic latent variable A work together to generate the topological structure of the heterogeneous graph.

[0067] The generative model parameter φ of the generative model can be solved by maximum likelihood estimation, that is, maximizing logp φ (G|X). Since there are hidden variables in the model, it is impossible to solve this maximum optimization problem directly, so the variational expectation maximization (vEM) algorithm is used to solve it.

[0068] Optionally, determine the maximum likelihood estimation function logp of the model parameters corresponding to the heterogeneous graph structure and the initial node characteristics φ (G|X), the model parameters are adjusted through the maximum likelihood estimation function, and the initial node features are embedded using the adjusted model parameters through the probability graph generation model.

[0069] Among them, the maximum likelihood estimation function is transformed into the variational distribution q θ (A|X) and the posterior distribution p φ (A|G, X) expression, the variational distribution corresponds to the variational model parameter θ, the posterior distribution corresponds to the generative model parameter φ, according to the divergence requirements between the variational distribution and the posterior distribution, the variational model parameters are adjusted, and the generative model parameters are adjusted according to the adjusted variational model parameters. Schematically, the maximum likelihood estimation function is shown in the following formula 2:

[0070] Formula 2:

[0071] Among them, KL stands for KL divergence (Kullback-Leibler Divergence), which is used to measure the difference between two probability distributions. It represents a lower bound of the likelihood function, called the evidence lower bound (ELBO). By maximizing the evidence lower bound, the maximum likelihood estimation function can be maximized.

[0072] The variational model parameters and generative model parameters are adjusted by the vEM algorithm. The vEM algorithm is divided into the E step and the M step. The E step represents the inference process, and the M step represents the learning process. In the E step, the variational model parameters θ are first adjusted according to the divergence requirements between the variational distribution and the posterior distribution. In the M step, the generative model parameters φ are adjusted in combination with the adjusted variational model parameters θ. The variational model parameters θ and the generative model parameters φ are iteratively updated by the vEM algorithm. The E step and the M step are explained separately.

[0073] The E step represents the inference process. The probabilistic graph generation model requires the posterior distribution p φ (A|G, X) is estimated, but due to the unknown and complex relationship between the latent variable A and the node feature X in the estimation process, the estimation result cannot be obtained directly. Therefore, according to the vEM algorithm, the posterior distribution p is fixed in the E step. φ (A|G, X), and update the variational distribution q by θ (A|X) approximates the true posterior distribution.

[0074] Optionally, a graph neural network is used to instantiate the variational distribution q according to amortized inference θ (A|X), denoted as GNN θ , and according to the mean-field theory, the variational distribution is rewritten as the following formula 3:

[0075] Formula 3:

[0076] Where K represents the number of aspect latent variables in the heterogeneous graph. k represents the kth aspect variable.

[0077] GNN θ The optimization objective is defined as the following formula 4:

[0078] Formula 4:

[0079] According to the above optimization objective formula, the variational distribution q θ The optimization of (A|X) needs to satisfy the following formula 5:

[0080] Formula 5:

[0081] Among them, C is const, which is a constant. For example, taking one of the variables a0 as an example, the derivation process of the above formula 5 is explained, please refer to the following formula 6:

[0082]

[0083] The logF(a0) in the above derived formula is expanded as shown in the following formula 7:

[0084] Formula 7:

[0085] According to the above derivation, the optimal It is obtained when the KL divergence is zero, and the two distributions inside the KL divergence are equal. Refer to the following formula 8:

[0086] Formula 8:

[0087] The M step represents the learning process, in which the variational distribution q is fixed θ (A|X), update the posterior distribution p φ (A|G, X), the optimization process of parameter φ is as follows:

[0088] Formula 9:

[0089] Among them, logp φ(G|A,X) and logp φ (A|X) is instantiated as a graph neural network GNN φ .

[0090] That is, the probabilistic graph generation model includes the above GNN θ and GNN φ , through GNN θ and GNN φ The initial node features are embedded and the updated semantic features and updated node features are output.

[0091] Step 404: Analyze the updated semantic features and updated node features to generate analysis results corresponding to the node data.

[0092] Optionally, association prediction is performed on the node data in the heterogeneous graph structure according to the heterogeneous graph features, and the association prediction result is obtained as the analysis result.

[0093] The association prediction result is used to indicate the predicted association relationship between node data.

[0094] According to the association prediction results, the heterogeneous graph structure is subsequently applied. The application of the association prediction results is schematically illustrated by examples:

[0095] First, the node data includes a first node and a second node, wherein the first node corresponds to the account data and the second node corresponds to the candidate recommended content; an association prediction is performed on the first node and the second node according to the heterogeneous graph features to obtain an association prediction result, which is used to indicate the predicted interest level of the account data in the candidate recommended content.

[0096] Optionally, candidate recommended content with a predicted high interest level is sent to the target account based on the association prediction result; or, the number of target accounts with a high interest level corresponding to the candidate recommended content is predicted based on the association prediction result, thereby obtaining a predicted promotion effect of the candidate recommended content.

[0097] Optionally, in the process of performing association prediction, the heterogeneous graph features are input into a recommendation model, where the recommendation model is a pre-trained machine learning model, and the association prediction is performed on the first node and the second node through the recommendation model to obtain an association prediction result.

[0098] Second, the node data includes a third node and a fourth node, wherein the third node corresponds to an abnormal description content, and the fourth node corresponds to an abnormal state type, wherein the abnormal description content is a content describing the abnormal situation of the program, and the abnormal state type is a program running state diagnosis result corresponding to the abnormal description content. According to the heterogeneous graph features, the third node and the fourth node are associated with each other to obtain an associated prediction result, and the associated prediction result is used to indicate the abnormal state type speculation corresponding to each abnormal description content.

[0099] Optionally, an abnormal state type with a high degree of correlation with the target abnormal description content is determined according to the association prediction result, so as to handle the program abnormality with a solution corresponding to the abnormal state type.

[0100] Optionally, in the process of performing association prediction, the heterogeneous graph features are input into an anomaly prediction model, which is a pre-trained machine learning model. The anomaly prediction model is used to perform association prediction on the third node and the fourth node to obtain an association prediction result.

[0101] To summarize, the method for generating analysis results provided in this embodiment uses heterogeneous graph structures as random variables and semantic aspects as hidden variables, thereby embedding the heterogeneous graph and obtaining implicit semantics from the heterogeneous graph, thereby updating the node feature vector and the semantic feature vector, obtaining more accurate node feature vectors and semantic feature vectors, and avoiding updating node features by setting meta-paths, thereby improving the updating efficiency of node features and achieving higher task execution accuracy in downstream tasks.

[0102] In this embodiment, in the probabilistic graph generation model, the variational distribution is used to assist in maximizing the maximum likelihood estimation function, thereby deriving a graph neural network for updating node features and semantic features, thereby improving the accuracy of node updates.

[0103] Schematically, the algorithm of the overall solution framework provided by the embodiment of the present application is shown in the following process:

[0104] Input: initialnodefeatureX∈R |ν|×din , aspect number K

[0105] Output: Node embedding H∈R |ν|×dout

[0106] 1: while not converged

[0107] 2: E-Step: Inference Procedure

[0108] 3:Updatenodeembeddingsandedgeweightsbyq θ

[0109] 4: InferenceaspectembeddingsAbyq θ

[0110] 5: Updateq θ byEq(4)

[0111] 6: M-Step: Learning Procedure

[0112] 7:Updatenodeembeddingsandedgeweightsbyp φ

[0113] 8: Updatep φ

[0114] 9: endwhile

[0115] The first line of the algorithm, Input, indicates the input parameters, including the heterogeneous graph structure G, the initial node features X, and the number of semantics K. The number of semantics is used to indicate the number of semantic aspect types indicated by the edge data, that is, the number of aspect latent variables. The second line, Output, indicates the output content, including updated node features and updated semantic features, where R is used to indicate the type of edge, |ν| indicates the number of nodes, and d out Represents the dimension of the output updated feature vector.

[0116] In the algorithm process, step 1 indicates the start of iterative update; step 2 indicates the prediction process, which corresponds to step E above; step 3 indicates the prediction process based on q θ Update node features and edge weights; step 4 means according to q θ The latent vector A in the prediction aspect; Step 5 represents updating q according to the above formula 4 θ ; Step 6 indicates the start of the learning process, which corresponds to the above-mentioned M step; Step 7 indicates that according to p φ Update node features and edge weights; step 8 represents updating p φ ; Step 9 indicates the end of the iteration.

[0117] In an optional implementation, by using the above GNN θ and GNN φ When updating node features, it is achieved by decoupling edge weights and initial node features to obtain K aspect channels. Figure 5 is a flowchart of a method for generating analysis results provided by another exemplary embodiment of the present application. Taking the method applied to a server as an example, Figure 5 As shown, the method includes:

[0118] Step 501: Obtain a heterogeneous graph structure of a target heterogeneous graph, wherein the heterogeneous graph structure includes node data and edge data.

[0119] The node data corresponds to the initial node features, and the edge data corresponds to the semantic aspects.

[0120] In one example, a heterogeneous graph structure is expressed as The initial eigenvector is expressed as X∈R |ν|×din , the semantic aspect is expressed as A (aspect).

[0121] Step 502: input the heterogeneous graph structure of the target heterogeneous graph into a probabilistic graph generation model.

[0122] When the heterogeneous graph structure is input into the probabilistic graph generation model, the initial node features and the above-mentioned semantic quantity are input into the probabilistic graph generation model, so that the probabilistic graph generation model updates the initial node features in combination with the input content.

[0123] Step 503: Decouple the edge weights and initial node features to obtain K aspect channels, where K is a positive integer.

[0124] The value of K corresponds to the semantic quantity, and the semantic quantity is used to indicate the number of semantic aspect types indicated by the edge data, wherein the value of K is predefined.

[0125] Optionally, the neural network structure used in the probabilistic graph generation model is a graph neural network (Aspect-aware GNN, A 2 GNN), the above-mentioned GNN θ and GNN φ .

[0126] The output of the probabilistic graph generation model includes updated semantic features and updated node features, where the updated node features are expressed as h i represents the output feature of the neural network layer, i represents the i-th node; the updated semantic feature expression is a k represents the kth aspect latent variable, and K represents the total number of semantic aspects.

[0127] Step 504: Update the edge weight according to the node feature vector and the aspect feature vector of the kth aspect channel.

[0128] Due to different aspects of latent variables a kThe conditions need to be kept as independent as possible to describe semantic aspects with different meanings in heterogeneous graphs, and each node can participate in the description of different semantic aspects. Therefore, the co-occurrence probability between a node and its surrounding neighbor nodes needs to meet the aspect-aware condition, that is, the probabilistic graph generation model needs to have the ability to model the co-occurrence probability between a node and its surrounding neighbor nodes.

[0129] Therefore, in this embodiment, the edge data also corresponds to the edge weight, and the edge weight and the initial node feature are decoupled to obtain K aspect channels, K is a positive integer, and the value of K corresponds to the number of semantics. The edge weight is updated according to the node feature vector and the aspect feature vector of the kth aspect channel, and the initial node feature is updated according to the updated edge weight. Among them, the node feature vector is obtained by mapping the initial node feature vector through a nonlinear mapping function, that is, the initial node feature is mapped through a nonlinear mapping function to obtain the node feature vector of the kth aspect channel; the aspect feature vectors of the k aspect channels are obtained by performing global graph pooling processing in the kth aspect channel, wherein, in this embodiment, the global graph pooling processing is implemented as a global average pooling processing, and the global graph pooling processing can also be implemented as other graph pooling technologies, which is not limited in this embodiment. Schematically, please refer to the following formula ten for the global pooling process:

[0130] Formula 10:

[0131] Among them, GLOBALPOOL represents global graph pooling processing. W represents the semantic type.

[0132] When updating the edge weight, the first node feature vector and the first aspect feature vector of the i-th node in the k-th aspect channel are obtained, and the first splicing vector is obtained by splicing; the second node feature vector and the second aspect feature vector of the j-th node in the k-th aspect channel are obtained, and the second splicing vector is obtained by splicing; the third node feature vector and the third aspect feature vector of the m-th node in the k-th aspect channel are obtained, and the third splicing vector is obtained by splicing, i, j, and m are all positive integers, and the m-th node is a neighbor node of the i-th node, a first semantic similarity between the first splicing vector and the second splicing vector is determined, and a second semantic similarity between the first splicing vector and the third splicing vector is determined, and the edge weight is updated according to the first semantic similarity and the second semantic similarity.

[0133] For illustration, please refer to the following formula 11 for the update process of edge weights:

[0134] Formula 11:

[0135] Among them, for the k-th aspect channel, is the first concatenated vector in the lth iteration, is the second concatenation vector in the lth iteration, is the edge weight between the i-th node and the j-th node in the l-1th iteration, N(v i ) indicates the neighbor nodes of the i-th node, is the third concatenation vector in the lth iteration, is the edge weight between the ith node and the mth node in the l-1th iteration. K represents the kernel function that measures the semantic similarity between nodes.

[0136] Step 505: Update the initial node features according to the updated edge weights, and output the heterogeneous graph features.

[0137] Heterogeneous graph features include updating semantic features and updating node features.

[0138] Indicatively, based on the update of edge weights, the initial node features are decoupled according to semantics, please refer to the following formula 12:

[0139] Formula 12:

[0140] Among them, for the k-th aspect channel, is the first concatenated vector in the l-1th iteration.

[0141] The denominators in the above formulas 10 and 11 are normalized operations on the corresponding features within the neighborhood. By alternating the updates of edge weights and node features, the model can capture the semantics of different aspects of heterogeneous graphs. The final node features are obtained by concatenating the node features in different channels, as shown in formula 13:

[0142] Formula 13:

[0143] Among them, h i represents the updated node, W out represents the characteristics of the neural network output, z i,k Represents the concatenated vector obtained by concatenating the node feature vector and the aspect feature vector in the kth aspect channel after iteration.

[0144] Step 506: Analyze the updated semantic features and updated node features to generate analysis results corresponding to the node data.

[0145] Optionally, association prediction is performed on node data in the heterogeneous graph structure according to the heterogeneous graph features to obtain an association prediction result.

[0146] The association prediction result is used to indicate the predicted association relationship between node data.

[0147] To summarize, the method for generating analysis results provided in this embodiment uses heterogeneous graph structures as random variables and semantic aspects as hidden variables, thereby embedding the heterogeneous graph and obtaining implicit semantics from the heterogeneous graph, thereby updating the node feature vector and the semantic feature vector, obtaining more accurate node feature vectors and semantic feature vectors, and avoiding updating node features by setting meta-paths, thereby improving the updating efficiency of node features and achieving higher task execution accuracy in downstream tasks.

[0148] In this embodiment, for A 2 GNN neural network, through decoupling to obtain K aspect channels, maintain different aspect latent variables a k The conditions need to be kept as independent as possible to describe semantic aspects with different meanings in heterogeneous graphs and ensure that the probabilistic graph generation model has the ability to model the co-occurrence probability between a node and its surrounding neighbor nodes.

[0149] Illustratively, the A provided in the embodiments of the present application 2 The algorithm of the GNN neural network is shown as follows:

[0150] Input: initialnodefeatureX∈R |ν|×din , aspectnumberK, layernumberL

[0151] Output: Node embedding H∈R |ν|×dout

[0152] 1: Randomlyinitialize a k , 1≤k≤K

[0153] 2: while not converged

[0154] 3: Calculatex i,k =f k (x i ),

[0155] 4: forlayerl=1,2,…,L,do

[0156] 5: fork = 1, 2, ..., K, do

[0157] 6: for(i, j)∈εdo

[0158] 7:

[0159] 8: endfor

[0160] 9: fori=1,2,…,|V|do

[0161] 10:

[0162] 11: endfor

[0163] 12: ifl = Lthen

[0164] 13:

[0165] 14: Updatea k

[0166] 15: endif

[0167] 16: endfor

[0168] 17: endfor

[0169] 18: endwhile

[0170] The first line of the algorithm, Input, indicates the input parameters, including the heterogeneous graph structure G, the initial node features X, and the number of semantics K. The number of semantics is used to indicate the number of semantic aspect types indicated by the edge data, that is, the number of aspect latent variables, and the number of neural network iterations L. The second line, Output, indicates the output content, including updated node features and updated semantic features, where R is used to indicate the type of edge, |ν| indicates the number of nodes, and d out Represents the dimension of the output updated feature vector.

[0171] During the algorithm, step 1 represents the random initialization of the aspect feature vector a k ; Step 2 indicates the start of iterative update; Step 3 indicates the calculation of x i,k and Step 4 indicates whether the number of iterations l reaches L; Step 5 indicates whether the currently targeted aspect channel k reaches K; Step 6 indicates whether the current edge (i, j) belongs to a known edge in the heterogeneous graph structure; Step 7 indicates updating the edge weight; Step 8 indicates ending the for loop of weight update after updating the weight for each edge; Step 9 indicates whether the currently updated node i reaches the total number of nodes |V|; Step 10 indicates updating the concatenated vector of the node feature vector and the semantic feature vector in the kth channel; Step 11 indicates ending the for loop of node feature update after the node is updated; Step 12 indicates when the number of iterations l reaches the set number L; Step 13 indicates obtaining the total node feature by concatenating the node features in different aspect channels; Step 14 indicates updating the semantic feature; Steps 15 to 18 indicate ending the iteration process when all conditions are met.

[0172] In an optional embodiment, the generation model parameters involved in the embodiments of the present application also need to be trained and adjusted through a loss function. Figure 6 is a flowchart of a method for generating analysis results provided by another exemplary embodiment of the present application. Taking the method applied to a server as an example, Figure 6 As shown, the method includes:

[0173] Step 601, obtaining a heterogeneous graph structure of a target heterogeneous graph, wherein the heterogeneous graph structure includes node data and edge data.

[0174] The node data corresponds to the initial node features, and the edge data corresponds to the semantic aspects.

[0175] In one example, a heterogeneous graph structure is expressed as The initial eigenvector is expressed as X∈R |ν|×din , the semantic aspect is expressed as A (aspect).

[0176] Step 602: input the heterogeneous graph structure of the target heterogeneous graph into the probabilistic graph generation model.

[0177] When the heterogeneous graph structure is input into the probabilistic graph generation model, the initial node features and the above-mentioned semantic quantity are input into the probabilistic graph generation model, so that the probabilistic graph generation model updates the initial node features in combination with the input content.

[0178] Step 603, taking the heterogeneous graph structure as a random variable and the semantic aspect as a hidden variable, embedding the initial node features through a probabilistic graph generation model, and outputting the heterogeneous graph features of the target heterogeneous graph.

[0179] Heterogeneous graph features include updating semantic features and updating node features.

[0180] The probability graph generation model also corresponds to generation model parameters. In response to the generation model parameters being untrained parameters, it is necessary to first iteratively adjust the model parameters according to the heterogeneous graph structure.

[0181] Schematically, as shown in the above formula 1, φ represents the generation model parameters of the probability map generation model.

[0182] The generative model parameter φ of the generative model can be solved by maximum likelihood estimation, that is, maximizing logp φ (G|X). Since there are hidden variables in the model, it is impossible to solve this maximum optimization problem directly, so the variational expectation maximization (vEM) algorithm is used to solve it.

[0183] Optionally, determine the maximum likelihood estimation function logp of the model parameters corresponding to the heterogeneous graph structure and the initial node characteristics φ (G|X), the model parameters are adjusted through the maximum likelihood estimation function, and the initial node features are embedded using the adjusted model parameters through the probability graph generation model.

[0184] Among them, the maximum likelihood estimation function is transformed into the variational distribution q θ (A|X) and the posterior distribution p φ (A|G, X) expression, the variational distribution corresponds to the strain model parameters θ, the posterior distribution corresponds to the generative model parameters φ, according to the divergence requirements between the variational distribution and the posterior distribution, the variational model parameters are adjusted, and the generative model parameters are adjusted according to the adjusted variational model parameters.

[0185] Optionally, according to the updated semantic features and the updated node features, the generation model parameters may also be adjusted through the loss value.

[0186] Step 604: input the updated semantic features and the updated node features into a preset loss function, and output a loss value corresponding to the updated result.

[0187] Traditional undirected probabilistic graph models (also known as Markov networks) follow the pairwise Markov property, that is, each node has a probabilistic dependency only with its first-order neighbors, and is conditionally independent with nodes that are not directly connected. However, heterogeneous graphs have complex long-distance dependencies. This application uses a self-supervised training strategy to model the association relationship between non-directly adjacent nodes in a regularized form in heterogeneous graphs. Schematically, for a given central node v c First, we design specific rules to construct the mask subgraph G. mask , where G maskThe included edges satisfy: (1) keep the original heterogeneous graph and the central node v c The edges corresponding to the directly connected one-hop neighbors are used as anchor points; (2) For the edges other than the anchor points, the edges in the original heterogeneous graph are shielded and supplemented with the edges corresponding to the central node v c Not directly connected edges. Construct G mask After that, the self-supervision task is to update the node features to the central node v c The goal is to predict the type of. This prediction task is formalized as a classification task, using the cross entropy loss function as the loss function. The form of the loss function is shown in the following formula 14:

[0188] Formula 14:

[0189] Here, I represents the indicator function.

[0190] Step 605: adjust the probability map generation model according to the loss value.

[0191] Optionally, the above-mentioned generation model parameters are adjusted according to the loss value calculated by Formula 14, and after the adjustment, the node features are updated to the initial node features, and the step of embedding the initial node features through the probability graph generation model is iteratively performed.

[0192] Optionally, when calculating the loss value, in addition to the cross entropy loss function provided by the above formula 14, the total loss value can also be determined according to the objective function of the downstream task, that is, combined with various downstream tasks on heterogeneous graphs, and end-to-end training is performed using a standard back-propagation algorithm.

[0193] Schematically, the total loss function can be formalized as follows:

[0194] Among them, L d Represents the loss function corresponding to the downstream task.

[0195] To summarize, the method for generating analysis results provided in this embodiment uses the heterogeneous graph structure as a random variable and the semantic aspect as a hidden variable, so as to embed the heterogeneous graph and obtain implicit semantics from the heterogeneous graph, thereby updating the node feature vector and the semantic feature vector, obtaining more accurate node feature vectors and semantic feature vectors, and avoiding updating node features by setting meta-paths, thereby improving the updating efficiency of node features and achieving higher task execution accuracy in downstream tasks.

[0196] Illustratively, the method for generating analysis results provided in the above-mentioned embodiment of the present application can improve the accuracy of node classification. Please refer to the following Table 1, in which the values ​​are expressed in percentages.

[0197] Table 1

[0198]

[0199]

[0200] As shown in Table 1 above, the classification results of the related art and the present application are compared using the node classification task, and the databases used include the DataBase systems and Logic Programming (DBLP) database, the Association for Computing Machinery (ACM) database, and the Internet Movie DataBase (IMDB).

[0201] Among them, the relevant technologies mainly include methods for processing homogeneous graphs: DeepWalk, Graph Convolutional Networks (GCN), and heterogeneous graph processing methods: metapath2vec, Heterogeneous Graph Attention Network (HAN), Graph Transformer Networks (GTN). From the results in Table 1, it can be seen that the method provided by this application is leading in node classification accuracy.

[0202] Figure 7 is a structural block diagram of a device for generating analysis results provided by an exemplary embodiment of the present application, such as Figure 7 As shown, the device comprises:

[0203] An acquisition module 710 is used to acquire a heterogeneous graph structure of a target heterogeneous graph, wherein the heterogeneous graph structure includes node data and edge data, wherein the node data corresponds to initial node features, and the edge data corresponds to semantic aspects;

[0204] A determination module 720, configured to determine initial node features corresponding to the node data and semantic aspects corresponding to the edge data;

[0205] An embedding module 730 is used to embed the initial node features with the heterogeneous graph structure as a random variable and the semantic aspect as a hidden variable to obtain the heterogeneous graph features of the target heterogeneous graph, wherein the heterogeneous graph features include updated semantic features and updated node features;

[0206] The analysis module 740 is used to analyze the update semantic features and the update node features to generate analysis results corresponding to the node data.

[0207] In an alternative embodiment, please refer to Figure 8 The embedding module 730 is also used to input the heterogeneous graph structure into a probabilistic graph generation model; using the heterogeneous graph structure as a random variable and the semantic aspect as a hidden variable, the initial node features are embedded through the probabilistic graph generation model.

[0208] In an optional embodiment, the probability map generation model includes generation model parameters;

[0209] The embedding module 730 includes:

[0210] A determination unit 731 is used to determine a maximum likelihood estimation function of the model parameters corresponding to the heterogeneous graph structure and the initial node features;

[0211] An adjusting unit 732, configured to adjust the model parameters by using the maximum likelihood estimation function;

[0212] The embedding unit 733 is used to embed the initial node features through the probability graph generation model with the adjusted model parameters.

[0213] In an optional embodiment, the adjustment unit 732 is specifically used to convert the maximum likelihood estimation function into an expression expressed by a variational distribution and a posterior distribution, wherein the variational distribution corresponds to the generative model parameters, and the posterior distribution corresponds to the generative model parameters; according to the divergence requirement between the variational distribution and the posterior distribution, the variational model parameters are adjusted; and the generative model parameters are adjusted according to the adjusted variational model parameters.

[0214] In an optional embodiment, the front embedding module 730 is further used to input the updated semantic features and the updated node features into a preset loss function, and output a loss value corresponding to the updated result;

[0215] The embedding module 730 is further used to adjust the probability map generation model according to the loss value.

[0216] In an optional embodiment, the embedding module 730 is further used to iteratively execute the step of embedding the initial node feature through the probabilistic graph generation model using the updated node feature as the initial node feature.

[0217] In an optional embodiment, the edge data further corresponds to an edge weight, and the semantic aspect corresponds to a semantic quantity, and the semantic quantity is used to indicate the quantity of the semantic aspect types indicated by the edge data;

[0218] The embedding module 730 includes:

[0219] An embedding unit 733, configured to decouple the edge weight and the initial node feature to obtain K aspect channels, where K is a positive integer and the value of K corresponds to the number of semantics, wherein each aspect channel corresponds to a set of node feature vectors and aspect feature vectors;

[0220] The adjustment unit 732 is used to update the edge weight according to the node feature vector and the aspect feature vector of the kth aspect channel; and update the initial node feature according to the updated edge weight.

[0221] In an optional embodiment, the embedding unit is also used to map the initial node features through a nonlinear mapping function to obtain the node feature vector of the k-th aspect channel; and perform global graph pooling processing in the k-th aspect channel to obtain the aspect feature vector of the k-th aspect channel.

[0222] In an optional embodiment, the adjustment unit 732 is further used to obtain the first node feature vector and the first aspect feature vector of the i-th node in the k-th aspect channel, and splice them to obtain a first splicing vector; obtain the second node feature vector and the second aspect feature vector of the j-th node in the k-th aspect channel, and splice them to obtain a second splicing vector; obtain the third node feature vector and the third aspect feature vector of the m-th node in the k-th aspect channel, and splice them to obtain a third splicing vector, i, j, and m are all positive integers, and the m-th node is a neighbor node of the i-th node;

[0223] The adjusting unit 732 is further configured to determine a first semantic similarity between the first splicing vector and the second splicing vector; determine a second semantic similarity between the first splicing vector and the third splicing vector; and update the edge weight according to the first semantic similarity and the second semantic similarity.

[0224] In an optional embodiment, the node data includes a first node and a second node, the first node corresponds to the account data, and the second node corresponds to the candidate recommended content;

[0225] The analysis module 740 is further used to perform association prediction on the first node and the second node according to the heterogeneous graph features, and obtain an association prediction result as the analysis result, wherein the association prediction result is used to indicate the predicted interest level of the account data in the candidate recommended content.

[0226] In an optional embodiment, the analysis module 740 is further used to input the heterogeneous graph features into a recommendation model, where the recommendation model is a pre-trained machine learning model; and perform association prediction on the first node and the second node through the recommendation model to obtain the association prediction result.

[0227] To summarize, the analysis result generation device provided in this embodiment uses the heterogeneous graph structure as a random variable and the semantic aspect as a hidden variable, so as to embed the heterogeneous graph and obtain implicit semantics from the heterogeneous graph, thereby updating the node feature vector and the semantic feature vector, obtaining more accurate node feature vectors and semantic feature vectors, and avoiding updating node features by setting meta-paths, thereby improving the updating efficiency of node features and achieving higher task execution accuracy in downstream tasks.

[0228] It should be noted that: the analysis result generation device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the analysis result generation device provided in the above embodiment and the analysis result generation method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0229] Fig. 9 The following is a schematic diagram showing the structure of a server provided by an exemplary embodiment of the present application. Specifically:

[0230] The server 900 includes a central processing unit (CPU) 901, a system memory 904 including a random access memory (RAM) 902 and a read only memory (ROM) 903, and a system bus 905 connecting the system memory 904 and the central processing unit 901. The server 900 also includes a mass storage device 906 for storing an operating system 913, application programs 914, and other program modules 915.

[0231] The mass storage device 906 is connected to the central processing unit 901 through a mass storage controller (not shown) connected to the system bus 905. The mass storage device 906 and its associated computer readable media provide non-volatile storage for the server 900. That is, the mass storage device 906 may include a computer readable medium (not shown) such as a hard disk or a compact disc read only memory (CD-ROM) drive.

[0232] Without loss of generality, computer-readable media may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, Erasable Programmable Read Only Memory (EPROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other solid-state storage technologies, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, cassettes, tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media are not limited to the above. The above-mentioned system memory 904 and mass storage device 906 can be collectively referred to as memory.

[0233] According to various embodiments of the present application, the server 900 can also be connected to a remote computer on the network through a network such as the Internet. That is, the server 900 can be connected to the network 912 through the network interface unit 911 connected to the system bus 905, or the network interface unit 911 can be used to connect to other types of networks or remote computer systems (not shown).

[0234] The above-mentioned memory also includes one or more programs, and the one or more programs are stored in the memory and configured to be executed by the CPU.

[0235] An embodiment of the present application also provides a computer device, which includes a processor and a memory, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by the processor to implement the method for generating analysis results provided in the above-mentioned method embodiments.

[0236] An embodiment of the present application also provides a computer-readable storage medium, on which is stored at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the method for generating analysis results provided in the above-mentioned method embodiments.

[0237] The embodiments of the present application also provide a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method for generating analysis results described in any of the above embodiments.

[0238] Optionally, the computer readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a solid state drive (SSD), or an optical disk. Among them, the random access memory may include a resistance random access memory (ReRAM) and a dynamic random access memory (DRAM). The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0239] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0240] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for generating an analysis result, characterized in that: The method comprises: Acquire a heterogeneous graph structure of a target heterogeneous graph, wherein the heterogeneous graph structure includes node data and edge data; Determine an initial node feature corresponding to the node data and a semantic aspect corresponding to the edge data, wherein the edge data further corresponds to an edge weight, and the semantic aspect corresponds to a semantic quantity, wherein the semantic quantity is used to indicate the quantity of the semantic aspect types indicated by the edge data; The heterogeneous graph structure is used as a random variable, and the semantic aspect is used as a hidden variable to embed the initial node feature; wherein, the edge weight and the initial node feature are decoupled to obtain K aspect channels, K is a positive integer, and the value of K corresponds to the number of semantics, each aspect channel corresponds to a set of node feature vectors and aspect feature vectors, and the edge weight is updated according to the node feature vector and aspect feature vector of the kth aspect channel; the initial node feature is updated according to the updated edge weight to obtain the heterogeneous graph feature of the target heterogeneous graph, and the heterogeneous graph feature includes an updated semantic feature and an updated node feature; The update semantic features and the update node features are analyzed to generate analysis results corresponding to the node data.

2. The method according to claim 1, characterized in that The method of taking the heterogeneous graph structure as a random variable and the semantic aspect as a hidden variable and embedding the initial node features includes: Inputting the heterogeneous graph structure into a probabilistic graph generation model; The heterogeneous graph structure is used as a random variable, the semantic aspect is used as a hidden variable, and the initial node features are embedded through the probabilistic graph generation model.

3. The method according to claim 2, characterized in that The probability map generation model includes model parameters; The embedding of the initial node features by using the probability graph generation model includes: Determine a maximum likelihood estimation function of the model parameters corresponding to the heterogeneous graph structure and the initial node features; Adjusting the model parameters by using the maximum likelihood estimation function; The initial node features are embedded using the adjusted model parameters through the probability graph generation model.

4. The method according to claim 3, characterized in that Adjusting the model parameters by using the maximum likelihood estimation function includes: The maximum likelihood estimation function is converted into an expression through a variational distribution and a posterior distribution, wherein the variational distribution corresponds to the variational model parameters and the posterior distribution corresponds to the generative model parameters; Adjusting the variational model parameters according to the divergence requirement between the variational distribution and the posterior distribution; The generation model parameters are adjusted according to the adjusted variational model parameters.

5. The method according to any one of claims 2 to 4, characterized in that: After obtaining the heterogeneous graph features of the target heterogeneous graph, the method further includes: Input the updated semantic features and the updated node features into a preset loss function, and output a loss value corresponding to the updated result; The probability map generation model is adjusted according to the loss value.

6. The method according to claim 5, characterized in that After obtaining the heterogeneous graph features of the target heterogeneous graph, the method further includes: The updated node feature is used as the initial node feature, and the step of embedding the initial node feature through the probabilistic graph generation model is iteratively performed.

7. The method according to any one of claims 1 to 4, characterized in that: Before updating the edge weight according to the node feature vector and the aspect feature vector of the kth aspect channel, the method includes: Mapping the initial node features through a nonlinear mapping function to obtain the node feature vector of the k-th channel; A global graph pooling process is performed in the k-th aspect channel to obtain the aspect feature vector of the k-th aspect channel.

8. The method according to any one of claims 1 to 4, characterized in that: The updating of the edge weight according to the node feature vector and the aspect feature vector of the kth aspect channel comprises: Obtaining the first node feature vector and the first aspect feature vector of the i-th node in the k-th aspect channel, and concatenating them to obtain a first concatenated vector; Obtain the second node feature vector and the second aspect feature vector of the j-th node in the k-th aspect channel, and concatenate them to obtain a second concatenation vector; Obtain the third node feature vector and the third aspect feature vector of the mth node in the kth aspect channel, and concatenate them to obtain a third concatenated vector, where i, j, and m are all positive integers, and the mth node is a neighbor node of the i-th node; determining a first semantic similarity between the first splicing vector and the second splicing vector; determining a second semantic similarity between the first splicing vector and the third splicing vector; The edge weight is updated according to the first semantic similarity and the second semantic similarity.

9. The method according to any one of claims 1 to 4, characterized in that: The node data includes a first node and a second node, the first node corresponds to the account data, and the second node corresponds to the candidate recommended content; The analyzing the update semantic features and the update node features to generate analysis results corresponding to the node data includes: An association prediction is performed on the first node and the second node according to the heterogeneous graph feature to obtain an association prediction result as the analysis result, wherein the association prediction result is used to indicate the predicted interest level of the account data in the candidate recommended content.

10. The method according to claim 9, characterized in that The performing association prediction on the first node and the second node according to the heterogeneous graph feature to obtain an association prediction result as the analysis result includes: Inputting the heterogeneous graph features into a recommendation model, where the recommendation model is a pre-trained machine learning model; The recommendation model is used to perform association prediction on the first node and the second node to obtain the association prediction result.

11. A device for generating analysis results, characterized in that: The device comprises: An acquisition module, used for acquiring a heterogeneous graph structure of a target heterogeneous graph, wherein the heterogeneous graph structure includes node data and edge data, wherein the node data corresponds to initial node features, and the edge data corresponds to semantic aspects; A determination module, used to determine an initial node feature corresponding to the node data and a semantic aspect corresponding to the edge data, wherein the edge data further corresponds to an edge weight, and the semantic aspect corresponds to a semantic quantity, wherein the semantic quantity is used to indicate the quantity of the semantic aspect types indicated by the edge data; An embedding module is used to embed the initial node features with the heterogeneous graph structure as a random variable and the semantic aspects as hidden variables; wherein the edge weights and the initial node features are decoupled to obtain K aspect channels, K is a positive integer, and the value of K corresponds to the number of semantics, wherein each aspect channel corresponds to a set of node feature vectors and aspect feature vectors, and the edge weights are updated according to the node feature vectors and aspect feature vectors of the kth aspect channel; the initial node features are updated according to the updated edge weights to obtain the heterogeneous graph features of the target heterogeneous graph, wherein the heterogeneous graph features include updated semantic features and updated node features; The analysis module is used to analyze the update semantic features and the update node features to generate analysis results corresponding to the node data.

12. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the method for generating analysis results as described in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that: The storage medium stores at least one program, and the at least one program is loaded and executed by the processor to implement the method for generating analysis results as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Heterogeneous graph neural network generation method and device, electronic device and storage medium

    CN110046698A

  • Visual problem common sense reasoning model and method based on multi-domain heterogeneous graph guidance

    CN110598573A