Coding and decoding structure-based user generated content target site joint detection method and system

Through a method based on codec structure, the goals and positions in social media text are directly predicted, and the problems of manual annotation dependence and error cascade are solved, which improves the accuracy of position detection and application feasibility.

CN118916739AActive Publication Date: 2024-11-08HARBIN INST OF TECH

Patent Information

Application Number
CN202410944911.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-11-08
Estimated Expiration
2044-07-15

AI Technical Summary

Technical Problem

The existing position detection method relies on manual labeling of target information, resulting in high labor costs. The target recognition error in the two-stage method will affect the position detection performance and produce error cascade.

Method used

Using a joint detection method of user-generated content target position based on codec structure, the text features are acquired by pre-processing social media text, and the sequence sub-encoder and emotional sub-encoder of fine-tuning BERT model are used to obtain the text features, combining self-attention and cross-attention mechanisms. Conduct interaction and fusion of goal-position characteristics to directly predict goals and positions.

Benefits of technology

No need for manual target labeling, which avoids error cascade, improves the accuracy and feasibility of position detection, and enhances the prediction performance of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916739A_ABST
    Figure CN118916739A_ABST
Patent Text Reader

Abstract

The invention relates to a coding and decoding structure-based user generated content target site joint detection method and system, and relates to site detection of social media. According to the method, the problem of manual dependence of the vertical detection task is solved, and the wrong cascade phenomenon is eliminated. According to the technical key points, preprocessed social media text data are input into an encoder, the encoder is composed of a sequence encoder and a fine-tuned emotion encoder, a self-attention mechanism is used between query vectors, and the correlation degree between each query vector and other query vectors is dynamically calculated; therefore, the dependency relationship among different query vectors can be better captured; then, inputting the sequence features output by the encoder into a decoder, and performing a cross attention mechanism with a query vector; inputting all the query vectors fused with the sequence features into a target-field aggregation layer; inputting the aggregated query vector and an emotion feature output by an encoder into a target vertical pair decoding layer, firstly assigning a weight to the query vector and the emotion feature through an attention mechanism, and then splicing the two features to obtain a final feature vector; and inputting the final feature representation into a decoder composed of two full-connection neural networks to output prediction results of the target and the vertical field. The method is applied to social network analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of social media stance detection and social network data processing, and in particular to a method and system for joint detection of target stance of user-generated content. Background Art

[0002] Nowadays, the rise of social media platforms has changed people's lifestyles, allowing people to obtain information, share opinions, and communicate feelings more quickly and conveniently, promoting the rapid dissemination of information and the widespread sharing of knowledge. Stance detection for social media can help relevant personnel better understand and analyze social opinions, opinions, and attitudes, so as to make more informed decisions in the fields of politics, business, and society. By analyzing the public's stance on a topic, it can help the government understand public opinion and formulate more reasonable policies; help companies understand consumers' views on products or services, conduct market positioning and formulate marketing strategies; help the media and news organizations understand the public's reaction to news events and improve the accuracy and quality of reports. In summary, stance detection technology has important research significance and application value in real-world scenarios.

[0003] Scholars have conducted a large number of related studies on the task of stance detection for social media. Yuan et al. [1] introduced the human stance reasoning process as task knowledge into the stance detection calculation, so that the model can effectively filter the redundant features of the text data itself, thereby relying more on the target features. For tweets related to climate change, Upadhyaya et al. [2] introduced fine-grained emotion recognition and aggression recognition as auxiliary tasks, and used emoticons in social media as multimodal information to provide richer semantic information. Ko et al. [3] used a hierarchical attention network to learn the relationship between three different levels of semantic information, and incorporated external knowledge of the real world into the process of political stance prediction by constructing a political knowledge graph and knowledge encoding, effectively improving the model performance. Based on traditional stance detection research, Li et al. [4] proposed a two-stage stance detection method for unlabeled target information. First, the target of social media text is identified in the first stage, and then the stance detection is performed in the second stage based on the first stage. This study greatly reduced the labor cost in stance detection and provided new ideas for the field of stance detection.

