Training methods for prediction models and prediction methods for information propagation paths

By constructing sample heterogeneous graphs containing accounts, content carriers and keywords, and training prediction models, the problem of failure to fully consider information content and context in the prior art is solved, and the prediction accuracy of information dissemination paths is significantly improved.

CN118797266BActive Publication Date: 2025-05-09BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410778134.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2025-05-09
Estimated Expiration
2044-06-17

AI Technical Summary

Technical Problem

When predicting the path of harmful information dissemination, the prior art fails to fully consider the content and context information of the dissemination information, resulting in low prediction accuracy.

Method used

By constructing a sample heterogeneous graph, including account entities, content carrier entities and keyword entities, and extracting multiple metapaths, determining the target characteristics of the nodes, and training the prediction model to improve prediction accuracy.

Benefits of technology

This method can build a knowledge graph more comprehensively, consider multiple node types, and significantly improve the prediction accuracy of information propagation paths.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118797266B_ABST
    Figure CN118797266B_ABST
Patent Text Reader

Abstract

The present application provides a prediction model training method and an information propagation path prediction method, which may include: constructing a sample heterogeneous graph according to sample information; the sample information includes at least account entity information, content carrier entity information and keyword entity information, the nodes of the sample heterogeneous graph represent account entities, content carrier entities or keyword entities, and the edges of the sample heterogeneous graph represent the connection relationship between entities; extracting multiple meta-paths for propagating sample information from the sample heterogeneous graph, and determining the target features of each node in each meta-path; inputting the sample heterogeneous graph and the target features of each node into the initial prediction model, training the initial prediction model with the true label of the sample heterogeneous graph as the expected output of the initial prediction model, and obtaining the prediction model; the true label represents the probability of the existence of a connection relationship between each node in the sample heterogeneous graph. This method can improve the accuracy of the predicted information propagation path.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information processing, and more specifically, to a method for training a prediction model and a method for predicting an information propagation path. Background Art

[0002] With the widespread use of the Internet, the spread of harmful information such as cyber violence and online rumors often causes many problems. In order to reduce the problems caused, the propagation path of harmful information can be predicted in advance.

[0003] In the related art, there is a solution to predict by constructing a knowledge graph with breakthrough information, but its construction process does not consider the content of the propagated information itself and its context information, so it cannot build a knowledge graph more comprehensively, resulting in low prediction accuracy. In addition, there is also a solution to predict by isomorphic graphs, but isomorphic graphs only consider one type of node, which also leads to low prediction accuracy. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a prediction model training method and an information propagation path prediction method to improve the accuracy of the predicted information propagation path.

[0005] In the first aspect, the embodiment of the present application provides a method for training a prediction model, the method comprising: constructing a sample heterogeneous graph according to sample information; the sample information at least includes account entity information, content carrier entity information and keyword entity information, the nodes of the sample heterogeneous graph represent account entities, content carrier entities or keyword entities, and the edges of the sample heterogeneous graph represent the connection relationship between entities; extracting multiple meta-paths for propagating the sample information from the sample heterogeneous graph, and determining the target features of each node in each meta-path; inputting the sample heterogeneous graph and the target features of each node into an initial prediction model, training the initial prediction model with the true label of the sample heterogeneous graph as the expected output of the initial prediction model, and obtaining a prediction model; the true label represents the probability that there is a connection relationship between each node in the sample heterogeneous graph. In this way, a sample heterogeneous graph for representing the association relationship between account entities, content carrier entities and keyword entities can be established through sample information, so that a prediction model can be obtained according to the sample heterogeneous graph and node feature training. In this way, both the content of the propagated information itself and its contextual information are considered, and the types of various nodes are considered, so that the accuracy of the prediction model can be improved.

[0006] Optionally, the determination of the target features of each node in each meta-path includes: determining the type weight of each node in each meta-path; the type weight represents the degree of influence of the node by the type of its neighboring nodes; for a node in a meta-path, determining the aggregate features of the node according to the type weights of the neighboring nodes of the node and the features of the neighboring nodes; for a meta-path in the multiple meta-paths, determining the propagation weight of the meta-path according to the aggregate features of each node in the meta-path and the total number of meta-paths; the propagation weight represents the degree of influence of different types of nodes on the sample information during the propagation process along the meta-path; for any node in the sample heterogeneous graph, determining the target features of the node according to the propagation weight of the meta-path where the node is located and the aggregate features of each node in the meta-path. In this way, each node aggregates the features of all nodes connected in the meta-path where it is located and the propagation weight of the meta-path, which effectively utilizes the structural information of the sample heterogeneous graph and the various types of relationships between nodes, thereby helping to improve the accuracy of the prediction model.

[0007] Optionally, before determining the aggregate features of a node in a meta-path according to the type weights of the node's neighbor nodes and the features of the neighbor nodes, the determining the target features of each node in each meta-path also includes: constructing embedded features corresponding to each entity; wherein the dimension of each embedded feature is greater than the total number of the account entities and greater than the total number of the keyword entities; determining the aggregate features of a node in a meta-path according to the type weights of the node's neighbor nodes and the features of the neighbor nodes includes: determining the aggregate features of a node in a meta-path according to the type weights of the node's neighbor nodes and the embedded features of the neighbor nodes. In this way, by constructing embedded features corresponding to each entity, the node features can be enriched, which can help improve the accuracy of the prediction model to a certain extent.

