A text information detection method and device

CN117912033BActive Publication Date: 2026-09-22NORTHWESTERN POLYTECHNICAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311637368.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-01
Publication Date
2026-09-22
Estimated Expiration
2043-12-01

AI Technical Summary

Technical Problem

[0004]本发明提供一种文本信息的检测方法与装置,用以解决现有技术中无法对不实文本做出及时的检测识别的缺陷

Benefits of technology

[0063]本发明提供的文本信息的检测方法与装置,通过构建文本传播结构图,得到原始文本传播图,并利用原始文本传播图重构得到两个新的重构图,然后利用重图和原始图训练模型,并以训练好的模型来检测文本的真不实,该方法一方面克服了以往方法对大量标记数据的需求,从而能够及时对不实文本实现准确识别,更好地适用于现实场景。另一方面,该方法同时从文本内容和传播结构两个角度实现了对信息系统中不实文本的检测,克服了以往不实文本的检测仅从单一角度检测的偏见,提高了对不实文本检测的准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117912033B_ABST
    Figure CN117912033B_ABST
Patent Text Reader

Abstract

The application provides a text information detection method and device. The method comprises the following steps: constructing a text propagation structure graph G, G=(V, A, X); performing a data enhancement operation on the text propagation structure graph G, and obtaining two enhanced graphs, namely, an enhanced graph and an enhanced graph; training an initial automatic encoder model according to the text propagation structure graph G and the enhanced graph, and obtaining a trained automatic encoder model; inputting the text information to be detected into the trained model, and detecting and recognizing the text to be detected according to the prediction result of the model. On the one hand, the application overcomes the demand for a large amount of marked data in the previous method, so that accurate recognition of false text can be realized in time, and the application is better suitable for real scenes. On the other hand, the application overcomes the bias of the previous false text detection from a single angle, and improves the accuracy of false text detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of information detection technology, and in particular relates to a method and apparatus for detecting text information. Background Technology

[0002] With the rapid development of the internet, various online communication methods have become increasingly sophisticated. At the same time, misinformation is also constantly increasing. To automatically identify this growing volume of misinformation, various methods have been proposed. Traditional misinformation detection methods mainly involve manually designing rules to extract text features, and then using a classifier to categorize these features. However, manually designing rules to extract valuable misinformation features can be labor-intensive, resulting in low efficiency and accuracy.

[0003] In recent years, deep learning has played an increasingly important role in misleading text detection. However, current methods for detecting misleading text rely on large labeled datasets. Obtaining these labeled datasets typically requires significant time, effort, and domain expertise, thus hindering timely detection and identification of misleading text. Summary of the Invention

[0004] This invention provides a method and apparatus for detecting text information, which solves the shortcomings of existing technologies that cannot detect and identify false text in a timely manner.

[0005] This invention provides a method for detecting text information, comprising: S1: constructing a text propagation structure graph G, G = (V, A, X); wherein, V = {v n ,v n} represents a set of nodes, v n It is a text node, v u The user node represents the forwarded text; A is the adjacency matrix representing the forwarding relationship formed by the user forwarding the text, and X is the node feature matrix;

[0006] S2: Perform a reconstruction operation on the text propagation structure graph G to obtain two reconstruction graphs, namely reconstruction graph G1 and reconstruction graph G2.

[0007] S3: Train an initial autoencoder model based on the text propagation structure graph G, the reconstruction graph G1, and the reconstruction graph G2 to obtain a trained autoencoder model;

[0008] S4: Input the text to be detected into the trained autoencoder model, and detect and recognize the text to be detected based on the model's prediction results.

[0009] According to a text information detection method provided by the present invention, step S1 includes:

[0010] S11: Obtain several texts with propagation relationships;

[0011] S12: For each of the texts, obtain the user corresponding to each text and the forwarding relationship of the text;

[0012] S13: Construct a propagation chain for each text based on the user corresponding to each text and the forwarding relationship of the text;

[0013] S14: Based on the propagation chain, determine the text propagation structure diagram G corresponding to the plurality of texts with propagation relationships.

[0014] According to a text information detection method provided by the present invention, step S2 includes:

[0015] S21: Randomly mask the node features of the text propagation structure graph G, that is, randomly select a certain proportion of nodes V from the original text propagation structure graph G=(V,A,X). m As a set of nodes used for masking, for V m Each node in the matrix has its feature vector replaced with a special mask, denoted as x. [MASK] Then, the feature matrix after masking for:

[0016]

