Media fake news detection method and system based on long text feature extraction optimization

By using BERT's attention network layer and data alignment method in Chinese social media fake news detection, it solves the problem of information loss and excessive dimensionality in long text data processing, enhances the feature learning ability and semantic understanding of the model, and achieves More accurate fake news detection.

CN113704473BActive Publication Date: 2024-08-23UNIV OF JINAN
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111005192.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-30
Publication Date
2024-08-23
Estimated Expiration
2041-08-30

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively process long text data in Chinese social media fake news detection, and there are problems of information loss and excessive dimensionality. Moreover, deep learning models have learning biases in the pre-training and fine-tuning stages, and it is difficult to capture deep semantic understanding and long-term text data. distance dependence.

Method used

The attention network layer based on BERT is used to extract long text features. Through data alignment and secondary word masking learning methods, the noise is reduced, the feature dimension is reduced, the model's semantic understanding of long texts is improved, and the self-attention mechanism is used to capture long texts. distance dependence.

Benefits of technology

It improves the model's feature learning ability for long texts, reduces learning errors in the pre-training and fine-tuning stages, enhances the understanding of context and inter-word dependencies, and improves the model's generalization ability and classification performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113704473B
    Figure CN113704473B
Patent Text Reader

Abstract

The present invention provides a media fake news detection method and system based on long text feature extraction optimization, preprocessing the acquired media data; dividing the preprocessed media data into long text and short text according to the unified length of data alignment, and extracting news text features of corresponding categories in different ways, and outputting vectorized representations of text features; according to the application scenarios of the media data, using different pre-trained deep learning classification models to predict the truth or falsehood of the vectorized representations of text features, and obtaining detection results. The present invention can reduce the data noise problem, solve the learning bias in the pre-training-fine-tuning stage of the autoencoder model, reduce the feature dimension, solve the problem of long text information loss, and improve the feature learning ability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of machine learning and text classification, and relates to a media fake news detection method and system based on long text feature extraction optimization. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] With the rapid development of network technology, we are gradually entering the era of self-media. Compared with traditional news, self-media news has high portability and low threshold, and its quality is generally lower than traditional news. In order to attract readers' attention, fake news events emerge in an endless stream. Not only will it mislead readers who do not know the truth, but it will also cause adverse social impacts.

[0004] Research on fake news detection at home and abroad is mainly divided into traditional machine learning methods and deep learning methods. Traditional machine learning mainly relies on manually extracting news content features, such as statistical features or semantic features. Typical traditional machine learning classifiers include naive Bayes classifier, support vector machine (SVM), decision tree, etc. However, the language pattern of news is highly dependent on specific events and corresponding domain knowledge, so it is difficult to manually create data features. Compared with traditional machine learning methods, deep learning to build neural networks can learn text content representation more accurately. Recurrent neural networks (RNN) and convolutional neural networks (CNN) have been applied to fake news detection respectively. RNN can model the text content representation in time series as feature vectors, and convolutional neural networks (CNN) can extract local and global features from news texts. Later, scholars proposed models such as LSTM, RCNN, and DPCNN. Experimental results show that models based on deep learning have good performance. However, CNN and LSTM have natural defects in extracting semantic features of long texts. Due to the size limit of the convolution kernel, CNN cannot capture long-distance dependencies. Although LSTM overcomes the vanishing gradient problem of RNN when learning long-distance dependencies, it still cannot effectively capture long-distance dependencies. In 2017, Google proposed the Transformer model. The attention mechanism is widely used in various Seq2Seq models and shows strong advantages in semantic learning. Later, some scholars proposed ELMo, which uses bidirectional LSTM to build a language model. Compared with the context-independent word vectors built by traditional neural networks, it can model polysemous words. However, LSTM is a serial mechanism, takes a long time to train, and is less capable than the Transformer model in feature extraction. Compared with the ELMo model, GPT uses Transformer as a feature extractor, which can better capture long-distance language structures. However, due to the use of a unidirectional language model, the learning of context information is not deep enough. BERT uses the Masked Language Model (MLM) learning objective to implement bidirectional language model training, which can learn deeper context understanding than the language model trained unidirectionally. However, BERT only uses the MLM learning objective in the pre-training stage, which leads to learning errors in the pre-training and fine-tuning stages.