[0004] The prior art with document number CN118070774A provides a method and system for detecting the stance of user-generated content based on target information recognition. In order to solve the problem that the existing user-generated content stance detection or recognition methods need to spend a lot of labor costs to annotate the target information, and the only similar methods often require large-scale data to train or fine-tune the model in the target recognition stage, resulting in the problem that the quality of sample data directly affects the performance and accuracy of target recognition. The technical points are: first, representative keywords are extracted from a given social media text; then, the similarity between the keywords and the specific targets in the target set is calculated by cosine similarity, and the target object targeted by the text is determined according to the similarity; finally, based on the identified target object, a multi-task BERTweet model is used to detect the stance relationship between the text and the target object. The proposed user-generated content stance detection method based on target information recognition can effectively reduce labor costs, thereby improving the feasibility and practicality of the stance detection method in practical applications.

[0005] The prior art with document number CN116992873A discloses a multi-target stance detection method and system based on contrastive learning and consistency detection. The prior art enables the model to learn more feature information of the target and strengthen the connection between semantic information between targets, so that targets can assist each other in detecting their own stance. In addition, the prior art fine-tunes BERT and embeds BiLSTM as an encoder to make more full use of the semantic information between hidden contexts. The prior art also uses joint training as a multi-task learning method, allowing the model to share information in a specific field based on the data set. It solves the problems of noisy data sets, isolated targets, and insufficient information in specific fields in multi-target stance detection. It not only improves the accuracy of the performance on this task, but also has reference significance for other multi-target text classification tasks with similar problems.

[0006] The prior art with document number CN114330360A discloses a stance detection method for a specific target. The prior art uses a deep network to extract the semantic features of a sentence, and fully considers the target features during stance detection to achieve the interaction between the target features and the sentence features. The model uses a densely connected BiLSTM network and a nested LSTM network to extract the semantic features of a sentence. While capturing the deep semantic information of the sentence, it can solve the gradient vanishing problem and the long-term dependency problem. It uses an attention mechanism to obtain the importance of a specific target to each part of the sentence, thereby obtaining a sentence vector representation that incorporates the specific target information, helping the model to fully consider the given specific target when performing stance detection.

[0007] Although the above research and existing technologies have achieved breakthroughs in stance detection tasks to varying degrees, they still have the following defects: (1) Traditional stance detection methods often rely on both social media text and manually annotated target information. Before performing detection calculations, the text to be detected needs to be manually annotated, which consumes too much manpower costs; (2) Current target-stance detection methods for user-generated content usually adopt a two-stage method. Although this method reduces the labor cost of stance detection tasks, the errors generated in the first-stage target recognition task will have a negative impact on the performance of the second-stage stance detection task, thereby causing an error cascade phenomenon. Summary of the invention

[0008] The technical problems to be solved by the present invention are:

[0009] In view of the above problems, the present invention proposes a method and system for joint detection of target stance of user-generated content based on a codec structure. The method not only solves the problem of manual dependence of stance detection tasks, but also eliminates the error cascade phenomenon, effectively improving the feasibility and accuracy of stance detection methods in practical applications.

[0010] The technical solution adopted by the present invention to solve the above technical problems is:

[0011] 1. A method for joint detection of user-generated content target stance based on a codec structure, characterized in that the implementation process of the method is as follows:

[0012] Step 1: Preprocess user-generated content data:

[0013] Data preprocessing is divided into the following two steps: (1) Data cleaning: used to remove network elements such as emoticons and web links contained in user-generated content; (2) Network term conversion: using a predefined abbreviation dictionary to convert common network terms in social media texts into written terms;

[0014] Step 2: Fine-tune the BERT model using a preprocessed sentiment analysis dataset, where the dataset has two sentiment labels: "positive" and "negative". The dataset includes a training set, a validation set, and a test set. The data format includes a data number, an input text sequence, and a true sentiment label corresponding to the text.