[0008] Optionally, the initial prediction model includes a decoder, and the method further includes: introducing negative sample edges into the sample heterogeneous graph including positive sample edges to obtain a training heterogeneous graph; the positive sample edges represent the real existence of a connection relationship between nodes, and the negative sample edges represent the real non-existence of a connection relationship between nodes; in this way, the sample heterogeneous graph and the target features of each node are input into the initial prediction model, and the real label of the sample heterogeneous graph is used as the expected output of the initial prediction model to train the initial prediction model to obtain a prediction model, including: inputting the training heterogeneous graph and the target features of each node into a decoder, and obtaining the probability of existence of each edge in the training heterogeneous graph through the decoder; for any edge in the training heterogeneous graph, if the probability of existence of the edge is greater than a probability threshold, determining that the edge exists; if the probability of existence of the edge is less than the probability threshold, determining that the edge does not exist; counting a first number of existing edges and a second number of non-existing edges; determining a training error based on the first number, the second number and the real labels of each edge in the training heterogeneous graph; if the training error is less than the error threshold, determining the current decoder as the prediction model. In this way, by constructing a training heterogeneous graph and enriching the training data, the training process can be converted into a binary classification problem, so that the prediction model can learn how to identify positive sample edges and how to identify negative sample edges, which improves the generalization ability and accuracy of the prediction model to a certain extent.

[0009] Optionally, before constructing the sample heterogeneous graph according to the sample information, the method further includes: constructing a keyword list according to the rumor type; thus, constructing the sample heterogeneous graph according to the sample information includes: if there is keyword entity information in the sample information that matches any keyword in the keyword list, constructing the sample heterogeneous graph according to the keyword entity information, the account entity information in the sample information, and the content carrier entity information. In this way, keywords can be classified to facilitate the processing of different types of rumors, thereby improving the generalization ability of the prediction model.

[0010] Optionally, the sample heterogeneous graph constructed according to the sample information includes: if there is a publishing relationship between the account entity information and the content carrier entity information, then the node representing the account entity is connected with the node representing the content carrier entity; if there is an inclusion relationship between the content carrier entity information and the keyword entity information, then the node representing the content carrier entity is connected with the node representing the keyword entity; if there is a follow relationship between any two account entity information, then the nodes representing the account entities corresponding to the any two account entity information are connected. In this way, through the relationship between different entities, a more comprehensive sample heterogeneous graph can be constructed, which improves the accuracy of the prediction model to a certain extent.

[0011] In the second aspect, the embodiment of the present application provides a method for predicting an information propagation path, the method comprising: constructing a heterogeneous graph according to the information to be processed; the information to be processed includes at least account entity information, content carrier entity information and keyword entity information, the nodes of the heterogeneous graph represent account entities, content carrier entities or keyword entities, and the edges of the heterogeneous graph represent the connection relationship between entities; extracting multiple meta-paths for propagating the information to be processed from the heterogeneous graph, and determining the target features of each node in each meta-path; inputting the heterogeneous graph and the target features of each node into a prediction model, and obtaining the probability of the existence of edges between nodes through the prediction model; the prediction model is obtained by the training method as described in the first aspect; and predicting the propagation path of the information to be processed through the probability of the existence of edges between nodes. In this way, the prediction model can be used to predict whether there is a connection relationship between different types of entities, and since the prediction accuracy of the prediction model is high, a more accurate prediction result can be obtained. Compared with the schemes in the prior art such as using isomorphic graphs or constructing knowledge graphs with breakthrough information for prediction, the prediction method of this implementation method not only considers the content of the information to be processed itself and its context information, but also considers the types of multiple nodes, so that a more accurate propagation path can be predicted. Furthermore, since a relatively accurate propagation path is predicted, the starting entity of the propagation path can be determined, thereby achieving the purpose of tracing the source.

[0012] In the third aspect, the embodiment of the present application provides a training device for a prediction model, which includes: a sample heterogeneous graph construction module, which is used to construct a sample heterogeneous graph according to sample information; the sample information at least includes account entity information, content carrier entity information and keyword entity information, the nodes of the sample heterogeneous graph represent account entities, content carrier entities or keyword entities, and the edges of the sample heterogeneous graph represent the connection relationship between entities; a first determination module, which is used to extract multiple meta-paths that propagate the sample information from the sample heterogeneous graph, and determine the target features of each node in each meta-path; a training module, which is used to input the sample heterogeneous graph and the target features of each node into an initial prediction model, and train the initial prediction model with the true label of the sample heterogeneous graph as the expected output of the initial prediction model to obtain a prediction model; the true label represents the probability that there is a connection relationship between each node in the sample heterogeneous graph. In this way, the accuracy of the prediction model can be improved.

[0013] In the fourth aspect, the embodiment of the present application provides a prediction device for information propagation path, which includes: a heterogeneous graph construction module, which is used to construct a heterogeneous graph according to the information to be processed; the information to be processed includes at least account entity information, content carrier entity information and keyword entity information, the nodes of the heterogeneous graph represent account entities, content carrier entities or keyword entities, and the edges of the heterogeneous graph represent the connection relationship between entities; a second determination module, which is used to extract multiple meta-paths for propagating the information to be processed from the heterogeneous graph, and determine the target features of each node in each meta-path; an input module, which is used to input the heterogeneous graph and the target features of each node into a prediction model, and obtain the probability of the existence of edges between nodes through the prediction model; the prediction model is obtained by the training method as described in the first aspect; a prediction module, which is used to predict the propagation path of the information to be processed through the probability of the existence of edges between nodes. In this way, a more accurate prediction result can be obtained, so that a more accurate propagation path can be predicted, and the purpose of tracing can be achieved.