[0005] Word embedding is also an important factor in improving model performance. After word embedding is combined with neural networks, it is widely used in natural language processing. ELMo uses a bidirectional long short-term memory network (LSTM) for pre-training, combines word vectors with context to learn word meaning, and converts static word vectors into dynamic word vectors. GPT first proposed unsupervised pre-training and supervised fine-tuning, so that the trained model can better adapt to downstream tasks. BERT uses a bidirectional Transformer structure to train the language model, which makes the model's understanding of the context more profound. In text classification tasks, the data is uneven, which brings difficulties to model training, so data alignment is required before training. Most of the current text classification methods are aimed at short texts, and the usual approach for long text data is to truncate it first and then use the same method as short text to process it. This approach will inevitably lead to the loss of text information. The incomplete text sequence generated will not only lose text features, but also cause text ambiguity. At the same time, the part retained after truncation will also have quite a lot of features that have no or little effect on classification, affecting classification performance.

[0006] At present, the research on fake news detection in Chinese social media mainly focuses on analyzing text features and using classification or sorting methods to evaluate the credibility of text information. There are several main problems in this field:

[0007] Social media data contains a lot of noisy data, such as emojis, punctuation marks, and unreadable codes.

[0008] It is difficult for the model to learn deep semantic understanding, and the autoencoder model has learning biases in the pre-training and fine-tuning stages.

[0009] Research on long text feature representation methods has serious problems of information loss and high dimensionality, and long text cannot capture any long-distance dependencies exceeding the predefined context length. Summary of the invention

[0010] In order to solve the above problems, the present invention proposes a media fake news detection method and system based on long text feature extraction optimization, which can reduce data noise problems, solve the learning bias of the pre-training-fine-tuning stage of the autoencoder model, reduce feature dimensions, solve the problem of long text information loss, and improve feature learning capabilities.

[0011] According to some embodiments, the present invention adopts the following technical solutions:

[0012] A method for detecting fake news in the media based on long text feature extraction optimization includes the following steps:

[0013] Preprocessing the acquired media data;

[0014] The preprocessed media data is divided into long text and short text according to the uniform length of data alignment, and the news text features of the corresponding categories are extracted using different methods to output the vectorized representation of the text features;

[0015] According to the application scenario of the media data, different pre-trained deep learning classification models are used to predict the truth or falsity of the vectorized representation of the text features to obtain the detection results.

[0016] As an optional implementation, the data preprocessing process includes:

[0017] Eliminate invalid and missing values ​​in the data;

[0018] Segment Chinese data on a word-by-word basis to ensure the integrity of the word meaning;

[0019] Remove noise including special characters, punctuation marks and garbled characters from the data.

[0020] As an optional implementation, the uniform length is the average length of the data set. If the length of the preprocessed data is greater than the uniform length, it is classified as long text, otherwise it is classified as short text.

[0021] As an optional implementation, the specific process of extracting news text features of corresponding categories in different ways includes:

[0022] The input of multiple long text instances is processed by the secondary word masking learning method for the fine-tuning stage. Each instance obtains two differently masked tag sequences. The two tag sequences are aligned by edge feature-preserving data to obtain the reconstructed long text feature vector representation.

[0023] For short text data, padding is used to align data, zero is added to the part of the tag sequence that is less than the uniform length, and the BERT pre-trained model is used as the embedding layer to learn the short text feature vector representation;

[0024] The feature vector representations of long text and short text are input into the BERT-based attention network layer to learn the dependencies between words and obtain deep feature representations.

[0025] As a further limitation, the specific process of the data alignment method using edge feature preservation includes:

[0026] Add start bits to each of the two marker sequences;

[0027] By adopting the transfer learning method, the BERT pre-trained model is used as the embedding layer to convert the tag sequence after the step start bit into a vector representation, and obtain two long text feature vector representations;

[0028] Connect the two long text feature vectors end to end and stretch them into a one-dimensional vector;