[0015] Step 3: Input the preprocessed social media text data into the encoder. The encoder consists of a sequence sub-encoder and a fine-tuned sentiment sub-encoder. Both the sequence sub-encoder and the sentiment sub-encoder are based on the BERT model. The sequence sub-encoder is used to obtain the sequence features composed of text context information, while the sentiment sub-encoder is used to obtain the sentiment information implied in the text sequence, providing richer semantic features for subsequent calculations.

[0016] Step 4: Randomly initialize m query embedding vectors. First, in the internal attention layer of the query embedding vector, a self-attention mechanism is used on the query embedding vector so that the query embedding vectors can interact and transfer information effectively to capture the dependency between different query embedding vectors. The query vector, key vector, and value vector in the self-attention mechanism all come from the query embedding vector itself.

[0017] Then, in the tweet feature attention layer, the sequence features output by the encoder are input into the decoder, and a cross-attention mechanism is performed with the query embedding vector after interaction to promote the interaction and fusion of the two features.

[0018] In the cross-attention mechanism, the query embedding vector is used as the query vector, and the sequence features are used as the key vector and value vector.

[0019] Step 5: All query vectors fused with sequence features are input into the target-stance aggregation layer. The main purpose of this layer is to make the model focus on features that are more important or relevant to the current task, thereby improving the prediction performance of the model.

[0020] Assign corresponding weights to different query vectors and perform weighted summation on all query vectors to obtain a vector representation that integrates all query features;

[0021] Step 6: Input the aggregated query vector and the sentiment features output by the encoder into the target stance pair decoding layer. First, assign weights to the query vector and the sentiment features, then concatenate the two features to obtain the final feature vector. The final feature representation is input into a decoder composed of two fully connected neural networks to output the prediction results of the target and stance.

[0022] Furthermore, in step 2, the BERT model is fine-tuned using the preprocessed SST-2 sentiment analysis dataset, which has two sentiment labels: "positive" and "negative". The training set, validation set, and test set of the dataset contain 67,349, 872, and 1,821 data items, respectively. The specific data format includes: idx represents the data number, sentence represents the input text sequence, and label represents the true sentiment label corresponding to the text.

[0023] Furthermore, in step three, the encoder is composed of a sequence sub-encoder and a fine-tuned emotion sub-encoder, and the specific formula is as follows:

[0024] h sent =BERT sent (T)

[0025] h seq =BERT seq (T)

[0026] Among them, h sent and h seq Represent the sequence features and sentiment features respectively, T={w1,w2,w3,...,w n} represents the input text sequence, w i (1≤i≤n) represents the words in the sequence.

[0027] Furthermore, in step 4, the specific formula is as follows:

[0028]

[0029] q r =Attention(q org ,q org ,q org )

[0030] q=Attention(q r ,h seq ,h seq )

[0031] Among them, Attention represents the attention mechanism, q org represents the randomly initialized original query embedding vector, q r represents the output vector of the attention layer inside the query embedding vector, q represents the output vector of the tweet feature attention layer; Q, K, V represent the query parameter, key parameter, and value parameter in the attention mechanism respectively; d k The dimensions of the vector representing the key parameters.

[0032] Furthermore, in step five, the specific formula is as follows:

[0033] α=softmax(w q tanh(q)

[0034] q all =qα T

[0035] Among them, α represents the final query vector weight, q all Represents a vector representation that aggregates all query features.

[0036] Furthermore, in step six, the specific formula is as follows:

[0037]

[0038] Among them, pair represents the final prediction result including the target and the position, w o Represents the weights of different feature vectors, FCN t and FCN s Represent the fully connected decoding layers for target and stance, respectively.

[0039] A user-generated content target stance joint detection system based on a codec structure, the system has a program module corresponding to the steps of the technical solution, and executes the steps in the user-generated content target stance joint detection method based on a codec structure when running.

[0040] A computer-readable storage medium stores a computer program, wherein the computer program is configured to implement the steps of the method for joint detection of target stance of user-generated content based on a codec structure when called by a processor.

[0041] The present invention has the following beneficial technical effects:

[0042] The target stance joint detection method of user-generated content based on the codec structure described in the present invention realizes social media text stance detection without manually annotating targets, solves the dependence of stance detection tasks on manual work, avoids the occurrence of error cascades, and improves the accuracy of stance detection. At present, the target-stance detection method for user-generated content usually adopts a two-stage method, first identifying the target object targeted by the user-generated content in the first stage, and then performing stance detection in the second stage based on the identified target object. Although this two-stage method effectively alleviates the dependence of the stance detection task on manually annotated target information, the errors generated in the first stage target recognition task will directly affect the performance of the second stage stance detection task, resulting in obvious error cascades. No one in the prior art has discovered and proposed such a technical problem that needs to be solved urgently. The present invention discovers the technical problems objectively existing in the prior art and the causes of the technical problems. In response to the above problems and the causes, the present invention specifically proposes a user-generated content target-stance joint detection method based on a codec structure, which models the target information and stance information implicit in the user-generated content in an end-to-end manner, which not only avoids error cascades, but also effectively improves the performance of target-stance detection, thereby further improving the feasibility, accuracy and practicality of the stance detection method in practical applications.

[0043] The present invention is applied to social network analysis, and more specifically to social media text stance detection and related research without the need for manual target labeling. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 is a flowchart of the calculation process of the method of the present invention,

[0045] Figure 2 This is the architecture diagram of the target stance joint detection model based on the codec structure;

[0046] Figure 3 This is a screenshot of the SST-2 data sample;

[0047] Figure 4 This is a comparison chart of target recognition results. DETAILED DESCRIPTION

[0048] Combined with Figure 1-4 The implementation and technical effect verification of the joint detection method of user-generated content target stance based on the codec structure described in the present invention are described as follows:

[0049] 1. User-generated content on social media platforms is full of Internet elements and usually does not follow traditional grammatical rules, showing obvious colloquial characteristics. Therefore, user-generated content data needs to be preprocessed before calculation. Data preprocessing can be divided into the following two steps: (1) Data cleaning: This step aims to eliminate Internet elements such as emoticons and web links contained in user-generated content; (2) Internet term conversion: Use a predefined abbreviation dictionary to convert common Internet terms in social media texts into written terms. For example, "4U" is converted to "For you"; "2nyt" is converted to "tonight".

[0050] 2. Fine-tune the BERT model using the preprocessed SST-2 sentiment analysis dataset, which has two sentiment labels: "positive" and "negative". The training set, validation set, and test set of this dataset contain 67,349, 872, and 1,821 data items, respectively. The specific data format is as follows: Figure 3 As shown in the figure, 'idx' represents the data number, 'sentence' represents the input text sequence, and 'label' represents the true sentiment label corresponding to the text.

[0051] 3. Input the preprocessed social media text data into the encoder, which consists of two parts: the sequence sub-encoder and the sentiment sub-encoder. The sequence encoder is used to obtain the sequence features composed of the text context information, while the sentiment encoder is used to obtain the sentiment information implied in the text sequence, providing richer semantic features for subsequent calculations. Both sub-encoders are built based on BERT. Among them, the sequence encoder directly adopts the pre-trained BERT model and uses the output vectors of all words as sequence features. The sentiment encoder adopts the BERT model fine-tuned on the SST-2 dataset in step 2, and uses the output vector of the [CLS] symbol as the sentiment feature. The specific formula is as follows:

[0052] h sent =BERT sent (T)

[0053] h seq =BERT seq (T)

[0054] Among them, h sent and h seq Represent the sequence features and sentiment features respectively, T={w1,w2,w3,...,w n} represents the input text sequence, w i (1≤i≤n) represents the words in the sequence.

[0055] 4. Randomly initialize m query embedding vectors. First, in the internal attention layer of the query embedding vector, use the self-attention mechanism on the query embedding vector so that the query embedding vectors can effectively interact and transfer information, thereby better capturing the dependencies between different query embedding vectors. The query vector, key vector, and value vector in the self-attention mechanism all come from the query embedding vector itself. Then in the tweet feature attention layer, the sequence features output by the encoder are input into the decoder, and a cross-attention mechanism is performed with the query embedding vector after interaction to promote the interaction and fusion of the two features. In the cross-attention mechanism, the query embedding vector is used as the query vector, and the sequence features are used as the key vector and value vector. The specific formula is as follows:

[0056]

[0057] q r =Attention(q org ,q org ,q org )

[0058] q=Attention(q r ,h seq ,h seq )

[0059] Among them, Attention represents the attention mechanism, q org represents the randomly initialized original query embedding vector, q r represents the output vector of the attention layer inside the query embedding vector, and q represents the output vector of the tweet feature attention layer; d k The dimension of the vector representing the key parameters.

[0060] Q, K, and V represent the query parameter, key parameter, and value parameter in the attention mechanism, respectively. r It is equivalent to q, which assigns values ​​to Q, K, and V and calls the attention function.

[0061] 5. All query vectors that incorporate sequence features are input into the target-stance aggregation layer. The main purpose of this layer is to make the model focus on features that are more important or relevant to the current task, thereby improving the model's prediction performance. First, assign corresponding weights to different query vectors, and perform weighted summation on all query vectors to obtain a vector representation that integrates all query features. This method strengthens the positive impact of important query vectors while weakening the negative impact of irrelevant query vectors. The specific formula is as follows:

[0062] α=softmax(w q tanh(q)

[0063] q all =qα T

[0064] Among them, α represents the final query vector weight, q all Represents a vector representation that aggregates all query features;

[0065] w q is the weight of all query vectors, which is a trainable parameter and randomly initialized; tanh(q) represents the activation function, which is a common activation function.

[0066] 6. The aggregated query vector and the sentiment feature output by the encoder are input into the target stance pair decoding layer. First, weights are assigned to the query vector and the sentiment feature, and then the two features are concatenated to obtain the final feature vector. The final feature representation is input into the decoder composed of two fully connected neural networks to output the prediction results of the target and stance. The specific formula is as follows:

[0067]

[0068] Among them, pair represents the final prediction result including the target and the position, w o Represents the weights of different feature vectors, FCN t and FCN sRepresent the fully connected decoding layers for target and stance, respectively.

[0069] 7. In order to verify the effectiveness and superiority of the user-generated content stance detection method based on target information recognition proposed in this invention, experiments were conducted using the dataset provided in the literature [4]. This dataset is a combination of four commonly used stance detection datasets: SemEval-2016, AM, COVID-19, and P-stance. The dataset contains a total of 18 target categories, as shown in Table 1; and 4 stance categories: 'Dummy Stance', 'FAVOR', 'NONE', and 'AGAINST', where 'Dummy Stance' is not predicted. In order to be more in line with the situation in real social networks, the 'Unrelated' target category is also added to the dataset to simulate the stance detection process in reality.

[0070] The experimental results are shown in Table 2. Figure 4 As shown in the figure, since the proposed method is based on deep learning, in order to more comprehensively verify the model effect, three different seeds were selected in the experiment, and the final experimental results were the average of the three experimental results. In the target-stance detection experiment, F1 value and accuracy were used as evaluation indicators. In the target recognition experiment, micro-averaged F1 was used as the evaluation indicator. From the experimental results, it can be seen that this method has achieved the best experimental results in both the target-stance detection task and the target recognition task, and has been improved to varying degrees compared with other comparison models.

[0071] Table 1: Dataset target categories

[0072]

[0073] Table 2: Experimental results of target-stance detection

[0074]

[0075] 8. The above experimental results show that the F1 value and accuracy of the proposed method in the target-stance detection task are improved by 4.18% and 3.68% respectively compared with the best baseline model, and the accuracy is improved by 6.83% in the target recognition task, which fully demonstrates the superiority of the proposed method in the present invention.

[0076] In summary, the method of the present invention has been verified through simulation experiments and practical applications. The proposed method not only solves the problem of manual dependence in the stance detection task, but also eliminates the error cascade phenomenon, effectively improving the feasibility and accuracy of the stance detection method in practical applications.

[0077] The algorithm (method) proposed in the present invention is the underlying technical core of the present invention, and various products can be derived based on the algorithm.

[0078] Based on the algorithm (method) proposed in the present invention, a user-generated content target stance joint detection system based on a codec structure is developed using a programming language. The system has program modules corresponding to the steps of the above technical solution, and executes the steps of the above-mentioned user-generated content target stance joint detection method based on a codec structure when running.

[0079] The computer program of the developed system (software) is stored on a computer-readable storage medium, and the computer program is configured to implement the steps of the above-mentioned method for joint detection of user-generated content target stance based on the codec structure when called by a processor, that is, the present invention is materialized on a carrier to become a computer program product.

[0080] Based on the method, a user-generated content target stance joint detection device can also be developed, the detection device includes at least one processor, and a memory connected to the at least one processor in communication, wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the above-mentioned user-generated content target stance joint detection method based on the codec structure, realize real-time analysis of social networks, and realize social media text stance detection without manual target labeling. The user-generated content target stance joint detection device is used as a terminal product applied by the present invention.

[0081] Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0082] The computer programs (also referred to as programs, software, software applications, or codes) of the present invention include machine instructions for programmable processors, and these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or device (e.g., disk, optical disk, memory, programmable logic device PLD) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0083] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, they are all within the scope of protection of the present invention.

