Standard detection method based on text semantic mining and external associated knowledge fusion

Through the method of fusion of text summary and external knowledge, the field-related text fragments are established and emotional and knowledge embedding vectors are extracted, which solves the problem of semantic sparsity and insufficient knowledge utilization in position detection, and improves the detection accuracy and generalization ability of the model in small sample and zero sample scenarios.

CN120541227APending Publication Date: 2025-08-26CHENGDU KAIYUAN ZHIYI TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510635071.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-08-26

AI Technical Summary

Technical Problem

When processing long texts or texts with sparse emotional expressions, existing position detection methods are susceptible to noise interference, making it difficult to effectively capture position-related semantics, and failing to make full use of external knowledge sources, resulting in insufficient generalization capabilities in small-sample and zero-sample scenarios.

Method used

The pre-trained text summary model creates field-related text fragments, combines the emotion encoder to extract the emotion embedding vector, and extracts relational and factual knowledge embedding vectors from the common sense knowledge graph and Wikipedia, and uses a multi-layer perceptron for fusion classification.

Benefits of technology

It improves the accuracy and robustness of position detection, and significantly improves the detection performance in small sample and zero sample scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120541227A_ABST
    Figure CN120541227A_ABST
Patent Text Reader

Abstract

The invention provides a standing field detection method based on text semantic mining and external associated knowledge fusion, and belongs to the technical field of artificial intelligence and natural language processing. The method comprises the following steps: constructing a semantic mining module, and extracting emotional expressions related to a standing site through a text filter; constructing an external knowledge embedding module, and extracting subject-related factual and relational knowledge from the common knowledge graph and the Wikipedia text; the output of semantic mining and the output of external knowledge embedding are fused through a two-dimensional knowledge fusion module, and unified text-topic representation is constructed; and finally, classifying the fused representation through a multi-layer perceptron, and outputting a vertical label. The method can be widely applied to scenes of public opinion analysis, recommendation systems, social media monitoring and the like, and particularly has relatively high accuracy and robustness in small sample and zero sample scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence and natural language processing technology, and in particular to a stance detection method based on the fusion of text semantic mining and external association knowledge. Background Art

[0002] Stance detection is a crucial task in natural language processing, aiming to analyze a text's attitude toward a specific topic (e.g., support, opposition, or neutrality). It is widely used in fields such as public opinion analysis, recommender systems, and social media monitoring. However, existing methods struggle to effectively capture stance-related semantics, particularly when processing long texts or texts with sparse sentiment. They are susceptible to noise interference, resulting in insufficient stance classification accuracy. Furthermore, existing techniques fail to fully leverage external knowledge sources such as commonsense knowledge graphs and Wikipedia, failing to effectively address the limitations of internal semantic representation in texts. This performance is particularly poor when processing texts with complex semantic relationships or those that rely on background knowledge. Furthermore, existing methods often rely on single-dimensional knowledge representation, focusing only on relational or factual knowledge, making it difficult to comprehensively model complex semantic relationships and background knowledge. Finally, existing techniques perform poorly when processing long-tail data and are unable to effectively mitigate class imbalance, resulting in insufficient generalization in small- and zero-shot scenarios. Therefore, integrating text semantic mining with external contextual knowledge to improve stance detection performance in small- and zero-shot scenarios remains an urgent challenge. Summary of the Invention

[0003] To address the aforementioned shortcomings of existing technologies, the present invention provides a stance detection method based on text semantic mining and the fusion of external relational knowledge. This method addresses the poor performance of existing stance detection methods in handling the sparsity of text sentiment and stance semantics, as well as their poor adaptability to small- and zero-shot scenarios due to their lack of utilization of factual and relational external knowledge.