[0014] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the method provided in the first aspect or the second aspect are executed.

[0015] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method provided in the first aspect or the second aspect are performed.

[0016] In a seventh aspect, an embodiment of the present application provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the method described in the first aspect or the second aspect is executed.

[0017] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the embodiments of the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 A flowchart of a prediction model training method provided in an embodiment of the present application;

[0020] Figure 2 A sample isomorphic graph provided in an embodiment of the present application;

[0021] Figure 3 A flowchart of a method for predicting an information propagation path provided in an embodiment of the present application;

[0022] Figure 4 A structural block diagram of a prediction model training device provided in an embodiment of the present application;

[0023] Figure 5 A structural block diagram of a device for predicting an information propagation path provided in an embodiment of the present application;

[0024] Figure 6 A schematic diagram of the structure of an electronic device for executing a prediction model training method or an information propagation path prediction method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0026] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0027] It should be noted that the embodiments in this application or the technical features in the embodiments may be combined if there is no conflict.

[0028] In the related art, there is a problem that the accuracy of the propagation path of information is low; in order to solve this problem, the present application provides a method for training a prediction model; further, the method constructs a sample heterogeneous graph based on the account entity, content carrier entity and keyword entity involved in the propagation process, thereby training the initial prediction model through the sample heterogeneous graph and node features to obtain a prediction model that can be applied to actual scenarios. In this way, both the content of the propagated information itself and its contextual information are taken into account, and the types of multiple nodes are taken into account, thereby improving the accuracy of the prediction model.

[0029] The defects existing in the solutions in the above-mentioned related technologies are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above-mentioned problems and the solutions proposed in the embodiments of the present invention below for the above-mentioned problems should all be the contributions made by the inventor to the present invention during the process of the present invention.

[0030] In some application scenarios, the training method of the above-mentioned prediction model can be executed in a server, a server cluster, or a cloud platform. The present application will be described below using the execution in a server as an example.

[0031] Please refer to Figure 1 , which shows a flow chart of a prediction model training method provided by an embodiment of the present application. Figure 1 As shown, the training method of the prediction model includes the following steps 101 to 103.

[0032] Step 101, constructing a sample heterogeneous graph according to sample information; the sample information at least includes account entity information, content carrier entity information and keyword entity information, the nodes of the sample heterogeneous graph represent account entities, content carrier entities or keyword entities, and the edges of the sample heterogeneous graph represent connection relationships between entities;

[0033] The above sample information may include, for example, posts and comments published by an account, which may include account information, document content information, publishing time information, etc.

[0034] The above account entity information may include, for example, the account's registration address, IP address, number of followers, number of followers, and other information.

[0035] The above-mentioned content entity carrier information may include, for example, information such as the relationship between the document content and the documents it references.

[0036] The above keyword entity information may include, for example, sensitive words, specific words, etc.

[0037] In some implementations, the server may first construct a keyword list based on the rumor type. The above rumor types may include, for example, disaster rumors, social panic rumors, and other types. Among them, for disaster rumors, for example, words such as earthquake, flood, tsunami, etc. may be used as keywords. For social panic rumors, for example, words such as emergency blockade, virus outbreak, etc. may be used as keywords.

[0038] In this way, the construction of a sample heterogeneous graph based on sample information described in the above step 101 includes: if there is keyword entity information in the sample information that matches any keyword in the keyword list, then the sample heterogeneous graph is constructed based on the keyword entity information, the account entity information in the sample information, and the content carrier entity information.

[0039] In some application scenarios, the server can determine whether there are keywords in the keyword list in the sample information. If a keyword exists, a sample heterogeneous graph can be constructed based on the keyword entity information, the account entity information in the sample information, and the content carrier entity information.

[0040] In this implementation, keywords can be classified to facilitate processing of different types of rumors, thereby improving the generalization ability of the prediction model.

[0041] In some optional implementations, when constructing a sample heterogeneous graph, if there is a publishing relationship between the account entity information and the content carrier entity information, the node representing the account entity and the node representing the content carrier entity are connected; if there is an inclusion relationship between the content carrier entity information and the keyword entity information, the node representing the content carrier entity and the node representing the keyword entity are connected; if there is a follow relationship between any two account entity information, the nodes representing the account entities corresponding to the any two account entity information are connected.

[0042] That is to say, there may be a publishing relationship between account entity information and content carrier entity information, there may be a containment relationship between content carrier entity information and keyword entity information, and there may be a follow relationship between different account entity information. Therefore, the server can determine the relationship between different entities. For example, if an account publishes a document, there is a publishing relationship between the account and the document it publishes; if a document contains keywords, there is a containment relationship between the two; there is a follower-followed relationship between accounts.