[0029] Taking the uniform length as the standard length, the one-dimensional vectors are clipped from front to back, and the vectors that are less than the uniform length are eliminated, and finally two reconstructed vectors containing the edge features of the long text are obtained.

[0030] As a further qualification, the specific process of inputting the long text and short text feature vector representations into the BERT-based attention network layer to learn the dependencies between words includes:

[0031] Input the multi-dimensional vector into the BERT-based attention network layer;

[0032] Copy each input data vector into three vector matrices: Query, Key, and Value;

[0033] Take the target word as the query and other words in the context as the key, and calculate the similarity between them;

[0034] The similarity results are normalized into probability distribution using Softmax operation and multiplied with matrix V to obtain the attention weight representation.

[0035] As an optional implementation, according to the application scenario of the media data, the specific process of using different pre-trained deep learning classification models to predict the truth or falsity of the vectorized representation of text features includes:

[0036] According to the specific application scenario, a deep learning classification model is selected, and the deep learning classification model is trained in advance. The trained deep learning classification model is used to decode the vector representation of the obtained text features to obtain the final detection result.

[0037] A media fake news detection system based on long text feature extraction optimization, including:

[0038] A data preprocessing module, configured to preprocess the acquired media data;

[0039] The feature encoding module is configured to classify the preprocessed media data into long text and short text according to the uniform length of data alignment, and extract news text features of corresponding categories in different ways, and output vectorized representation of text features;

[0040] The feature decoding module is configured to process the vectorized representation of the text features using different pre-trained deep learning classification models according to the application scenarios of the media data to obtain detection results.

[0041] A computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor of a terminal device and executing the steps of the method.

[0042] A terminal device includes a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; the computer-readable storage medium is used to store multiple instructions, wherein the instructions are suitable for being loaded by the processor and executing the steps of the method.

[0043] Compared with the prior art, the present invention has the following beneficial effects:

[0044] The present invention adopts a deep learning method instead of a traditional machine learning method, which can learn text content representation more accurately.

[0045] During the processing, the present invention pre-processes the data according to the characteristics of Chinese social media data to reduce data noise.

[0046] When processing long texts, the present invention utilizes an optimized long text feature extraction method to improve the model's ability to learn key features of an unbalanced data set; uses a secondary word masking target for the fine-tuning stage for training to solve the learning deviation between the pre-training and fine-tuning stages of the autoencoder model; and adopts a data alignment method that retains edge features to learn the complete semantic information of the long text.

[0047] The present invention uses a BERT-based attention network layer to capture long-distance dependencies and uses the self-attention mechanism to enhance the learning of contextual semantics and inter-word dependencies. The model is allowed to connect different classifiers according to different application scenarios, improving the model's generalization ability for different types of samples.

[0048] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0050] Figure 1 It is a schematic diagram of the overall process of Embodiment 1;

[0051] Figure 2 It is a schematic diagram of the long text processing flow of the first embodiment;

[0052] Figure 3 is a schematic diagram of a word shielding mechanism of the first embodiment;

[0053] Figure 4 It is a schematic diagram of the system architecture of Example 2. DETAILED DESCRIPTION

[0054] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0055] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0056] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0057] Embodiment 1:

[0058] like Figure 1 As shown, this embodiment provides a Chinese social media fake news detection method based on long text feature extraction optimization, which mainly includes: data preprocessing, data feature encoding, and data feature decoding processes.

[0059] Data preprocessing: Given a news dataset N = {n1, n2, n3, ..., n d} and news label set Y = {y1,y2,y3,...,y d}, each piece of news data n corresponds to a label y. In order to enhance the model feature learning effect, the news data n is preprocessed before being input into the model to obtain a token sequence X. The data preprocessing includes data cleaning, Chinese word segmentation and stop word removal.

[0060] The data cleaning removes invalid and missing values ​​in the training set, such as samples containing only emoticons or neutral attitudes. Such samples are not only irrelevant to the classification of true and false news, but also affect the model's learning of features. At the same time, regularization operations are performed on data samples, mainly including unifying word capitalization and deleting punctuation marks.

[0061] The Chinese word segmentation refers to dividing continuous character sequence data into words according to the grammatical characteristics of Chinese data.