[0004] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is: A stance detection method based on text semantic mining and external association knowledge fusion includes the following steps: The original text is filtered through a pre-trained text summarization model to generate stance-related text fragments, and a sentiment encoder is used to extract sentiment embedding vectors; Extract topic-related subgraphs from the commonsense knowledge graph and use graph neural networks to encode the subgraphs to generate relational knowledge embedding vectors; Based on external knowledge text data, a pre-trained language model is used to generate factual knowledge embedding vectors; Fuse the sentiment embedding vector, relational knowledge embedding vector, and factual knowledge embedding vector to generate a comprehensive feature vector; The comprehensive feature vector is classified by a multi-layer perceptron and the stance detection result is output.

[0005] Furthermore, the original text is filtered through the pre-trained text summarization model to generate position-related text fragments including: A Transformer-based pre-trained text summarization model is used to extract summaries of the input original text and topics to generate stance-related text fragments.

[0006] Furthermore, the emotion encoder is used to extract the emotion embedding vector including: The filtered text is encoded using a BERT-based sentiment encoder to output a sentiment embedding vector.

[0007] Furthermore, topic-related subgraphs are extracted from the common sense knowledge graph, including: Using the common sense knowledge graph as the base graph, the nouns, adjectives, and adverbs extracted from the original text and topics are used as seeds. Starting from the extracted seeds, a breadth-first search is performed in the common sense knowledge graph to obtain concepts and relationships directly connected to the seeds. Nodes and edges within two levels of distance from the seed are retained to construct a subgraph related to the topic.

[0008] Furthermore, using graph neural networks to encode subgraphs to generate relational knowledge embedding vectors includes: The recurrent graph convolutional network is used to embed the subgraph, which can be expressed as:

[0009] in, is the encoder network, is the activation function, is the normalization constant, , To learn the parameters, For nodes Adjacent nodes The eigenvector of For nodes The eigenvector of l is the number of layers in the recurrent graph convolutional network, is a set of relations, Through relationships and concept adjacent sets of concepts; After two layers of recurrent graph convolutional network encoding, the stance aggregation feature vector of each concept is obtained, which is expressed as:

[0010]

[0011] in, After a layer of encoding, the concept i The position aggregation feature vector, After two layers of coding, the concept i The position aggregation feature vector, is the initial concept feature vector; The average value of the feature vectors of all concepts in the subgraph is used as the relational knowledge embedding vector, which is expressed as:

[0012] in, is the relational knowledge embedding vector, is the set of nodes in the subgraph.

[0013] Furthermore, based on external knowledge text data, a pre-trained language model is used to generate factual knowledge embedding vectors, including: Search Wikipedia introduction text using the topic as a keyword; Use BERT to perform deep semantic encoding on the retrieved text, generate contextual embeddings for each word and entity, and then average pool the contextual embeddings to obtain factual knowledge embedding vectors.

[0014] Furthermore, the sentiment embedding vector, relational knowledge embedding vector, and factual knowledge embedding vector are fused to generate a comprehensive feature vector, including: The sentiment embedding vector, relational knowledge embedding vector, and factual knowledge embedding vector are tensor-connected according to their dimensions to obtain a comprehensive feature vector.

[0015] Furthermore, the comprehensive feature vector is transformed into a multi-layer perceptron.

[0016] Furthermore, the comprehensive feature vector is classified by a multi-layer perceptron and the stance detection result is output, specifically:

[0017] in, is the probability distribution of stance labels, for, is a multi-layer perceptron, is the sentiment embedding vector, is the relational knowledge embedding vector, Embedding vector for factual knowledge.

[0018] Furthermore, the multi-layer perceptron uses cross entropy as the loss function for training, specifically:

[0019] in, is the loss function, is the true position label, Predict labels for stances, is the L2 regularization coefficient, are the trainable parameters of the model, is the dimension of the true stance label, The dimension of the stance prediction label.

