A text authentication method based on text conflict detection
Through deep learning models combined with multiple detection methods, the detection of false news is automatically solved, and the problem of low accuracy of text conflict detection in the existing technology is solved, and efficient and interpretable text false detection effect is achieved.
Patent Information
- Application Number
- CN202211324359.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-27
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2042-10-27
AI Technical Summary
The element-based text conflict detection method in the prior art is not very accurate and it is difficult to effectively identify fake news.
Deep learning model is used to combine multiple methods for collaborative detection, including event sentence detection, event sentence conflict detection, event element conflict detection and sentence semantic similarity detection. Through deep learning models, we can achieve automation and intuitive display, and reduce manual work.
It improves the accuracy and efficiency of text false verification, the detection results are interpretable, the degree of automation is high, and the labor workload is reduced.
Smart Images

Figure CN115759109B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of text detection, in particular to a text authentication method based on text conflict detection. Background Art
[0002] Text conflict detection can be used to identify fake news by comparing two articles to detect inconsistencies. For example, if two news articles describing the same event contain a discrepancy in a key piece of information, it can be assumed that at least one of the articles is likely false. Based on this discrepancy, authenticity can be quickly determined. Therefore, conflict detection is an indirect method for verifying the authenticity of news texts. By quickly identifying conflicting points, these points can be used as areas of suspicion and breakthroughs in text verification.
[0003] Currently, many text verification methods focus directly on the content of individual articles, examining wording and factual descriptions to determine if they are inconsistent with the facts. Other news sources are rarely used. Fake news, on the other hand, is typically derived from real news using various methods. For example, relevant elements of the event, such as the actor or time of occurrence, may be replaced.
[0004] For such news, the system can detect conflicts and verify their authenticity to determine whether the news is fake. For example, it can paradoxically replace "support" for an action with "opposition" for another. Another example is replacing the time and location, such as describing an event that occurred in Region A in 2004 as occurring in Region B in 2011.
[0005] Text authentication ultimately comes down to identifying specific sentences, thus transforming into sentence conflict detection. Only event sentences that provide rich and substantive information are valuable. Therefore, to quickly identify valid sentences, we first perform event sentence detection. We extract event sentences that contain all the elements of an event, such as the actor, trigger, recipient, time, and location. Next, we perform conflict detection on the event sentences in the two passages.
[0006] The relationship between two sentences generally falls into three categories: sequential, conflicting, and independent. Sequential means the two sentences follow one another in time or logically progress. For example, "Xiao Ming went to school today" and "He put down his schoolbag first when he got to school." Conflict means the semantics of the two sentences are opposite and contradictory. For example, "Xiao Ming went to school today" and "Xiao Ming didn't go to school today; he went to the zoo instead." Independence means the semantics of the two sentences are unrelated and cannot be deduced from each other. For example, "Xiao Ming went to school today" and "Xiao Ming's mother likes Xiao Ming."
[0007] As can be seen above, identifying fake news based on conflict detection is feasible. Traditional conflict detection methods are based on feature-based conflict detection, which has low accuracy. Summary of the Invention
[0008] In view of this, the present invention provides a text authentication method based on text conflict detection, which combines multiple methods for collaborative detection to ensure the high accuracy of the detection results. It adopts a deep learning model to realize automatic detection, and the conflict detection points are intuitively displayed. The detection results are sufficiently interpretable and trustworthy. Automatic detection greatly reduces manual work and improves detection efficiency.
[0009] The present invention discloses a text authentication method based on text conflict detection, comprising:
[0010] Step 1: extract event sentences from two texts describing the same event, and form two corresponding event sentence lists, namely the first event sentence list and the second event sentence list;
[0011] Step 2: performing event sentence conflict detection, event element conflict detection, and sentence semantic similarity detection on the event sentences in the first event sentence list and the event sentences in the second event sentence list;
[0012] Step 3: If the detection results of event sentence conflict detection, event element conflict detection and sentence semantic similarity detection are all conflicting, then there is a conflict between the two texts describing the same event.
[0013] Furthermore, the step 1 includes:
[0014] Step 11: Sentence the two texts describing the same event separately;
[0015] Step 12: Each sentence is sent to the event sentence detection model for detection, and output whether it is an event sentence; wherein the event sentence includes the event agent, event trigger, event object, occurrence time and location;
[0016] Step 13: List the event sentences corresponding to the same text, and finally obtain the event sentences of the first event sentence list and the second event sentence list.
[0017] Furthermore, in step 2,
[0018] Performing event sentence conflict detection on the event sentences in the first event sentence list and the event sentences in the second event sentence list includes:
[0019] Step 21: Select an unselected event sentence from each of the first event sentence list and the second event sentence list;
[0020] Step 22: Input the two selected event sentences into a multi-classification model for context relationship prediction to obtain relationship labels; wherein the relationship labels include sequential, conflicting, and independent;
[0021] Step 23: Repeat steps 21 to 22 until there are no unselected event sentences in the first event sentence list and the second event sentence list.
[0022] Furthermore, the training data format of the multi-classification model for predicting the relationship between the upper and lower sentences is "relationship label sentence 1 sentence 2".
[0023] Furthermore, in step 2,
[0024] The performing event element conflict detection on the event sentences in the first event sentence list and the event sentences in the second event sentence list includes:
[0025] Step 211: selecting an unselected event sentence from each of the first event sentence list and the second event sentence list;
[0026] Step 212: Input the two event sentences selected in step 211 into the event element extraction model to obtain the event elements corresponding to each event sentence; wherein the event elements include the agent, the patient, the trigger word, the time, and the place;
[0027] Step 213: Determine the similarity between the event elements corresponding to the two event sentences to determine whether there is a conflict between the two event sentences;
[0028] Step 214: Repeat steps 211 to 213 until there are no unselected event sentences in the first event sentence list and the second event sentence list.
[0029] Furthermore, the step 213 includes:
[0030] The similarity between two event elements is calculated using a word similarity calculation algorithm;
[0031] If two event sentences have four-fifths of the same event elements and one-fifth of the different event elements, there is a conflict between the two event sentences.
[0032] Furthermore, a BERT-based sequence labeling model is used to extract event elements from the event sentence, and each event element in the event sentence is labeled using a BIO method.
[0033] Furthermore, in step 2,
[0034] The performing sentence semantic similarity detection on the event sentences in the first event sentence list and the event sentences in the second event sentence list includes:
[0035] Step 2111: selecting an unselected event sentence from each of the first event sentence list and the second event sentence list;
[0036] Step 2112: Segment the two event sentences respectively and calculate the similarity between the segmented words;
[0037] Step 2113: Based on the similarity between the words and the similarity between the corresponding event sentences, determine whether there is a conflict between the two event sentences;
[0038] Step 2114: Repeat steps 2111 to 2113 until there are no unselected event sentences in the first event sentence list and the second event sentence list.
[0039] Furthermore, the step 2113 includes:
[0040] Step 21131: If the similarity between the words is higher than a preset threshold, then there is similarity between the two words;
[0041] Step 21132: Calculate the semantic similarity between the two event sentences corresponding to the two words;
[0042] Step 21133: If the calculated semantic similarity is lower than the set threshold value, there is a conflict between the two event sentences; otherwise, there is no conflict.
[0043] Furthermore, the step 21132 includes:
[0044] The two event sentences corresponding to the two words are respectively encoded with feature vectors through the BERT pre-training model to obtain two one-dimensional vectors. The semantic similarity between the two one-dimensional vectors is calculated using the cosine similarity calculation method.
[0045] By employing the above-mentioned technical solution, the present invention has the following advantages: It combines multiple detection methods to ensure high accuracy of detection results. Secondly, this paper uses a deep learning model to achieve automatic detection, and the conflict detection points are intuitively displayed, making the detection results fully interpretable and trustworthy. Automated detection significantly reduces manual work and improves detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments described in the embodiments of the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0047] Figure 1 is a schematic diagram of the overall method of an embodiment of the present invention;
[0048] Figure 2 It is an overall workflow diagram of an embodiment of the present invention;
[0049] Figure 3 is a flow chart of event sentence detection according to an embodiment of the present invention;
[0050] Figure 4 This is a flow chart of the context relationship detection according to an embodiment of the present invention;
[0051] Figure 5 This is a schematic diagram of a model for detecting the relationship between a sentence and a context according to an embodiment of the present invention;
[0052] Figure 6 is a schematic diagram of an event extraction model according to an embodiment of the present invention;
[0053] Figure 7 This is a flowchart of sentence semantic similarity calculation according to an embodiment of the present invention. DETAILED DESCRIPTION
[0054] The present invention will be further described with reference to the accompanying drawings and embodiments. Obviously, the embodiments described are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those skilled in the art should fall within the scope of protection of the embodiments of the present invention.
[0055] The present invention provides an embodiment of a text authentication method based on text conflict detection, which mainly consists of four parts: event sentence detection, event sentence conflict detection, event element conflict detection and sentence semantic similarity detection. Figure 1 and Figure 2 As shown in the figure, event sentence detection is a prerequisite for extracting truly valuable sentences from the article. Furthermore, by filtering out a large number of invalid sentences at the very beginning, the efficiency of conflict detection is greatly improved. Next, event sentence conflict detection, event element conflict detection, and sentence semantic similarity detection are performed simultaneously. If all three detection results are conflicting, the two news items are considered to have conflicting results.
[0056] 1) Event Sentence Detection
[0057] See also Figure 3 The event sentence detection module first segments each passage into sentences. Each sentence is then fed into the event sentence detection model for testing. The event sentence detection model is a binary classification model. It takes an event sentence as input and outputs whether it is an event sentence. The training data format for the event sentence model is "labeled sentences." After testing all sentences in each passage, a list of event sentences for each passage is generated.
[0058] 2) Event sentence conflict detection
[0059] Select two event sentences from two articles one by one and feed them into the sentence relationship detection model. The process is as follows: Figure 4 The model is shown in Figure 5 As shown, this model is a multi-classification model for predicting contextual relationships. It consists of two components: a large-scale text pre-training model and a multi-label classifier. The relationship labels are: sequential, conflicting, and independent. If the detection result is conflicting, the two sentences are considered conflicting. The training data format for the contextual relationship prediction model is "relationship label sentence 1 sentence 2." After testing all sentences in the two passages, the model outputs all sentence pairs with a "conflicting" relationship.
[0060] 3) Event element conflict detection
[0061] Send the event sentences into the event element extraction model respectively. Figure 6 As shown, the model extracts the five elements of an event sentence: agent, patient, trigger, time, and location. Next, it performs conflict detection on the event elements of the two event sentences. Conflict identification is based on the following criteria: A conflict occurs when four of the five elements (agent, patient, trigger, time, and location) match and one does not. Because the four elements are identical, the two event sentences are considered to describe the same event. However, one element differs, so it is different in the two event sentences, creating a conflict. Therefore, there is reason to suspect that the descriptions in the two event sentences are false. Event element extraction utilizes a BERT-based sequence labeling model, using a BIO approach to annotate the elements of the event sentences: agent, patient, trigger, time, and location. Event element conflict detection uses a word similarity algorithm to calculate the degree of consistency between the two event elements.
[0062] 4) Sentence semantic similarity detection
[0063] First, the event sentences are segmented. Then, the similarity of the words obtained after the segmentation of the two event sentences is calculated. When the similarity of the detected words is higher than a certain threshold, it is considered that the two sentences have great similarity in words, and the descriptions of the two sentences look similar. It is roughly speculated that they describe the same thing. Then, the sentence semantic similarity is calculated. The two sentences are encoded with feature vectors through the BERT pre-training model to generate a vector of 1*768 dimensions. Then, the two vectors are calculated for similarity using the cosine similarity method, such as Figure 7 After calculation, the value is compared with the threshold. If it is lower than the threshold, it is considered that although the two sentences look similar, their actual semantics are quite different and they are actually conflicting.
[0064] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.
Claims
1. A text authentication method based on text conflict detection, characterized in that: include: Step 1: extract event sentences from two texts describing the same event, and form two corresponding event sentence lists, namely the first event sentence list and the second event sentence list; Step 2: performing event sentence conflict detection, event element conflict detection, and sentence semantic similarity detection on the event sentences in the first event sentence list and the event sentences in the second event sentence list; Step 3: If the detection results of event sentence conflict detection, event element conflict detection, and sentence semantic similarity detection are all conflicting, then there is a conflict between the two texts describing the same event; The step 1 comprises: Step 11: Sentence the two texts describing the same event separately; Step 12: Each sentence is sent to the event sentence detection model for detection, and output whether it is an event sentence; wherein the event sentence includes the event agent, event trigger, event object, occurrence time and location; Step 13: List the event sentences corresponding to the same text, and finally obtain the event sentences of the first event sentence list and the second event sentence list; In step 2, Performing event sentence conflict detection on the event sentences in the first event sentence list and the event sentences in the second event sentence list includes: Step 21: Select an unselected event sentence from each of the first event sentence list and the second event sentence list; Step 22: Input the two selected event sentences into a multi-classification model for context relationship prediction to obtain relationship labels; wherein the relationship labels include sequential, conflicting, and independent; Step 23: Repeat steps 21 to 22 until no unselected event sentences exist in the first event sentence list and the second event sentence list; In step 2, The performing event element conflict detection on the event sentences in the first event sentence list and the event sentences in the second event sentence list includes: Step 211: selecting an unselected event sentence from each of the first event sentence list and the second event sentence list; Step 212: Input the two event sentences selected in step 211 into the event element extraction model to obtain the event elements corresponding to each event sentence; wherein the event elements include the agent, the patient, the trigger word, the time, and the place; Step 213: Determine the similarity between the event elements corresponding to the two event sentences to determine whether there is a conflict between the two event sentences; Step 214: Repeat steps 211 to 213 until no unselected event sentences exist in the first event sentence list and the second event sentence list; The step 213 includes: The similarity between two event elements is calculated using a word similarity calculation algorithm; If two event sentences have four-fifths of the same event elements and one-fifth of the different event elements, there is a conflict between the two event sentences; In step 2, The performing sentence semantic similarity detection on the event sentences in the first event sentence list and the event sentences in the second event sentence list includes: Step 2111: selecting an unselected event sentence from each of the first event sentence list and the second event sentence list; Step 2112: Segment the two event sentences respectively and calculate the similarity between the segmented words; Step 2113: Based on the similarity between the words and the similarity between the corresponding event sentences, determine whether there is a conflict between the two event sentences; Step 2114: Repeat steps 2111 to 2113 until no unselected event sentences exist in the first event sentence list and the second event sentence list; The step 2113 includes: Step 21131: If the similarity between the words is higher than a preset threshold, then there is similarity between the two words; Step 21132: Calculate the semantic similarity between the two event sentences corresponding to the two words; Step 21133: If the calculated semantic similarity is lower than the set threshold, there is a conflict between the two event sentences; otherwise, there is no conflict; The step 21132 includes: The two event sentences corresponding to the two words are respectively encoded with feature vectors through the BERT pre-training model to obtain two one-dimensional vectors. The semantic similarity between the two one-dimensional vectors is calculated using the cosine similarity calculation method.
2. The method according to claim 1, characterized in that The training data format of the multi-classification model for predicting the relationship between the upper and lower sentences is the relationship label sentence 1 sentence 2.
3. The method according to claim 1, characterized in that A BERT-based sequence labeling model is used to extract event elements from the event sentence, and the event elements in the event sentence are labeled using a BIO method.
Citation Information
Patent Citations
Method and device for determining element attribute conflict in text, equipment and medium
CN112560434A
Conflict detection method and device for classification labeling in natural language processing, equipment
CN113435182A
Text infringement detection method and device, electronic equipment and storage medium
CN114564936A