[0062] The stop word removal refers to deleting some meaningless characters, words or symbols in the text sequence. Such characters have no actual meaning and have no effect on classification, but will affect the learning efficiency of the model.

[0063] Data feature encoding: such as Figure 2 As shown, the preprocessed text sequence X = {x1, x2, x3, ..., x d} as the input of the model, and use the generative model to capture contextual information from the input sequence, and output the feature vector V = {v1,v2,v3,...,v d}, where x is a token and v is the vector representation corresponding to x. The data feature coding includes long text data feature coding, short text data feature coding and deep feature extraction.

[0064] The pre-processed data is divided into long text and short text according to the uniform length Seq_len of data alignment, and news text features are extracted in different ways to output the vectorized representation of the features;

[0065] The uniform length Seq_len for data alignment is defined to be approximately equal to the average length of the data set and is an integer power of 2. According to the relationship between the length of the preprocessed data and Seq_len, it is divided into long text and short text. If the data length is greater than Seq_len, it is divided into long text, otherwise it is divided into short text.

[0066] The long text data feature encoding mainly includes a secondary word masking learning method for the fine-tuning stage and a data alignment method for retaining edge features.

[0067] The two-time word masking learning method eliminates the pre-training-fine-tuning learning error of the autoencoder model by masking the token sequence in the fine-tuning stage. The purpose of using two word masking is to prevent the key words from being masked, which causes the model to be unable to learn key features. d}, select 15% of the tokens for processing.

[0068] like Figure 3 As shown in the figure, for the target masked token x, there is an 80% probability of replacing it with a special token [MASK], a 10% probability of replacing it with another token in the sequence X, and a 10% probability of remaining unchanged. d}After the secondary word masking method, two masked text sequences are obtained and text sequence

[0069] The data alignment method for retaining edge features obtains a vector representation containing all features of the original news data by overall reconstruction of feature vectors of two text sequences after masking learning.

[0070] First, add the start bit x0 = [CLS] to the text sequences X1 and X2, and we get and The start bit [CLS] mark is used to indicate the beginning of data and distinguish it from the previous data.

[0071] Secondly, using the BERT pre-trained model as the embedding layer, the token sequences X′1 and X′2 are converted into vector representations to obtain two long text feature vector representations. and The BERT pre-training model can be selected according to specific application scenarios, such as RoBERTa.

[0072] Again, concatenate the eigenvectors V1 and V2 to obtain the concatenated vector

[0073] Finally, with Seq_len as the standard length, V′ is pruned from front to back to obtain a pruned vector set E = {V′1, V′2, …, V′ e}. Then remove the vectors whose length is less than Seq_len in the vector set. Since the incomplete vector only exists at the end of the clipping, only the vector V′ needs to be removed. e Generally speaking, after removing the incomplete vectors, two vectors V′1 and V′2 will remain, which contain all the features of the original news data.

[0074] The feature encoding of short text data uses padding to align the data for short text data, fills [0] for the part of the token sequence that is less than Seq_len, and uses the BERT pre-trained model as the embedding layer to learn the short text feature vector representation.

[0075] Deep feature extraction is performed by combining long text and short text feature vector representations.

[0076] The deep feature extraction captures long-distance dependencies through a BERT-based attention network layer, and uses the self-attention mechanism to strengthen the learning of contextual semantics and inter-word dependencies. The attention network layer consists of 8 identical neural network layers, each with 4 sublayers, including a multi-head attention layer, a residual connection layer, a feedforward neural network layer, and a second residual connection layer. The word embedding matrix V obtained by data feature encoding of long and short texts is input into the attention network layer to learn self-attention. Each sublayer of the attention network layer goes through the following steps:

[0077] First, the word embedding matrix is ​​input into the multi-head attention layer, and the Query vector (Q), Key vector (K), and Value vector (V) of each token are projected h times by different linear projections. Here, h times is called multi-head.

[0078] Secondly, we calculate the scaled dot product Attention in parallel, i.e. head i =Attention(QW i Q ,KW i K ,VW i V ), where the matrix W i Q , W i K , W i V Refers to the different weight parameters to be trained. Since the multi-head attention layer has h heads, the matrix W has h dimensions, W i Represents the i-th dimension of the W matrix.