[0043] In some application scenarios, if the relationship between different entities is: Account 1 follows Account 2 and Account 3 respectively, Account 3 follows Account 2; Account 1 publishes Document 1 and Document 3, Account 2 publishes Document 2 and Document 3, Account 3 publishes Document 1, Document 3 and Document 4; Document 1 contains Keyword 1, Document 2 contains Keyword 1 and Keyword 4, Document 3 contains Keyword 2 and Keyword 6, Document 4 contains Keyword 3 and Keyword 5. Then you can connect the corresponding nodes according to these relationships to construct a graph like Figure 2 Sample heterogeneity graph shown.

[0044] In this implementation, a more comprehensive sample heterogeneous graph can be constructed through the relationship between different entities, which improves the accuracy of the prediction model to a certain extent.

[0045] Step 102, extracting multiple meta-paths for propagating the sample information from the sample heterogeneous graph, and determining target features of each node in each meta-path;

[0046] The above meta-path can be regarded as the propagation path of sample information between entities. Figure 2 In the example, there may be meta-paths such as account 1 -> follow -> account 2, account 1 publishes -> document 1 -> includes keyword 1. Furthermore, the server may traverse the sample heterogeneous graph to extract multiple meta-paths.

[0047] The target features of the above nodes can be represented by, for example, an Embedding vector (embedded feature vector).

[0048] For example, for account 1, if the embedding dimension is 3, the embedding vector (1,0,0) can be obtained through one-hot encoding. For account 2, the embedding vector (0,1,0) can be obtained. For account 3, the embedding vector (0,0,1) can be obtained.

[0049] For a document, if the document contains a keyword, the corresponding position is encoded as 1, otherwise it is 0. For example, for document 1, if it contains keywords w1, w3, w5, its Embedding vector is (1, 0, 1, 0, 1, 0, 0, 0...).

[0050] For keywords, if the keyword list includes three keywords: earthquake, flood, and tsunami, the Embedding vector of earthquake is (1,0,0), the Embedding vector of flood is (0,1,0), and the Embedding vector of tsunami is (0,0,1).

[0051] It should be noted that a node can exist in multiple meta-paths, and the target feature of the node is the aggregation of the features of the nodes connected to it in each meta-path. Figure 2 In the example, the Account 1 node exists in both the meta-path of Account 1-->Follow-->Account 2 and the meta-path of Account 1 Publish-->Document 1-->Include Keyword 1. Therefore, the target feature of the Account 1 node aggregates the features of each node in these two meta-paths.

[0052] Step 103, input the sample heterogeneous graph and the target features of each node into the initial prediction model, and train the initial prediction model with the true label of the sample heterogeneous graph as the expected output of the initial prediction model to obtain a prediction model; the true label represents the probability of a connection relationship between each node in the sample heterogeneous graph.

[0053] The above-mentioned initial prediction model may include, for example, a decoder, a decoding part in a sequence-to-sequence (Seq2Seq) model, etc.

[0054] In some application scenarios, the probability of the connection relationship between each node in the sample heterogeneous graph can be pre-labeled to obtain the true label of the sample heterogeneous graph. If two nodes are connected, the corresponding true label is 1, and if the two nodes are not connected, the corresponding true label is 0.

[0055] Then, the server can train in the direction of making the initial prediction model output the true label. Specifically, the server can input the target features of each node and the sample heterogeneous graph into the initial prediction model to output the probability of the existence of edges between each node through the initial prediction model.

[0056] In some application scenarios, if the loss value between the predicted probability output by the initial prediction model and the true label is less than a preset loss value threshold, or the number of training times of the initial prediction model is greater than a preset number threshold, the initial prediction model can be considered to have converged.

[0057] In this implementation, a sample heterogeneous graph can be established through sample information to characterize the association relationship between account entities, content carrier entities, and keyword entities, so that a prediction model can be obtained based on the sample heterogeneous graph and node feature training. In this way, both the content of the propagated information and its context information are considered, and the types of various nodes are considered, so that the accuracy of the prediction model can be improved.

[0058] In some optional implementations, the step of determining the target feature of each node in each meta-path described in step 102 includes:

[0059] Step 1021, determining the type weight of each node in each meta-path; the type weight represents the degree to which the node is affected by the type of its neighboring node;

[0060] In some application scenarios, for example, Masked graph attention can be used to determine the above type weights. Determine the type weight of each node. ij Represents the matrix weights learned through masked graph attentioni, α ij Represents the type weight of the node, i represents the index of the current node, j represents the index of the neighboring node, and k represents the index of all neighboring nodes traversed of node i.

[0061] Step 1022, for a node in a meta-path, determine the aggregation feature of the node according to the type weights of the neighboring nodes of the node and the features of the neighboring nodes;

[0062] In some application scenarios, after the server determines the type weight of the current node, it can aggregate the features of all neighboring nodes of the current node to obtain the aggregated features of the node. In this way, for a meta-path, the aggregated features of each node in it can be expressed as z i = Among them, z i represents the aggregated features of node i, i is the index of the current node, j is the index of the neighboring node, h′ j It represents the node features obtained after learning the graph neural network, and σ() represents the activation function, which can be, for example, a ReLU activation function.

[0063] In some application scenarios, the server can first construct the embedding features corresponding to each entity. The dimension of each embedding feature is greater than the total number of account entities and greater than the total number of keyword entities. In this way, a set of node features in a meta-path can be expressed as h = {h1, h2, h3…, h N},h i ∈R K . Among them, h represents the embedded features, and K represents the embedding dimension, that is, the dimension of the embedded features. Then, h can be input into the graph neural network to obtain h′={h′1,h′2,h′3,…,h′ N}.