[0020] The present invention has the following beneficial effects: The present invention effectively solves the problem of sentiment semantic sparsity through text filters and sentiment encoders, thereby improving the accuracy of stance detection. By integrating common sense knowledge graphs with Wikipedia texts, the invention supplements the deficiencies in the text's internal semantics and enhances the robustness of the model. Through multi-dimensional knowledge fusion, the invention significantly improves the generalization ability of the model in small-sample and zero-sample scenarios, thereby improving the accuracy of stance detection in these scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 This is a flowchart of a stance detection method based on the fusion of text semantic mining and external related knowledge; Figure 2 Schematic diagram of text semantic mining; Figure 3 Schematic diagram for embedding common sense knowledge graph; Figure 4 Embedding schematic diagram for external textual knowledge. DETAILED DESCRIPTION

[0022] The specific embodiments of the present invention are described below to facilitate understanding of the present invention by those skilled in the art. However, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the appended claims, these changes are obvious, and all inventions and creations utilizing the concepts of the present invention are protected.

[0023] This embodiment provides a stance detection method based on text semantic mining and the fusion of external related knowledge. By fusing the stance semantics in the text with external related background knowledge, the accuracy and generalization ability of the stance detection model in small sample and zero-sample scenarios are improved.

[0024] like Figure 1 As shown, an embodiment of the present invention provides a stance detection method based on text semantic mining and external related knowledge fusion, including the following steps S1 to S5: S1. Filter the original text through the pre-trained text summarization model to generate stance-related text fragments, and use the sentiment encoder to extract the sentiment embedding vector; In an optional embodiment of the present invention, step S1 filters the original text using a pre-trained text summarization model to generate stance-related text segments, including: A Transformer-based pre-trained text summarization model is used to extract summaries of the input original text and topics to generate stance-related text fragments.

[0025] Step S1 uses the emotion encoder to extract the emotion embedding vector, including: The filtered text is encoded using a BERT-based sentiment encoder to output a sentiment embedding vector.

[0026] like Figure 2 As shown, to effectively extract sentiment expressions related to stances, this embodiment uses a method that combines text summarization technology and sentiment analysis technology. First, a stance-related text filter is introduced. The main concept of a text filter is to emphasize sentiment expressions related to stances by filtering out text containing irrelevant background information or neutral sentiment statements. In this method, text summarization technology is used as the implementation of this text filter. The reason for using a text summarization model is that text summarizers are designed to compress a given text into a more concise version, thereby capturing the essential information in the original document.

[0027] By summarizing the text, when the overall sentiment of the text is not neutral, the sentiment encoder can delete most of the neutral sentiment sentences to obtain a non-neutral sentiment summary related to the topic. In this embodiment, the Flan-T5 pre-trained summary model obtained from huggingface is used.

[0028] Sample text: …I totally agree with this premise. As a younger person I wasagainst Nuclear power (I was in college during 3 mile island)… The sample text obviously has non-neutral emotions. After the text filter, the redundant emotional information brought by the statement can be removed. Each text document in Feed it into the text filter to get the filtered , the filtered documents are represented as:

[0029] After completing the stance-related text filtering, the sentiment of the text is encoded through the sentiment analysis model. The sentiment encoder of this method uses a BERT-based model that has been trained with sentiment masks and is called SentiBERT. In this embodiment, the twitter-roberta-base-sentiment-latest pre-trained sentiment analysis model obtained from huggingface is used. As input. Since BERT requires Enter data in the form of , the encoder connects instances with corresponding topics as And input it into SentiBERT to obtain the following sentiment embedding :

[0030] Through the above steps, this embodiment can effectively solve the problem of sentiment semantic sparsity and improve the accuracy of stance detection.

[0031] S2. Extract topic-related subgraphs from the commonsense knowledge graph and use graph neural networks to encode the subgraphs to generate relational knowledge embedding vectors. In an optional embodiment of the present invention, Figure 3 As shown, in order to extract subgraphs related to text and topics from the common sense knowledge graph and generate relational knowledge embeddings, this embodiment adopts the following steps: First, unique nouns, adjectives, and adverbs are extracted from the original text and topics as seed concepts. These seed concepts are used to search in the common sense knowledge graph to obtain relevant background knowledge. Specifically, this embodiment uses the open source common sense knowledge graph ConceptNet as the base graph. The extraction of seed concepts can be achieved by:

[0032] in, Represents a set of seed concepts extracted from the original text.

[0033] Next, starting with these seed concepts, we perform a breadth-first search (BFS) in ConceptNet to obtain concepts and relationships directly connected to the seed concepts. To ensure the relevance and compactness of the subgraph, we only retain nodes and edges within two levels of distance from the seed concepts. Specifically, the subgraph construction process can be expressed as:

[0034] in, represents the set of nodes in the subgraph, Represents the set of edges in a subgraph.

[0035] After extracting the subgraph, the subgraph is encoded using a graph neural network to generate a graph feature vector This embodiment uses the recurrent graph convolutional network (RGCN) for graph embedding, and the graph encoder encodes the subgraph using the following formula:

[0036] in, is the encoder network, Indicates through relationship and concept adjacent sets of concepts; is a normalizing constant; is an activation function, such as ReLU; and are parameters that can be learned through training.

[0037] Specifically, the initialization concept feature vector of the graph encoder is Generated by:

[0038] in, It is a concept node in the subgraph.

[0039] After two layers of RGCN encoding, this embodiment obtains the stance aggregation feature vector of each concept :

[0040]

[0041] Finally, the average of the feature vectors of all concepts in the subgraph is used as the graph feature vector :

[0042] Through the above steps, this embodiment can effectively extract common sense knowledge related to the topic and convert it into relational knowledge embedding, providing rich background knowledge support for subsequent stance detection.

[0043] S3. Generate factual knowledge embedding vectors using a pre-trained language model based on external knowledge text data; In an optional embodiment of the present invention, Figure 4 As shown, in order to obtain topic-related text from external text resources and generate factual knowledge embedding, this embodiment adopts the following steps: First, we search for Wikipedia introduction text using the topic as a keyword. Specifically, we use the Wikipedia API or a pre-built Wikipedia knowledge base to enter the topic keywords, search for relevant Wikipedia pages, and extract the page introduction text. This introduction text serves as the initial textual representation of factual external knowledge. The following is an example of the retrieved Wikipedia text: Topic: Affirmative Actions Wikipedia text: The term affirmative action refers to a policy aimed at increasing workplace or educational opportunities for underrepresented parts of society. These programs are commonly implemented by businesses and governments by taking individuals' race, sex, religion, or national origin into account. Affirmative action focuses on demographics with historically low representation in leadership, professional, and academic roles and is often considered a means of countering discrimination against particular groups. Next, we use BERT to encode the retrieved text. This example uses the bert-base-uncased pre-trained model obtained from huggingface. The input format is `[CLS] original text [SEP] topic [SEP] Wikipedia text [SEP]`, and the output text feature vector is Specifically, the BERT encoder is implemented in the following way:

[0044] During the encoding process, the BERT model performs deep semantic encoding on the input sequence and generates contextual embeddings for each word and entity. Finally, the embeddings of the entire sequence are average pooled to obtain the text feature vector :

[0045] in, is the length of the input sequence, It is The embedding vector of each word.

[0046] Through the above steps, this embodiment can effectively obtain factual background knowledge related to the topic and convert it into factual knowledge embedding, providing rich external information support for subsequent stance detection.

[0047] S4, fusing the sentiment embedding vector, the relational knowledge embedding vector, and the factual knowledge embedding vector to generate a comprehensive feature vector; In an optional embodiment of the present invention, in order to fuse the extracted sentiment features with the two knowledge embeddings, construct a comprehensive feature vector, and integrate internal semantics and external knowledge, this embodiment adopts the following steps: First, embed emotions , relational knowledge embedding and factual knowledge embedding Perform tensor concatenation. Specifically, concatenate these three feature vectors into a comprehensive feature vector according to their dimensions. The generation process of the comprehensive feature vector can be expressed as:

[0048] Among them, the symbol " " represents a tensor connection operation.

