Training method of false news identification model, false news identification method and device
The fake news discrimination model is trained through heterogeneous graph neural network, and the heterogeneous graph is constructed using the initial vectors of news content, promotional content and user information, which solves the problem of difficult false news recognition in traditional methods and achieves more accurate false news recognition.
Patent Information
- Application Number
- CN202210254714.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-15
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2042-03-15
AI Technical Summary
The traditional method of manually identifying fake news consumes a lot of human resources and is difficult to achieve good results. It is impossible to accurately identify fake news, which affects user perception.
Use heterogeneous graph neural network to train a false news discrimination model. By obtaining the initial vectors of news content, promotion content and user information in the news training sample set, heterogeneous graph is constructed, and feature vectors are generated using the attention mechanism layer and the full connection layer to output Predict the results and iteratively adjust the network parameters through the loss function to generate a trained fake news discriminant model.
It improves the accuracy of identification of fake news and can more accurately determine whether news is false, thus overcoming the shortcomings of traditional methods and partially solving the impact of fake news on user perception.
Smart Images

Figure CN114579878B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of false news identification, and more specifically, to a false news identification model training method, a false news identification method, a false news identification model training device, a false news identification device, an electronic device, a readable storage medium, and a program product. Background Art
[0002] Fake news refers to erroneous news published by relevant individuals or organizations to achieve their own goals. It will mislead the public and cause the spread of erroneous public opinion, which will cause great damage to political and economic development. With the development of the Internet in recent years, fake news has been spreading rapidly on various social platforms. Faced with superb forgery skills and massive amounts of false information, traditional manual identification methods not only consume a lot of human resources, but also have difficulty in achieving good identification results. Summary of the invention
[0003] In view of this, the embodiments of the present disclosure provide a false news identification model training method, a false news identification method, a false news identification model training device, a false news identification device, an electronic device, a readable storage medium and a program product.
[0004] One aspect of an embodiment of the present disclosure provides a method for training a fake news discrimination model, including:
[0005] Acquire a news training sample set, wherein the news training sample set includes a plurality of training samples and label data corresponding to the training samples, wherein the training samples include a heterogeneous graph, and the heterogeneous graph is generated according to nodes and node relationships related to the news, wherein the nodes include a plurality of initial vectors corresponding to news content, promotional content, and user information, respectively, and the node relationships include an adjacency matrix generated according to association relationships and attention relationships corresponding to the news;
[0006] Input the above training samples in the above news training sample set into the heterogeneous graph neural network and output the prediction results;
[0007] Input the above prediction results and the above label data into the loss function to obtain the loss result;
[0008] Iteratively adjusting the network parameters of the heterogeneous graph neural network according to the loss results to generate the trained fake news discrimination model;
[0009] The heterogeneous graph neural network includes a first attention mechanism layer, a second attention mechanism layer, a fully connected layer and a normalization layer;
[0010] The step of inputting the training samples in the news training sample set into the heterogeneous graph neural network and outputting prediction results includes:
[0011] According to the heterogeneous graph, a node feature matrix and a node relationship matrix are obtained, wherein the node relationship matrix includes the adjacency matrix, the node feature matrix includes a plurality of news nodes, the node relationship matrix includes node relationships between the plurality of news nodes, and the plurality of news nodes include a plurality of initial vectors corresponding to the news content, the promotion content, and the user information, respectively;
[0012] For each of the news nodes, using the first attention mechanism layer to process the news node and the node relationship related to the news node to obtain a first attention value;
[0013] Determine the associated news nodes related to the news nodes according to the node relationship of the news nodes;
[0014] Processing the first attention value and the related news node using the second attention mechanism layer to obtain a second attention value of the news node;
[0015] Determine a first eigenvector according to the plurality of second attention values and the graph network calculation formula;
[0016] Processing the plurality of the first eigenvectors using the fully connected layer to obtain a second eigenvector;
[0017] The second eigenvector is processed by using the normalization layer to obtain the prediction result.
[0018] According to an embodiment of the present disclosure, the above-mentioned association relationship includes a reference relationship, a reprint relationship and a publishing relationship;
[0019] The above training samples are generated in the following way:
[0020] Obtaining the news content, the promotion content and the user information, wherein the promotion content is obtained by querying keywords of the news content using an information query interface, and the user information includes user information and social relationships;
[0021] According to the news content, the promotion content and the user information, a plurality of initial vectors corresponding to the news content, the promotion content and the user information are generated respectively;
[0022] According to the citation relationship, the reprint relationship, the publishing relationship and the attention relationship, the adjacency matrix is generated;
[0023] The training sample including the heterogeneous graph is generated according to the multiple initial vectors and the adjacency matrix.
[0024] According to an embodiment of the present disclosure, the generating of the plurality of initial vectors corresponding to the news content, the promotion content and the user information respectively according to the news content, the promotion content and the user information respectively includes:
[0025] In the case where the news content includes text information, a paragraph vector method is used to obtain a text vector of the text information;
[0026] In the case where the news content includes image information, an image vector of the image information is obtained by using a local binary method;
[0027] Generate the initial vector corresponding to the news content according to the text vector and / or the image vector;
[0028] In the case where the above-mentioned promotional content includes original content, the original vector of the above-mentioned original content is obtained by using the paragraph vector method;
[0029] In the case where the above-mentioned promotional content includes reprinted content, the user opinions corresponding to the above-mentioned reprinted content are processed using the paragraph vector method to obtain a reprint vector;
[0030] Generating the initial vector corresponding to the promotional content according to the original vector and / or the reprinted vector;
[0031] In the case where the user information includes text-related information, the user information is processed using a paragraph vector method to obtain a text-related vector;
[0032] In the case where the user information includes image information, an image vector of the image information is obtained by using a local binary method;
[0033] The initial vector corresponding to the user information is generated according to the text-like vector and / or the image-like vector.
[0034] According to an embodiment of the present disclosure, the above-mentioned image information includes a plurality of image elements and a pixel value corresponding to each of the above-mentioned image elements;
[0035] Wherein, in the case that the news content includes image information, obtaining the image vector of the image information by using the local binary method includes:
[0036] For each of the above image elements, use the above local binary method to process the pixel value of the above image element and the pixel value of the image element related to the above image element to obtain the local binary value of the above image element;
[0037] The plurality of local binary values are normalized to obtain the image vector of the image information.
[0038] According to an embodiment of the present disclosure, the training method of the fake news discrimination model further includes:
[0039] Acquire a news verification sample set, wherein the news verification sample set includes multiple verification samples and verification label data corresponding to the verification samples, wherein the verification samples include a verification heterogeneous graph generated according to verification nodes and verification node relationships related to the verification news, the verification nodes include multiple verification initial vectors corresponding to the verification news content, the verification promotion content, and the verification user information, respectively, the verification node relationships include a verification adjacency matrix generated according to the verification association relationship and the verification attention relationship, and there is a one-to-one correspondence between the multiple verification label data and the multiple verification news contents;
[0040] Input the plurality of verification samples into the fake news discrimination model, and output a verification result, wherein the verification result includes a verification score result corresponding to each of the verification samples;
[0041] Match and compare the above prediction results with the multiple verification label data to obtain a comparison result;
[0042] When the comparison result indicates that the proportion of the verification score results that are identical to the verification label data among the plurality of verification score results meets a preset proportion, the false news discrimination model is determined as the target false news discrimination model.
[0043] Another aspect of the disclosed embodiment provides a method for identifying fake news, including:
[0044] Acquire a news data set to be identified, wherein the news data set to be identified includes target news, target promotion content respectively related to the target news, target user information, target association relationship and target attention relationship;
[0045] According to the above news data set to be identified, a heterogeneous graph to be identified is generated;
[0046] The above heterogeneous graph to be identified is input into a false news discrimination model, and a recognition result is output. The above recognition result is used to characterize the true and false type of the above target news, wherein the above false news discrimination model is trained using the method described above.
[0047] According to an embodiment of the present disclosure, the above-mentioned target association relationship includes a target reference relationship, a target reprint relationship and a target publishing relationship;
[0048] The above-mentioned generating a heterogeneous graph to be identified based on the above-mentioned news data set to be identified includes:
[0049] According to the target news, the target promotion content, and the target user information, a plurality of target vectors corresponding to the target news, the target promotion content, and the target user information are generated respectively;
[0050] Generate a target adjacency matrix according to the target citation relationship, the target reprint relationship, the target publishing relationship and the target attention relationship;
[0051] The heterogeneous graph to be identified is generated according to the multiple target vectors and the target adjacency matrix.
[0052] Another aspect of the disclosed embodiment provides a training device for a fake news discrimination model, including:
[0053] A first acquisition module is used to acquire a news training sample set, wherein the news training sample set includes multiple training samples and label data corresponding to the training samples, wherein the training samples include a heterogeneous graph, and the heterogeneous graph is generated according to nodes and node relationships related to the news, the nodes include multiple initial vectors corresponding to news content, promotional content and user information, respectively, and the node relationships include an adjacency matrix generated according to association relationships and attention relationships corresponding to the news;
[0054] A prediction module, used to input the training samples in the news training sample set into the heterogeneous graph neural network and output a prediction result;
[0055] A calculation module, used for inputting the prediction result and the label data into a loss function to obtain a loss result; and
[0056] An iteration module, used for iteratively adjusting the network parameters of the heterogeneous graph neural network according to the loss result to generate the trained fake news discrimination model;
[0057] The heterogeneous graph neural network includes a first attention mechanism layer, a second attention mechanism layer, a fully connected layer and a normalization layer;
[0058] The above prediction module includes:
[0059] A submodule is obtained, which is used to obtain a node feature matrix and a node relationship matrix according to the heterogeneous graph, wherein the node relationship matrix includes the adjacency matrix, the node feature matrix includes a plurality of news nodes, the node relationship matrix includes node relationships between the plurality of news nodes, and the plurality of news nodes include a plurality of initial vectors corresponding to the news content, the promotion content, and the user information, respectively;
[0060] A first processing submodule is used for processing the news node and the node relationship related to the news node using the first attention mechanism layer for each of the news nodes to obtain a first attention value;
[0061] A first determination submodule is used to determine the associated news nodes related to the above news nodes according to the node relationship of the above news nodes;
[0062] A second processing submodule, configured to process the first attention value and the associated news node using the second attention mechanism layer to obtain a second attention value of the news node;
[0063] A second determination submodule, used to determine a first feature vector according to the plurality of second attention values and the graph network calculation formula;
[0064] A third processing submodule, configured to process the plurality of first feature vectors using the fully connected layer to obtain a second feature vector;
[0065] The normalization submodule is used to process the second eigenvector using the normalization layer to obtain the prediction result.
[0066] Another aspect of the disclosed embodiment provides a false news identification device, including:
[0067] The second acquisition module is used to acquire a news data set to be identified, wherein the news data set to be identified includes target news, target promotion content related to the target news, target user information, target association relationship and target attention relationship;
[0068] A generation module, used for generating a heterogeneous graph to be identified based on the above-mentioned news data set to be identified; and
[0069] The recognition module is used to input the above-mentioned heterogeneous graph to be recognized into the false news discrimination model and output the recognition result, wherein the above-mentioned recognition result is used to characterize the true and false type of the above-mentioned target news, wherein the above-mentioned false news discrimination model is trained using the method described above.
[0070] Another aspect of an embodiment of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described above.
[0071] Another aspect of an embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the method described above when executed.
[0072] Another aspect of an embodiment of the present disclosure provides a computer program product, wherein the computer program product includes computer executable instructions, and the instructions are used to implement the method described above when executed.
[0073] According to an embodiment of the present disclosure, by utilizing node relationships consisting of association relationships and attention relationships corresponding to news and nodes consisting of multiple initial vectors corresponding to news content, promotional content and user information, a false news discrimination model is obtained by training a heterogeneous graph neural network according to training samples consisting of nodes and node relationships. Since the training samples fully consider the node relationships related to the news content, the trained false news discrimination model can more accurately determine whether the recognition result of the news to be identified is false news, thereby at least partially overcoming the technical problem that false news cannot be accurately identified, which easily affects the user's cognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0075] Figure 1 An exemplary system architecture of a training method for applying a fake news identification model or a fake news identification method according to an embodiment of the present disclosure is schematically shown;
[0076] Figure 2 A flowchart of a method for training a fake news discrimination model according to an embodiment of the present disclosure is schematically shown;
[0077] Figure 3 The structure diagram of the fake news discrimination model according to the embodiment of the present disclosure is schematically shown;
[0078] Figure 4 A flowchart of a method for training a fake news discrimination model according to an embodiment of the present disclosure is schematically shown;
[0079] Figure 5 A block diagram schematically shows a training device for a fake news discrimination model according to an embodiment of the present disclosure;
[0080] Figure 6 A block diagram schematically shows a false news identification device according to an embodiment of the present disclosure; and
[0081] Figure 7 A block diagram of an electronic device for implementing a false news identification model training method or a false news identification method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0082] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0083] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0084] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0085] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0086] The embodiments of the present disclosure provide a training method for a false news discrimination model, a false news discrimination method and a device. The training method includes obtaining a news training sample set, wherein the news training sample set includes multiple training samples and label data corresponding to the training samples, wherein the training samples include a heterogeneous graph, which is generated based on nodes and node relationships related to news, wherein the nodes include multiple initial vectors corresponding to news content, promotional content and user information, respectively, and the node relationships include an adjacency matrix generated based on association relationships and attention relationships corresponding to the news; inputting the training samples in the news training sample set into a heterogeneous graph neural network and outputting a prediction result; inputting the prediction result and the label data into a loss function to obtain a loss result; iteratively adjusting the network parameters of the heterogeneous graph neural network according to the loss result to generate a trained false news discrimination model.
[0087] Figure 1 The exemplary system architecture 100 to which the training method of the false news identification model or the false news identification method according to the embodiment of the present disclosure can be applied is schematically shown. It should be noted that: Figure 1What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0088] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0089] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as model training shopping applications, news identification applications, web browser applications, search applications, instant messaging tools, email clients and / or social platform software, etc. (only as examples).
[0090] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0091] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0092] It should be noted that the training method of the false news discrimination model or the false news discrimination method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the training device of the false news discrimination model or the false news discrimination device provided in the embodiment of the present disclosure can generally be set in the server 105. The training method of the false news discrimination model or the false news discrimination method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal device 101, 102, 103 and / or the server 105. Correspondingly, the training device of the false news discrimination model or the false news discrimination device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal device 101, 102, 103 and / or the server 105. Alternatively, the training method of the false news discrimination model or the false news discrimination method provided in the embodiment of the present disclosure can also be executed by the terminal device 101, 102, or 103, or can also be executed by other terminal devices different from the terminal device 101, 102, or 103. Accordingly, the training device of the false news identification model or the false news identification device provided in the embodiments of the present disclosure may also be disposed in the terminal device 101, 102, or 103, or in other terminal devices different from the terminal device 101, 102, or 103.
[0093] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0094] Figure 2 The flowchart of the training method of the fake news discrimination model according to the embodiment of the present disclosure is schematically shown.
[0095] like Figure 2 As shown, the training method of the fake news identification model includes operations S201 to S204.
[0096] In operation S201, a news training sample set is obtained, wherein the news training sample set includes multiple training samples and label data corresponding to the training samples, wherein the training samples include a heterogeneous graph, which is generated based on nodes and node relationships related to the news, wherein the nodes include multiple initial vectors corresponding to news content, promotional content and user information, respectively, and the node relationships include an adjacency matrix generated based on association relationships and attention relationships corresponding to the news.
[0097] In operation S202, the training samples in the news training sample set are input into the heterogeneous graph neural network, and the prediction results are output.
[0098] In operation S203, the prediction result and the label data are input into the loss function to obtain a loss result.
[0099] In operation S204, network parameters of the heterogeneous graph neural network are iteratively adjusted according to the loss result to generate a trained fake news discrimination model.
[0100] According to an embodiment of the present disclosure, the association relationship may refer to whether the news is quoted, reprinted, or published.
[0101] According to an embodiment of the present disclosure, promotional content may refer to content with a promotional nature, for example, a user may express his or her subjective opinion on news by publishing the content.
[0102] According to an embodiment of the present disclosure, a heterogeneous graph neural network (Heterogenous Graph Attention Networks, HetGNN) can integrate information of various types of nodes and edges composed of heterogeneous structures, and can also consider heterogeneous attributes and heterogeneous contents associated with each node.
[0103] According to an embodiment of the present disclosure, the following relationship may refer to the user's following object and other users following the user, such as the user followed by the news publisher, or may refer to a social relationship. User information may refer to the user's identity authentication information in the user's homepage.
[0104] According to an embodiment of the present disclosure, after obtaining a news training sample set, the training samples in the news training sample set are input into a heterogeneous graph neural network, and a prediction result corresponding to the training sample is output. The loss result corresponding to the training sample is calculated based on the prediction result and the corresponding label data, and the network parameters of the heterogeneous graph neural network are iteratively adjusted according to the loss result, so that a trained false news discrimination model can be generated.
[0105] According to an embodiment of the present disclosure, by utilizing node relationships consisting of association relationships and attention relationships corresponding to news and nodes consisting of multiple initial vectors corresponding to news content, promotional content and user information, a false news discrimination model is obtained by training a heterogeneous graph neural network according to training samples consisting of nodes and node relationships. Since the training samples fully consider the node relationships related to the news content, the trained false news discrimination model can more accurately determine whether the recognition result of the news to be identified is false news, thereby at least partially overcoming the technical problem that false news cannot be accurately identified, which easily affects the user's cognition.
[0106] According to an embodiment of the present disclosure, the association relationship includes a reference relationship, a reprint relationship, and a publishing relationship.
[0107] According to an embodiment of the present disclosure, training samples are generated in the following manner:
[0108] Acquire news content, promotional content and user information, wherein the promotional content is obtained by querying the keywords of the news content using the information query interface, and the user information includes user information and social relationships. Generate multiple initial vectors corresponding to the news content, promotional content and user information respectively according to the news content, promotional content and user information. Generate an adjacency matrix according to the citation relationship, reprint relationship, release relationship and attention relationship. Generate training samples including heterogeneous graphs according to the multiple initial vectors and the adjacency matrix.
[0109] According to the embodiments of the present disclosure, the source of news content can be various commercial websites, which can detect the authenticity of news and provide experts in various fields with the identification of true or false news, and thus can serve as the data source of news training sample sets. The information query interface can include but is not limited to the enterprise API interface that provides social services.
[0110] According to an embodiment of the present disclosure, when news content is obtained, keywords of the news are extracted, and promotional content corresponding to the news content can be obtained using an information query interface, while the user information and social relationships that publish the promotional content are obtained.
[0111] According to an embodiment of the present disclosure, in order to integrate multi-level social background information, an embodiment of the present disclosure constructs a heterogeneous graph including three types of nodes: news content, promotional content, and user information. The heterogeneous graph includes four types of edges: reference relationship, reprint relationship, release relationship, and follow-up relationship, which can be expressed as G = (V, E), where V represents a node and E represents a node relationship or different types of edges.
[0112] According to an embodiment of the present disclosure, nodes in a heterogeneous graph are generated based on the initial vectors of the acquired news content, promotional content, and user information, and an adjacency matrix is generated based on the citation relationship, reprint relationship, release relationship, and attention relationship. The above adjacency matrix can characterize the node relationship.
[0113] According to an embodiment of the present disclosure, generating a plurality of initial vectors corresponding to the news content, the promotion content, and the user information respectively according to the news content, the promotion content, and the user information may include the following operations:
[0114] In the case where the news content includes text information, the paragraph vector method is used to obtain the text vector of the text information. In the case where the news content includes image information, the local binary method is used to obtain the image vector of the image information. Based on the text vector and / or the image vector, an initial vector corresponding to the news content is generated. In the case where the promotional content includes original content, the paragraph vector method is used to obtain the original vector of the original content. In the case where the promotional content includes reprinted content, the paragraph vector method is used to process the user opinions corresponding to the reprinted content to obtain the reprinted vector. Based on the original vector and / or the reprinted vector, an initial vector corresponding to the promotional content is generated. The user information is processed using the paragraph vector method to obtain the initial vector corresponding to the user information.
[0115] According to an embodiment of the present disclosure, the news content includes two modes, text information and image information. When the news content is text information, the text information can be processed using a paragraph vector method to obtain a corresponding text vector. The paragraph vector method can include a Doc2Vec algorithm.
[0116] According to an embodiment of the present disclosure, when the news content includes image information, the image information can be processed using a local binary method to obtain a corresponding image vector. The local binary method includes an LBP (Local Binary Pattern) algorithm. The text vector and the image vector are fused to obtain an initial vector corresponding to the news content.
[0117] According to the embodiments of the present disclosure, the promotional content generally includes two types: original content and reprinted content. In the case where the promotional content is original content or reprinted content, the paragraph vector method can be used to process it, thereby obtaining the corresponding original vector or reprinted vector, and then obtaining the initial vector corresponding to the promotional content according to the original vector and / or reprinted vector.
[0118] According to the embodiments of the present disclosure, users are important participants in the social environment, and user identity authentication is an important indicator for identifying false news. Therefore, the acquired user information can be processed using the paragraph vector method to obtain a feature representation of the identity authentication information, which can be used as the initial vector of the user information.
[0119] According to an embodiment of the present disclosure, the image information includes a plurality of image elements and a pixel value corresponding to each image element.
[0120] According to an embodiment of the present disclosure, when the news content includes image information, obtaining an image vector of the image information using a local binary method (LBP) may include the following operations:
[0121] For each image element, the pixel value of the image element and the pixel value of the image element related to the image element are processed using the local binary method to obtain the local binary value of the image element. Multiple local binary values are normalized to obtain an image vector of the image information.
[0122] According to an embodiment of the present disclosure, the calculation of the LBP algorithm is shown in formula (1) and formula (2).
[0123]
[0124]
[0125] Among them, (x c ,y c ) represents an image element in a region, and the pixel value is i c ,i p Represents the pixel value of the image element within the region associated with the image element.
[0126] According to an embodiment of the present disclosure, the local binary value of each image element is calculated using the LBP algorithm, multiple local binary values are counted and normalized to obtain an image vector of the image information.
[0127] According to an embodiment of the present disclosure, the heterogeneous graph neural network includes a first attention mechanism layer, a second attention mechanism layer, a fully connected layer and a normalization layer.
[0128] According to an embodiment of the present disclosure, inputting a training sample into a heterogeneous graph neural network and outputting a prediction result may include the following operations:
[0129] According to the heterogeneous graph, a node feature matrix and a node relationship matrix are obtained, wherein the node relationship matrix includes an adjacency matrix, the node feature matrix includes multiple news nodes, the node relationship matrix includes node relationships between multiple news nodes, and multiple news nodes include multiple initial vectors corresponding to news content, promotional content, and user information, respectively. For each news node, the first attention mechanism layer is used to process the news node and the node relationship related to the news node to obtain a first attention value. According to the node relationship of the news node, the associated news node related to the news node is determined. The first attention value and the associated news node are processed by the second attention mechanism layer to obtain the second attention value of the node relationship. According to the second attention value and the graph network calculation formula, the first eigenvector is determined. The multiple first eigenvectors are processed by the fully connected layer to obtain the second eigenvector. The second eigenvector is processed by the normalization layer to obtain the prediction result.
[0130] According to an embodiment of the present disclosure, the first attention value α P The calculation of is shown in formula (3) and formula (4).
[0131] h P =∑ i′ A ii′ h i′ (3)
[0132]
[0133] Among them, i represents the news node, P represents the type of relationship connected to the news node i, A represents the initial adjacency matrix, and h P The feature vector representing the relationship type P; L represents all the relationship types connected to the central news node, represents the training parameters of the node relationship P, σ represents the nonlinear activation function, and || represents the vector concatenation operation.
[0134] According to an embodiment of the present disclosure, the second attention value β i,j The calculation of is shown in the formula.
[0135]
[0136] Among them, h i and h j The feature vectors representing news nodes i and j, respectively, h q Characterize the feature vector of the neighboring nodes whose relationship with node i is P, The relationship between nodes is represented as the training parameter P, σ represents the nonlinear activation function, and || represents the vector concatenation operation.
[0137] According to an embodiment of the present disclosure, according to a plurality of second attention values β i,j Forming the attention matrix B i,j , B i,j =β i,j , combined with the graph network calculation formula, we can get the target graph network calculation formula as shown in formula (6).
[0138] H (l+1) =σ(B′·H (l) ·W (l) ) (6)
[0139] in, represents the symmetrically normalized attention matrix, M ij =∑ j A i,j , A represents the initial adjacency matrix, W (l) Represents a trainable transformation matrix.
[0140] According to an embodiment of the present disclosure, the first eigenvector H can be determined according to the target graph network calculation formula. (l+1) , and then use the fully connected layer and normalization layer to process to get the prediction result.
[0141] According to an embodiment of the present disclosure, the prediction result may include a confidence level p t Or other types of prediction parameters. This embodiment is exemplified by taking the prediction result as the confidence level.
[0142] According to the embodiments of the present disclosure, fake news has the problem of uneven recognition difficulty, so the present technology adopts the Focal Loss loss function, which provides a suppression factor γ, which can effectively solve the problem of uneven recognition difficulty of fake news samples. The loss function loss is shown in formula (7):
[0143] loss=-(1-p t ) γ log(p t ) (7)
[0144] According to an embodiment of the present disclosure, for news that is easy to identify, p t The value of (1-p t ) γ The value of will decrease. This will reduce the impact of easily identifiable news on the loss function and enhance the model's ability to identify news that is difficult to distinguish between true and false. Among them, γ is an adjustment factor set according to actual needs.
[0145] According to an embodiment of the present disclosure, the training method of the fake news discrimination model may further include the following operations:
[0146] A news verification sample set is obtained, wherein the news verification sample set includes multiple verification samples and verification label data corresponding to the verification samples, wherein the verification samples include a verification heterogeneous graph generated according to verification nodes and verification node relationships related to the verification news, the verification nodes include multiple verification initial vectors corresponding to the verification news content, the verification promotion content and the verification user information respectively, and the verification node relationships include a verification adjacency matrix generated according to the verification association relationship and the verification attention relationship.
[0147] Multiple verification samples are input into the fake news discrimination model, and a verification result is output, wherein the verification result includes a verification score result corresponding to each verification sample. The prediction result is matched and compared with multiple verification label data to obtain a comparison result. If the comparison result shows that the number of verification score results that are the same as the verification label data in the multiple verification score results meets the preset ratio, the fake news discrimination model is determined as the target fake news discrimination model.
[0148] According to an embodiment of the present disclosure, after the training of the false news discrimination model is completed, the accuracy of the false news discrimination model can be verified using a news verification sample set, thereby ensuring that the accuracy of the false news discrimination model meets preset requirements.
[0149] It should be noted that the construction process of the news verification sample set is the same as that of the news training sample set, and will not be described in detail here.
[0150] According to an embodiment of the present disclosure, the verification samples in the news verification sample set are input into the trained false news discrimination model to obtain a verification result, and the multiple verification sub-results in the verification result are respectively compared with the corresponding verification label data to obtain a comparison result reflecting whether the result is accurate. In the case where the comparison result shows that the proportion of the number of verification results that are correct meets the preset proportion, the false news discrimination model can be determined as the target false news discrimination model. In the case where the comparison result shows that the proportion of the number of verification results that are correct does not meet the preset proportion, the false news discrimination model can be continued to be trained using the news training sample set until the proportion of the number of verification results that are correct does not meet the preset proportion. Among them, the value of the preset proportion can be set according to specific needs, for example, it can be set to 80%, 90%, etc.
[0151] In order to more clearly illustrate the training method of the fake news discrimination model, a specific example is introduced below for illustrative explanation.
[0152] In an exemplary embodiment, the following steps are included:
[0153] Step 1: Data preparation
[0154] Based on the authoritative data released by a website, the data induction system automatically inducts. For example, if a website determines that "Emmys 2017: What the Nominees Are Saying" is a false news, the data induction system will obtain the text information and image information in the news according to the URL address of the news. Then, the enterprise API interface is used to search with the title of the news as the keyword to obtain the list of tweet IDs that cite the news. According to the tweet ID, the tweet content (i.e. news content), the tweet's reprint information (i.e. reprint relationship), the user who posted the tweet, the user's profile (i.e. user information), and the user's follow network (i.e. follow relationship) are obtained. 70% of the samples are randomly selected as the news training sample set, 10% of the samples are used as the news verification sample set, and 20% of the samples are used as the news data set to be judged. The ratio of false news to real news in each sample can be set but is not limited to 1:1.
[0155] Step 2: Building heterogeneous graphs and feature engineering
[0156] To construct a heterogeneous graph containing three types of nodes: news content, promotional content, and user information, we first need to perform feature engineering on the three types of nodes to obtain vector representations of the nodes. For news nodes, news usually contains two parts: text information and image information. Taking the news "Emmys 2017: What the Nominees Are Saying" as an example, we use the Doc2Vec algorithm to obtain a 300-dimensional feature vector of text information:
[0157] [0.5527, 0.1235, 0.2367, …, 0.2589, 0.6781, 0.4523]
[0158] For the image information in the news, the LBP algorithm is used to extract the features of the image information and vectorize the image information. The LBP algorithm samples the 8 pixels around the central pixel to obtain the binary LBP value of the central node, such as 00010011, which is converted to decimal 19. The LBP value range obtained by sampling 8 pixels is 0-255. The frequency of occurrence of the LBP value is counted to obtain a 256-dimensional vector as the feature vector of the image information in the news, such as:
[0159] [0.2833, 0.5546, 0, 9856, …, 0.1299, 0.5623, 0.8815]
[0160] Then, the feature vectors of text information and image information are concatenated to obtain a 556-dimensional feature vector (i.e., the initial vector of the news content), which is used as the initial feature representation of the news node:
[0161] [0.5527, 0.1235, 0.2367, …, 0.1299, 0.5623, 0.8815]
[0162] For the promotional content nodes that cite the news, the same method as the news nodes is used to process the text and image information using the Doc2Vec algorithm and the LBP algorithm to obtain a 556-dimensional initial vector. If the tweet does not contain image information, it is padded with 0.
[0163] For the user information node, we obtain the user's personal information, including nickname, personal introduction, address information, number of "fans", etc., and use the Doc2Vec algorithm to obtain the 300-dimensional feature vector of these text information. Based on the user's avatar picture, we use the LBP algorithm to obtain the 256-dimensional feature vector of the avatar, and concatenate and fuse the vectors of the text and picture to obtain the 556-dimensional initial vector of the user information node.
[0164] All nodes are stacked from top to bottom in the order of news content, promotional content, and user information to form the feature matrix W of the entire heterogeneous graph m×n, where m represents the number of all nodes in the heterogeneous graph, and n represents the dimension of the node feature vector.
[0165] After completing the feature engineering of the nodes in the heterogeneous graph, we start to build the edges of the heterogeneous graph. The heterogeneous graph contains four types of edges: reference relationship, reprint relationship, release relationship, and follow relationship. The adjacency matrix A of the heterogeneous graph is constructed. If there is a relationship between two nodes, the corresponding position on the adjacency matrix is 1, otherwise it is 0.
[0166] After the above steps, the construction of the heterogeneous graph and the initial feature engineering are completed, providing a foundation for subsequent graph computing.
[0167] Step 3: Build the model
[0168] Figure 3 The structural diagram of the fake news discrimination model according to the embodiment of the present disclosure is schematically shown.
[0169] The heterogeneous graph neural network with a double-layer attention mechanism is used as the basis of the fake news discrimination model in this embodiment (such as Figure 3 As shown in Figure 2, the first level of attention mechanism is the relationship type level attention. Taking the promoted content node i as an example, the feature vector of the promoted content node is h i , including three types of relationships: reference relationship, reprint relationship and publication relationship. The feature vectors of nodes that have a reference relationship with node i are added together to obtain the feature vector h of the reference relationship. y Similarly, we obtain the feature vectors h of the reprint relationship and the required type of the issuing official. r and h p . Then, the relationship-level attention formula is used to calculate the attention weights of the three types of allocations. For example, the weights assigned to the citation relationship, reprint relationship, and publication relationship can be 0.3, 0.5, and 0.2 respectively.
[0170] The second-level attention mechanism is node-level attention. Taking the promotion content node i as an example, there are n nodes of the reprint relationship type in the promotion content node i. Using the attention mechanism, the attention allocated to the n nodes is:
[0171] [0.23, 0.15, 0.12, …, 0.05, 0.11, 0.27]
[0172] The first layer of relational attention assigns an attention weight of 0.3 to the reprint type. After multiplying the two layers of attention, the actual attention assigned to these n nodes is obtained as follows:
[0173] [0.069, 0.045, 0.036, …, 0.015, 0.033, 0.081]
[0174] In the process of graph calculation, it is assumed that the feature vectors of n nodes are h1 to h n , then the formula (8) for the central node i to aggregate the information of these n nodes is as follows:
[0175]
[0176] After two-layer graph calculation, we get the feature matrix R of the news content m×n , m represents the number of news content, n represents the dimension of the news content feature vector. Input to the fully connected layer, and the weight matrix W n×2 Multiplying them, we get formula (9):
[0177] R′ m×2 =R m×n ×W n×2 (9)
[0178] After passing through the normalization layer, the probability of whether the news content is true or false is obtained. For example, the final output vector of the model is [0.3, 0.7], which means that there is a 70% probability that the news is false news, so the news is judged to be false.
[0179] Step 4: Model training
[0180] In the process of model training, there is a problem of uneven sample identification difficulty, so this embodiment uses the FocalLoss loss function for training. The formula (10) of Focal Loss is as follows:
[0181] loss=-(1-p t ) γ log(p t ) (10)
[0182] where p t represents the confidence level of the correct sample identification. For a real news article, if the feature vector output by the model is [0.95, 0.05], then p t The value of is 0.95. Obviously, this news is an easy-to-identify sample, and the corresponding loss value should be reduced. Conversely, the lower the confidence, the higher the corresponding loss value should be. In this way, the ability of the fake news discrimination model to discriminate news that is difficult to distinguish between true and false can be enhanced. γ is used as an adjustment factor to reduce the loss value of easy-to-identify samples. The specific value can be adjusted according to actual conditions. In this embodiment, γ is selected as 2 after a large number of comparative experiments. After that, the loss value is back-propagated to continuously update the model parameters to enhance the model's effect on the identification of fake news.
[0183] Figure 4 The flowchart of the training method of the fake news discrimination model according to the embodiment of the present disclosure is schematically shown.
[0184] like Figure 4 As shown, the false news identification method includes operations S401 to S403.
[0185] In operation S401, a news data set to be identified is obtained, wherein the news data set to be identified includes target news, target promotion content respectively related to the target news, target user information, target association relationship and target attention relationship.
[0186] In operation S402, a heterogeneous graph to be identified is generated according to the news data set to be identified.
[0187] In operation S403, the heterogeneous graph to be identified is input into a false news discrimination model, and a recognition result is output. The recognition result is used to characterize the true or false type of the target news, wherein the false news discrimination model is trained using the method described above.
[0188] According to an embodiment of the present disclosure, when the fake news discrimination model is used, it is necessary to convert the obtained news data set to be discriminated into a heterogeneous graph to be identified, so that after the heterogeneous graph to be identified is input into the fake news discrimination model, the corresponding recognition result can be output, wherein the recognition result may include "the news is true news" or "the news is fake news".
[0189] According to an embodiment of the present disclosure, by utilizing node relationships consisting of association relationships and attention relationships corresponding to news and nodes consisting of multiple initial vectors corresponding to news content, promotional content and user information, a false news discrimination model is obtained by training a heterogeneous graph neural network according to training samples consisting of nodes and node relationships. Since the training samples fully consider the node relationships related to the news content, the trained false news discrimination model can more accurately determine whether the recognition result of the news to be identified is false news, thereby at least partially overcoming the technical problem that false news cannot be accurately identified, which easily affects the user's cognition.
[0190] According to an embodiment of the present disclosure, the target association relationship includes a target reference relationship, a target reprint relationship and a target publishing relationship.
[0191] According to an embodiment of the present disclosure, generating a heterogeneous graph to be identified based on a news data set to be identified may include the following operations:
[0192] Based on the target news, target promotion content, and target user information, multiple target vectors corresponding to the target news, target promotion content, and target user information are generated. Based on the target reference relationship, target reprint relationship, target release relationship, and target attention relationship, a target adjacency matrix is generated. Based on multiple target vectors and the target adjacency matrix, a heterogeneous graph to be identified is generated.
[0193] According to the embodiments of the present disclosure, the source of the target news is not limited to various news websites or others, such as commercial software such as Weibo and Twitter.
[0194] According to an embodiment of the present disclosure, when target news is obtained, keywords of the target news are extracted, and target promotion content corresponding to the target news can be obtained using an information query interface, while target user information such as the user profile and social relationships that publish the target promotion content is obtained.
[0195] According to the embodiment of the present disclosure, the corresponding target vector is generated according to the target news, target promotion content, and target user information obtained above, and then the target adjacency matrix generated according to the target reference relationship, target reprint relationship, target release relationship, and target attention relationship is combined to obtain a heterogeneous graph to be identified. Thus, the heterogeneous graph to be identified is input into the false news discrimination model to discriminate the truth of the target news.
[0196] Figure 5 A block diagram of a training device for a fake news discrimination model according to an embodiment of the present disclosure is schematically shown.
[0197] like Figure 5 As shown, the training device for the fake news discrimination model may include a first acquisition module 510, a prediction module 520, a calculation module 530 and an iteration module 540.
[0198] The first acquisition module 510 is used to acquire a news training sample set, wherein the news training sample set includes multiple training samples and label data corresponding to the training samples, wherein the training samples include a heterogeneous graph, which is generated based on nodes and node relationships related to the news, the nodes include multiple initial vectors corresponding to news content, promotional content and user information respectively, and the node relationships include an adjacency matrix generated based on association relationships and attention relationships corresponding to the news.
[0199] The prediction module 520 is used to input the training samples in the news training sample set into the heterogeneous graph neural network and output the prediction results.
[0200] The calculation module 530 is used to input the prediction result and the label data into the loss function to obtain the loss result.
[0201] The iteration module 540 is used to iteratively adjust the network parameters of the heterogeneous graph neural network according to the loss results to generate a trained fake news discrimination model.
[0202] According to an embodiment of the present disclosure, by utilizing node relationships consisting of association relationships and attention relationships corresponding to news and nodes consisting of multiple initial vectors corresponding to news content, promotional content and user information, a false news discrimination model is obtained by training a heterogeneous graph neural network according to training samples consisting of nodes and node relationships. Since the training samples fully consider the node relationships related to the news content, the trained false news discrimination model can more accurately determine whether the recognition result of the news to be identified is false news, thereby at least partially overcoming the technical problem that false news cannot be accurately identified, which easily affects the user's cognition.
[0203] According to an embodiment of the present disclosure, the association relationship includes a reference relationship, a reprint relationship, and a publishing relationship.
[0204] According to an embodiment of the present disclosure, the training sample may be generated by an acquisition submodule, a first generation submodule, a second generation submodule, and a third generation submodule.
[0205] The acquisition submodule is used to acquire news content, promotional content and user information, wherein the promotional content is obtained by querying the keywords of the news content using the information query interface, and the user information includes user profile and social relationships.
[0206] The first generating submodule is used to generate a plurality of initial vectors corresponding to the news content, the promotion content and the user information respectively according to the news content, the promotion content and the user information.
[0207] The second generation submodule is used to generate an adjacency matrix according to the citation relationship, the reprint relationship, the publishing relationship and the attention relationship.
[0208] The third generation submodule is used to generate training samples including heterogeneous graphs according to multiple initial vectors and adjacency matrices.
[0209] According to an embodiment of the present disclosure, the first generating submodule may include a first acquiring unit, a second acquiring unit, a first generating unit, a third acquiring unit, a first obtaining unit, a second generating unit and a second obtaining unit.
[0210] The first acquisition unit is used to acquire the text vector of the text information by using the paragraph vector method when the news content includes text information.
[0211] The second acquisition unit is used to acquire the image vector of the image information by using a local binary method when the news content includes image information.
[0212] The first generating unit is used to generate an initial vector corresponding to the news content according to the text vector and / or the image vector.
[0213] The third acquisition unit is used to acquire the original vector of the original content by using a paragraph vector method when the promotion content includes the original content.
[0214] The first obtaining unit is used to process the user viewpoint corresponding to the reprinted content by using a paragraph vector method to obtain a reprinted vector when the promoted content includes the reprinted content.
[0215] The second generating unit is used to generate an initial vector corresponding to the promotion content according to the original vector and / or the reprinted vector.
[0216] The second obtaining unit is used to process the user information using a paragraph vector method to obtain an initial vector corresponding to the user information.
[0217] According to an embodiment of the present disclosure, the image information includes a plurality of image elements and a pixel value corresponding to each image element.
[0218] According to an embodiment of the present disclosure, the second acquiring unit may include a obtaining subunit and a normalizing subunit.
[0219] A subunit is obtained, which is used to process the pixel value of the image element and the pixel value of the image element related to the image element by using a local binary method for each image element, so as to obtain the local binary value of the image element.
[0220] The normalization subunit is used to perform normalization processing on multiple local binary values to obtain an image vector of image information.
[0221] According to an embodiment of the present disclosure, the heterogeneous graph neural network includes a first attention mechanism layer, a second attention mechanism layer, a fully connected layer and a normalization layer.
[0222] According to an embodiment of the present disclosure, the prediction module 520 may include an obtaining submodule, a first processing submodule, a first determining submodule, a second processing submodule, a second determining submodule, a third processing submodule and a normalization submodule.
[0223] A submodule is obtained, which is used to obtain a node feature matrix and a node relationship matrix according to a heterogeneous graph, wherein the node relationship matrix includes an adjacency matrix, the node feature matrix includes multiple news nodes, the node relationship matrix includes node relationships between multiple news nodes, and the multiple news nodes include multiple initial vectors corresponding to news content, promotional content and user information respectively.
[0224] The first processing submodule is used to process the news node and the node relationship related to the news node by using the first attention mechanism layer for each news node to obtain a first attention value.
[0225] The first determining submodule is used to determine the associated news nodes related to the news node according to the node relationship of the news nodes.
[0226] The second processing submodule is used to use the second attention mechanism layer to process the first attention value and the associated news node to obtain the second attention value of the news node.
[0227] The second determination submodule is used to determine the first feature vector according to multiple second attention values and the graph network calculation formula.
[0228] The third processing submodule is used to process the multiple first feature vectors using a fully connected layer to obtain a second feature vector.
[0229] The normalization submodule is used to process the second eigenvector using the normalization layer to obtain a prediction result.
[0230] According to an embodiment of the present disclosure, the training device for the fake news discrimination model may further include a third acquisition module, a verification module, a comparison module and a determination module.
[0231] The third acquisition module is used to obtain a news verification sample set, wherein the news verification sample set includes multiple verification samples and verification label data corresponding to the verification samples, wherein the verification samples include a verification heterogeneous graph generated according to verification nodes and verification node relationships related to the verification news, the verification nodes include multiple verification initial vectors corresponding to the verification news content, the verification promotion content and the verification user information respectively, and the verification node relationships include a verification adjacency matrix generated according to the verification association relationship and the verification attention relationship.
[0232] The verification module is used to input multiple verification samples into the fake news discrimination model and output verification results, wherein the verification results include verification score results corresponding to each verification sample.
[0233] The comparison module is used to match and compare the prediction results with multiple verification label data to obtain comparison results.
[0234] The determination module is used to determine the false news discrimination model as the target false news discrimination model when the comparison result shows that the proportion of the number of verification score results that are the same as the verification label data in multiple verification score results meets a preset proportion.
[0235] Figure 6 The block diagram of a false news identification device according to an embodiment of the present disclosure is schematically shown.
[0236] like Figure 6 As shown, the fake news identification device 600 may include a second acquisition module 610 , a generation module 620 and an identification module 630 .
[0237] The second acquisition module 610 is used to acquire a news data set to be identified, wherein the news data set to be identified includes target news, target promotion content respectively related to the target news, target user information, target association relationship and target attention relationship.
[0238] The generation module 620 is used to generate a heterogeneous graph to be identified based on the news data set to be identified.
[0239] The identification module 630 is used to input the heterogeneous graph to be identified into the false news discrimination model and output the identification result, which is used to characterize the true and false types of the target news, wherein the false news discrimination model is trained using the method described above.
[0240] According to an embodiment of the present disclosure, by utilizing node relationships consisting of association relationships and attention relationships corresponding to news and nodes consisting of multiple initial vectors corresponding to news content, promotional content and user information, a false news discrimination model is obtained by training a heterogeneous graph neural network according to training samples consisting of nodes and node relationships. Since the training samples fully consider the node relationships related to the news content, the trained false news discrimination model can more accurately determine whether the recognition result of the news to be identified is false news, thereby at least partially overcoming the technical problem that false news cannot be accurately identified, which easily affects the user's cognition.
[0241] According to an embodiment of the present disclosure, the target association relationship includes a target reference relationship, a target reprint relationship and a target publishing relationship.
[0242] According to an embodiment of the present disclosure, the generation module 620 may include a fourth generation submodule, a fifth generation submodule, and a sixth generation submodule.
[0243] The fourth generating submodule is used to generate a plurality of target vectors corresponding to the target news, the target promotion content, and the target user information respectively according to the target news, the target promotion content, and the target user information.
[0244] The fifth generation submodule is used to generate a target adjacency matrix according to the target reference relationship, the target reprint relationship, the target release relationship and the target attention relationship.
[0245] The sixth generation submodule is used to generate a heterogeneous graph to be identified according to multiple target vectors and a target adjacency matrix.
[0246] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (Field Programmable Gate Array, FPGA), programmable logic arrays (Programmable Logic Arrays, PLA), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), or can be implemented by hardware or firmware of any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware, and firmware or by any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.
[0247] For example, any of the first acquisition module 510, the prediction module 520, the calculation module 530 and the iteration module 540, or the second acquisition module 610, the generation module 620 and the identification module 630 can be combined in one module / unit / sub-unit for implementation, or any of the modules / units / sub-units can be split into multiple modules / units / sub-units. Alternatively, at least part of the functions of one or more of these modules / units / sub-units can be combined with at least part of the functions of other modules / units / sub-units and implemented in one module / unit / sub-unit. According to an embodiment of the present disclosure, at least one of the first acquisition module 510, the prediction module 520, the calculation module 530 and the iteration module 540, or the second acquisition module 610, the generation module 620 and the identification module 630 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in an appropriate combination of any of them. Alternatively, at least one of the first acquisition module 510, the prediction module 520, the calculation module 530 and the iteration module 540, or the second acquisition module 610, the generation module 620 and the identification module 630 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be performed.
[0248] It should be noted that the training device or false news discrimination device part of the false news discrimination model in the embodiments of the present disclosure corresponds to the training method or false news discrimination method part of the false news discrimination model in the embodiments of the present disclosure. The description of the training device or false news discrimination device part of the false news discrimination model specifically refers to the training method or false news discrimination method part of the false news discrimination model, which will not be repeated here.
[0249] Figure 7 A block diagram of an electronic device suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0250] like Figure 7As shown, the electronic device 700 according to the embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 702 or the program loaded from the storage part 708 to the random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present disclosure.
[0251] In RAM 703, various programs and data required for the operation of electronic device 700 are stored. Processor 701, ROM 702 and RAM 703 are connected to each other via bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 702 and / or RAM 703. It should be noted that the program can also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0252] According to an embodiment of the present disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The system 700 may further include one or more of the following components connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.
[0253] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.
[0254] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0255] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM (Erasable Programmable Read Only Memory, EPROM) or flash memory), a portable compact disk read-only memory (Computer Disc Read-Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device.
[0256] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 702 and / or the RAM 703 described above and / or one or more memories other than the ROM 702 and the RAM 703 .
[0257] An embodiment of the present disclosure also includes a computer program product, which includes a computer program, which contains program code for executing the method provided by the embodiment of the present disclosure. When the computer program product runs on an electronic device, the program code is used to enable the electronic device to implement the training method of the false news discrimination model or the false news discrimination method provided by the embodiment of the present disclosure.
[0258] When the computer program is executed by the processor 701, the above functions defined in the system / device of the embodiment of the present disclosure are executed. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0259] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 709, and / or installed from the removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0260] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0261] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions. It can be understood by those skilled in the art that the features recorded in the various embodiments and / or claims of the present disclosure can be combined and / or combined in a variety of ways, even if such a combination or combination is not explicitly recorded in the present disclosure. In particular, without departing from the spirit and teaching of the present disclosure, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0262] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A training method for a fake news discrimination model, comprising: Acquire a news training sample set, wherein the news training sample set includes a plurality of training samples and label data corresponding to the training samples, wherein the training samples include a heterogeneous graph, the heterogeneous graph is generated according to nodes and node relationships related to the news, the nodes include a plurality of initial vectors corresponding to news content, promotional content, and user information, respectively, and the node relationships include an adjacency matrix generated according to association relationships and attention relationships corresponding to the news; Inputting the training samples in the news training sample set into a heterogeneous graph neural network and outputting a prediction result; Inputting the prediction result and the label data into a loss function to obtain a loss result; Iteratively adjusting the network parameters of the heterogeneous graph neural network according to the loss result to generate the trained fake news discrimination model; The heterogeneous graph neural network includes a first attention mechanism layer, a second attention mechanism layer, a fully connected layer and a normalization layer; The step of inputting the training samples in the news training sample set into a heterogeneous graph neural network and outputting prediction results includes: According to the heterogeneous graph, a node feature matrix and a node relationship matrix are obtained, wherein the node relationship matrix includes the adjacency matrix, the node feature matrix includes a plurality of news nodes, the node relationship matrix includes node relationships between the plurality of news nodes, and the plurality of news nodes include a plurality of initial vectors corresponding to the news content, the promotion content, and the user information, respectively; For each of the news nodes, the first attention mechanism layer is used to process the news node and the node relationship related to the news node to obtain a first attention value, wherein the first attention value The calculation of is shown in formula (1) and formula (2): (1) (2) in, Characterize news nodes, Representation and News Nodes The type of relationship connected, represents the initial adjacency matrix, Characterizing relationship types The eigenvector of Represents all the relationship types connected to the central news node, The relationship between the nodes is represented by The training parameters of represents the nonlinear activation function, Represents a vector concatenation operation; Determining an associated news node related to the news node according to the node relationship of the news node; The first attention value and the associated news node are processed by the second attention mechanism layer to obtain a second attention value of the news node, wherein the second attention value The calculation of is shown in formula (3): (3) in, and Represent news nodes and The characteristic vector of Representation and Nodes The relationship is The feature vectors of the neighboring nodes of , The relationship between nodes is represented as The training parameters of Represents a nonlinear activation function, Characterize vector concatenation operations; Determine a first feature vector according to the plurality of second attention values and a graph network calculation formula; Processing a plurality of the first feature vectors using the fully connected layer to obtain a second feature vector; The second feature vector is processed by using the normalization layer to obtain the prediction result.
2. According to the method of claim 1, the association relationship includes a reference relationship, a reprint relationship and a publishing relationship; in, The training samples are generated in the following way: Acquire the news content, the promotion content and the user information, wherein the promotion content is obtained by querying keywords of the news content using an information query interface, and the user information includes user information and social relationships; Generating a plurality of initial vectors corresponding to the news content, the promotion content and the user information respectively according to the news content, the promotion content and the user information; Generate the adjacency matrix according to the citation relationship, the reprint relationship, the publishing relationship and the attention relationship; The training sample including the heterogeneous graph is generated according to the multiple initial vectors and the adjacency matrix.
3. The method according to claim 2, wherein: The generating a plurality of initial vectors corresponding to the news content, the promotion content and the user information respectively according to the news content, the promotion content and the user information comprises: In the case where the news content includes text information, obtaining a text vector of the text information using a paragraph vector method; In the case where the news content includes image information, using a local binary method to obtain an image vector of the image information; Generate the initial vector corresponding to the news content according to the text vector and / or the image vector; In the case where the promotional content includes original content, obtaining an original vector of the original content using a paragraph vector method; In the case where the promotional content includes reprinted content, a paragraph vector method is used to process user opinions corresponding to the reprinted content to obtain a reprint vector; Generating the initial vector corresponding to the promotional content according to the original vector and / or the reprinted vector; In the case where the user information includes text-like information, the user information is processed using a paragraph vector method to obtain a text-like vector; In the case where the user information includes image information, obtaining an image vector of the image information by using a local binary method; The initial vector corresponding to the user information is generated according to the text-like vector and / or the image-like vector.
4. The method according to claim 3, wherein the image information comprises a plurality of image elements and a pixel value corresponding to each of the image elements; in, When the news content includes image information, obtaining the image vector of the image information by using a local binary method includes: For each of the image elements, use the local binary method to process the pixel value of the image element and the pixel values of the image elements related to the image element to obtain the local binary value of the image element; Normalization is performed on the multiple local binary values to obtain the image vector of the image information.
5. The method according to claim 1, further comprising: Acquire a news verification sample set, wherein the news verification sample set includes multiple verification samples and verification label data corresponding to the verification samples, wherein the verification samples include a verification heterogeneous graph generated according to verification nodes and verification node relationships related to the verification news, the verification nodes include multiple verification initial vectors corresponding to the verification news content, the verification promotion content and the verification user information, respectively, and the verification node relationship includes a verification adjacency matrix generated according to the verification association relationship and the verification attention relationship; Inputting the plurality of verification samples into the fake news discrimination model, and outputting a verification result, wherein the verification result includes a verification score result corresponding to each of the verification samples; Matching and comparing the prediction result with the plurality of verification label data to obtain a comparison result; When the comparison result indicates that the proportion of the verification score results that are identical to the verification label data among the multiple verification score results meets a preset proportion, the false news discrimination model is determined as the target false news discrimination model.
6. A method for identifying fake news, comprising: Acquire a news data set to be identified, wherein the news data set to be identified includes target news, target promotion content respectively related to the target news, target user information, target association relationship and target attention relationship; Generate a heterogeneous graph to be identified based on the news data set to be identified; The heterogeneous graph to be identified is input into a false news discrimination model, and an identification result is output, wherein the identification result is used to characterize the true or false type of the target news, wherein the false news discrimination model is trained using the method described in any one of claims 1 to 5.
7. According to the method of claim 6, the target association relationship includes a target reference relationship, a target reprint relationship and a target publishing relationship; in, The step of generating a heterogeneous graph to be identified based on the news data set to be identified includes: According to the target news, the target promotion content, and the target user information, a plurality of target vectors corresponding to the target news, the target promotion content, and the target user information are generated respectively; Generate a target adjacency matrix according to the target reference relationship, the target reprint relationship, the target publishing relationship and the target attention relationship; The to-be-identified heterogeneous graph is generated according to the multiple target vectors and the target adjacency matrix.
8. A training device for a fake news discrimination model, comprising: A first acquisition module is used to acquire a news training sample set, wherein the news training sample set includes multiple training samples and label data corresponding to the training samples, wherein the training samples include a heterogeneous graph, and the heterogeneous graph is generated according to nodes and node relationships related to the news, wherein the nodes include multiple initial vectors corresponding to news content, promotional content, and user information, respectively, and the node relationships include an adjacency matrix generated according to association relationships and attention relationships corresponding to the news; A prediction module, used for inputting the training samples in the news training sample set into a heterogeneous graph neural network and outputting a prediction result; A calculation module, used for inputting the prediction result and the label data into a loss function to obtain a loss result; and An iteration module, used for iteratively adjusting the network parameters of the heterogeneous graph neural network according to the loss result to generate the trained fake news discrimination model; The heterogeneous graph neural network includes a first attention mechanism layer, a second attention mechanism layer, a fully connected layer and a normalization layer; Wherein, the prediction module includes: A submodule is obtained, which is used to obtain a node feature matrix and a node relationship matrix according to the heterogeneous graph, wherein the node relationship matrix includes the adjacency matrix, the node feature matrix includes a plurality of news nodes, the node relationship matrix includes node relationships between the plurality of news nodes, and the plurality of news nodes include a plurality of initial vectors corresponding to the news content, the promotion content and the user information respectively; The first processing submodule is used to process the news node and the node relationship related to the news node using the first attention mechanism layer for each news node to obtain a first attention value, wherein the first attention value The calculation of is shown in formula (4) and formula (5): (4) (5) in, Characterize news nodes, Representation and News Nodes The type of relationship connected, represents the initial adjacency matrix, Characterizing relationship types The eigenvector of Represents all the relationship types connected to the central news node, The relationship between the nodes is represented by The training parameters of represents the nonlinear activation function, Represents a vector concatenation operation; A first determining submodule, configured to determine an associated news node related to the news node according to a node relationship of the news node; The second processing submodule is used to process the first attention value and the associated news node using the second attention mechanism layer to obtain a second attention value of the news node, wherein the second attention value The calculation of is shown in formula (6): (6) in, and Represent news nodes and The characteristic vector of Representation and Nodes The relationship is The feature vectors of the neighboring nodes of , The relationship between nodes is represented as The training parameters of Represents a nonlinear activation function, Characterize vector concatenation operations; A second determination submodule, configured to determine a first feature vector according to a plurality of the second attention values and a graph network calculation formula; A third processing submodule, configured to process the plurality of first feature vectors using the fully connected layer to obtain a second feature vector; A normalization submodule is used to process the second feature vector using the normalization layer to obtain the prediction result.
9. A false news identification device, comprising: The second acquisition module is used to acquire a news data set to be identified, wherein the news data set to be identified includes target news, target promotion content related to the target news, target user information, target association relationship and target attention relationship; A generating module, used for generating a heterogeneous graph to be identified according to the news data set to be identified; and The recognition module is used to input the heterogeneous graph to be recognized into a false news discrimination model and output a recognition result, wherein the recognition result is used to characterize the true or false type of the target news, wherein the false news discrimination model is trained using the method described in any one of claims 1 to 5.
Citation Information
Patent Citations
Building energy consumption prediction method based on deep cascade generative adversarial network and related products
CN112183826A
Chemical information extraction model training method and device, chemical information extraction method and device, equipment and storage medium
CN112699668A
Information diffusion prediction method fusing space-time attention and heterogeneous graph convolutional network
CN113850446A
Peer-inspired student performance prediction in interactive online question pools with graph neural network
US20210398439A1