[0084] The references cited in the present invention are listed as follows:

[0085] [1] Yuan J, Zhao Y, Lu Y, et al. Ssr: Utilizing simplified stance reasoning process for robust stance detection [C] / / Proceedings of the 29th International Conference on Computational Linguistics. 2022: 6846-6858.

[0086] [2]Upadhyaya A, Fisichella M, Nejdl WA multi-task model for emotion and offensive aided stance detection of climate change tweets[C] / / Proceedings of the ACM Web Conference 2023.2023:3948-3958.

[0087] [3]Ko Y,Ryu S,Han S,et al.KHAN:knowledge-aware hierarchical attentionnetworks for accurate political stance prediction[C] / / Proceedings of the ACMWeb Conference 2023.2023:1572-1583.

[0088] [4]Li Y,Garg K,Caragea C.A New Direction in Stance Detection:Target-Stance Extraction in the Wild[C] / / Proceedings of the 61st Annual Meeting ofthe Association for Computational Linguistics(Volume 1:Long Papers).2023:10071-10085。

Claims

1. A joint detection method for user-generated content target stance based on codec structure, It is characterized in that The implementation process of the method is: Step 1: Preprocess user-generated content data: Data preprocessing is divided into the following two steps: (1) Data cleaning: used to remove network elements such as emoticons and web links contained in user-generated content; (2) Network term conversion: using a predefined abbreviation dictionary to convert common network terms in social media texts into written terms; Step 2: Fine-tune the BERT model using a preprocessed sentiment analysis dataset, where the dataset has two sentiment labels: "positive" and "negative". The dataset includes a training set, a validation set, and a test set. The data format includes a data number, an input text sequence, and a true sentiment label corresponding to the text. Step 3: Input the preprocessed social media text data into the encoder. The encoder consists of a sequence sub-encoder and a fine-tuned sentiment sub-encoder. Both the sequence sub-encoder and the sentiment sub-encoder are based on the BERT model. The sequence sub-encoder is used to obtain the sequence features composed of text context information, while the sentiment sub-encoder is used to obtain the sentiment information implied in the text sequence, providing richer semantic features for subsequent calculations. Step 4: Randomly initialize m query embedding vectors. First, in the internal attention layer of the query embedding vector, a self-attention mechanism is used on the query embedding vector so that the query embedding vectors can interact and transfer information effectively to capture the dependency between different query embedding vectors. The query vector, key vector, and value vector in the self-attention mechanism all come from the query embedding vector itself. Then, in the tweet feature attention layer, the sequence features output by the encoder are input into the decoder, and a cross-attention mechanism is performed with the query embedding vector after interaction to promote the interaction and fusion of the two features. In the cross-attention mechanism, the query embedding vector is used as the query vector, and the sequence features are used as the key vector and value vector. Step 5: All query vectors fused with sequence features are input into the target-stance aggregation layer. The main purpose of this layer is to make the model focus on features that are more important or relevant to the current task, thereby improving the prediction performance of the model. Assign corresponding weights to different query vectors and perform weighted summation on all query vectors to obtain a vector representation that integrates all query features; Step 6: Input the aggregated query vector and the sentiment features output by the encoder into the target stance pair decoding layer. First, assign weights to the query vector and the sentiment features, then concatenate the two features to obtain the final feature vector. The final feature representation is input into a decoder composed of two fully connected neural networks to output the prediction results of the target and stance.