[0049] After tensor concatenation, in order to further enhance the expressiveness of features, the comprehensive feature vector can be transformed by multi-layer perceptron (MLP).

[0050] Through the above steps, this embodiment effectively integrates sentiment features and external knowledge to construct a comprehensive feature vector, providing rich semantic information for subsequent stance classification. This multi-dimensional knowledge fusion method not only improves model accuracy but also enhances its generalization capabilities in small and zero-sample scenarios.

[0051] S5. Classify the comprehensive feature vector through a multi-layer perceptron and output the stance detection result.

[0052] In an optional embodiment of the present invention, step S5 classifies the fused feature vector using a classification algorithm and outputs a label representing the stance of the text on the topic. Specifically, a multi-layer perceptron (MLP) is used to classify the fused feature vector and output a stance label (support, oppose, or neutral). The formula is:

[0053] in, Represents the probability distribution of stance labels, symbol" " represents a tensor connection operation. The model training uses cross entropy as the loss function, and the cross entropy loss is minimized through the standard gradient descent algorithm. The learning objective is defined as follows:

[0054] in, represents the dimension of the pose label, The ground truth labels representing the pose, represents the label predicted by the model, represents the L2 regularization coefficient, Represents the trainable parameters of the model.

[0055] To achieve efficient model training, this example uses the Adam optimizer. Batch training is supported, and a negative sampling mechanism is used to construct training pairs using a positive sample and several negative samples. Furthermore, an early stopping strategy is combined with validation set monitoring metrics to determine the optimal model, ensuring the model's adaptability and accuracy in different scenarios.

[0056] The method of the present invention is verified and explained below with reference to specific examples.

[0057] The proposed method was evaluated on the VAST dataset, released in 2020. This dataset is used to evaluate the performance of stance detection models in few-shot and zero-shot scenarios. The default partitioning of this dataset contains only 13,477 training data items, 2,062 validation data items, and 3,066 test data items. The original text data is quite repetitive, with only 1,845, 682, and 786 unique review items in the training, validation, and test data, respectively. Despite its limited data size, this dataset boasts a large number of topics and includes a significant amount of unlabeled test data, making it the most suitable public dataset for testing stance detection in few-shot and zero-shot scenarios.

[0058] Some specific test examples of this embodiment are as follows: Training Example 1: Subject: Nuclear Power Text: I totally agree with this premise. As a younger person I was against Nuclear power (I was in college during 3 mile island) but now it seems that nuclear should be in the mix. Fission technology is better, and will continue to get better if we actively promote its development. The prospect of fusion energy also needs to be explored. If it's good enough for the sun and the stars, it's good enough for me. Position: Supportive Training Example 2: Topic: illegal immigrants Text: Who is the mayor of N.Y. to assume he has the authority to dole out to illegal immigrants an almost carte blanche sure fire way to be on our sovereign soil, and all they had to do was break our laws by crossing our borders by getting here. If there ever was a way to encourage more of the same acts of disobedience for others to follow this surely would be it. If I was a border patrol agent sworn to serve and protect the citizens of these United States I would consider New York's mayor an enemy to their very cause, and an enemy to all those citizens who are here legally. Position: Opposed Test data example: Test sample 1: Subject: nuclear energy Text: Nuclear energy only provides 8% of U.S. energy. We could easily conserve 8% and then begin the decommissioning of every nuclear power plant. Then we could take the BILLIONS and BILLIONS of dollars thrown at the nuclear industry and invest it in Renewable Energies like Wind and Solar Energy. Germany is HUGELY successful with Wind and Solar Energy. Germany has produced the energy-equivalent of 20 nuclear power plants (yes 20!!) with Solar Energy alone! They are having the same success with Wind Energy. This success in Renewable Energy proves how obsolete and unnecessary nuclear energy is. Position: Against Test example 2: Topic: a harmful atmosphere for gays Text: ""Yet that same Bible gives us Christians a particularanthropology, and reveals to us the meaning of sex and marriage within the cosmic order."" And herein lies the problem. If you look to a ""holy"" bookwritten long, long ago and betraying its human origins on every page for guidance on issues of cosmology, biology, sexuality and other human and natural sciences, you will inevitably be in constant conflict with socialprogress and, indeed, reality. There is no secular opposition. tohomosexuality. Position: Oppose In terms of training details, the model was trained using the Adam optimizer on a single GPU (Nvidia GeForce RTX 4090 24GB), with an initial learning rate of 8.14e-6 and a training batch size of 16. These parameters were automatically selected as optimal hyperparameters by the NNI automated training method. During training, the best model checkpoint was saved based on the F1 performance on the validation set. Furthermore, the standard training / validation / test set splitting method used by VAST was followed.