[0079] Again, concatenate the results of h times of zoom-click Attention, and perform another linear transformation to obtain the multi-head attention representation, H = MultiHead(Q, K, V) = Concat(head1, head2, …, head h )W o . Where W o is the weight parameter to be trained.

[0080] Finally, the multi-head attention representation is residually connected and normalized, and then nonlinearly transformed to obtain the output of each sub-layer, which is also used as the input of the next sub-layer. ReLU is used as the activation function. The specific process is as follows:

[0081] u=tanh(W h H+b)

[0082]

[0083] Where W h is the weight parameter to be trained, and b is the bias term.

[0084] Data feature decoding: The present invention can connect different classifiers according to specific application scenarios. The classifiers are various neural network models, including but not limited to CNN, RNN, and LSTM. Of course, this connection selection can be based on experience or can be verified and determined using sample data to determine a classifier based on specific requirements (such as precision, accuracy, classification speed, etc.).

[0085] In this embodiment, CNN is used as an example for explanation. CNN is mainly composed of convolutional layer, pooling layer and fully connected layer. The deep data feature representation V obtained by the attention network layer is input into CNN for decoding. The specific process is as follows:

[0086] First, the word embedding matrix V is output through the attention network layer att ={v1,v2,v3,...,v d},in R represents the set of real numbers, d w Represents the vector dimension.

[0087] Secondly, the word embedding matrix V att Convolution is performed to extract features. The specific operation is as follows: c = f(W c v+h-1)+b. Where W c is a learnable parameter, b is a bias term, and h is the convolution kernel size. After convolution, the feature matrix C is obtained.

[0088] Again, the feature matrix C is processed by the maximum pooling method to obtain the feature vector c max , and send it to the fully connected layer. After being processed by the fully connected layer, the final text feature vector v is obtained.

[0089] Finally, the model is trained to optimize the network parameters, such as using the cross entropy loss function to train the model parameters to minimize the objective function loss and obtain the optimal network structure.

[0090] Embodiment 2:

[0091] A media fake news detection system based on long text feature extraction optimization, such as Figure 4 As shown, including:

[0092] A data preprocessing module, configured to preprocess the acquired media data;

[0093] The feature encoding module is configured to classify the preprocessed media data into long text and short text according to the uniform length of data alignment, and extract news text features of corresponding categories in different ways, and output vectorized representation of text features;

[0094] A feature decoding module is configured to process the vectorized representation of text features using different pre-trained deep learning classification models according to the application scenarios of the media data to obtain detection results;

[0095] The prediction display module obtains the detection results and feeds them back to the user using a visual interface.

[0096] The log module is configured to record historical detection records within a certain period of time, which is convenient for users to view at any time.

[0097] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented 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.

[0098] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0099] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0100] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0101] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

[0102] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. A media fake news detection method based on long text feature extraction optimization, characterized by: The following steps are involved: Preprocessing the acquired media data; The preprocessed media data is divided into long text and short text categories according to the uniform length of data alignment, and the news text features of the corresponding categories are extracted using different methods to output the vectorized representation of the text features; According to the application scenario of the media data, different pre-trained deep learning classification models are used to predict the truth or falsity of the vectorized representation of the text features to obtain the detection results; The specific process of extracting news text features of corresponding categories in different ways includes: The input of multiple long text instances is processed by the secondary word masking learning method for the fine-tuning stage. Each instance obtains two differently masked tag sequences. The two tag sequences are aligned by edge feature-preserving data to obtain the reconstructed long text feature vector representation. For short text data, padding is used to align data, zero is added to the part of the tag sequence that is less than the uniform length, and the BERT pre-trained model is used as the embedding layer to learn the short text feature vector representation; Input the feature vector representation of long text and short text into the BERT-based attention network layer to learn the dependencies between words and obtain deep feature representation; The specific process of using the data alignment method that preserves edge features includes: Add start bits to each of the two marker sequences; By adopting the transfer learning method, the BERT pre-trained model is used as the embedding layer to convert the tag sequence after the step start bit into a vector representation, and obtain two long text feature vector representations; Connect the two long text feature vectors end to end and stretch them into a one-dimensional vector; Using a uniform length as the standard length, the one-dimensional vectors are clipped from front to back, and vectors with less than the uniform length are removed, and finally two reconstructed vectors containing the edge features of the long text are obtained; The specific process of inputting the feature vector representation of long text and short text into the BERT-based attention network layer to learn the dependency relationship between words includes: Input the multi-dimensional vector into the BERT-based attention network layer; Copy each input data vector into three vector matrices: Query, Key, and Value; Take the target word as the query and other words in the context as the key, and calculate the similarity between them; The similarity results are normalized into probability distribution using Softmax operation and multiplied with matrix V to obtain the attention weight representation.