[0017] in The enhanced features of node i, the enhanced feature matrix Depend on structure;

[0018] S22: Randomly discard the edges of the text propagation structure graph G, E Drop A is an edge set obtained by randomly sampling from the original edge set E. Drop E represents Drop Given the adjacency matrix; then the augmented adjacency matrix. The following equation can be used to calculate:

[0019]

[0020] Where A is the original adjacency matrix, A Drop It is an adjacency matrix constructed by randomly sampling edges from the original edge set.

[0021] S23: Perform steps S21 and S22 twice on the text propagation structure graph G to obtain two enhanced graphs:

[0022]

[0023]

[0024] in, This is the augmented image obtained after the first data augmentation. This is the augmented image obtained after the second data augmentation. Enhanced representation diagram The adjacency matrix, Enhanced representation diagram eigenmatrix Enhanced representation diagram The adjacency matrix, Enhanced representation diagram The characteristic matrix of .

[0025] According to a text information detection method provided by the present invention, step S3 includes:

[0026] S31: Use a two-layer GIN encoder to process the enhanced map respectively. and Enhanced Map The encoding operations are performed separately to obtain latent vectors H1 and H2 respectively;

[0027] S32: Use a one-layer GIN decoder model to decode the latent vectors H1 and H2, map the latent representation vectors back to the input, and obtain the reconstructed feature matrix X'1 and the reconstructed feature matrix X'2 accordingly.

[0028] S33: Obtain the original feature matrix X corresponding to the text propagation structure graph G, and based on the original feature matrix X, the reconstructed feature matrix X'1 and the reconstructed feature matrix X'2, train an initial autoencoder model based on the reconstruction error loss function and the contrast loss function to obtain a trained autoencoder model; wherein, the reconstruction error loss is used to minimize the difference between the reconstructed representation of the graph and the original graph representation; the contrast loss is used to minimize the difference between two augmented graphs derived from the same propagation graph.

[0029] According to a text information detection method provided by the present invention, step S31 includes:

[0030] In the l-th layer of each augmented graph, the hidden feature vector of node i is updated using an aggregation function.

[0031]

[0032] in, It is the set of neighboring nodes of i. It is the input feature vector of node i, ∈ (l) The weight parameters of the learnable self-features of the l-th layer are represented by MLP(·), which represents a nonlinear transformation model. This process is performed iteratively on all nodes until the l-th layer.

[0033] After two layers of information propagation, the GIN encoder outputs a set of node embeddings H for all nodes in the augmented graph. Through the above encoding steps, the augmented graphs are finally obtained. and Enhanced Map The corresponding latent vectors H1 and H2.

[0034] According to a text information detection method provided by the present invention, step S32 includes:

[0035] S321: For each enhancement graph, V m For each node in the array, replace V with a mask label. m For each node in the array, the mask is represented as h. [REMASK] Then, node v i Feature representation after remasking Defined as:

[0036]

[0037] S322: According to the node v i Feature representation after remasking Construct its corresponding remasked latent vector Accordingly, enhanced graph The corresponding latent vector after remasking is Enhanced graph The corresponding latent vector after remasking is

[0038] S323: Use a single-layer GIN decoder to process the re-masked latent vectors. and Decoding yields the reconstructed feature matrix X'1 and the reconstructed feature matrix X'2:

[0039]

[0040]

[0041] Among them, GIN decoder Represents a single-layer GIN decoder. To enhance the image The adjacency matrix, Enhanced graph The adjacency matrix; To enhance the image The corresponding latent vector H1 after remasking; To enhance the image The corresponding remasked latent vector H2; the latent vector H1 is derived from the enhanced graph. The corresponding feature matrix X1 is constructed; the latent vector H2 is obtained from the enhancement map. The corresponding characteristic matrix X2 is constructed.

[0042] According to a text information detection method provided by the present invention, step S33 includes:

[0043] S331: First, calculate the reconstruction loss, using the mean squared error (MSE) between the original feature matrix and the reconstructed feature matrix as the reconstruction loss:

[0044]

[0045] Where n is the number of samples, X is the original feature matrix of the text propagation structure graph G, and X'1 is the enhancement graph. The corresponding reconstructed feature matrix; X'2 is the enhancement map. The corresponding reconstructed feature matrix is ​​obtained by minimizing the reconstruction loss during the training phase;

[0046] S332: Then, the contrastive loss is calculated by minimizing the cosine similarity between the reconstructed feature matrix X'1 and the reconstructed feature matrix X'2:

[0047]

[0048] S333: Finally, calculate the final loss function value L, which is a weighted sum of reconstruction loss and contrast loss:

[0049] L = L rec +αL con

[0050] Among them, L rec It is a reconstruction loss, L con It is a contrastive loss, and α is a hyperparameter that controls the balance between the two loss functions.

[0051] According to a text information detection method provided by the present invention, step S4 includes:

[0052] S41: Input the text to be detected into the trained autoencoder model, and determine its corresponding graph-level representation vector F based on the model:

[0053]

[0054] Among them, h i It is node v in the text propagation graph to be detected. i The corresponding feature encoding representation;

[0055] S42: Input the graph-level representation vector F into the SVM classifier to obtain the true / false category y of the text:

[0056] y = SVM(F).

[0057] The present invention also provides a text information detection device, comprising the following steps:

[0058] The building unit is used to construct the text propagation structure graph G, where G = (V, A, X); and V = {v n ,v u} represents a set of nodes, v n It is a text node, v u The user node represents the forwarded text; A is the adjacency matrix representing the forwarding relationship formed by the user forwarding the text, and X is the node feature matrix;

[0059] The reconstruction unit is used to perform a reconstruction operation on the text propagation structure graph G, resulting in two reconstruction graphs, namely reconstruction graph G1 and reconstruction graph G2.

[0060] The training unit is used to train an initial autoencoder model based on the text propagation structure graph G, the reconstruction graph G1, and the reconstruction graph G2, so as to obtain a trained autoencoder model.

[0061] The detection unit is used to input the text to be detected into the trained autoencoder model and detect and recognize the text to be detected based on the prediction results of the model.

[0062] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the text information detection method as described above.

[0063] The text information detection method and apparatus provided by this invention constructs a text propagation structure graph to obtain an original text propagation graph, and then reconstructs two new reconstructed graphs using the original text propagation graph. A model is then trained using the reconstructed graphs and the original graph, and the trained model is used to detect the authenticity of text. This method overcomes the need for large amounts of labeled data required by previous methods, thus enabling timely and accurate identification of false text and making it better suited for real-world scenarios. Furthermore, this method simultaneously detects false text in information systems from both the perspectives of text content and propagation structure, overcoming the bias of previous false text detection methods that only considered a single perspective, and improving the accuracy of false text detection. Attached Figure Description

[0064] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0065] Figure 1 Flowchart of the text information detection method provided by the present invention;

[0066] Figure 2(a) shows the comparison of detection accuracy, precision, recall and F1 score results with five other unsupervised methods on Information System 1.

[0067] Figure 2(b) shows a comparison of the detection accuracy, precision, recall, and F1 score results with five other unsupervised methods on Information System II.

[0068] Figure 2(c) shows the comparison of detection accuracy and F1 score results with four other supervised methods on two information systems;

[0069] Figure 3 This is a comparative diagram of the ablation experiment results conducted by GAMC on two datasets; Figure 4 This is a schematic diagram illustrating the impact of masking rate λ and edge drop rate γ on the false text recognition rate. Detailed Implementation

[0070] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0071] Figure 1 The flowchart of the text information detection method provided by the present invention is as follows: Figure 1 As shown, the method includes the following steps:

[0072] S1: Construct a text propagation structure graph G, G = (V, A, X); where V = {v n ,v u} represents a set of nodes, v n It is a text node, v u The user node represents the forwarded text; A is the adjacency matrix representing the forwarding relationship formed by the user forwarding the text, and X is the node feature matrix;

[0073] S2: Perform data augmentation on the text propagation structure graph G to obtain two augmented graphs, namely the augmented graph G. Enhanced graph

[0074] S3: Based on the text propagation structure diagram G and the enhancement diagram Enhanced graph Train the initial autoencoder model to obtain the trained autoencoder model;

[0075] S4: Input the text to be detected into the trained autoencoder model, and detect and recognize the text to be detected based on the model's prediction results.

[0076] The method provided by this invention constructs a text propagation structure graph to obtain an original text propagation graph, and then reconstructs two new reconstructed graphs using the original text propagation graph. A model is then trained using the reconstructed graphs and the original graph, and the trained model is used to detect the authenticity of text. This method overcomes the need for large amounts of labeled data required by previous methods, thus enabling timely and accurate identification of false text information and making it better suited for real-world scenarios. Furthermore, this method simultaneously detects false text in information systems from both the perspectives of text content and propagation structure, overcoming the bias of previous false text detection methods that only considered a single perspective, and improving the accuracy of false text information detection.