[0059] To verify the effectiveness of our method, we conducted comparative experiments with BiCond, Cross-Net, SEKT, BERT-sep, BERT-joint, TGA-Net, TSDA, CKE-Net, BS-RGCN, WS-BERT, and TarBK-BERT, representing the most effective existing stance detection methods. We used macro-F1 as the evaluation metric, evaluating the performance of the methods across all labels and the support / opposition / neutral sub-labels, to measure our method's stance detection capabilities, as shown in Table 1.

[0060] Table 1

[0061] Table 1 shows that our method achieves outstanding performance across all sub-indicators. In particular, compared to CKE-Net and BS-RGCN, our method achieves 5.9% and 4.9% higher macro F1 scores, respectively, demonstrating its significant advantage in incorporating factual and relational knowledge. Compared to WS-BERT and TarBK-BERT, our method achieves 1.5% and 2.4% higher macro F1 scores, respectively, further demonstrating the importance of internal semantic mining alongside the incorporation of external knowledge.

[0062] Furthermore, our method achieves significantly higher macro F1 scores for the "neutral" label than other baseline models, demonstrating that the model effectively models the relationship between text and the target. Our method also achieves significant improvements for the "oppose" and "support" labels, demonstrating that through text filters and knowledge fusion, the model can effectively extract non-neutral sentiment to assist in stance modeling. These results demonstrate the superiority and robustness of our method in stance detection tasks.

[0063] The event detection method of this embodiment can be applied to texts of various types in various fields, such as news, broadcasting, blogs, finance, and judicial fields, to detect events such as birth, marriage, death, attack, defamation, transportation, transfer, and prosecution. Event detection has also been applied in various application scenarios in the industrial field. For example, in the financial field, events that may affect the market are detected in text data such as corporate information, announcements, and financial news, thereby providing traders with the latest information in a timely manner. In the social media field, platforms can use event detection technology to discover news information and monitor current hot news events. In e-commerce and forums, platforms can use event detection technology to monitor after-sales service, product quality, and other issues to promptly discover potential hidden dangers. For example, it can be used by smart car companies to promptly discover product quality defects and avoid accidents.

[0064] 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 flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, 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 flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.

[0065] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work 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 The function specified in one or more boxes.

[0066] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device 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.

[0067] Specific embodiments are used in the present invention to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.

[0068] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and it should be understood that the scope of protection of the present invention is not limited to such specific descriptions and embodiments. Those skilled in the art can make various other specific variations and combinations based on the technical teachings disclosed in the present invention without departing from the essence of the present invention, and such variations and combinations are still within the scope of protection of the present invention.

Claims

1. A stance detection method based on text semantic mining and external related knowledge fusion, characterized by: The following steps are involved: The original text is filtered through a pre-trained text summarization model to generate stance-related text fragments, and a sentiment encoder is used to extract sentiment embedding vectors; Extract topic-related subgraphs from the commonsense knowledge graph and use graph neural networks to encode the subgraphs to generate relational knowledge embedding vectors; Based on external knowledge text data, a pre-trained language model is used to generate factual knowledge embedding vectors; Fuse the sentiment embedding vector, relational knowledge embedding vector, and factual knowledge embedding vector to generate a comprehensive feature vector; The comprehensive feature vector is classified by a multi-layer perceptron and the stance detection result is output.