2. According to claim 1, a method for joint detection of user-generated content target stance based on codec structure, It is characterized in that In step 2, the BERT model is fine-tuned using the preprocessed SST-2 sentiment analysis dataset, which has two sentiment labels: "positive" and "negative". The training set, validation set, and test set of this dataset contain 67,349, 872, and 1,821 data items, respectively. The specific data format includes: idx represents the data number, sentence represents the input text sequence, and label represents the true sentiment label corresponding to the text.

3. A method for joint detection of target stance of user-generated content based on codec structure according to claim 1 or 2, It is characterized in that In step 3, the encoder is composed of a sequence sub-encoder and a fine-tuned emotion sub-encoder. The specific formula is as follows: h sent =BERT sent (T) h seq =BERT seq (T) Among them, h sent and h seq Represent sequence features and sentiment features respectively, T={w 1 ,w 2 ,w 3 ,...,w n } represents the input text sequence, w i (1≤i≤n) represents the words in the sequence.

4. The method for joint detection of user-generated content target stance based on codec structure according to claim 3, It is characterized in that In step 4, the specific formula is as follows: q r =Attention(q org ,q org ,q org ) q=Attention(q r ,h seq ,h seq ) Among them, Attention represents the attention mechanism, q org represents the randomly initialized original query embedding vector, q r represents the output vector of the attention layer inside the query embedding vector, q represents the output vector of the tweet feature attention layer; Q, K, V represent the query parameter, key parameter, and value parameter in the attention mechanism respectively; d k The dimensions of the vector representing the key parameters.