[0077] Furthermore, the following section details how to construct the text propagation structure graph G, specifically including the following steps:

[0078] S11: Obtain several texts with propagation relationships; S12: For each text, obtain the user corresponding to each text and the forwarding relationship of the text; S13: Construct the propagation chain corresponding to each text based on the user corresponding to each text and the forwarding relationship of the text; S14: Determine the text propagation structure diagram G corresponding to the several texts with propagation relationships based on the propagation chain.

[0079] Specifically, firstly, several texts with propagation relationships are obtained, and their forwarding relationships are determined based on these texts. Then, each text is modeled into a graph G = (V, A, X) based on these forwarding relationships, where V = {v...} n ,v u} represents a set of nodes, where v n It is a text node, v u Represents the user node forwarding the text; A represents the adjacency matrix, reflecting the forwarding relationships; X is the node feature matrix, where the feature of the i-th node in graph G is denoted as x. i Text node v nThe node features are text content embeddings, encoded by a pre-trained BERT model, while the user node v u The node features are the embeddings of the user's historical posts, encoded by a pre-trained BERT model.

[0080] Furthermore, the following describes how to reconstruct the text propagation structure graph G to obtain reconstructed graph G1 and reconstructed graph G2. The method specifically includes the following steps:

[0081] S21: Randomly mask the node features of the text propagation structure graph G: that is, randomly select a certain proportion of nodes V from the original text propagation structure graph G=(V,A,X). m As a set of nodes used for masking. For V m For each node in the vector, we replace its feature vector with a special mask label, denoted as x. [MASK] So, the feature matrix after masking It can be defined as:

[0082]

[0083] in The enhanced features of node i, the enhanced feature matrix Depend on structure.

[0084] S22: Randomly discard the edges of the text propagation structure graph G. E Drop A is an edge set obtained by randomly sampling from the original edge set E. Drop E represents Drop The adjacency matrix. Then the augmented adjacency matrix. It can be calculated from the following equation:

[0085]

[0086] Where A is the original adjacency matrix, A Drop It is an adjacency matrix constructed by randomly sampling edges from the original edge set.

[0087] S23: Perform steps S21 and S22 twice on the text propagation structure graph G, which will yield two enhanced graphs:

[0088]

[0089]

[0090] in, This is the augmented image obtained after the first data augmentation. This is the augmented image obtained after the second data augmentation. Enhanced representation diagram The adjacency matrix, Enhanced representation diagram eigenmatrix Enhanced representation diagram The adjacency matrix, Enhanced representation diagram The characteristic matrix of .

[0091] The following explains how to use the text propagation structure diagram G and the enhancement diagram. Enhanced graph The training of the autoencoder model is explained in detail, including the following steps:

[0092] S31: Use a two-layer autoencoder model to process the augmented map respectively. and Enhanced Map The encoding operations are performed separately to obtain latent vectors H1 and H2 respectively;

[0093] S32: Use a one-layer autoencoder model to decode the latent vectors H1 and H2, mapping the latent representation vectors back to the input to obtain the reconstructed feature matrix X'1. 和 Reconstruct the feature matrix X'2;

[0094] S33: Obtain the original feature matrix X corresponding to the text propagation structure graph G, and based on the original feature matrix X, the reconstructed feature matrix X'1 and the reconstructed feature matrix X'2, train an initial autoencoder model based on the reconstruction error loss function and the contrast loss function to obtain a trained autoencoder model; wherein, the reconstruction error loss is used to minimize the difference between the reconstructed representation of the graph and the original graph representation; the contrast loss is used to minimize the difference between two augmented graphs derived from the same propagation graph.

[0095] Further, step S31 specifically includes: providing an enhancement graph. The GIN encoder operates as follows. In the l-th layer, the hidden feature vector of node i is updated using an aggregation function.

[0096]

[0097] in It is the set of neighboring nodes of i. It is the input feature vector of node i, ∈ (l) The weights represent the learnable self-features of the l-th layer, and MLP(·) represents the nonlinear transformation model. This process is performed iteratively on all nodes until the l-th layer.

[0098] After two layers of information propagation, the GIN encoder outputs a set of node embeddings H for all nodes in the graph. Through the above encoding steps, an enhanced graph can be obtained. The latent vector H1, the augmented graph The potential vector H2.

[0099] Furthermore, S32 specifically includes:

[0100] First, this invention performs a re-masking operation on the masked nodes in order to reconstruct their initial features; for V m Each node in the array has its latent representation vector replaced with a special mask label, denoted as h. [REMASK] So, node v i Feature representation after remasking It can be defined as:

[0101]

[0102] Re-masked node latent representation Depend on Construction. Accordingly, after performing the remasking operation, the enhanced graph... The corresponding latent vector after remasking is Enhanced graph The corresponding latent vector after remasking is

[0103] Secondly, a single-layer GIN decoder is used to process the latent vectors. and Decoding yields the reconstructed feature matrices X'1 and X'2, as follows:

[0104]

[0105]

[0106] Among them, GIN decoder Represents a single-layer GIN decoder.

[0107] Among them, GIN decoder Represents a single-layer GIN decoder. To enhance the image The adjacency matrix, Enhanced graph The adjacency matrix; To enhance the image The corresponding latent vector H1 after remasking; To enhance the image The corresponding remasked latent vector H2; the latent vector H1 is derived from the enhanced graph. The corresponding feature matrix X1 is constructed; the latent vector H2 is obtained from the enhancement map. The corresponding characteristic matrix X2 is constructed.

[0108] Furthermore, S33 specifically includes:

[0109] Obtain the original feature matrix X corresponding to the text propagation structure graph G, and based on the original feature matrix X, the reconstruction vector X'1 and the reconstruction vector X'2, train an initial autoencoder model based on the reconstruction error loss function and the contrast loss function to obtain the trained autoencoder model; wherein, the reconstruction error loss is used to minimize the difference between the reconstruction representation of the graph and the original graph representation; the contrast loss is used to minimize the difference between two reconstruction graphs derived from the same propagation graph.

[0110] Specifically, we first calculate the reconstruction loss. The reconstruction loss aims to ensure the similarity between the reconstructed feature matrices X'1 and X'2 and the original feature matrix X. We use the mean squared error (MSE) between the original feature matrix and the reconstructed feature matrix as the reconstruction loss:

[0111]

[0112] Where n is the number of samples, X is the original feature matrix of graph G, and v'1 and X'2 are the augmented graphs. and The reconstructed feature matrix. By minimizing this loss during the training phase, the model can generate a reconstructed graph that closely matches the original graph, which encourages the graph encoder to learn better graph-level representation vectors.

[0113] Then, the contrastive loss is calculated. The contrastive loss aims to minimize the difference between two reconstructed graphs derived from the same propagation graph. This is achieved by minimizing the cosine similarity between the reconstructed feature matrices X'1 and X'2:

[0114]

[0115] Where X'1 and X'2 are augmented graphs and The reconstructed decoded representation vector.

[0116] Finally, the final loss function value L is calculated. The final loss function is a weighted sum of the reconstruction loss and the contrast loss:

[0117] L = L rec +αL con

[0118] Among them, L rec It is a reconstruction loss, L con It is a contrastive loss, and α is a hyperparameter that controls the balance between the two loss functions.

[0119] The text information detection method provided by this invention helps the model learn graph-level representation vectors through data augmentation, graph encoding, and graph decoding strategies for use in the task of detecting false text information, and enables the model to better understand and learn the potential patterns of text propagation. Furthermore, by minimizing the difference between the reconstructed graph and the original graph through reconstruction error loss, the graph autoencoder can better learn the potential features of the text propagation graph; contrastive loss ensures that two augmented graphs generated from the same propagation graph are as similar as possible after reconstruction, resulting in higher detection accuracy for the detection method provided by this invention. Moreover, this invention does not require labeled data, making it better applicable to real-world scenarios.

[0120] Further, S4 includes:

[0121] S41: Input the text to be detected into the trained autoencoder model, and determine its corresponding graph-level representation vector F based on the model:

[0122]

[0123] Among them, h i It is node v in the text propagation graph to be detected. i The corresponding feature encoding representation;

[0124] S42: Input the graph-level representation vector F into the SVM classifier to obtain the true / false category y of the text:

[0125] y = SVM(F).

[0126] Specifically, after the model is trained, the node embedding vectors obtained by the aggregate encoder are used to obtain the graph-level representation vector F of the entire graph. Inputting this graph-level representation vector into the SVM classifier yields the true / false category y of the text.

[0127] The beneficial effects of this invention are reflected in the following aspects:

[0128] (1) The present invention can automatically detect false text information in information systems without the need for large labeled datasets.

[0129] (2) This invention takes into account both text content and propagation structure to detect false text information, thereby improving the accuracy of text information detection.

