News text information extraction method based on large language model
By constructing a historical news database and a large language model, and combining word vectors and logistic regression models, the problem of universality in judging fake news was solved, and more accurate fake news detection was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEI JING NORMAL UNIV HONG KONG BAPTIST UNIV UNITED INT COLLEGE
- Filing Date
- 2026-04-28
- Publication Date
- 2026-07-07
AI Technical Summary
Existing technologies fail to comprehensively consider the diversity of news types when judging fake news, resulting in low universality of judgments and affecting accuracy.
A historical news database is constructed, and news text information is segmented and semantically quantified based on a large language model. Keywords are extracted, and false positives are identified by combining word vectors and importance weights with a logistic regression model.
By dynamically quantifying the importance of each word within news text, the accuracy and relevance of fake news identification have been improved.
Smart Images

Figure CN122113933B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic digital data processing technology, specifically to a method for extracting news text information based on a large language model. Background Technology
[0002] In today's information-exploding digital age, the speed of information dissemination has significantly increased, and the frequency of online news texts is rising, providing convenience for public life. However, at the same time, due to the lack of a mechanism for verifying the authenticity of news texts, fake news can spread rapidly, and its potential harm and impact are expanding. Therefore, detecting fake news is of great practical significance.
[0003] With the continuous development of Large Language Model (LLM) natural language processing technology, it is now possible to construct datasets to train language models and extract news text information by recognizing and matching text words. When determining the authenticity of news text, current techniques often rely on manual comparison, judgment, and annotation to train the language model, aiming to improve the model's accuracy in distinguishing the authenticity of news text information. However, this method requires a significant investment of human and time resources, and manual judgment is easily influenced by personal subjective factors, potentially leading to incorrect annotations and affecting the subsequent determination of the authenticity of news text information.
[0004] To address the shortcomings of existing technologies, current methods often involve segmenting words within news texts and assigning weights to their importance. A logistic regression model is then used to train the model on a large dataset of news text information to determine whether the news text is false. However, existing technologies typically assign weights directly to words. News encompasses a wide variety of types and fields, such as political, entertainment, and financial news. Using directly preset weights has low applicability to such diverse news, making it difficult to capture the domain-specific semantic relationships and implicit information. Furthermore, it fails to provide accurate falsehood assessments for certain types of news. Summary of the Invention
[0005] To address the technical problem that existing methods for judging fake news lack comprehensive consideration of a single preset weight, resulting in a lack of relevance to diverse news topics, low universality, and inaccurate judgment results, the present invention aims to provide a news text information extraction method based on a large language model. The specific technical solution adopted is as follows:
[0006] A historical news database is constructed, news text information to be judged is collected, and the historical news database and news text information to be judged are lexically segmented based on a large language model to obtain several words and corresponding word vectors.
[0007] Analyze each word in the news text information to be judged, extract keywords, and match the keywords with the historical news database to obtain the matching results;
[0008] Based on the matching results and combined with word vectors, the importance weights of words in the news text information to be judged and the corresponding historical news text information are determined.
[0009] Construct a logistic regression model, use importance weights to make false judgments on the news text information to be judged, and output the judgment result.
[0010] Preferably, a historical news database is constructed, news text information to be judged is collected, and the historical news database and the news text information to be judged are lexically segmented based on a large language model to obtain several words and their corresponding word vectors, including:
[0011] We will compile existing open-source datasets containing both real and fake news, construct a historical news database, and collect news text information to be judged from news websites.
[0012] Based on a large language model, all historical news text information and news text information to be judged in the historical news database are segmented into several words, and semantic quantization is performed on the words to obtain the corresponding word vectors.
[0013] Preferably, each word in the news text to be judged is analyzed, keywords are extracted, and the keywords are matched with a historical news database to obtain matching results, including:
[0014] A comprehensive analysis of the vocabulary in the news text information to be judged is conducted to determine the probability that each word belongs to a keyword, and the keywords in the news text information to be judged are then selected.
[0015] The system uses keywords to search historical news databases and marks several corresponding historical news texts that contain the same keywords.
[0016] Preferably, a comprehensive analysis of the vocabulary in the news text information to be judged is conducted to determine the probability that each vocabulary word belongs to a keyword, and keywords in the news text information to be judged are screened, including:
[0017] Count the number of occurrences of each word in the news text to be judged, and filter for the word with the highest frequency of occurrence;
[0018] In the news text information to be judged, determine the total number of words and the position of each word in any sentence;
[0019] By combining the maximum frequency of occurrence, the total number of words, and the word position, the likelihood that each word belongs to the keyword of the news text information to be judged is assessed;
[0020] Keywords are extracted from the news text information to be judged based on probability.
[0021] Preferably, keywords are extracted from the news text information to be judged based on probability, specifically as follows:
[0022] A preset filtering threshold is used to compare the probability of each word belonging to the keywords of the news text to be judged. If the probability is greater than the filtering threshold, it is marked as a keyword. If the probability of all words belonging to the keywords of the news text to be judged is less than or equal to the filtering threshold, the word with the highest probability is selected as the keyword.
[0023] Preferably, based on the matching results and word vectors, the importance weights of words in the news text information to be judged and the corresponding historical news text information are determined, including:
[0024] The correlation between the news text information to be judged and any corresponding historical news text information is evaluated based on the matching results.
[0025] By combining word vectors and relevance, we can assess the importance weight of any word in the news text to be judged in the process of judging falsehood.
[0026] Preferably, the relevance of the news text information to be judged to any corresponding historical news text information is evaluated based on the matching results, including:
[0027] Count the number of keywords in the news text to be judged and the corresponding historical news text.
[0028] Obtain the probability of each keyword in the news text information to be judged and any corresponding historical news text information, and determine the sum of the keyword probabilities corresponding to the news text information to be judged.
[0029] By combining the number of keywords, the probability of keywords, and the sum of the probability of keywords, the relevance of the news text information to be judged with the historical news text information currently being analyzed is determined.
[0030] Preferably, by combining word vectors and relevance, the importance weight of any word in the news text to be judged in the process of determining falsehood is evaluated, including:
[0031] Based on word vectors, multiple historical news texts that are most similar to the news text to be judged are selected, and the maximum similarity between words is extracted.
[0032] Count the number of real news items and fake news items separately from the most similar historical news text information;
[0033] By combining relevance, maximum similarity, and the number of real and fake news items, the importance weight of any word in the news text to be judged in the process of judging falsehood is generated.
[0034] Preferably, based on word vectors, multiple historical news texts most similar to the news text to be judged are selected, and the maximum similarity between words is extracted, including:
[0035] Based on the word vector of any word in the news text information to be judged, semantic matching is performed with all words in any corresponding historical news text information, and multiple historical news text information that are most similar to the news text information to be judged are selected.
[0036] Obtain the relevance between all the most similar historical news texts and the news text to be judged, sum the relevances, and then filter the maximum similarity between each of the most similar historical news texts and any word in the news text to be judged.
[0037] Preferably, multiple historical news texts most similar to the news text to be judged are selected, specifically:
[0038] A preset judgment threshold is set, and the cosine similarity between any word in the news text to be judged and all words in any historical news text is evaluated. The maximum cosine similarity of the corresponding historical news text is selected and compared with the judgment threshold. The most similar words are marked, and the historical news text that is most similar to the news text to be judged is selected through the most similar words.
[0039] The present invention has the following beneficial effects:
[0040] Based on a comparative analysis of historical news text information and news text information to be judged, the vocabulary of the two types of news text information is segmented, and keywords are extracted from the news text information to be judged. These keywords are then compared with a massive amount of news text information in the historical news database to obtain matching results. The importance index of each word in the news text information to be judged is dynamically quantified, that is, each word in the news text information to be judged is assigned a specific weight. Combined with a logistic regression model, more targeted false positive results are obtained for the news text information to be judged, thereby improving the accuracy of false positive judgments for the news text information to be judged. Attached Figure Description
[0041] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 This is a flowchart illustrating the steps of a news text information extraction method based on a large language model, as provided in one embodiment of the present invention. Detailed Implementation
[0043] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a news text information extraction method based on a large language model proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0044] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0045] The following description, in conjunction with the accompanying drawings, details a specific scheme for a news text information extraction method based on a large language model provided by this invention.
[0046] To better illustrate, news text information refers to various messages, event descriptions, viewpoints, and background information conveyed and expressed through language. It typically encompasses various news media, including news reports, commentaries, and feature articles. Through news text information, users can obtain information about social dynamics, current events, or form their own understanding. Its authenticity and accuracy directly influence the public's judgment and decision-making regarding facts. In today's information-saturated society, false or misleading news can confuse the public, distort the truth, interfere with rational discussion, and may even trigger social panic, damage the reputation of individuals or institutions, and negatively impact public decision-making. Therefore, verifying the authenticity of news text information helps maintain a clean information environment, protect the public's right to know, and promote a healthy social discourse and information ecosystem.
[0047] Large language models refer to artificial intelligence models based on deep learning technology. Through training on large-scale text data, they learn language patterns, structures, and semantic information to possess powerful language understanding and generation capabilities. They can handle various natural language tasks, such as text generation, question-answering systems, and machine translation. However, existing news texts are numerous, diverse, and highly interconnected. Judging whether news is fake news based solely on vocabulary is too simplistic. Therefore, this paper proposes a news text information extraction method based on large language models. This method, combined with training and optimization of the large language model, assists in the automated or semi-automated detection of the authenticity of news texts, improving the efficiency and coverage of fake information identification. It provides strong technical support for content review, fact-checking, and public opinion analysis, and more effectively addresses the challenge of fake news dissemination in an era of information overload. Furthermore, any integration of the model and program data, or configuration of different hardware to produce similar effects, falls within the scope of this invention.
[0048] Please see Figure 1 The diagram illustrates a flowchart of a news text information extraction method based on a large language model, according to an embodiment of the present invention. The method includes:
[0049] Step S1: Construct a historical news database, collect news text information to be judged, and perform word segmentation on the historical news database and the news text information to be judged based on a large language model to obtain several words and corresponding word vectors.
[0050] Step S2: Analyze each word in the news text information to be judged, extract keywords, and match the keywords with the historical news database to obtain the matching results;
[0051] Step S3: Based on the matching results and word vectors, determine the importance weights of words in the news text information to be judged and the corresponding historical news text information;
[0052] Step S4: Construct a logistic regression model, use importance weights to make false judgments on the news text information to be judged, and output the judgment results.
[0053] As an optional implementation, in this embodiment, both historical news text information and news text information to be judged are analyzed based on a pure English text information dataset. That is, English, as a globally used international language, occupies a dominant position in the field of news dissemination. Moreover, using a pure English dataset can better utilize the existing language understanding capabilities and parameter initialization advantages of the existing pre-trained model, and reduce the performance loss caused by cross-language transfer.
[0054] Further, step S1 includes:
[0055] Step S11: Aggregate existing publicly available open-source datasets containing both real and fake news, construct a historical news database, and collect news text information to be judged from news websites.
[0056] The explanation states that existing open-source datasets include the GossipCop dataset, the FakeNewsNet dataset, and the LIAR dataset. Among them, the GossipCop dataset mainly focuses on rumor detection on social media, with a large amount of news text information; the FakeNewsNet dataset covers a variety of topics and sources; and the LIAR dataset mainly focuses on verifying the authenticity of political statements. In other words, by aggregating a large amount of historical news text from real and fake news in open-source datasets, a historical news database can be built, which can more comprehensively cover real and fake news in different scenarios and improve the generalization ability of large language models. Furthermore, news text information to be judged is collected from news websites for subsequent analysis.
[0057] Step S12: Based on the large language model, perform word segmentation on all historical news text information and news text information to be judged in the historical news database to obtain several words, and perform semantic quantization on the words to obtain the corresponding word vectors.
[0058] It can be noted that, in this embodiment, the large language model adopts the existing English vocabulary word vector large model, namely the all-MiniLM-L6-v2 model, to segment the vocabulary and quantize the word vectors of the news text information to be judged and all news text information in the historical news database. Among them, the all-MiniLM-L6-v2 model is a lightweight word vector representation model based on a pre-trained language model architecture, which can convert English words or short text sequences into high-dimensional dense vectors, i.e., word vectors, to capture the semantic information, contextual relationships and semantic similarity of words.
[0059] Specifically, defining the total amount of historical news text information in the historical news database The combined news text information to be judged totals [number] items. Each news text message is segmented into words, and the number of words is counted accordingly, denoted as _____. ,in, This indicates the number of words corresponding to the news text information to be judged; express In the historical news text information, the number of words corresponding to each historical news text information is determined; then, semantic quantization is performed on each word in each news text information to obtain the corresponding word vector, denoted as . , indicating the first The first news text message The word vectors corresponding to each word.
[0060] Further, step S2 includes:
[0061] Step S21: Analyze the words in the news text information to be judged, determine the probability that each word belongs to the keyword, and filter the keywords in the news text information to be judged.
[0062] Understandably, news text information revolves around one or more subjects, such as well-known figures, events, or institutions. These subjects are the core elements of the news, and the main content of the news unfolds around these subjects. When judging the authenticity of news, it is necessary to first determine the subject content that the news text information targets. By identifying the words in the news text information that correspond to the subject, the keywords of the news text information to be analyzed can be extracted.
[0063] Further, step S21 includes:
[0064] Step S211: Count the number of times each word appears in the news text information to be judged, and filter the words with the highest frequency of occurrence.
[0065] Specifically, for ease of explanation, based on the first part of the news text information to be judged... To elaborate on each word, in practice, as the main vocabulary of news articles, its frequency of occurrence within the news text is relatively higher than other words; we iterate through all words in the news text to be judged, counting the number of times each word appears, i.e., the [number]th word... The number of occurrences of each word is denoted as . Similarly, the frequency of occurrence for all words is... Filter by the maximum number of occurrences, i.e. ,in, Indicates the maximum number of occurrences of a word in the news text to be judged; This represents the maximum value function operation.
[0066] Step S212: In the news text information to be judged, determine the total number of words and the position of each word in any sentence.
[0067] Specifically, the main vocabulary of a news story is usually located in the subject position of the sentence structure of the news text, and the news narrative then unfolds around this subject; in the news text to be judged, the first... All statements in which the word appears, assuming it is in the nth word In a sentence, count the total number of words in the current sentence, and record it as . , No. The word in the first The position of the sentence in the sentence, that is, the lexical position. .
[0068] Step S213: Based on the maximum occurrence frequency, total number of words, and word position, assess the likelihood that each word belongs to the keyword of the news text information to be judged.
[0069] Specifically, assess the first The probability that a word belongs to the keyword of the news text to be judged is calculated using the following formula:
[0070]
[0071] in, Indicates the first The probability that each word belongs to the keywords of the news text information to be judged; Indicates the maximum number of occurrences of a word in the news text to be judged; Indicates the first The word in the news text information to be judged is the first one. The lexical position of a sentence; Indicates the first The word in the news text information to be judged is the first one. The total number of words in a sentence; This indicates the index of the statement in the news text information to be judged; Indicates the first The number of times each word appears in the news text information to be judged.
[0072] It can be explained that, It is by Simplified, we get, This indicates the first piece of news text information to be judged. The frequency of a word relative to all words is determined by its relative occurrence frequency; the higher the value, the higher the frequency of the word. The higher the frequency of a word in the news text to be judged, the more likely the word being analyzed is to be a keyword in the news text to be judged. Then it means the first The word is located in the first position in the news text information to be judged. The average relative position of sentences; the larger the value, the more accurate the interpretation. The earlier a word appears in each sentence, the more likely it is to be analyzed. The more likely a word is to belong to the keyword information of the news text to be judged, the more probabilities it represents; integrate and simplify this logical expression to determine the probability. The larger this value, the more it indicates that the first... The higher the probability that a given word belongs to the keyword of the news text to be judged, the better. And based on the... Similarly, the probability of each word in the news text being judged belonging to the keywords of the news text being judged is determined. .
[0073] It should be noted that when conducting statistical analysis based on the frequency of a word's appearance in news text, if a word appears multiple times in the same sentence, it is only counted once. That is, the number of times any word appears in the news text to be judged is the same as the number of sentences marked accordingly. This is to avoid function words occupying too much statistical weight and obscuring the core content words that actually have news value, and to effectively filter out meaningless repetitions.
[0074] Step S214: Extract keywords from the news text information to be judged based on probability.
[0075] The term "keywords" refers to highly generalized and representative words in news texts that directly reflect the core subject, event, or issue of the news.
[0076] Furthermore, in step S214, specifically:
[0077] A preset filtering threshold is used to compare the probability of each word belonging to the keywords of the news text to be judged. If the probability is greater than the filtering threshold, it is marked as a keyword. If the probability of all words belonging to the keywords of the news text to be judged is less than or equal to the filtering threshold, the word with the highest probability is selected as the keyword.
[0078] Specifically, the screening threshold is denoted as In this embodiment, It can be specifically set according to the actual situation; if all the words obtained in the aforementioned steps are likely to be keywords in the news text information to be judged... There are [cases] that exceed the filtering threshold. The value will be greater than the filtering threshold for each... The corresponding vocabulary is marked as the keywords of the news text information to be judged; conversely, if the probability is low... There are no values greater than the filtering threshold. The value of, i.e., probability. When all values are less than or equal to the screening threshold, proceed from the probability threshold. The maximum value is selected from the list, and the words corresponding to the maximum value are marked as keywords in the news text information to be judged.
[0079] Step S22: Use keywords to search the historical news database and mark several corresponding historical news texts with the same keywords.
[0080] Specifically, based on the news text information to be judged, keywords are extracted. Similarly, keywords from all historical news text information in the historical news database are determined. These keywords are then used to perform a search and matching process with the historical news text information. Several historical news text information entries that match the news text information to be judged using the same keywords are identified and denoted as follows: This historical news text information will be used for subsequent steps.
[0081] Furthermore, step S3 includes:
[0082] Step S31: Evaluate the relevance between the news text information to be judged and any corresponding historical news text information based on the matching results.
[0083] Understandably, based on the aforementioned steps, the news text information to be judged and the corresponding multiple historical news text information in the matching results are determined. The lexical semantics and authenticity of the matched historical news text information can be used as a reference for the authenticity of the news text information to be judged. However, it is necessary to first evaluate the reference value of each matched historical news text information to be judged, that is, to make a judgment based on the correlation between the two, so as to accurately measure the contribution and reference value of the historical news text information to be judged.
[0084] Further, step S31 includes:
[0085] Step S311: Count the number of keywords in the news text information to be judged and the corresponding historical news text information.
[0086] Specifically, for ease of explanation, the historical news text information that matches the news text information to be judged in the current analysis is defined as the first... Article, that is, around the first The following is an explanation of the historical news text information: If the two matched news texts are highly relevant, then the number of keywords matched between them is greater than the number of keywords in other matching results. The number of keywords in the news text to be judged is denoted as... The matching first The number of keywords in each historical news text is recorded as follows: .
[0087] Step S312: Obtain the probability of each keyword in the news text information to be judged and any corresponding historical news text information, and determine the sum of the keyword probabilities corresponding to the news text information to be judged.
[0088] Understandably, when there are multiple subjects in a news text, there is a distinction between primary and secondary subjects, and a certain degree of importance. The more important subject in the news text to be judged, the higher the relative reference value of the historical news text matched. At the same time, the more consistent the degree of importance of the matched subjects between the two news texts corresponding to the matching results, the higher the relevance between the matched news, and thus the higher the probability that the aforementioned steps determine that it belongs to the keyword, and the higher the degree of importance.
[0089] Specifically, step S2 obtains the probability that each keyword in the news text information to be judged belongs to a keyword, i.e. At the same time, determine the sum of the probabilities of the keywords corresponding to the news text information to be judged, that is... , This indicates the keyword index in the news text information to be judged; This indicates the number of keywords in the news text information to be judged; Indicates the first The probability that each keyword corresponds to a keyword in the news text information to be judged; based on the aforementioned step S2... Similarly, for each word, the probability of all words in each historical news text being keywords of the corresponding historical news text is determined, and then the matching words are targeted. In the historical news text information The first keyword still revolves around the first Each keyword is described as having a probability that it belongs to the news text information to be judged. , belongs to the The probability of keywords in a historical news text is denoted as: .
[0090] Step S313: Based on the number of keywords, the probability of keywords, and the sum of the probabilities of keywords, determine the relevance between the news text information to be judged and the historical news text information currently being analyzed.
[0091] Specifically, assess the news text information to be judged in relation to the first... The relevance of each historical news text is calculated using the following formula:
[0092]
[0093] in, This indicates that the news text information to be judged is related to the first... Relevance of historical news text information; This indicates the number of keywords in the news text information to be judged; Indicates the first The number of keywords in a historical news text message; This indicates a keyword index within the news text. This represents the sum of the probabilities of the keywords corresponding to the news text information to be judged; Indicates the first The probability that each keyword belongs to the keyword information in the news text to be judged; Indicates the first The keyword belongs to the first The likelihood of keywords in a historical news text message; This represents the absolute value operation; It represents a very small positive number.
[0094] It can be explained that, This indicates the news text information to be judged and the first The relative number of keywords matched in the historical news text; the larger this value, the more significant the result. The higher the number of keywords in the historical news text compared to the corresponding news text, the higher the correlation between the two news texts. The keyword importance of the news text information to be judged is indicated in the first place. The consistency of two historical news text messages; the smaller the value, the higher the consistency between the two news text messages; the sum of the probabilities of the keywords corresponding to the news text message to be judged. That is, the sum of the keyness of all keywords in the news text to be judged, and then, using... For consistency Weighting, The larger the value, the more significant the th... The higher the relative importance of keywords in the historical news text information within the news text information to be judged, and the more relevant they are to the first historical news text information, the more important they are to the first historical news text information. The more consistent the key information in the historical news texts, the better. The higher the relevance between historical news text information and the news text information to be judged, the better; finally, the relevance between the two news text information is determined. The larger this value, the more relevant the two news text messages are.
[0095] It should be noted that the keywords belong to news text information. and There are cases where they are equal, so we can use the smallest positive number. To ensure the stability of fractional operations, under normal circumstances, or This is to prevent the calculation results from being meaningless.
[0096] Step S32: Combine word vectors and relevance to evaluate the importance weight of any word in the news text information to be judged in the false judgment process.
[0097] Understandably, the meanings of words used in news texts differ, and the semantics they express are not entirely the same. Some words, such as adverbs of degree of falsehood and exaggeration, are relatively more likely to appear in fake news. For example, words like "extremely," "absolutely," and "completely" are more likely to appear in fake news because they can enhance the impact and persuasiveness of false information. Therefore, these kinds of words need to be given more attention in the process of judging whether something is false. In other words, different words in the news to be judged have different importance in the process of judging whether something is false.
[0098] Further, step S32 includes:
[0099] Step S321: Based on word vectors, filter multiple historical news texts that are most similar to the news text information to be judged, and extract the maximum similarity between words.
[0100] To clarify, word vectors are mathematical vectors used to represent the semantic features of words; similarity, on the other hand, is a quantitative indicator of the degree of semantic relevance between news text information or words, used to reflect the semantic association.
[0101] Further, step S321 includes:
[0102] Step S3211: Based on the word vector of any word in the news text information to be judged, perform semantic matching with all words in any corresponding historical news text information, and filter out multiple historical news text information that are most similar to the news text information to be judged.
[0103] It can be noted that, in this embodiment, based on the first text information to be judged... The more words that appear semantically similar to the word in the historical news texts that match the news text to be judged, the better the word is considered to be. The more valuable a word is for reference, the higher its value.
[0104] Furthermore, in step S3211, multiple historical news text messages that are most similar to the news text message to be judged are selected, specifically as follows:
[0105] A preset judgment threshold is set, and the cosine similarity between any word in the news text to be judged and all words in any historical news text is evaluated. The maximum cosine similarity of the corresponding historical news text is selected and compared with the judgment threshold. The most similar words are marked, and the historical news text that is most similar to the news text to be judged is selected through the most similar words.
[0106] Specifically, in this embodiment, the threshold is determined. It can be specifically configured according to the actual situation; it obtains the first element from the text information to be judged. The word vectors corresponding to each word are: Based on the matching result between the word and the text information to be judged Semantic matching is performed on the words in each historical news text to determine the first... The cosine similarity of each word with all words in each historical news text is calculated, and the highest cosine similarity with each historical news text is selected, along with a judgment threshold. The comparison is performed; if the highest cosine similarity is greater than the judgment threshold... This indicates that the corresponding words are those in the historical news text information that are related to the first word. The most similar words are identified, and the historical news text information corresponding to these most similar words is then used as the most similar historical news text information to the news text information to be judged; conversely, if the highest cosine similarity is less than or equal to the judgment threshold, the judgment is not made. At that time, the corresponding historical news text information is discarded; according to this filtering mechanism, the final result is... The historical news text information that is most similar to the news text information to be judged contains the most similar words.
[0107] Specifically, in actual operation, there is usually no situation where all highest cosine similarities are less than or equal to the judgment threshold. That is, the matching results are obtained based on keyword searches between the news text to be judged and historical news text. News text is often generated based on common event backgrounds, thematic domains, or information sources. Even after editing and wording adjustments, the core content retains a certain degree of relevance. Therefore, there must be some degree of similarity between the news text to be judged and historical news text, making it highly likely that the highest cosine similarity will exceed the preset threshold. Simultaneously, controlling the judgment threshold... The value can also, to some extent, prevent a large amount of non-repeating but similar reasonable news text information from being incorrectly marked as duplicates.
[0108] Step S3212: Obtain the relevance between all the most similar historical news text information and the news text information to be judged, sum them to obtain the sum of relevance, and filter the maximum similarity of any word in each of the most similar historical news text information and the news text information to be judged.
[0109] Specifically, based on the aforementioned steps, a total of [number] results were obtained. The most similar historical news text information is identified, and the correlation between the news text information to be judged and each of the most similar historical news text information is obtained, denoted as . The sum of the correlations is obtained by adding them together, that is... , This represents the relevance index between the news text information to be judged and the most similar historical news text information; simultaneously, based on... Filter all words in the most similar historical news text and compare them with the first word in the news text to be judged. The maximum similarity of 1 word is denoted as . .
[0110] Step S322: Count the number of real news items and fake news items from the most similar historical news text information.
[0111] It can be explained that, among the historical news texts matching the news text information to be judged, there are both real and fake news. If the currently analyzed words are unevenly distributed among real and fake news, that is, appearing relatively more frequently in real or fake news, it indicates that the current words are more important for judging the falsehood of the news text information they are in; that is, based on... Among the most similar historical news texts, the number of those identified as genuine news items is: The number of articles that are considered fake news is .
[0112] Step S323: Based on the combined relevance, maximum similarity, and the number of real and fake news items, generate the importance weight of any word in the news text information to be judged in the fake news judgment process.
[0113] Specifically, the evaluation of the news text information to be judged includes the first... The importance weight of each word in the false positive process is calculated using the following formula:
[0114]
[0115] in, Indicates the first The importance weight of each word in the false alarm process; This represents the index of the most similar historical news text information to the news text information to be judged; This represents the number of historical news texts that are most similar to the news text to be judged. This represents the sum of the relevance between the news text information to be judged and all the most similar historical news text information; This indicates that the news text information to be judged is related to the first... The relevance of the most similar historical news texts; This indicates the first piece of news text information to be judged. The word and the first The maximum similarity of words among the most similar historical news texts; express The number of real news items among the most similar historical news text messages; express The number of fake news items among the most similar historical news texts; This represents absolute value operations.
[0116] It can be explained that, The larger the result value, the more significant the result. The more words a word is associated with, the greater the similarity between words in historical news texts with higher relevance, thus indicating that the first word... The more important a word is in the process of judging whether the news text information is false, the higher its importance will be. The feedback indicates the difference between the number of real and fake news items; the larger the difference, the higher the number of fake news items. The more unevenly a word is distributed between real and fake news, the higher its importance in the process of judging the falsehood of the news text information; therefore, the word is determined to be... The importance weight of each word in the false alarm process The larger this value, the higher the number of the current analysis. The more important a word is in the subsequent false positive detection process, the higher its reference value. According to the... Similarly, the importance weight of each word in the news text to be judged in the false judgment process is determined.
[0117] As explained, in step S4, a logistic regression model is constructed, and then the importance weights are... As weights in the logistic regression model, the model calculates the falsity of the news text information to be judged. Then, the trained logistic regression model and the constructed historical news database are used to judge the falsity of the feedback news text information to be judged, and the judgment result is output. Among them, the logistic regression model is a statistical learning method widely used in classification problems to judge the authenticity of news text information and to label the news text information to be judged. The judgment on the label of the news text information is usually made using verification methods such as k-fold cross-validation to ensure the reliability of the evaluation results.
[0118] Understandably, by comparing and analyzing historical news text information with the news text information to be judged, vocabulary segmentation is performed on the two types of news text information. Keywords are extracted from the news text information to be judged and compared with massive news text information in the historical news database to obtain matching results. The importance index of each word in the news text information to be judged is dynamically quantified, that is, each word in the news text information to be judged is assigned targeted weights. Combined with a logistic regression model, more targeted false judgment results of news text information are obtained, thereby improving the accuracy of false judgment of news text information to be judged.
[0119] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0120] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
Claims
1. A method for extracting information from news text based on a large language model, characterized in that, The method includes: A historical news database is constructed, news text information to be judged is collected, and the historical news database and news text information to be judged are lexically segmented based on a large language model to obtain several words and corresponding word vectors. Analyze each word in the news text information to be judged, extract keywords, and match the keywords with the historical news database to obtain the matching results; Based on the matching results and word vectors, the importance weights of words in the news text information to be judged and the corresponding historical news text information are determined, including: Count the number of keywords in the news text to be judged and the corresponding historical news text. Obtain the probability of each keyword in the news text information to be judged and any corresponding historical news text information, and determine the sum of the keyword probabilities corresponding to the news text information to be judged. By combining the number of keywords, the probability of keywords, and the sum of the probabilities of keywords, the relevance between the news text information to be judged and the historical news text information currently being analyzed is determined. Based on word vectors, multiple historical news texts that are most similar to the news text to be judged are selected, and the maximum similarity between words is extracted. Count the number of real news items and fake news items separately from the most similar historical news text information; By combining relevance, maximum similarity, and the number of real and fake news items, the importance weight of any word in the news text to be judged in the fake news judgment process is generated. The evaluation of the news text information to be judged is the first The importance weight of each word in the false positive process is calculated using the following formula: ; in, Indicates the first The importance weight of each word in the false alarm process; This represents the index of the most similar historical news text information to the news text information to be judged; This represents the number of historical news texts that are most similar to the news text to be judged. This represents the sum of the relevance between the news text information to be judged and all the most similar historical news text information; This indicates that the news text information to be judged is related to the first... The relevance of the most similar historical news texts; This indicates the first piece of news text information to be judged. The word and the first The maximum similarity of words among the most similar historical news texts; express The number of real news items among the most similar historical news text messages; express The number of fake news items among the most similar historical news texts; This represents the absolute value operation; Construct a logistic regression model, use importance weights to make false judgments on the news text information to be judged, and output the judgment results; Analyze each word in the news text to be judged, extract keywords, and match these keywords with a historical news database to obtain matching results, including: A comprehensive analysis of the vocabulary in the news text information to be judged is conducted to determine the probability that each word belongs to a keyword, and the keywords in the news text information to be judged are then selected. The system uses keywords to search the historical news database and marks several corresponding historical news texts that contain the same keywords. A comprehensive analysis of the vocabulary in the news text to be judged is conducted to determine the probability that each word is a keyword, and keywords in the news text to be judged are selected, including: Count the number of occurrences of each word in the news text to be judged, and filter for the word with the highest frequency of occurrence; In the news text information to be judged, determine the total number of words and the position of each word in any sentence; By combining the maximum frequency of occurrence, the total number of words, and the word position, the likelihood that each word belongs to the keyword of the news text information to be judged is assessed; Keywords are extracted from the news text information to be judged based on probability.
2. The news text information extraction method based on a large language model according to claim 1, characterized in that, A historical news database is constructed, and news text information to be judged is collected. Based on a large language model, the historical news database and the news text information to be judged are segmented into words, resulting in several words and their corresponding word vectors, including: We will compile existing open-source datasets containing both real and fake news, construct a historical news database, and collect news text information to be judged from news websites. Based on a large language model, all historical news text information and news text information to be judged in the historical news database are segmented into several words, and semantic quantization is performed on the words to obtain the corresponding word vectors.
3. The news text information extraction method based on a large language model according to claim 1, characterized in that, Keywords are extracted from the news text information to be judged based on probability, specifically: A preset filtering threshold is used to compare the probability of each word belonging to the keywords of the news text to be judged. If the probability is greater than the filtering threshold, it is marked as a keyword. If the probability of all words belonging to the keywords of the news text to be judged is less than or equal to the filtering threshold, the word with the highest probability is selected as the keyword.
4. The news text information extraction method based on a large language model according to claim 1, characterized in that, Based on word vectors, multiple historical news texts most similar to the news text to be judged are selected, and the maximum similarity between words is extracted, including: Based on the word vector of any word in the news text information to be judged, semantic matching is performed with all words in any corresponding historical news text information, and multiple historical news text information that are most similar to the news text information to be judged are selected. Obtain the relevance between all the most similar historical news texts and the news text to be judged, sum the relevances, and then filter the maximum similarity between each of the most similar historical news texts and any word in the news text to be judged.
5. The news text information extraction method based on a large language model according to claim 4, characterized in that, Filter through multiple historical news texts that are most similar to the news text to be judged, specifically: A preset judgment threshold is set, and the cosine similarity between any word in the news text to be judged and all words in any historical news text is evaluated. The maximum cosine similarity of the corresponding historical news text is selected and compared with the judgment threshold. The most similar words are marked, and the historical news text that is most similar to the news text to be judged is selected through the most similar words.