5. The method for joint detection of target stance of user-generated content based on codec structure according to claim 4, Features In step five, the specific formula is as follows: α=softmax(w q tanh(q)) q all =qα T Among them, α represents the final query vector weight, q all Represents a vector representation that aggregates all query features.

6. The method for joint detection of target stance of user-generated content based on codec structure according to claim 5, Features In step six, the specific formula is as follows: Among them, pair represents the final prediction result including the target and the position, w o Represents the weights of different feature vectors, FCN t and FCN s Represent the fully connected decoding layers for target and stance, respectively.

7. A joint detection system for user-generated content target stance based on codec structure, Features: The system has a program module corresponding to the steps of any one of claims 1 to 6, and executes the steps in the method for joint detection of target stance of user-generated content based on codec structure when running.

8. A computer-readable storage medium, Features: The computer-readable storage medium stores a computer program, and the computer program is configured to implement the steps of the method for joint detection of target stance of user-generated content based on a codec structure according to any one of claims 1 to 6 when called by a processor.

Citation Information

Patent Citations

  • Standard detection method for specific target

    CN114330360A

  • Multi-target vertical field detection method and system based on comparative learning and consistency detection

    CN116992873A

  • User generated content standing detection method and system based on target information identification

    CN118070774A

  • Standard detection method based on multi-task learning

    CN114638195A

  • Multi-task site detection method based on multi-graph sparse interaction network

    CN114969318A

Cited By

  • Risk control rule engine construction and data processing method based on node arrangement

    CN121903612A

  • A Method for Building and Processing Risk Control Rule Engines Based on Node Orchestration

    CN121903612B