[0130] (3) This invention eliminates the dependence on labeled datasets by applying a graph autoencoder with masking and contrastive learning, and effectively solves the problem of not fully considering the text propagation structure to assist in the detection of false text information.

[0131] (4) This invention is a method for detecting text information, which overcomes the need for a large amount of labeled data in previous methods; secondly, this invention realizes the detection of false text information in the information system from both the perspective of text content and propagation structure, which overcomes the bias of previous false text information detection technical solutions that only realize detection from a single perspective.

[0132] Figure 2 shows the detailed results of the proposed method (GAMC) on two real-world datasets, comparing it with other methods in terms of evaluation metrics for detecting misleading text. Figure 2(a) compares the detection accuracy, precision, recall, and F1 score with five other unsupervised methods on Information System 1; Figure 2(b) compares the detection accuracy, precision, recall, and F1 score with five other unsupervised methods on Information System 2; and Figure 2(c) compares the detection accuracy and F1 score with four other supervised methods on both information systems. It can be seen that the proposed method significantly improves upon existing unsupervised methods across all four metrics in both information systems. This demonstrates that the GAMC method based on graph autoencoders can fully utilize text content and propagation structure to learn better graph-level representation vectors for detecting misleading text. In addition, it can be seen that the text propagation graph-based method performs better than the text content-based method, which indicates that the propagation structure of the text may contain more features that can identify false text. At the same time, supervised methods are often better than unsupervised methods, mainly because the label information in the dataset can enable the model to learn more discriminative false text features. GAMC eliminates the dependence on labeled datasets while ensuring high detection accuracy, making it more flexible and applicable in real-world scenarios.

[0133] Figure 3 This is a comparative diagram showing the results of ablation experiments conducted by GAMC on two information systems. The contribution of each module is evaluated by removing it individually and observing its impact on model performance. Here, GAMC-Aug represents the removal of data augmentation operations; GAMC-L... rec This indicates the removal of reconstruction error loss; GAMC-L con This indicates the removal of the contrast loss. It can be seen that removing all three modules leads to a decrease in model accuracy, demonstrating the importance of each module in GAMC. Data augmentation helps improve the feature reconstruction capability of the autoencoder, reconstruction loss helps the model accurately reconstruct the original image, and contrast loss helps the model identify similarities and differences between different instances, enhancing its discriminative ability. In summary, each component of the GAMC model plays a crucial role in ensuring optimal performance.

[0134] Figure 4Figure 1 illustrates the impact of masking rate λ and edge dropout rate γ on the false text recognition rate. Figure 2 shows the impact of masking rate λ and edge dropout rate γ on the false text recognition rate in Information System 1, and Figure 3 shows the impact of masking rate λ and edge dropout rate γ on the false text recognition rate in Information System 2. GAMC performs best when the masking rate is 0.5 and the edge dropout rate is 0.2. A high masking rate obscures most node information, causing the model to lose key information and making it difficult to identify features and structures relevant to the detection task. Similarly, a high edge dropout rate disrupts the inherent structure and connectivity of the original graph, making the graph too sparse and thus losing important relationship data between nodes. On the other hand, a low masking rate and edge dropout rate may not provide sufficient reconstruction clues. Therefore, choosing appropriate masking rate and edge dropout rate can improve the accuracy of false text detection.

[0135] In summary, the method provided by this invention solves the problem of insufficient consideration of the text propagation structure by utilizing the context and content in the text propagation process as self-supervised signals, as well as feature reconstruction and comparison tasks, and eliminates the need for a large amount of labeled datasets. This makes the false text information detection method of this invention have practical guiding significance.

[0136] The text information detection device provided by the present invention is described below. The text information detection device described below and the text information detection method described above can be referred to in correspondence.

[0137] A text information detection device includes the following steps:

[0138] The building unit is used to construct the text propagation structure graph G, where G = (V, A, X); and V = {v n v u} represents a set of nodes, v n It is a text node, v u The user node represents the forwarded text; A is the adjacency matrix representing the forwarding relationship formed by the user forwarding the text, and X is the node feature matrix;

[0139] The reconstruction unit is used to perform a reconstruction operation on the text propagation structure graph G, resulting in two reconstruction graphs, namely reconstruction graph G1 and reconstruction graph G2.

[0140] The training unit is used to train an initial autoencoder model based on the text propagation structure graph G, the reconstruction graph G1, and the reconstruction graph G2, so as to obtain a trained autoencoder model.