2. The method for detecting fake news in the media based on long text feature extraction optimization as claimed in claim 1, characterized in that: The pretreatment process includes: Eliminate invalid and missing values ​​in the data; Segment Chinese data on a word-by-word basis to ensure the integrity of the word meaning; Remove noise including special characters, punctuation marks and garbled characters from the data.

3. The method for detecting fake news in the media based on long text feature extraction and optimization as claimed in claim 1, characterized in that: The uniform length is the average length of the data set. If the length of the preprocessed data is greater than the uniform length, it is classified as a long text, otherwise it is classified as a short text.

4. The method for detecting media fake news based on long text feature extraction optimization as claimed in claim 1, characterized in that: According to the application scenario of the media data, the specific process of using different pre-trained deep learning classification models to predict the truth or falsehood of the vectorized representation of text features includes: According to the specific application scenario, a deep learning classification model is selected, and the deep learning classification model is trained in advance. The trained deep learning classification model is used to decode the vector representation of the obtained text features to obtain the final detection result.

5. A media fake news detection system based on long text feature extraction optimization, characterized by: include: A data preprocessing module, configured to preprocess the acquired media data; The feature encoding module is configured to classify the preprocessed media data into long text categories and short text categories according to the uniform length of data alignment, and extract news text features of the corresponding categories in different ways, and output vectorized representations of the text features; A feature decoding module is configured to process the vectorized representation of text features using different pre-trained deep learning classification models according to the application scenarios of the media data to obtain detection results; The specific process of extracting news text features of corresponding categories in different ways includes: The input of multiple long text instances is processed by the secondary word masking learning method for the fine-tuning stage. Each instance obtains two differently masked tag sequences. The two tag sequences are aligned by edge feature-preserving data to obtain the reconstructed long text feature vector representation. For short text data, padding is used to align data, zero is added to the part of the tag sequence that is less than the uniform length, and the BERT pre-trained model is used as the embedding layer to learn the short text feature vector representation; Input the feature vector representation of long text and short text into the BERT-based attention network layer to learn the dependencies between words and obtain deep feature representation; The specific process of using the data alignment method that preserves edge features includes: Add start bits to each of the two marker sequences; By adopting the transfer learning method, the BERT pre-trained model is used as the embedding layer to convert the tag sequence after the step start bit into a vector representation, and obtain two long text feature vector representations; Connect the two long text feature vectors end to end and stretch them into a one-dimensional vector; Using a uniform length as the standard length, the one-dimensional vectors are clipped from front to back, and vectors with less than the uniform length are removed, and finally two reconstructed vectors containing the edge features of the long text are obtained; The specific process of inputting the feature vector representation of long text and short text into the BERT-based attention network layer to learn the dependency relationship between words includes: Input the multi-dimensional vector into the BERT-based attention network layer; Copy each input data vector into three vector matrices: Query, Key, and Value; Take the target word as the query and other words in the context as the key, and calculate the similarity between them; The similarity results are normalized into probability distribution using Softmax operation and multiplied with matrix V to obtain the attention weight representation.

6. A computer-readable storage medium, characterized in that: There are a plurality of instructions, which are suitable for being loaded by a processor of a terminal device and executing the steps of the method according to any one of claims 1-4.

7. A terminal device, characterized in that: The method comprises a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; and the computer-readable storage medium is used to store a plurality of instructions, wherein the instructions are suitable for being loaded by the processor and executing the steps of the method according to any one of claims 1 to 4.