[0064] In this way, the above step 1022, for a node in a meta-path, determines the aggregate features of the node according to the type weights of the neighbor nodes of the node and the features of the neighbor nodes, including: for a node in a meta-path, determines the aggregate features of the node according to the type weights of the neighbor nodes of the node and the embedded features of the neighbor nodes.

[0065] That is, when determining the aggregate features of the current node, h′ j It represents the node features obtained after learning the graph neural network, and the node features are embedded features. It should be noted that the embedded features can be represented by the embedded feature vector mentioned above, which will not be repeated here.

[0066] In this application scenario, by constructing embedded features corresponding to each entity, the node features can be enriched, which can help improve the accuracy of the prediction model to a certain extent.

[0067] Step 1023, for a meta-path among the multiple meta-paths, determine a propagation weight of the meta-path according to the aggregated features of each node in the meta-path and the total number of meta-paths; the propagation weight represents the degree to which the sample information is affected by different types of nodes in the process of propagating along the meta-path;

[0068] Since a node can exist in multiple meta-paths, the target feature of the node can aggregate the features of each node in each meta-path. Therefore, for each meta-path, the server can determine the propagation weight of the meta-path based on the features of each node in the meta-path and the total number of meta-paths. The process of determining the propagation weight can be, for example, calculated by We get T represents the adjustment system, w and b represent the linear correlation parameters, Characterization element path L p The propagation weight of Characterizes the total number of meta-paths, z i Characterize the features of the node, i represents the node index. Then, softmax can be used to process To convert it into a probability distribution in the (0,1) interval, ensure that the sum of the weights of all meta-paths is 1.

[0069] Step 1024: for any node in the sample heterogeneous graph, determine the target feature of the node according to the propagation weight of the meta-path where the node is located and the aggregate features of each node in the meta-path.

[0070] In some application scenarios, for any node, the server can traverse all meta-paths where the node is located, and then determine the aggregate features of each node in each meta-path. Then, the aggregate features can be weighted averaged with the propagation weights of the corresponding meta-paths to obtain the target features of the node.

[0071] In this implementation, each node aggregates the features of all nodes connected in its meta-path and the propagation weight of the meta-path, which effectively utilizes the structural information of the sample heterogeneous graph and various types of relationships between nodes, thereby helping to improve the accuracy of the prediction model.

[0072] In some optional implementations, the initial prediction model includes a decoder, and the method further includes: introducing negative sample edges into the sample heterogeneous graph including positive sample edges to obtain a training heterogeneous graph; the positive sample edges represent the actual existence of a connection relationship between nodes, and the negative sample edges represent the actual non-existence of a connection relationship between nodes.

[0073] It should be noted that after the server completes the construction of the sample heterogeneous graph, the sample heterogeneous graph includes positive sample edges. On this basis, the server can randomly add negative sample edges to the sample heterogeneous graph to increase the training samples, thereby obtaining a training heterogeneous graph. Figure 2 In the example, account 1 did not publish document 2, so an edge can be added between account 1 and document 2, which is the negative sample edge. However, account 1 actually published document 1, so the edge between account 1 and document 1 is the positive sample edge.

[0074] In this way, the step 103 described above of inputting the sample heterogeneous graph and the target features of each node into the initial prediction model, taking the true label of the sample heterogeneous graph as the expected output of the initial prediction model to train the initial prediction model, and obtaining the prediction model includes:

[0075] Sub-step 1031, inputting the training heterogeneous graph and the target features of each node into a decoder, and obtaining the probability of existence of each edge in the training heterogeneous graph through the decoder;

[0076] In some application scenarios, for each edge in the training heterogeneous graph, the decoder can determine the two nodes connected by the edge, and then perform a dot product operation on the target features corresponding to the two nodes and aggregate the values ​​of multiple embedding dimensions to obtain the probability of the existence of the edge.

[0077] Sub-step 1032, for any edge in the training heterogeneous graph, if the probability of the edge existing is greater than the probability threshold, then determine that the edge exists; if the probability of the edge existing is less than the probability threshold, then determine that the edge does not exist;

[0078] The above probability threshold may include, for example, an empirical value for considering the existence of an edge. Thus, if the probability of the existence of an edge is greater than the probability threshold, it can be determined that the edge exists, and if it is less than the probability threshold, it can be determined that the edge does not exist.

[0079] Sub-step 1033, counting a first number of existing edges and a second number of non-existing edges;

[0080] Sub-step 1034, determining a training error according to the first number, the second number, and the true label of each edge in the training heterogeneous graph;

[0081] It should be noted that if the true label of the positive sample edge represents that the edge actually exists, the probability of the connection relationship is 1. If the true label of the negative sample edge represents that the edge actually does not exist, the probability of the connection relationship is 0.

[0082] In some application scenarios, the training error can be calculated by Among them, TP represents the number of decoder outputs that the edge exists and the edge actually exists, TN represents the number of decoder outputs that the edge does not exist and the edge actually does not exist, FP represents the number of decoder outputs that the edge exists but the edge actually does not exist, and FN represents the number of decoder outputs that the edge does not exist but the edge actually exists.

[0083] Sub-step 1035: If the training error is less than the error threshold, the current decoder is determined as the prediction model.