[0141] The detection unit is used to input the text to be detected into the trained autoencoder model and perform detection and recognition on the text to be detected.

[0142] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the text information detection method provided by the above methods.

[0143] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting text information, characterized in that, Includes the following steps: S1: Construct a text propagation structure diagram G , ;in, Represents a set of nodes. It is a text node. The user node that represents the forwarded text; The adjacency matrix represents the forwarding relationships formed by users forwarding text. The node feature matrix; S2: The text propagation structure diagram G Performing data augmentation results in two augmentation graphs: the augmentation graph and the data augmentation graph. Enhanced image The details are as follows: S21: Text Propagation Structure Diagram G Randomly mask the node features, that is, from the original text propagation structure graph. G Randomly select a certain proportion of nodes As a set of nodes used for masking, for Each node in the matrix has its feature vector replaced with a special mask label, represented as follows: Then, the feature matrix after masking for: ; in It is a node i Enhanced features, enhanced feature matrix Depend on structure; S22: The text propagation structure diagram G The edges are randomly discarded. From the original edge set The edge set obtained by random sampling in the middle, express Given the adjacency matrix; then the augmented adjacency matrix. The following equation can be used to calculate: ; in It is the original adjacency matrix. It is an adjacency matrix constructed by randomly sampling edges from the original edge set; S23: Text Propagation Structure Diagram G Performing steps S21 and S22 twice respectively yields two enhanced images: ; ; in, This is the augmented image obtained after the first data augmentation. This is the augmented image obtained after the second data augmentation. Enhanced representation diagram The adjacency matrix, Enhanced representation diagram eigenmatrix Enhanced representation diagram The adjacency matrix, Enhanced representation diagram The feature matrix; S3: Based on the text propagation structure diagram G The enhanced map Enhanced image The initial autoencoder model is trained to obtain the trained autoencoder model; the details are as follows: S31: Use a two-layer GIN encoder to process the enhanced map respectively. and Enhanced Map Each encoding operation is performed separately to obtain the corresponding latent vector. and latent vectors ; S32: Use a one-layer GIN decoder on the latent vector and latent vectors The decoding operation maps the latent representation vector back to the input, resulting in the reconstructed feature matrix. and reconstruct the feature matrix ; S33: Obtain the text propagation structure diagram. G The corresponding original feature matrix And based on the original feature matrix and the reconstructed feature matrix and reconstruct the feature matrix Based on the reconstruction error loss function and the contrast loss function, an initial autoencoder model is trained to obtain a trained autoencoder model. The reconstruction error loss is used to minimize the difference between the reconstructed representation of the graph and the original representation; the contrast loss is used to minimize the difference between two augmented graphs derived from the same propagation graph. S4: Input the text to be detected into the trained autoencoder model, and detect and recognize the text to be detected based on the model's prediction results.

2. The text information detection method according to claim 1, characterized in that, Step S1 includes: S11: Obtain several texts with propagation relationships; S12: For each text, obtain the corresponding user and the forwarding relationship of the corresponding text; S13: Construct the propagation chain of each text based on the user and the forwarding relationship of the corresponding text; S14: Based on the propagation chain of the corresponding text, determine the text propagation structure diagram corresponding to the plurality of texts with propagation relationships. G。 3. The text information detection method according to claim 1, characterized in that, S31 includes: The first in each augmentation graph l Each layer updates its nodes using aggregate functions. i Hidden feature vectors : ; in, yes The set of neighboring nodes, It is a node The input feature vector, Representing the l Layer-learnable self-feature weight parameters, MLP (·) represents a nonlinear transformation model, and this process is performed iteratively over all nodes until the _th ... l layer; After two layers of information propagation, the GIN encoder outputs a set of node embeddings for all nodes in the augmented graph. Through the above encoding steps, the enhanced maps are finally obtained respectively. and Enhanced Map Corresponding latent vector and latent vectors .

4. The text information detection method according to claim 1, characterized in that, S32 includes: S321: For each enhancement graph Each node in the array is replaced with a mask mark. For each node in the array, the mask is represented as Then, node Feature representation after remasking Defined as: ; S322: According to the node Feature representation after remasking Construct the corresponding remasked latent vector Accordingly, enhanced graph The corresponding latent vector after remasking is Enhanced image The corresponding latent vector after remasking is ; S323: Use a single-layer GIN decoder to process the re-masked latent vectors. and Decoding yields the reconstructed feature matrix. and reconstruct the feature matrix : ; ; in, Represents a single-layer GIN decoder. To enhance the image The adjacency matrix, Enhanced graph The adjacency matrix; To enhance the image The corresponding remasked latent vector ; To enhance the image The corresponding remasked latent vector latent vector By augmented graph Corresponding feature matrix The latent vector is constructed. By augmented graph Corresponding feature matrix It is constructed.

