False keyword detection method, device, storage medium and program product
Patent Information
- Application Number
- CN202610875782.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-17
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2046-06-17
AI Technical Summary
Existing technologies, when processing extremely long fake news texts, suffer from semantic information loss and missed detection of key fake keywords due to input length limitations, making it impossible to effectively detect fake keywords in long texts.
By segmenting the text to be detected based on semantic boundaries, extracting sentence unit feature vectors, constructing sentence semantic graphs, and using graph neural network models, long-range semantic dependencies across sentences are captured. Combined with global features and contradiction feature vectors, fake keywords are identified.
It effectively preserves the semantic structure of ultra-long texts, improves the ability to identify sparse, implicit, and cross-sentence fake keywords, and enhances the reliability and accuracy of detection.
Smart Images

Figure CN122452578B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, device, storage medium, and program product for detecting fake keywords. Background Technology
[0002] In the era of information overload on the internet, the speed and scope of the spread of fake news have grown exponentially. Especially in scenarios such as social media and news websites, fake news is often spread through falsified data, misleading statements, or implicit meanings.
[0003] In existing technologies, when processing extremely long fake news texts, input length limitations, such as the 512-word limit of Bidirectional Encoder Representations from Transformers (BERT), lead to truncation or segmentation, resulting in the loss of semantic information and missed detection of key fake keywords. The original semantic structure of long texts cannot be preserved, making the reliability of fake keyword detection low. Summary of the Invention
[0004] This application provides a method, device, storage medium, and program product for detecting fake keywords, in order to solve the technical problem of low reliability in fake keyword detection.
[0005] Firstly, this application provides a method for detecting fake keywords, including:
[0006] Based on semantic boundaries, the text to be detected is segmented to obtain multiple sentence units;
[0007] Feature extraction is performed on each sentence unit to obtain a single sentence feature vector corresponding to each sentence unit. The single sentence feature vector is used to indicate the expression features of implicit false tendencies in the sentence unit.
[0008] Based on the single-sentence feature vectors corresponding to each sentence unit, the sentence sequence-level hidden features corresponding to each sentence unit and the full-text global features of the text to be detected are determined.
[0009] Based on the sentence sequence-level hidden features of each sentence unit, determine the contradiction feature vector corresponding to each sentence unit;
[0010] Based on the full-text global features of the text to be detected and the contradiction feature vectors corresponding to each sentence unit, the false keywords corresponding to the text to be detected are determined.
[0011] In this embodiment, by replacing truncation or segmentation with sentence-level segmentation, all semantic information in ultra-long texts can be completely preserved, avoiding the loss of key false keywords. At the same time, it effectively models long-range semantic dependencies across sentences, improving the reliability of false keyword detection in long texts.
[0012] Optionally, based on the sentence sequence-level hidden features of each sentence unit, the contradiction feature vector corresponding to each sentence unit is determined, including:
[0013] Construct a sentence semantic graph corresponding to the text to be detected. The sentence semantic graph is constructed with the sentence sequence-level hidden features of each sentence unit as the initial node features and the semantic similarity between sentences as the edge weights.
[0014] Based on the sentence semantic graph, the contradiction feature vector corresponding to each sentence unit is determined.
[0015] In this embodiment of the application, by modeling the global semantic relationship between sentences through graph structure, it is possible to effectively capture the deep logical contradictions across multiple sentences in long texts, make up for the limitations of comparing single sentences, and improve the ability to identify complex semantic conflicts.
[0016] Optionally, based on the sentence semantic graph, the contradiction feature vector corresponding to each sentence unit is determined, including:
[0017] The sentence semantic graph is propagated through a graph neural network to update the initial node features and obtain the target node features of each sentence unit.
[0018] Based on the target node features of each sentence unit, the degree of semantic contradiction between sentence units is determined;
[0019] Generate a contradiction feature vector corresponding to the semantic contradiction degree between the sentences of each sentence unit.
[0020] In this embodiment of the application, global inter-sentence relationships are modeled by graph neural networks, which can capture implicit, indirect, and multi-hop semantic contradictions in long texts and significantly improve the ability to identify long-range false clues across sentences.
[0021] Optionally, for any given sentence unit, feature extraction processing is performed on each sentence unit to obtain a single-sentence feature vector corresponding to each sentence unit, including:
[0022] The sentence unit is subjected to feature extraction processing to obtain the word-level hidden feature vector, the sentence-level overall semantic vector and the sentence intent label corresponding to the sentence unit. The word-level hidden feature vector includes the word-level hidden feature vectors corresponding to each word in the sentence unit.
[0023] Determine the semantic similarity between the word-level hidden feature vector and the sentence-level overall semantic vector corresponding to each word;
[0024] Based on the semantic similarity of the word-level hidden feature vectors corresponding to each word and the sentence intent label, the single-sentence feature vector corresponding to the sentence unit is determined.
[0025] In this embodiment, both word-level fine-grained information and sentence-level global semantics are taken into account, which can highlight the core expressive features of the sentence and provide a more discriminative semantic representation for subsequent identification of keywords with implicit false tendencies.
[0026] Optionally, based on the semantic similarity of the word-level hidden feature vectors corresponding to each word and the sentence intent label, the single-sentence feature vector corresponding to the sentence unit is determined, including:
[0027] The initial weights of each word are determined based on the semantic similarity of each word and the sentence intent label.
[0028] Based on a priori dictionary of false keywords, the matching words are identified among multiple words in the sentence unit, and the initial weight of the matching words is increased to obtain the matching weight.
[0029] The hit weights of the hit words and the initial weights of the non-hit words are normalized to obtain the normalized weights corresponding to each word.
[0030] Based on the normalized weights corresponding to each word, the word-level hidden feature vectors are weighted and summed to generate the single-sentence feature vector of the sentence unit.
[0031] In this embodiment, semantic similarity, intent tags and prior dictionaries are integrated, and the ability to capture expressions with implicit false tendencies is effectively improved by enhancing the features of high-risk false words, thereby reducing the risk of missed detection of sparse false keywords.
[0032] Optionally, based on the full-text global features of the text to be detected and the contradiction feature vectors corresponding to each sentence unit, the fake keywords corresponding to the text to be detected are determined, including:
[0033] The full-text global features are concatenated with the contradiction degree feature vector to obtain the text fusion feature vector;
[0034] The text fusion feature vector is classified using a binary classifier to obtain the false keywords corresponding to the text to be detected.
[0035] In this embodiment, the association between features and false keywords is automatically learned through a classification mechanism, without relying on a complete prior dictionary, and can adapt to novel false expressions that have never been seen before; the fusion of features takes into account both global semantic consistency and local logical conflicts, and improves the ability to identify implicit and cross-sentence distributed false keywords.
[0036] Optionally, based on the single-sentence feature vectors corresponding to each sentence unit, the sentence sequence-level hidden features corresponding to each sentence unit and the full-text global features of the text to be detected are determined, including:
[0037] By concatenating the single-sentence feature vectors of each sentence unit, the global feature vector corresponding to the text to be detected is obtained;
[0038] A global semantic vector is added to the head of the global feature vector and input into a sequence encoding network for inter-sentence association feature learning, thereby obtaining the sentence sequence-level hidden features corresponding to each sentence unit and the full-text global features of the text to be detected.
[0039] In this embodiment, it is possible to effectively model long-range dependencies across sentences in long texts, preserve the complete semantic structure, avoid truncation and loss of false clues, and improve the ability to identify sparse, implicit, and cross-sentence distributed false keywords.
[0040] Secondly, this application provides a fake keyword detection device, including a segmentation processing module, a feature extraction module, a first determination module, a second determination module, and a third determination module:
[0041] The segmentation module is used to segment the text to be detected based on semantic boundaries to obtain multiple sentence units.
[0042] The feature extraction module is used to perform feature extraction processing on each sentence unit to obtain a single sentence feature vector corresponding to each sentence unit. The single sentence feature vector is used to indicate the expression features of implicit false tendencies in the sentence unit.
[0043] The first determining module is used to determine the sentence sequence-level hidden features corresponding to each sentence unit and the full-text global features of the text to be detected based on the single-sentence feature vectors corresponding to each sentence unit.
[0044] The second determining module is used to determine the contradiction feature vector corresponding to each sentence unit based on the sentence sequence-level hidden features of each sentence unit;
[0045] The third determining module is used to determine the false keywords corresponding to the text to be detected based on the full-text global features of the text to be detected and the contradiction degree feature vectors corresponding to each sentence unit.
[0046] Thirdly, embodiments of this application provide an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0047] The memory stores computer-executed instructions;
[0048] The processor executes computer execution instructions stored in the memory to implement the method as described in any of the first aspects.
[0049] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the first aspect.
[0050] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in any of the second aspects.
[0051] The fake keyword detection method, device, storage medium, and program products provided in this application can perform sentence-level segmentation through semantic boundaries. This not only avoids the semantic information fragmentation and omission of key fake keywords caused by forced truncation from an architectural perspective, but also fully preserves the original semantic structure of ultra-long texts. Through multi-level semantic processing logic, including single-sentence focused feature extraction, sentence sequence-level hidden feature modeling, and full-text global feature integration, it effectively models long-range dependencies across sentences within long texts. Simultaneously, by combining the auxiliary verification of inter-sentence contradiction feature vectors, it supplements the deficiencies of basic semantic representation at the semantic logic level, improving the ability to identify fake keywords with sparse distribution, implicit semantics, and cross-sentence dependencies. In the above execution process, it solves the technical defects of information loss, difficulty in modeling long-range dependencies, and low detection reliability in ultra-long text fake keyword detection, thus improving the reliability of long text fake keyword detection. Attached Figure Description
[0052] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0053] Figure 1 A schematic diagram illustrating the application scenarios provided in the embodiments of this application;
[0054] Figure 2 A flowchart illustrating a method for detecting fake keywords provided in an embodiment of this application;
[0055] Figure 3 A flowchart illustrating another method for detecting fake keywords provided in this application embodiment;
[0056] Figure 4A schematic diagram illustrating the architecture of a method for detecting fake keywords provided in an embodiment of this application;
[0057] Figure 5 This is a schematic diagram of a fake keyword detection device provided in an embodiment of this application;
[0058] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0059] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0060] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0061] Figure 1 This is a schematic diagram illustrating an application scenario provided in an embodiment of this application. Please refer to [link / reference]. Figure 1 This application is applicable to scenarios involving the governance of fake news on social media platforms, news websites, and in professional fields. This scenario includes a user device 101 and a server 102. Users can input long texts (such as news reports or academic papers of tens of thousands of words) through the user device 101, and the server 102 invokes this solution through a distributed computing cluster.
[0062] Server 102 performs sentence-level segmentation of the text to be detected, obtaining multiple sentence units. It then performs feature extraction on each sentence unit to obtain a single-sentence feature vector. Based on these single-sentence feature vectors, it models inter-sentence relationships to determine the sentence sequence-level hidden features of each sentence unit, as well as the full-text global features of the text to be detected. Based on the sentence sequence-level hidden features of each sentence unit, Server 102 determines the contradiction degree feature vector of each sentence unit. Finally, based on the full-text global features of the text to be detected and the contradiction degree feature vectors of each sentence unit, it obtains the false keywords corresponding to the text to be detected.
[0063] In related technologies, the detection of fake news relies on accurately identifying key false statements (i.e., fake keywords) in the text. However, due to limitations in input length, when processing extremely long fake news articles (such as reports of tens of thousands of words), truncation or segmentation can easily lead to the loss of key fake keywords and fail to preserve long-range semantic relationships between sentences. Furthermore, the lack of multi-granular semantic feature extraction logic for fake keywords makes it difficult to capture false clues of long-range dependencies across sentences and to identify false assertions in professional fields, resulting in low reliability of fake keyword detection.
[0064] The fake keyword detection method provided in this application, based on semantic boundaries, segments the text to be detected into multiple sentence units; performs feature extraction on each sentence unit to obtain a single-sentence feature vector corresponding to each sentence unit; determines the sentence sequence-level hidden features corresponding to each sentence unit, as well as the full-text global features of the text to be detected, based on the sentence sequence-level hidden features of each sentence unit; determines the contradiction degree feature vector corresponding to each sentence unit based on the sentence sequence-level hidden features of each sentence unit; and obtains the fake keywords corresponding to the text to be detected based on the full-text global features of the text to be detected and the contradiction degree feature vectors corresponding to each sentence unit. In the above process, sentence-level segmentation can replace truncation or segmentation, which can completely preserve all semantic information in ultra-long texts, avoid the loss of key fake keywords, and effectively model long-range semantic dependencies across sentences, thereby improving the reliability of fake keyword detection in long texts.
[0065] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0066] Figure 2 This is a flowchart illustrating a method for detecting fake keywords provided in an embodiment of this application. Please refer to [link / reference]. Figure 2 The method may include:
[0067] S201. Based on semantic boundaries, the text to be detected is segmented to obtain multiple sentence units.
[0068] The execution entity of this application embodiment can be a server or a fake keyword detection device set on the server. The fake keyword detection device can be implemented by software or by a combination of software and hardware.
[0069] Semantic boundaries refer to punctuation marks, line breaks, or sentence pause markers used in text to separate independent semantic units. For example, they can include periods, question marks, exclamation marks, semicolons, and paragraph separators.
[0070] The text to be detected refers to internet text content that needs to be identified for fake keywords. It is usually long or very long text with semantic connections across sentences. Examples include in-depth news reports of tens of thousands of words, financial analysis articles, medical and health science popularization articles, and academic papers.
[0071] By identifying semantic boundaries in the text to be detected, continuous text is split into several semantically complete and logically independent sentence units without truncating the text or losing key information. This preserves the overall semantic structure of the text and provides appropriately granular processing units for subsequent word-level feature extraction and inter-sentence association modeling, avoiding the omission of false keywords due to direct truncation.
[0072] For example, the text to be detected is "A study claims that long-term use of a certain health product can cure diabetes. This conclusion has not been verified by any clinical trials, and relevant institutions have refuted this claim." After segmenting according to semantic boundaries, three sentence units are obtained: Sentence unit A is "A study claims that long-term use of a certain health product can cure diabetes", Sentence unit B is "This conclusion has not been verified by any clinical trials", and Sentence unit C is "Relevant institutions have refuted this claim".
[0073] S202. Perform feature extraction processing on each sentence unit to obtain the single sentence feature vector corresponding to each sentence unit.
[0074] Single-sentence feature vectors can be used to indicate the expressive features in sentence units that imply a tendency to be false.
[0075] The following section uses any sentence unit as an example to illustrate feature extraction.
[0076] In some embodiments, sentence units can be input into a pre-trained language model, and the sentence-level semantic vectors output by the model can be extracted as single-sentence feature vectors.
[0077] By using a pre-trained language model to encode sentence units as a whole, the sentence-level aggregated features output by the model are directly used as the semantic representation of the sentence unit, thus quickly obtaining a single-sentence feature vector that can represent the overall semantic information of the sentence.
[0078] For example, for the sentence unit "a certain food can quickly lower blood pressure", after inputting it into the Transformer-based BERT model, the sentence-level [CLS] vector output by the model is directly taken as the single-sentence feature vector corresponding to the sentence unit.
[0079] In this embodiment, the feature extraction process is simple and efficient with low computational overhead, and can quickly obtain the overall semantic representation of sentence units, making it suitable for detection scenarios with high real-time requirements.
[0080] In other embodiments, feature extraction processing can be performed on sentence units to obtain word-level hidden feature vectors, sentence-level overall semantic vectors, and sentence intent labels corresponding to the sentence units. The word-level hidden feature vectors may include word-level hidden feature vectors corresponding to each word in the sentence unit; the semantic similarity between the word-level hidden feature vectors corresponding to each word and the sentence-level overall semantic vector is determined; and the single-sentence feature vector corresponding to the sentence unit is determined based on the semantic similarity between the word-level hidden feature vectors corresponding to each word and the sentence intent label.
[0081] First, a pre-trained language model is used to obtain the fine-grained features of each word in the sentence and the global semantic features of the whole sentence. Then, semantic similarity is used to measure the contribution of each word to the semantics of the whole sentence. Based on the similarity, the word-level features are weighted and fused, and finally aggregated to obtain a single-sentence feature vector that focuses on the core semantics of the sentence.
[0082] In this embodiment, both word-level fine-grained information and sentence-level global semantics are taken into account, which can highlight the core expressive features of the sentence and provide a more discriminative semantic representation for subsequent identification of keywords with implicit false tendencies.
[0083] S203. Based on the single-sentence feature vectors corresponding to each sentence unit, determine the sentence sequence-level hidden features corresponding to each sentence unit, as well as the full-text global features of the text to be detected.
[0084] Sentence sequence-level hidden features are semantic features that represent the contextual associations of each sentence unit within the overall text context.
[0085] The full-text global features are comprehensive feature vectors that characterize the overall semantics, inter-sentence logical relationships, and global falsehood tendency of the text to be detected.
[0086] The scattered single-sentence focused features can be fused with context and modeled globally. By learning the relationships between sentences, each sentence feature carries the contextual information of the whole text and generates global features that can represent the semantics of the entire text, providing long-range dependency information for subsequent identification of fake keywords.
[0087] In some embodiments, the single-sentence feature vectors of each sentence unit can be fused by mean or max pooling to obtain the global features of the whole text; at the same time, the single-sentence feature vectors can be directly used as hidden features at the sentence sequence level.
[0088] Without introducing complex sequence modeling, we directly aggregate sentence features through simple statistical fusion to obtain the full-text representation. The sentence sequence features retain the original single-sentence semantics, achieving lightweight context integration.
[0089] For example, mean pooling is performed on the single-sentence feature vectors of the three sentence units to obtain the global features of the whole text; at the same time, the three vectors are directly combined to form the hidden features at the sentence sequence level.
[0090] In this embodiment, the computational overhead is low and the reasoning speed is fast, making it suitable for short texts or scenarios with high real-time requirements. It can quickly obtain a basic full-text semantic representation.
[0091] In other embodiments, the single-sentence feature vectors of each sentence unit can be concatenated to obtain the global feature vector corresponding to the text to be detected; a global semantic vector is added to the head of the global feature vector and input into a sequence coding network for inter-sentence association feature learning to obtain the sentence sequence-level hidden features corresponding to each sentence unit, as well as the full-text global features of the text to be detected.
[0092] The global feature vector is a sequence of features formed by sequentially concatenating the single-sentence focused features of each sentence unit.
[0093] Global semantic vectors are initial marker vectors used to represent the overall semantics of the entire text, such as [SCLS] vectors;
[0094] Sequence coding networks are deep coding networks capable of modeling long-range dependencies between sequences, used to learn semantic associations and contextual dependencies between sentences.
[0095] Sequence coding networks include, but are not limited to, Transformer encoders, Long Short-Term Memory (LSTM) networks, Gated Recurrent Unit (GRU) networks, or self-attention coding networks.
[0096] First, all sentence features are concatenated to form a sentence sequence. Then, global semantic tags are introduced and sequence encoding networks are used to model the inter-sentence relationships, so that each sentence feature is fused with contextual information to obtain sentence sequence-level hidden features. Finally, the features corresponding to the global tags are extracted from the encoder output as global features for the whole text.
[0097] For example, the single-sentence focused features of 5 sentence units are concatenated into a sequence, a [SCLS] vector is added to the head, and the input is a 3-layer Transformer encoder. The output is the sentence sequence-level hidden features corresponding to the 5 sentences, as well as the full-text global features corresponding to the [SCLS] positions.
[0098] In this embodiment, it is possible to effectively model long-range dependencies across sentences in long texts, preserve the complete semantic structure, avoid truncation and loss of false clues, and improve the ability to identify sparse, implicit, and cross-sentence distributed false keywords.
[0099] S204. Based on the sentence sequence-level hidden features of each sentence unit, determine the contradiction degree feature vector corresponding to each sentence unit.
[0100] The contradiction feature vector is used to indicate the degree of semantic logical conflict, semantic deviation and factual contradiction between each sentence unit and other sentence units. It is a key feature vector that characterizes the semantic consistency within the text and is used to identify the hidden logical contradictions and semantic conflicts in fake news.
[0101] Based on the hidden features of sentence sequence at the sentence level of each sentence unit, the semantic matching degree and conflict degree between different sentence units are quantified by constructing semantic association structures or calculating semantic distance indicators. Feature vectors that can reflect the internal logical contradictions of the text are extracted, providing a semantic logic verification basis for the identification of false keywords.
[0102] In some embodiments, for any sentence unit, the cosine similarity between the sentence sequence-level hidden features of the sentence unit and the sentence sequence-level hidden features of other sentence units can be determined, and a contradiction feature vector can be generated based on the cosine similarity difference between the sentence unit and other sentence units.
[0103] By calculating the semantic similarity between sentence units, the difference between high similarity (semantic consistency) and low similarity (semantic conflict) is used as the quantitative basis for the degree of contradiction. Feature vectors reflecting the degree of contradiction between sentences are generated directly based on the semantic distance of feature vectors, without the need to build a complex network structure, thus achieving rapid contradiction perception.
[0104] For example, suppose the cosine similarity between the sequence features of sentence unit A and the sequence features of sentence unit B is 0.2, and the cosine similarity between the sequence features of sentence unit A and sentence unit C is 0.8. The calculated contradiction differences are 0.6 and -0.6, respectively. The differences are combined to form a contradiction feature vector with dimensions (2,768), which represents the semantic conflict intensity between sentence units A and B and C.
[0105] In this embodiment, the computational logic is simple and the operation is efficient. No additional model training is required, and the quantitative extraction of inter-sentence contradictions can be quickly achieved, effectively reducing the computational overhead of processing ultra-long texts. It is suitable for detection scenarios with high real-time requirements.
[0106] In other embodiments, a sentence semantic graph corresponding to the text to be detected is constructed. The sentence semantic graph is constructed with the sentence sequence-level hidden features of each sentence unit as the initial node features and the semantic similarity between sentences as the edge weights. Based on the sentence semantic graph, the contradiction feature vector corresponding to each sentence unit is determined.
[0107] A sentence semantic graph is constructed using the sequence-level hidden features of sentence units as nodes and the semantic similarity between sentences as edge weights. A graph neural network is used to perform message propagation and feature updates on the semantic graph to capture indirect semantic relationships between nodes. Based on the updated node features, the semantic deviation degree and logical conflict intensity of each sentence unit with other nodes in the semantic graph are calculated to generate a contradiction degree feature vector that integrates global semantic relationships, so as to fully reflect the deep semantic contradictions within the text.
[0108] For example, a sentence semantic graph is constructed for the five sentence units of the text to be detected. The initial node features are the sentence sequence-level hidden features of each unit, and the edge weights are the cosine similarity between the corresponding sentences. After updating the node features through a two-layer graph neural network, the semantic conflict value between each node and the other four nodes is calculated. The conflict values are fused into a contradiction degree feature vector with dimensions (4,768) to accurately represent the global semantic contradiction degree of each sentence unit.
[0109] In this embodiment, by modeling global semantic relationships between sentences using graph structures, it is possible to effectively capture deep logical contradictions across multiple sentences in long texts, make up for the limitations of comparing single sentences, improve the ability to identify complex semantic conflicts, and further enhance the accuracy and reliability of fake keyword detection.
[0110] S205. Based on the full-text global features of the text to be detected and the contradiction degree feature vectors corresponding to each sentence unit, determine the fake keywords corresponding to the text to be detected.
[0111] By integrating the overall semantic representation of the text (global features) with the internal logical conflict representation (contradiction degree feature vector), and through feature fusion and classification / matching mechanisms, it focuses on expressions with concentrated semantic contradictions and significant global false tendencies, locates and outputs false keywords in the text, and completes the closed loop from feature extraction to result judgment.
[0112] In some embodiments, the global features of the whole text and the contradiction feature vectors of each sentence unit can be weighted and fused to obtain the comprehensive text features; based on the semantic similarity matching between the comprehensive text features and the prior dictionary of fake keywords, the Top-K highly matching words are output as fake keywords.
[0113] By balancing the contributions of global semantic features and inter-sentence contradiction features through a weighted strategy, a comprehensive text feature that takes into account both overall tendency and local conflict is generated. By utilizing the semantic matching capability of the pseudo keyword prior dictionary, high-risk expressions are directly associated to quickly filter out words with the highest semantic fit with the comprehensive feature, thus achieving accurate matching and output of pseudo keywords.
[0114] For example, the full-text global feature with dimensions (1,768) is fused with the contradiction feature vectors of three sentence units (each with dimensions (2,768)) by weights of 0.6 and 0.4 to obtain the comprehensive text feature with dimensions (1,768). The cosine similarity between this feature and the prior dictionary of fake keywords (containing word vectors such as "cured diabetes" and "no clinical validation") is calculated, and the top-2 similarity words "cured diabetes" and "no clinical validation" are output as fake keywords.
[0115] In this embodiment, the semantic representation of the fusion feature, combined with the domain knowledge of the prior dictionary, has intuitive matching logic and fast reasoning speed. It can accurately hit false keywords within the dictionary coverage range, making it suitable for false expression detection scenarios in professional fields and reducing the risk of missed detection.
[0116] It is worth noting that new false statement patterns are identified through keyword clustering techniques (such as the DBSCAN algorithm); newly detected false keywords are matched with domain terms and added to the knowledge base of the false keyword prior dictionary; incremental learning techniques are used to update only the intent-keyword mapping layer parameters associated with the knowledge base without retraining the entire model, in order to adapt to new false assertions in the domain.
[0117] In other embodiments, the full-text global features and the contradiction degree feature vector are concatenated to obtain the text fusion feature vector; the text fusion feature vector is then classified using a binary classifier to obtain the fake keywords corresponding to the text to be detected.
[0118] First, the global features (overall semantics) of the whole text and the contradiction feature vector (local logical conflict) are concatenated dimensionally to generate a text fusion feature vector containing both global and local semantic information. Then, a binary classifier is used to learn the mapping relationship between the fusion features and the false keyword labels. By filtering through the classification probability threshold, the core keywords with false tendencies in the text are determined and output, thus realizing end-to-end false keyword detection.
[0119] For example, the full-text global features with dimensions (1,768) are concatenated with the contradiction feature vectors of three sentence units (each with dimensions (2,768)) to obtain a text fusion feature vector with dimensions (1+3×2,768)=(7,768). This vector is then input into a binary classification fully connected layer based on the Softmax activation function, with a probability threshold of 0.7. The output "cured diabetes" and "not clinically validated" with a classification probability ≥0.7 are used as false keywords.
[0120] In this embodiment, the association patterns between features and false keywords are automatically learned through an end-to-end classification mechanism. This does not require a complete prior dictionary and can adapt to novel false expressions that have not been seen before. The fusion of features takes into account both global semantic consistency and local logical conflicts, improving the ability to identify implicit and cross-sentence distributed false keywords, and resulting in stronger detection generalization and accuracy.
[0121] The fake keyword detection method provided in this application segmentes sentences at the semantic boundary level, which not only avoids semantic information fragmentation and omission of key fake keywords caused by forced truncation from an architectural perspective, but also fully preserves the original semantic structure of ultra-long texts. Through multi-level semantic processing logic, including single-sentence focused feature extraction, sentence sequence-level hidden feature modeling, and full-text global feature integration, it effectively models long-range dependencies across sentences within long texts. Simultaneously, by combining the auxiliary verification of inter-sentence contradiction feature vectors, it supplements the deficiencies of basic semantic representation at the semantic logic level, improving the ability to identify fake keywords with sparse distribution, implicit semantics, and cross-sentence dependencies. In the above execution process, it solves the technical defects of information loss, difficulty in modeling long-range dependencies, and low detection reliability in ultra-long text fake keyword detection, thus improving the reliability of long text fake keyword detection.
[0122] Figure 3 This is a flowchart illustrating another method for detecting fake keywords provided in an embodiment of this application. Please refer to [link / reference]. Figure 3 The method may include:
[0123] S301. Based on semantic boundaries, the text to be detected is segmented to obtain multiple sentence units.
[0124] The execution process of S301 can be found in the execution process of S201, and will not be repeated here.
[0125] S302. Perform feature extraction processing on sentence units to obtain word-level hidden feature vectors, sentence-level overall semantic vectors, and sentence intent labels corresponding to sentence units.
[0126] Sentence intent tags are used to indicate the type of expression intent of a sentence unit, such as specific intent categories in fields such as "stating facts," "citing data," "making clinical validation assertions," and "expressing academic conclusions."
[0127] A pre-trained language model (such as BERT-INTENT) fine-tuned with target domain data (such as text data from the medical, financial, and academic fields) is used as a feature extractor. Sentence units are pre-processed (semantic tags are added, word segmentation is performed, etc.), and the processed text is input into the model. The model utilizes the domain semantic knowledge learned after domain fine-tuning to achieve three outputs: first, word-level hidden feature vectors are obtained by encoding each word through the encoder layer; second, the feature vectors corresponding to the [CLS] tags are extracted as sentence-level overall semantic vectors; and third, the sentence intent label of the sentence unit is output by calculating the intent probability distribution through the classification layer. Word-level and sentence-level features provide basic semantic representations for subsequent word weight calculations, and sentence intent labels provide intent-level differentiation criteria for subsequent high-risk false statements identification.
[0128] The execution steps are as follows: Add a [CLS] tag at the beginning of the sentence unit and a [SEP] tag at the end to complete the semantic boundary identification; use a word segmentation strategy matching the pre-trained language model to split the tagged sentence unit into several tokens; convert the token sequence into an input ID sequence that the model can recognize (including token ID, segment ID, and attention mask); input the input ID sequence into the pre-trained language model, and perform semantic encoding through the model's encoder layer; wherein, the feature vector corresponding to each token forms a word-level hidden feature vector, and the feature vector corresponding to the [CLS] tag serves as the sentence-level overall semantic vector; and use the formula... Calculate the probability distribution of intent, where, This is the classification weight matrix. For bias terms, For the [CLS] tag vector of the i-th sentence unit, select the category with the highest probability as the sentence intent label for that sentence unit.
[0129] For example, the sentence unit is "A certain health product has been verified by 200 clinical trials to cure hypertension". After preprocessing, the resulting tag sequence is: [CLS]A certain health product has been verified by 200 clinical trials to cure hypertension [SEP]. After WordPiece word segmentation, the word sequence is: [CLS]A certain health product has been verified by 200 clinical trials to cure hypertension [SEP].
[0130] The input ID sequence is converted to: [101,3633,2038,2595,2223,2148,1234,5678,3456,2345,4567, 3678,2789,2148,3291,2974,3058,3019,3614,102]. Simultaneously, an attention mask of all 1s and segmented IDs of all 0s are generated. This input ID sequence is then fed into the BERT-INTENT model, fine-tuned with data from the medical field, for semantic encoding and intent probability calculation.
[0131] The word-level hidden feature vector has a dimension of (19, 768), corresponding to the 768-dimensional semantic features of each of the 19 tokens (including <[BOS_never_used_51bce0c785ca2f68081bfa7d91973934]> and [SEP]); the sentence-level overall semantic vector has a dimension of (1, 768), which is the output feature vector of the <[BOS_never_used_51bce0c785ca2f68081bfa7d91973934]> token; the sentence intent label: the intent probability distribution is calculated by a formula, wherein the probability of the category "citing clinical trial data" is 0.92, and this label is output as the intent label of the sentence unit.
[0132] S303. Determine the semantic similarity between the word-level hidden feature vector corresponding to each word and the sentence-level overall semantic vector.
[0133] The semantic similarity is used to indicate the degree of fit and the tightness of association between the word semantics and the global semantics of the sentence.
[0134] For example, the semantic similarity may be cosine similarity, Pearson correlation coefficient, normalized Euclidean distance, and the like.
[0135] In this embodiment, taking the semantic similarity as the cosine similarity as an example, the value range is [-1, 1]. A value closer to 1 indicates a more consistent semantics, and a value closer to -1 indicates a more deviated semantics.
[0136] Taking the sentence-level overall semantic vector as the semantic benchmark of the sentence core, by calculating the semantic similarity between the word-level hidden feature vector of each word and the benchmark vector, the contribution degree and association strength of a single word to the overall semantics of the sentence are quantified. A higher similarity indicates that the word is a key component of the core expression of the sentence; a lower similarity indicates that the word is weakly associated with the core semantics of the sentence, or may have a semantic deviation, which provides a quantitative basis for subsequent word weight adjustment.
[0137] For example, assume that the sentence-level overall semantic vector is the <[BOS_never_used_51bce0c785ca2f68081bfa7d91973934]> feature vector with a dimension of (1, 768) , and the feature vectors corresponding to "certain", "health", "care", "product", "can", "cure", "high", "blood" and "pressure" in the word-level hidden feature vector are V1 to V10 respectively (each with a dimension of (1, 768)). The cosine similarity formula is used to calculate the similarity between each vector and : calculate that the cosine similarity with V6 ("cure") is 0.89; calculate that the cosine similarity with V7 ("heal") is 0.87; calculate that the cosine similarity with V1 ("certain") is 0.32; calculate that the cosine similarity with V4 ("product") is 0.45; the remaining words and The similarity is between 0.3 and 0.9. The semantic similarity values corresponding to the 10 words are obtained as: [0.32, 0.41, 0.43, 0.45, 0.58, 0.89, 0.87, 0.62, 0.61, 0.59], among which "cure" and "recover" have the highest correlation with the overall semantics of the sentence.
[0138] S304. Determine the single-sentence feature vector corresponding to the sentence unit according to the semantic similarity of the word-level hidden feature vector corresponding to each word and the sentence intent label.
[0139] Taking the similarity between words and the global semantics of the sentence as the quantitative basis, through weight allocation and feature fusion strategies, the feature contribution of words related to the core semantics in the sentence is highlighted, the interference of irrelevant or low-correlation words is weakened, and a single-sentence feature vector that can focus on key expressions and strengthen core semantics is generated.
[0140] In some embodiments, after risk adaptation adjustment is performed on the semantic similarity of each word based on the sentence intent label, the adjusted similarity may be used as the weight of the corresponding word-level hidden feature vector, and the word-level hidden feature vectors are weighted and summed to generate the single-sentence feature vector.
[0141] Combined with the risk attributes of the sentence intent label (such as intent categories prone to false expressions like "citing clinical trial data" and "clinical verification assertion"), the similarity of words related to the core semantics of the intent is increased, and the similarity of irrelevant words is decreased. The adjusted similarity then represents the dual importance of the word to the core semantics of the sentence and the risk intent. A word with a higher adjusted similarity has a greater weight, and its feature accounts for a higher proportion in the fusion vector, so as to not only focus on the core expression of the sentence, but also strengthen the intent-related risk features, and realize intent-oriented precise feature focusing.
[0142] For example, assume that the sentence intent label of a sentence unit is "citing clinical trial data" (a high-risk intent in the medical field), and the semantic similarity corresponding to the 10 words "certain", "health", "care", "product", "can", "cure", "cure", "high", "blood", "pressure" is [0.32, 0.41, 0.43, 0.45, 0.58, 0.89, 0.87, 0.62, 0.61, 0.59]. Based on the intent label, the similarity of "cure" and "recover" (which are strongly related to the core intent of "clinical efficacy") is each increased by 10%, to obtain the adjusted similarity sequence [0.32, 0.41, 0.43, 0.45, 0.58, 0.979, 0.957, 0.62, 0.61, 0.59]; taking the adjusted similarity sequence as weights, perform element-wise multiplication with the word-level hidden feature vectors (V1-V10) of the corresponding words respectively, then sum all the weighted vectors to obtain a single-sentence feature vector with a dimension of (1,768). Among them, "cure" (similarity 0.979) and "recover" (similarity 0.957) have the highest feature contribution ratio, which is consistent with the intent risk orientation of "citing clinical trial data".
[0143] In this embodiment, the weight allocation logic takes into account both semantic correlation and intent risk, does not need to rely on an external dictionary, has low computational overhead and fast inference speed, can quickly focus on the core semantics of the sentence and the risk features related to the intent, is suitable for rapid processing of long texts in general scenarios and domain-specific scenarios, and effectively reduces the interference of redundant information and non-risk semantics on subsequent detection.
[0144] In other embodiments, the initial weight corresponding to each word is determined according to the semantic similarity corresponding to each word and the sentence intent label; based on the priori dictionary of false keywords, hit words are determined from a plurality of words in the sentence unit, and the initial weights of the hit words are increased to obtain hit weights; the hit weights of the hit words and the initial weights of the non-hit words are normalized to obtain the normalized weight corresponding to each word; based on the normalized weight corresponding to each word, weighted summation is performed on the word-level hidden feature vectors to generate the single-sentence feature vector of the sentence unit.
[0145] The semantic similarity is adjusted in combination with the sentence intent label (for example, under the high-risk intent category, the similarity of words related to the intent core is increased, and the similarity of irrelevant words is decreased) to obtain initial weights that take into account both semantic correlation and intent risk; then the domain knowledge of the priori false keyword dictionary is introduced to perform a second weight increase on high-risk words hit by the dictionary (especially focusing on the hit words under the risk scenario corresponding to the intent label), so as to further strengthen the features related to false tendency; normalization processing is performed to ensure that the sum of weights is 1, so as to avoid numerical deviation; finally, word-level features are fused based on the adjusted normalized weights to generate a single-sentence feature vector that not only focuses on the core semantics of the sentence, but also highlights the dual features of intent risk and false keywords, which greatly improves the targeting of features for false identification.
[0146] The priori false keyword dictionary may include a structured dictionary of common false expressions, misleading words, and words related to forged assertions in various fields. The words in the dictionary are associated with corresponding semantic vectors, supporting word matching and semantic similarity query. For example, "cure diabetes", "cure all diseases" in the medical field, and "zero risk and capital guaranteed" in the financial field, etc.
[0147] For example, assume that the sentence intent label of a sentence unit is "citing clinical trial data", and the semantic similarity corresponding to the 10 words "certain", "health", "care", "product", "can", "cure", "recover", "high", "blood", "pressure" is [0.32, 0.41, 0.43, 0.45, 0.58, 0.89, 0.87, 0.62, 0.61, 0.59]. The similarity of "cure" and "recover" is each increased by 10% based on the intent label, to obtain the initial weights [0.32, 0.41, 0.43, 0.45, 0.58, 0.979, 0.957, 0.62, 0.61, 0.59];
[0148] Assume that the priori false keyword dictionary contains words such as "cure" and "cure all", and "cure" and "recover" in the sentence unit form an expression related to "cure", which is determined as a hit word;
[0149] The initial weight 0.979 of "cure" is increased by 10% to 1.0769, the initial weight 0.957 of "recover" is increased by 10% to 1.0527, and the weights of the remaining non-hit words remain unchanged, to obtain a weight sequence [0.32, 0.41, 0.43, 0.45, 0.58, 1.0769, 1.0527, 0.62, 0.61, 0.59]; softmax normalization processing is performed on this sequence to obtain normalized weights; weighted summation is performed on V1-V10 based on the normalized weights to generate a single-sentence feature vector with a dimension of (1,768), wherein the feature contributions of "cure" and "recover" are significantly enhanced under the triple reinforcement of semantic correlation, intent risk and false keywords.
[0150] In this embodiment, the core focusing ability of semantic similarity, the risk orientation of intent tags, and the domain knowledge of the prior dictionary are integrated. By adjusting the weight twice, the features of high-risk false words are strengthened, which effectively improves the ability to capture expressions with implicit false tendencies and reduces the risk of missed detection of sparse false keywords. It can adapt to the characteristics of false expressions in different fields, and the detection is more targeted and accurate, and the robustness is better.
[0151] In some embodiments, a word attention mechanism that integrates the overall features of the sentence is used for semantic enhancement to generate single-sentence feature vectors corresponding to sentence units.
[0152] Specifically, the importance score of each word is determined based on the word-level hidden feature vector and the sentence-level overall semantic vector; the importance score of each word is normalized to obtain the attention weight corresponding to each word element; and the word-level hidden feature vector of each word is weighted and summed based on the attention weight to obtain the semantically enhanced single sentence feature vector.
[0153] For scoring the importance of any single word, please refer to the following formula:
[0154]
[0155] in, Score the importance of the j-th word in the i-th sentence unit; Let be the word-level hidden feature vector of the j-th word in the i-th sentence unit; Let i be the sentence-level overall semantic vector of the i-th sentence unit; , To learn the weight matrix, This is the transpose of the attention projection vector.
[0156] The importance scores for each word are normalized using the following formula:
[0157]
[0158] in, The attention weight for the j-th word in the i-th sentence unit. The importance score is given to the j-th word in the i-th sentence unit, where m is the total number of lexical units in the sentence unit.
[0159] The formula for weighted summation can be found here: ,in, Let i be the single-sentence feature vector of the i-th sentence unit. Let j be the attention weight of the j-th word in the i-th sentence unit. Let be the word-level hidden feature vector of the j-th word in the i-th sentence unit.
[0160] By incorporating the sentence-level overall semantic vector (including sentence intent information) into the word importance scoring calculation, word weights are jointly guided by the sentence's global semantics and intent. Under intents such as "cited data" and "efficacy assertion," words highly related to false cues (such as effectiveness, cure rate, no side effects, etc.) will automatically receive higher weights. This solves the problems of generalized sentence semantic representation and weakened key false cues, significantly improving the discriminative power and false cues perception of sentence vectors.
[0161] For example, in a sentence intended to "cite clinical trial data," the word units "cure," "cured," "high," "blood pressure," and "blood pressure" are highly correlated with the sentence-level overall vector. After attention scoring, their corresponding... Higher than other function words and modifiers; the single-sentence feature vector generated after weighted summation will highly focus on efficacy-related statements, providing stronger discriminative features for subsequent inter-sentence contradiction calculation and false keyword location.
[0162] In this embodiment, word-level attention guided by global semantics of sentences is used to achieve automatic focusing and semantic enhancement of key false clues. High-risk expressions can be adaptively highlighted without the need for manual rule design or reliance on prior dictionaries. The generated sentence vectors are more discriminative and semantically more compact, which can effectively improve the accuracy and robustness of cross-sentence contradiction identification and false keyword detection.
[0163] S305. Based on the single-sentence feature vectors corresponding to each sentence unit, determine the sentence sequence-level hidden features corresponding to each sentence unit, as well as the full-text global features of the text to be detected.
[0164] The execution process of S305 can be found in the execution process of S203, and will not be repeated here.
[0165] S306. Construct a semantic graph of the sentences corresponding to the text to be detected.
[0166] Each sentence unit in the text to be detected is abstracted as a node in a semantic graph. The sentence sequence-level hidden features after context modeling are used as the initial semantic representation of each node. By calculating the inter-sentence semantic similarity between any two sentence nodes, the value of the inter-sentence semantic similarity is used as the edge weight between sentences, thereby constructing a sentence semantic graph that can represent the semantic relationship structure between sentences in the whole text, providing a structured data foundation for subsequent graph neural network message passing and inter-sentence contradiction calculation.
[0167] Specifically, the sentence sequence-level hidden features corresponding to each sentence unit are used as the initial node features of the corresponding node in the semantic graph; all sentence node pairs are traversed, and the inter-sentence semantic similarity between each pair of sentence sequence-level hidden features is calculated; the calculated inter-sentence semantic similarity is used as the weight of the edge between the two corresponding sentence nodes to form the initial adjacency matrix A; to preserve the node's own features, a self-connected identity matrix I is added to the initial adjacency matrix A to obtain the adjacency matrix with self-connection. Based on adjacency matrix Calculate matrix ,in, And through the formula A normalized adjacency matrix is generated to avoid feature bias caused by differences in node degree; the normalized adjacency matrix is combined with the initial node features to form a complete sentence semantic graph.
[0168] For example, the text to be detected is segmented into 3 sentence units, and their corresponding sentence sequence-level hidden features are as follows: , , (All dimensions are 1×768). Calculate the cosine similarity between each pair of pairs: and The semantic similarity between sentences is 0.25; and The semantic similarity between sentences is 0.82; and The semantic similarity between sentences is 0.18; an initial adjacency matrix A is constructed, and after adding self-connections, the following is obtained: Calculate the degree matrix And normalized to obtain ; normalize the adjacency matrix With , , The initial node features are combined to form a complete sentence semantic graph.
[0169] In this embodiment, a structured model of the relationships between sentences in the whole text is achieved by constructing a sentence semantic graph. Combined with the global context capture capability of GCN and optimization strategies such as self-connection and normalization, it can intuitively reflect the semantic proximity and logical relationship between sentences, providing structural support for subsequent capture of long-range dependencies across sentences and mining deep semantic contradictions. It avoids the local bias caused by simple sentence-by-sentence comparison and improves the global perception capability of false clues in long texts.
[0170] S307. Based on the sentence semantic graph, determine the contradiction feature vector corresponding to each sentence unit.
[0171] Based on sentence semantic graphs, this study utilizes inter-sentence semantic associations and feature propagation mechanisms to quantify the degree of semantic conflict and logical deviation between each sentence unit and other sentences in the text. This generates a contradiction feature vector that reflects the contradictory relationships between sentences, providing a logical verification basis for subsequent identification of false keywords.
[0172] In some embodiments, semantic divergence values can be calculated based on the edge weights (semantic similarity between sentences) of the sentence semantic graph, and the semantic divergence values can be combined into a contradiction feature vector corresponding to each sentence unit.
[0173] The inverse value of the semantic similarity between sentences is used as the semantic contradiction degree. The lower the similarity, the higher the contradiction degree. For each sentence node, its semantic contradiction degree with all other sentences is arranged in order to form a one-dimensional or multi-dimensional contradiction degree feature vector, which can quickly represent the conflict between sentences without complex network calculations.
[0174] For example, the sentence semantic graph contains 3 sentence nodes. Sentence A has a similarity of 0.25 with sentence B and 0.82 with sentence C. Then the semantic divergence values corresponding to sentence A are 0.75 and 0.18, respectively. These are combined into a contradiction feature vector with dimensions (2,768).
[0175] In this embodiment, the calculation is simple and efficient, requiring no training of graph neural networks, and the inference speed is fast. It can quickly obtain inter-sentence contradiction features and is suitable for short or medium-length text detection scenarios with high real-time requirements.
[0176] In other embodiments, a graph neural network is used to propagate messages through the sentence semantic graph to update the initial node features and obtain the target node features of each sentence unit; based on the target node features of each sentence unit, the inter-sentence semantic contradiction degree between each sentence unit is determined; and a contradiction degree feature vector corresponding to the inter-sentence semantic contradiction degree between each sentence unit is generated.
[0177] Graph Convolutional Networks (GCNs) can be used to pass feature messages between nodes on the sentence semantic graph, enabling each sentence node to integrate neighboring nodes and global context information to obtain target node features containing global associations. Then, based on the updated target node features, the cosine distance between sentences is calculated to quantify the intensity of semantic contradictions. Finally, the contradiction distances are concatenated according to the sentence sequence to form a contradiction degree feature vector that takes into account both local and global semantic conflicts, thereby achieving accurate capture of deep, cross-sentence, and multi-hop logical contradictions.
[0178] Specifically, based on the constructed sentence semantic graph, node features are updated through L-layer message propagation (ideally 2-3 layers, balancing semantic capture capability and computational complexity) using GCN. The propagation formula is:
[0179]
[0180] in, For the first The node feature matrix of the layer For a normalized adjacency matrix with self-connections, For the first The learnable weight matrix of the layer, The activation function is ReLU; after propagation through L layers, the target node features are obtained by fusing global context information. .
[0181] Based on target node features To perform semantic contradiction detection, traverse all node pairs and calculate the features of each target node pair. Features of other target nodes The cosine distance between sentences is used to determine the semantic contradiction between sentences. The larger the cosine distance, the stronger the semantic contradiction between sentences. The cosine distance between each sentence and all other sentences is concatenated in sequence to directly form the contradiction feature vector corresponding to that sentence.
[0182] For example, for a sentence semantic graph containing 3 sentence nodes, a 2-layer graph convolutional network (GCN) is used for feature propagation to obtain updated target node features; the cosine distance between the target node features is calculated to obtain the semantic contradiction degree between sentences; the contradiction degree corresponding to each sentence is concatenated according to the dimension to generate a contradiction degree feature vector with dimension (3,768).
[0183] In this embodiment, global inter-sentence relationships can be modeled using graph neural networks, which can capture implicit, indirect, and multi-hop semantic contradictions in long texts, significantly improving the ability to identify long-range false clues across sentences, making the contradiction features more comprehensive and accurate, and effectively improving the reliability of false keyword detection.
[0184] S308. Based on the full-text global features of the text to be detected and the contradiction degree feature vectors corresponding to each sentence unit, obtain the false keywords corresponding to the text to be detected.
[0185] In addition to the global features of the entire text and the contradiction feature vectors corresponding to each sentence unit, we can also consider the meaning. Figure 1 The impact of consistency features and keyword credibility features on the classification of fake keywords constitutes a multi-dimensional feature set. This multi-dimensional feature set includes full-text global features, semantic contradiction features, and meaning... Figure 1 Consistency features, keyword credibility features, and local logical conflict features.
[0186] Among them, semantic contradiction feature The maximum value in the contradiction feature vector of each sentence unit; meaning Figure 1 Induction characteristics The entropy value of the sentence intent label distribution for each sentence unit (the higher the entropy value, the more dispersed the intent and the more obvious the topic drift); keyword credibility feature. To aggregate the credibility scores of highly relevant keywords in each sentence unit (If the average or weighted sum is taken, the lower the score, the stronger the tendency to make false claims.) Indicates the first unit of the sentence (Keywords); Characteristics of local logical conflicts Flatten or average the contradiction feature vectors of each sentence unit.
[0187] Specifically, this involves analyzing the overall features of the text, semantic contradiction features, and meaning... Figure 1 Consistency features, keyword credibility features, and local logical conflict features are concatenated along their dimensions to obtain an initial comprehensive feature vector. A feature-level attention mechanism is then introduced to assign dynamic weights, as shown in the following formula: ;Target comprehensive feature vector = ;
[0188] in, Here is the attention weight matrix. For bias terms, To achieve element-wise multiplication, dynamic weights can adaptively adjust the contribution of each feature (e.g., semantic contradiction features have higher weights in highly contradictory texts).
[0189] Input the target's comprehensive feature vector into a Sigmoid classifier to calculate the probability that the text is fake news:
[0190]
[0191] in, This is the classification weight matrix. For the bias term; set a probability threshold (e.g., 0.7), when At that time, extract the credibility score. The candidate keywords are selected, and the Top-K keywords are output as false keywords.
[0192] In this embodiment, global semantics, logical conflicts, and meaning are used. Figure 1 The synergy of multi-dimensional features of consistency and keyword credibility maximizes the ability to identify false clues and avoids the limitations of single features; the dynamic attention fusion strategy enables feature contributions to be adapted on demand, improving the accuracy of fake news judgment and keyword positioning. It can cover known false statements and adapt to new false clues, making it more robust.
[0193] The fake keyword detection method provided in this application replaces traditional truncation with semantic boundary segmentation, thus preserving the original semantic structure of ultra-long texts and preventing the loss of key fake keywords from the source. In the feature extraction stage, it uses dual feature modeling at the word and sentence levels and dynamically adjusts word weights based on semantic similarity and a priori dictionary of fake keywords to generate single-sentence feature vectors that focus on high-risk expressions, improving the semantic signal of sparse fake keywords. Through sentence semantic graph construction and graph neural network message propagation, it achieves deep modeling of long-range dependencies between sentences, which can accurately capture deep semantic contradictions across multiple sentences. By integrating global features of the whole text and contradiction feature vectors for fake keyword determination, it takes into account both the overall semantic tendency of the text and local logical conflicts. It not only improves the accuracy of identifying fake keywords in general scenarios, but also enhances the ability to identify domain-specific fake assertions by adapting to different professional fields through a priori dictionaries. At the same time, it takes into account both detection efficiency and generalization, and solves the defects of information fragmentation, missing clues, and difficulty in capturing logical contradictions in the detection of fake keywords in ultra-long texts. It improves the completeness, accuracy and robustness of detection results, and provides reliable technical support for the governance of fake news in social media, news websites and professional fields.
[0194] Figure 4 This is a schematic diagram illustrating the architecture of a fake keyword detection method provided in an embodiment of this application. Please refer to [link / reference]. Figure 4 The architecture is a hierarchical end-to-end network, consisting of a BERT layer, a word attention layer, a Transformer encoder layer, a sentence attention layer, and a keyword extraction layer from left to right.
[0195] The BERT layer starts with [CLS] as input and uses [PAD] for word-level filling. It extracts word-level hidden features and sentence-level overall semantic vectors through domain-specific fine-tuning of BERT, and simultaneously outputs sentence intent labels. The word attention layer integrates sentence-level features and word-level features, and generates semantically enhanced single-sentence feature vectors through the word attention mechanism, focusing on high-risk keywords. The Transformer encoder layer encodes single-sentence feature sequences, models long-range dependencies between sentences, and outputs sentence sequence-level hidden features and full-text global features. The sentence attention layer starts with [SCLS] as sentence-level input and uses [SPAD] for sentence-level filling. It highlights high-contradiction sentence features through sentence attention weighting and constructs a sentence semantic graph. The keyword extraction layer uses [SEP] as sentence separator, integrates global features and contradiction features, and outputs the fake keywords corresponding to the text to be detected through classification decision.
[0196] Figure 5 This is a schematic diagram of a fake keyword detection device provided in an embodiment of this application. Please refer to... Figure 5The fake keyword detection device 500 includes a segmentation processing module 501, a feature extraction module 502, a first determination module 503, a second determination module 504, and a third determination module 505.
[0197] The segmentation processing module 501 is used to segment the text to be detected based on semantic boundaries to obtain multiple sentence units;
[0198] The feature extraction module 502 is used to perform feature extraction processing on each sentence unit to obtain the single sentence feature vector corresponding to each sentence unit. The single sentence feature vector is used to indicate the expression features of implicit false tendencies in the sentence unit.
[0199] The first determining module 503 is used to determine the sentence sequence-level hidden features and the full-text global features of the text to be detected based on the single sentence feature vectors corresponding to each sentence unit.
[0200] The second determining module 504 is used to determine the contradiction feature vector corresponding to each sentence unit based on the sentence sequence-level hidden features of each sentence unit.
[0201] The third determining module 505 is used to determine the false keywords corresponding to the text to be detected based on the full-text global features of the text to be detected and the contradiction degree feature vectors corresponding to each sentence unit.
[0202] Optionally, the second determining module 504 is specifically used for:
[0203] Construct a sentence semantic graph corresponding to the text to be detected. The sentence semantic graph is constructed with the sentence sequence-level hidden features of each sentence unit as the initial node features and the semantic similarity between sentences as the edge weights.
[0204] Based on the sentence semantic graph, the contradiction degree feature vector corresponding to each sentence unit is determined.
[0205] Optionally, the second determining module 504 is specifically used for:
[0206] By using a graph neural network, message propagation is performed on the sentence semantic graph to update the initial node features and obtain the target node features of each sentence unit.
[0207] Based on the target node features of each sentence unit, the degree of semantic contradiction between sentence units is determined;
[0208] Generate the contradiction feature vector corresponding to the semantic contradiction degree between each sentence unit.
[0209] Optionally, for any sentence unit; the feature extraction module 502 is specifically used for:
[0210] The sentence unit is processed by feature extraction to obtain the word-level hidden feature vector, the sentence-level overall semantic vector and the sentence intent label corresponding to the sentence unit. The word-level hidden feature vector includes the word-level hidden feature vectors corresponding to each word in the sentence unit.
[0211] Determine the semantic similarity between the word-level hidden feature vectors and the sentence-level overall semantic vectors corresponding to each word;
[0212] Based on the semantic similarity of the word-level hidden feature vectors corresponding to each word and the sentence intent label, the single-sentence feature vector corresponding to the sentence unit is determined.
[0213] Optionally, the feature extraction module 502 is specifically used for:
[0214] The initial weights for each word are determined based on their semantic similarity and sentence intent labels.
[0215] Based on a prior dictionary of false keywords, the matching words are identified among multiple words in a sentence unit, and the initial weight of the matching words is increased to obtain the matching weight.
[0216] The hit weights of the hit words and the initial weights of the non-hit words are normalized to obtain the normalized weights of each word.
[0217] Based on the normalized weights corresponding to each word, the word-level hidden feature vectors are weighted and summed to generate the single-sentence feature vector of the sentence unit.
[0218] Optionally, the third determining module 505 is specifically used for:
[0219] The full-text global features and the contradiction degree feature vector are concatenated to obtain the text fusion feature vector;
[0220] By using a binary classifier, the text fusion feature vector is classified to obtain the fake keywords corresponding to the text to be detected.
[0221] Optionally, the first determining module 503 is specifically used for:
[0222] By concatenating the single-sentence feature vectors of each sentence unit, the global feature vector corresponding to the text to be detected is obtained;
[0223] A global semantic vector is added to the head of the global feature vector and input into the sequence encoding network for inter-sentence association feature learning, so as to obtain the sentence sequence-level hidden features corresponding to each sentence unit and the full-text global features of the text to be detected.
[0224] The fake keyword detection device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0225] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Please refer to... Figure 6 The electronic device 600 may include a processor 601 and a memory 602 communicatively connected to the processor 601. Exemplarily, the processor 601 and the memory 602 are interconnected via a bus 603.
[0226] Memory 602 stores computer-executed instructions;
[0227] The processor 601 executes computer execution instructions stored in the memory 602, causing the processor 601 to execute the fake keyword detection method as shown in the above method embodiment.
[0228] Accordingly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the fake keyword detection method of the above method embodiments.
[0229] Accordingly, embodiments of this application may also provide a computer program product, including a computer program, which, when executed by a processor, can implement the fake keyword detection method shown in the above method embodiments.
[0230] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0231] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0232] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0233] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.
[0234] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.
[0235] When integrated units / modules are implemented in hardware, the hardware can be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor can be any suitable hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, the storage unit can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc.
[0236] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0237] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0238] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0239] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for detecting fake keywords, characterized in that, include: Based on semantic boundaries, the text to be detected is segmented to obtain multiple sentence units; Feature extraction is performed on each sentence unit to obtain a single sentence feature vector corresponding to each sentence unit. The single sentence feature vector is used to indicate the expression features of implicit false tendencies in the sentence unit. Based on the single-sentence feature vectors corresponding to each sentence unit, the sentence sequence-level hidden features corresponding to each sentence unit and the full-text global features of the text to be detected are determined. Construct a sentence semantic graph corresponding to the text to be detected. The sentence semantic graph is constructed with the sentence sequence-level hidden features of each sentence unit as the initial node features and the semantic similarity between sentences as the edge weights. The sentence semantic graph is propagated through a graph neural network to update the initial node features and obtain the target node features of each sentence unit. The target node features are the features obtained by fusing the initial node features, neighbor node features, and global context information. Based on the target node features of each sentence unit, the inter-sentence semantic contradiction degree between each sentence unit is determined; and a contradiction degree feature vector corresponding to the inter-sentence semantic contradiction degree between each sentence unit is generated. Based on the full-text global features of the text to be detected and the contradiction feature vectors corresponding to each sentence unit, the false keywords corresponding to the text to be detected are determined.
2. The method according to claim 1, characterized in that, For any given sentence unit, feature extraction is performed on each sentence unit to obtain a single-sentence feature vector corresponding to each sentence unit, including: The sentence unit is subjected to feature extraction processing to obtain the word-level hidden feature vector, the sentence-level overall semantic vector and the sentence intent label corresponding to the sentence unit. The word-level hidden feature vector includes the word-level hidden feature vectors corresponding to each word in the sentence unit. Determine the semantic similarity between the word-level hidden feature vector and the sentence-level overall semantic vector corresponding to each word; Based on the semantic similarity of the word-level hidden feature vectors corresponding to each word and the sentence intent label, the single-sentence feature vector corresponding to the sentence unit is determined.
3. The method according to claim 2, characterized in that, Based on the semantic similarity of the word-level hidden feature vectors corresponding to each word and the sentence intent label, the single-sentence feature vector corresponding to the sentence unit is determined, including: The initial weights of each word are determined based on the semantic similarity of each word and the sentence intent label. Based on a priori dictionary of false keywords, the matching words are identified among multiple words in the sentence unit, and the initial weight of the matching words is increased to obtain the matching weight. The hit weights of the hit words and the initial weights of the non-hit words are normalized to obtain the normalized weights corresponding to each word. Based on the normalized weights corresponding to each word, the word-level hidden feature vectors are weighted and summed to generate the single-sentence feature vector of the sentence unit.
4. The method according to claim 1, characterized in that, Based on the full-text global features of the text to be detected and the contradiction feature vectors corresponding to each sentence unit, the fake keywords corresponding to the text to be detected are determined, including: The full-text global features are concatenated with the contradiction degree feature vector to obtain the text fusion feature vector; The text fusion feature vector is classified using a binary classifier to obtain the false keywords corresponding to the text to be detected.
5. The method according to claim 1, characterized in that, Based on the single-sentence feature vectors corresponding to each sentence unit, the sentence sequence-level hidden features corresponding to each sentence unit and the full-text global features of the text to be detected are determined, including: By concatenating the single-sentence feature vectors of each sentence unit, the global feature vector corresponding to the text to be detected is obtained; A global semantic vector is added to the head of the global feature vector and input into a sequence encoding network for inter-sentence association feature learning, thereby obtaining the sentence sequence-level hidden features corresponding to each sentence unit and the full-text global features of the text to be detected.
6. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-5.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method described in any one of claims 1-5.
8. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-5.
Citation Information
Patent Citations
Text keyword extraction method and device
CN106557508A
Text false information detection method and system fusing contradictory features
CN120744125A
Sentence-level illusion detection method, system and equipment for long text and storage medium
CN122045421A