[0084] In some application scenarios, the server can determine whether the decoder has converged based on the relationship between the training error and the error threshold. If the training error is less than the error threshold, it can be determined that the decoder has converged, so that the decoder can be applied to actual scenarios. If the training error is greater than the error threshold, the probability threshold can be adaptively adjusted to gradually reduce the training error.

[0085] In this implementation, by constructing a training heterogeneous graph and enriching the training data, the training process can be converted into a binary classification problem, so that the prediction model can learn how to identify positive sample edges and how to identify negative sample edges, thereby improving the generalization ability and accuracy of the prediction model to a certain extent.

[0086] See also Figure 3 , which shows a flow chart of a method for predicting an information propagation path provided by an embodiment of the present application. Figure 3 As shown, the training method of the prediction model includes the following steps 301 to 304.

[0087] Step 301, constructing a heterogeneous graph according to the information to be processed; the information to be processed includes at least account entity information, content carrier entity information and keyword entity information, the nodes of the heterogeneous graph represent account entities, content carrier entities or keyword entities, and the edges of the heterogeneous graph represent connection relationships between entities;

[0088] Step 302, extracting multiple meta-paths for propagating the information to be processed from the heterogeneous graph, and determining target features of each node in each meta-path;

[0089] It should be noted that the implementation process of the above steps 301 to 302 and the technical effects obtained may be similar to the implementation process and technical effects of the previous steps 101 to 102, and will not be repeated here.

[0090] Step 303: Input the heterogeneous graph and the target features of each node into a prediction model, and obtain the probability of the existence of edges between nodes through the prediction model; the prediction model is implemented as follows: Figure 1 The training method of any prediction model in the illustrated embodiment is obtained;

[0091] It should be noted that after the server inputs the heterogeneous graph and the target features of each node into the prediction model, the processing process of the prediction model on the two can be similar to the corresponding training process in the previous article, which will not be repeated here.

[0092] Step 304: predict the propagation path of the information to be processed based on the probability of the existence of edges between nodes.

[0093] In some application scenarios, if the probability of an edge between nodes is greater than a preset threshold, the edge can be considered to exist, so that the propagation path of the information to be processed can be determined according to multiple existing edges. Figure 2 In the example, if it is predicted that there is an edge between account 1 and account 2, the propagation path can be from account 1 to account 2. If it is predicted that there is an edge between account 1 and document 1, the propagation path is from account 1 to document 1.

[0094] In addition, if the probability of an edge between nodes is less than a preset threshold, it can be considered that the edge does not exist, and thus the propagation path represented by the edge does not exist. Figure 2 In the prediction, if there is no edge between account 1 and document 2, then there is no propagation path from account 1 to document 2.

[0095] In this implementation, the prediction model can be used to predict whether there is a connection relationship between different types of entities. Since the prediction accuracy of the prediction model is high, a relatively accurate prediction result can be obtained. Compared with the existing solutions in the prior art, such as using isomorphic graphs or constructing knowledge graphs with breakthrough information for prediction, the prediction method of this implementation not only considers the content of the information to be processed and its context information, but also considers the types of multiple nodes, so that a relatively accurate propagation path can be predicted.

[0096] Furthermore, since a relatively accurate propagation path is predicted, the starting entity of the propagation path can be determined, thereby achieving the purpose of tracing the source.

[0097] Those skilled in the art will appreciate that, in the above method of a specific embodiment, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0098] Please refer to Figure 4 , which shows a structural block diagram of a prediction model training device provided in an embodiment of the present application. The prediction model training device can be a module, program segment or code on an electronic device. It should be understood that the device is similar to the above Figure 1 The method embodiment corresponds to and can be executed Figure 1 The method embodiment involves various steps.

[0099] Optionally, the training device of the above prediction model includes a sample heterogeneous graph construction module 401, a first determination module 402 and a training module 403. The sample heterogeneous graph construction module 401 is used to construct a sample heterogeneous graph according to sample information; the sample information at least includes account entity information, content carrier entity information and keyword entity information, the nodes of the sample heterogeneous graph represent account entities, content carrier entities or keyword entities, and the edges of the sample heterogeneous graph represent the connection relationship between entities; the first determination module 402 is used to extract multiple meta-paths that propagate the sample information from the sample heterogeneous graph, and determine the target features of each node in each meta-path; the training module 403 is used to input the sample heterogeneous graph and the target features of each node into the initial prediction model, and train the initial prediction model with the true label of the sample heterogeneous graph as the expected output of the initial prediction model to obtain a prediction model; the true label represents the probability of a connection relationship between each node in the sample heterogeneous graph.

[0100] Optionally, the first determination module 402 is further used to: determine the type weight of each node in each meta-path; the type weight represents the degree to which the node is affected by the type of its neighboring nodes; for a node in a meta-path, determine the aggregate characteristics of the node based on the type weights of the neighboring nodes of the node and the characteristics of the neighboring nodes; for a meta-path in the multiple meta-paths, determine the propagation weight of the meta-path based on the aggregate characteristics of each node in the meta-path and the total number of meta-paths; the propagation weight represents the degree to which the sample information is affected by different types of nodes in the process of propagating along the meta-path; for any node in the sample heterogeneous graph, determine the target characteristics of the node based on the propagation weight of the meta-path where the node is located and the aggregate characteristics of each node in the meta-path.