5. The text information detection method according to claim 1, characterized in that, S33 includes: S331: First, calculate the reconstruction loss, using the mean squared error (MSE) between the original feature matrix and the reconstructed feature matrix as the reconstruction loss: ; in, It is the number of samples. It is a text propagation structure diagram G The original feature matrix, To enhance the image The corresponding reconstructed feature matrix; It is an enhanced graph The corresponding reconstructed feature matrix is ​​obtained by minimizing the reconstruction loss during the training phase; S332: Then calculate the contrastive loss by minimizing the reconstructed feature matrix. and This is achieved through cosine similarity between them: ; S333: Finally, calculate the final loss function value. The final loss function is a weighted sum of reconstruction loss and contrast loss: ; in, It is a reconstruction loss. It is a comparison of losses. It is a hyperparameter that controls the balance between the two loss functions.

6. The text information detection method according to claim 1, characterized in that, S4 includes: S41: Input the text to be detected into the trained autoencoder model, and determine its corresponding graph-level representation vector based on the model. : ; in, These are the nodes in the text propagation graph to be detected. v i The corresponding feature encoding representation; S42: Convert the graph-level representation vector By inputting an SVM classifier, you can obtain the true / false categories of the text. : .

7. A text information detection device, characterized in that, Includes the following steps: Building blocks are used to construct text propagation structure diagrams. G , ;in, Represents a set of nodes. It is a text node. The user node that represents the forwarded text; The adjacency matrix represents the forwarding relationships formed by users forwarding text. The node feature matrix; Reconstruction unit, used for the text propagation structure diagram G The reconstruction operation yields two reconstruction graphs, namely the reconstruction graph and the reconstruction graph. Reconstructed diagram The details are as follows: Text propagation structure diagram G Randomly mask the node features, that is, from the original text propagation structure graph. G Randomly select a certain proportion of nodes As a set of nodes used for masking, for Each node in the matrix has its feature vector replaced with a special mask label, represented as follows: Then, the feature matrix after masking for: ; in It is a node i Enhanced features, enhanced feature matrix Depend on structure; Regarding the text propagation structure diagram G The edges are randomly discarded. From the original edge set The edge set obtained by random sampling in the middle, express Given the adjacency matrix; then the augmented adjacency matrix. The following equation can be used to calculate: ; in It is the original adjacency matrix. It is an adjacency matrix constructed by randomly sampling edges from the original edge set; Text propagation structure diagram G Performing steps S21 and S22 twice respectively yields two enhanced images: ; ; in, This is the augmented image obtained after the first data augmentation. This is the augmented image obtained after the second data augmentation. Enhanced representation diagram The adjacency matrix, Enhanced representation diagram eigenmatrix Enhanced representation diagram The adjacency matrix, Enhanced representation diagram The feature matrix; Training unit, used to train according to the text propagation structure graph G The reconstructed graph Reconstructed diagram The initial autoencoder model is trained to obtain the trained autoencoder model; the details are as follows: The enhancement map is processed using a two-layer GIN encoder. and Enhanced Map Each encoding operation is performed separately to obtain the corresponding latent vector. and latent vectors ; The latent vector is processed using a one-layer GIN decoder. and latent vectors The decoding operation maps the latent representation vector back to the input, resulting in the reconstructed feature matrix. and reconstruct the feature matrix ; Obtain the text propagation structure diagram G The corresponding original feature matrix And based on the original feature matrix and the reconstructed feature matrix and reconstruct the feature matrix Based on the reconstruction error loss function and the contrast loss function, an initial autoencoder model is trained to obtain a trained autoencoder model. The reconstruction error loss is used to minimize the difference between the reconstructed representation of the graph and the original representation; the contrast loss is used to minimize the difference between two augmented graphs derived from the same propagation graph. The detection unit is used to input the text to be detected into the trained autoencoder model and detect and recognize the text to be detected based on the prediction results of the model.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the text information detection method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Heterogeneous graph convolution rumor detection method based on multistage interaction and graph reconstruction

    CN114880479A

  • Deep learning model training method for text detection, and text detection method

    WO2023015939A1