2. The stance detection method based on text semantic mining and external related knowledge fusion according to claim 1 is characterized in that: The original text is filtered through the pre-trained text summarization model to generate position-related text fragments including: A Transformer-based pre-trained text summarization model is used to extract summaries of the input original text and topics to generate stance-related text fragments.

3. The stance detection method based on text semantic mining and external related knowledge fusion according to claim 1 is characterized in that: The emotion encoder is used to extract the emotion embedding vector including: The filtered text is encoded using a BERT-based sentiment encoder to output a sentiment embedding vector.

4. The stance detection method based on text semantic mining and external related knowledge fusion according to claim 1 is characterized in that: Extracting topic-related subgraphs from the commonsense knowledge graph includes: Using the common sense knowledge graph as the base graph, the nouns, adjectives, and adverbs extracted from the original text and topics are used as seeds. Starting from the extracted seeds, a breadth-first search is performed in the common sense knowledge graph to obtain concepts and relationships directly connected to the seeds. Nodes and edges within two levels of distance from the seed are retained to construct a subgraph related to the topic.

5. The stance detection method based on text semantic mining and external related knowledge fusion according to claim 1 is characterized in that: Using graph neural networks to encode subgraphs to generate relational knowledge embedding vectors includes: The recurrent graph convolutional network is used to embed the subgraph, which can be expressed as: in, is the encoder network, is the activation function, is the normalization constant, , To learn the parameters, For the node Adjacent nodes The eigenvector of For nodes The eigenvector of l is the number of layers in the recurrent graph convolutional network, is a set of relations, Through relationships and concept adjacent sets of concepts; After two layers of recurrent graph convolutional network encoding, the stance aggregation feature vector of each concept is obtained, which is expressed as: in, After a layer of encoding, the concept i The position aggregation feature vector, After two layers of coding, the concept i The position aggregation feature vector, is the initial concept feature vector; The average value of the feature vectors of all concepts in the subgraph is used as the relational knowledge embedding vector, which is expressed as: in, is the relational knowledge embedding vector, is the set of nodes in the subgraph.

6. The stance detection method based on text semantic mining and external related knowledge fusion according to claim 1 is characterized in that: Based on external knowledge text data, a pre-trained language model is used to generate factual knowledge embedding vectors, including: Search Wikipedia introduction text using the topic as a keyword; Use BERT to perform deep semantic encoding on the retrieved text, generate contextual embeddings for each word and entity, and then average pool the contextual embeddings to obtain factual knowledge embedding vectors.

7. The stance detection method based on text semantic mining and external related knowledge fusion according to claim 1 is characterized in that: The sentiment embedding vector, relational knowledge embedding vector, and factual knowledge embedding vector are fused to generate a comprehensive feature vector, including: The sentiment embedding vector, relational knowledge embedding vector, and factual knowledge embedding vector are tensor-connected according to their dimensions to obtain a comprehensive feature vector.

8. The stance detection method based on text semantic mining and external related knowledge fusion according to claim 1 is characterized in that: The comprehensive feature vector is transformed into a multi-layer perceptron.

9. The stance detection method based on text semantic mining and external related knowledge fusion according to claim 1 is characterized in that: The comprehensive feature vector is classified by a multi-layer perceptron and the stance detection results are output, specifically: in, is the probability distribution of stance labels, for, is a multi-layer perceptron, is the sentiment embedding vector, is the relational knowledge embedding vector, Embedding vector for factual knowledge.

10. The stance detection method based on text semantic mining and external related knowledge fusion according to claim 1 is characterized in that: The multi-layer perceptron uses cross entropy as the loss function for training, specifically: in, is the loss function, is the true position label, Predict labels for stances, is the L2 regularization coefficient, are the trainable parameters of the model, is the dimension of the true stance label, The dimension of the stance prediction label.