[0101] Optionally, the first determination module 402 is further used to: construct embedded features corresponding to each entity; wherein the dimension of each embedded feature is greater than the total number of the account entities and greater than the total number of the keyword entities; for a node in a meta-path, determine the aggregation features of the node based on the type weights of the neighboring nodes of the node and the embedded features of the neighboring nodes.

[0102] Optionally, the initial prediction model includes a decoder, and the device also includes an introduction module, the introduction module is used to: introduce negative sample edges into the sample heterogeneous graph including positive sample edges to obtain a training heterogeneous graph; the positive sample edges represent the real connection relationship between nodes, and the negative sample edges represent the real non-existence of the connection relationship between nodes; in this way, the training module 403 is further used to: input the training heterogeneous graph and the target features of each node into the decoder, and obtain the probability of existence of each edge in the training heterogeneous graph through the decoder; for any edge in the training heterogeneous graph, if the probability of existence of the edge is greater than the probability threshold, it is determined that the edge exists; if the probability of existence of the edge is less than the probability threshold, it is determined that the edge does not exist; count the first number of existing edges and the second number of non-existent edges; determine the training error according to the first number, the second number and the real labels of each edge in the training heterogeneous graph; if the training error is less than the error threshold, determine the current decoder as the prediction model.

[0103] Optionally, the device also includes a keyword list construction module, which is used to: construct a keyword list according to the rumor type before constructing the sample heterogeneous graph according to the sample information; in this way, the sample heterogeneous graph construction module 401 is further used to: if there is keyword entity information in the sample information that matches any keyword in the keyword list, then construct the sample heterogeneous graph according to the keyword entity information, the account entity information in the sample information, and the content carrier entity information.

[0104] Optionally, the sample heterogeneous graph construction module 401 is further used for: if there is a publishing relationship between the account entity information and the content carrier entity information, then connecting the node representing the account entity with the node representing the content carrier entity; if there is an inclusion relationship between the content carrier entity information and the keyword entity information, then connecting the node representing the content carrier entity with the node representing the keyword entity; if there is a follow relationship between any two account entity information, then connecting the nodes representing the account entities corresponding to the any two account entity information.

[0105] Please refer to Figure 5 , which shows a structural block diagram of a prediction device for information propagation path provided by an embodiment of the present application. The prediction device for information propagation path can be a module, program segment or code on an electronic device. It should be understood that the device is similar to the above Figure 3 The method embodiment corresponds to and can be executed Figure 3 The method embodiment involves various steps.

[0106] Optionally, the training device of the above-mentioned prediction model includes a heterogeneous graph construction module 501, a second determination module 502, an input module 503 and a prediction module 504. Among them, the heterogeneous graph construction module 501 is used to construct a heterogeneous graph according to the information to be processed; the information to be processed includes at least account entity information, content carrier entity information and keyword entity information, the nodes of the heterogeneous graph represent account entities, content carrier entities or keyword entities, and the edges of the heterogeneous graph represent the connection relationship between entities; the second determination module 502 is used to extract multiple meta-paths that propagate the information to be processed from the heterogeneous graph, and determine the target features of each node in each meta-path; the input module 503 is used to input the heterogeneous graph and the target features of each node into the prediction model, and obtain the probability of the existence of edges between nodes through the prediction model; the prediction model is obtained by Figure 1 The training method of any prediction model in the illustrated embodiment is obtained; the prediction module 504 is used to predict the propagation path of the information to be processed by the probability of the existence of edges between nodes.

[0107] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0108] Please refer to Figure 6 , Figure 6A schematic diagram of the structure of an electronic device for executing a training method for a prediction model or a prediction method for an information propagation path provided in an embodiment of the present application, the electronic device may include: at least one processor 601, such as a CPU, at least one communication interface 602, at least one memory 603 and at least one communication bus 604. Among them, the communication bus 604 is used to realize direct connection and communication between these components. Among them, the communication interface 602 of the device in the embodiment of the present application is used to communicate signaling or data with other node devices. The memory 603 can be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 603 can optionally also be at least one storage device located away from the aforementioned processor. Computer-readable instructions are stored in the memory 603. When the computer-readable instructions are executed by the processor 601, the electronic device can execute the above Figure 1 or Figure 2 The method process is shown.

[0109] Understandably, Figure 6 The structure shown is for illustration only, and the electronic device may also include Figure 6 More or fewer components as shown, or with Figure 6 Different configurations shown. Figure 6 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0110] The present application embodiment provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the following can be performed: Figure 1 or Figure 2 The method process in the method embodiment shown is executed by the electronic device.

[0111] An embodiment of the present application provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments. For example, the method may include: constructing a sample heterogeneous graph according to sample information; the sample information includes at least account entity information, content carrier entity information and keyword entity information, the nodes of the sample heterogeneous graph represent account entities, content carrier entities or keyword entities, and the edges of the sample heterogeneous graph represent the connection relationship between entities; extracting multiple meta-paths that propagate the sample information from the sample heterogeneous graph, and determining the target features of each node in each meta-path; inputting the sample heterogeneous graph and the target features of each node into an initial prediction model, and training the initial prediction model with the true label of the sample heterogeneous graph as the expected output of the initial prediction model to obtain a prediction model; the true label represents the probability that there is a connection relationship between each node in the sample heterogeneous graph.

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

[0113] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0114] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0115] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0116] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A prediction model training method, characterized in that: include: Construct a sample heterogeneous graph based on sample information; The sample information at least includes account entity information, content carrier entity information and keyword entity information, the nodes of the sample heterogeneous graph represent account entities, content carrier entities or keyword entities, and the edges of the sample heterogeneous graph represent connection relationships between entities; Extracting multiple meta-paths that propagate the sample information from the sample heterogeneous graph, and determining target features of each node in each meta-path; Inputting the sample heterogeneous graph and the target features of each node into the initial prediction model, and training the initial prediction model with the true label of the sample heterogeneous graph as the expected output of the initial prediction model to obtain a prediction model; the true label represents the probability of a connection relationship between each node in the sample heterogeneous graph; The prediction model is used to predict the propagation path of rumor information; Wherein, determining the target feature of each node in each meta-path includes: Determine the type weight of each node in each meta-path; the type weight represents the degree to which the node is affected by the type of its neighboring nodes; For a node in a meta-path, the aggregation feature of the node is determined according to the type weights of the neighboring nodes of the node and the features of the neighboring nodes; For one of the multiple meta-paths, determining a propagation weight of the meta-path according to the aggregated features of each node in the meta-path and the total number of meta-paths; the propagation weight represents the degree to which the sample information is affected by different types of nodes in the process of propagating along the meta-path; For any node in the sample heterogeneous graph, the target feature of the node is determined according to the propagation weight of the meta-path where the node is located and the aggregation features of each node in the meta-path.

2. The method according to claim 1, characterized in that Before determining the aggregate feature of a node in a meta-path according to the type weights of neighboring nodes of the node and the features of the neighboring nodes, the step of determining the target feature of each node in each meta-path further includes: Constructing embedding features corresponding to each entity; wherein the dimension of each embedding feature is greater than the total number of the account entities and greater than the total number of the keyword entities; The step of determining, for a node in a meta-path, the aggregated features of the node according to the type weights of neighboring nodes of the node and the features of the neighboring nodes includes: For a node in a meta-path, the aggregate feature of the node is determined according to the type weights of the neighbor nodes of the node and the embedded features of the neighbor nodes.

3. The method according to any one of claims 1 to 2, characterized in that: The initial prediction model includes a decoder, and the method further includes: Introducing negative sample edges into the sample heterogeneous graph including positive sample edges to obtain a training heterogeneous graph; the positive sample edges represent the real existence of connection relationships between nodes, and the negative sample edges represent the real non-existence of connection relationships between nodes; and The step of inputting the sample heterogeneous graph and the target features of each node into the initial prediction model, and training the initial prediction model using the true label of the sample heterogeneous graph as the expected output of the initial prediction model to obtain the prediction model comprises: Inputting the training heterogeneous graph and the target features of each node into a decoder, and obtaining the probability of existence of each edge in the training heterogeneous graph through the decoder; For any edge in the training heterogeneous graph, if the probability of the edge existing is greater than a probability threshold, it is determined that the edge exists; if the probability of the edge existing is less than the probability threshold, it is determined that the edge does not exist; Counting a first number of edges that exist and a second number of edges that do not exist; Determine a training error according to the first number, the second number, and true labels of each edge in the training heterogeneous graph; If the training error is less than the error threshold, the current decoder is determined as the prediction model.

4. The method according to any one of claims 1 to 2, characterized in that: Before constructing the sample heterogeneous graph according to the sample information, the method further includes: Build a keyword list based on rumor type; and The constructing of a sample heterogeneous graph according to the sample information includes: If the sample information contains keyword entity information that matches any keyword in the keyword list, the sample heterogeneous graph is constructed according to the keyword entity information, the account entity information in the sample information, and the content carrier entity information.

5. The method according to any one of claims 1-2, characterized in that: The constructing of a sample heterogeneous graph according to the sample information includes: If there is a publishing relationship between the account entity information and the content carrier entity information, connecting the node representing the account entity and the node representing the content carrier entity; If there is a containment relationship between the content carrier entity information and the keyword entity information, connecting the node representing the content carrier entity and the node representing the keyword entity; If there is a follow relationship between any two account entity information, the nodes representing the account entities corresponding to the any two account entity information are connected.

6. A method for predicting an information propagation path, characterized in that: include: Construct a heterogeneous graph based on the information to be processed; The information to be processed includes at least account entity information, content carrier entity information and keyword entity information, the nodes of the heterogeneous graph represent account entities, content carrier entities or keyword entities, and the edges of the heterogeneous graph represent connection relationships between entities; Extracting multiple meta-paths for propagating the information to be processed from the heterogeneous graph, and determining target features of each node in each meta-path; Inputting the heterogeneous graph and the target features of each node into a prediction model, and obtaining the probability of the existence of edges between nodes through the prediction model; the prediction model is obtained by the training method according to any one of claims 1 to 5; The propagation path of the information to be processed is predicted by the probability of the existence of edges between nodes.

7. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 6 is executed.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is executed.

9. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the method according to any one of claims 1 to 6 is performed.

Citation Information

Patent Citations

  • Rumor detection method and system based on report information and dissemination heterogeneous graph

    CN115114500A

  • Intelligent recruitment system person and post matching method and system based on heterogeneous graph neural network

    CN117076765A