A method for constructing an opinion evaluation object model
By constructing an event summary text generation model, a sentence annotation model, and an opinion evaluation object extraction model, the problem of independence between opinion analysis and event extraction in online public opinion analysis was solved, enabling opinion analysis of events and improving the accuracy and performance of public opinion analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-06
- Publication Date
- 2026-03-03
AI Technical Summary
In existing online public opinion analysis, opinion analysis and event extraction are usually carried out as independent tasks, lacking direct correlation. Furthermore, existing models struggle to effectively utilize entity, event, and sentiment features within the context of opinions, thus impacting analytical performance.
We establish an event summary text generation model, a sentence annotation model, and an opinion evaluation object extraction model. Using T5 pre-trained model, BERT encoder, BiLSTM, and Conditional Random Field (CRF) techniques, combined with ROUGE-L and Jcarrd distance, we perform text similarity calculation and sequence annotation to extract opinion evaluation objects from event summary texts.
It enables opinion analysis of events as evaluation objects, integrates event extraction, opinion extraction, and evaluation perspective classification, improves the accuracy and performance of public opinion analysis, and can effectively utilize entity, event, and sentiment features in the opinion context.
Smart Images

Figure CN116029308B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of constructing online public opinion language models, and in particular to a method for constructing a model of opinion evaluation objects. Background Technology
[0002] Current online public opinion analysis focuses on acquiring opinions and comments from netizens as the evaluators and events as the evaluation objects. Further data analysis of these opinions is crucial for timely information gathering, enhanced public opinion monitoring, and improved public opinion response capabilities. To accurately obtain effective comment information, tasks need to be performed separately in several aspects: event extraction, opinion extraction, evaluation perspective classification, and opinion object extraction. However, current opinion analysis and event extraction are usually conducted as independent tasks with no direct connection. Furthermore, opinion analysis objects are typically entities or attributes, with few analyses using events as the evaluation object. Moreover, traditional opinion analysis objects are mostly entities and attributes, with very few solutions focusing on events as the opinion object. Event extraction, a hot research area in NLP in recent years, also faces many challenges, such as difficulty in obtaining labeled event data, imbalanced event argument samples, and event arguments spanning multiple paragraphs. Currently, the only available analysis methods are primarily BERT, using sequence labeling methods (such as CRF) for opinion extraction. Models built using these methods cannot effectively utilize the entity, event, and sentiment features within the opinion context, significantly impacting analysis performance. Summary of the Invention
[0003] Based on the above analysis, the embodiments of the present invention aim to provide a method for constructing a model of opinion evaluation objects, in order to solve the problem that existing public opinion analysis requires combining opinion analysis and event extraction.
[0004] On one hand, embodiments of the present invention provide a method for constructing a model of opinion evaluation objects, including:
[0005] An event summary text generation model is established, which is used to input information text containing event content and obtain event summary text.
[0006] A sentence annotation model is established, which is used to take as input opinion text evaluating the event and event summary text, and to obtain opinion text with semantic guidance from the event summary text; wherein, the opinion text is a sequence of sentences extracted from the opinion text.
[0007] A model for extracting opinion evaluation objects is established. This model is used to extract the evaluation objects of the opinion by taking an opinion and an event summary text as input. The evaluation objects are word sequences extracted from the event summary text.
[0008] Based on further improvements to the above method, an event summary text generation model is established, including:
[0009] Obtain relevant text related to the event content in the provided information text;
[0010] Set a text similarity threshold, and use the content in the relevant text that has a text similarity greater than the text similarity threshold to the information text as new training samples to expand the training set;
[0011] The T5 pre-trained model was trained based on the expanded training set;
[0012] The ROUGE-L evaluation method was used to optimize the model, resulting in an event summary text generation model.
[0013] Based on the further improvement of the above method, the Jcarrd distance between the related text and the information text after word segmentation is calculated as the text similarity. The content of the related text that matches the text similarity is added to the training set as a new training sample, thus expanding the training set to more than 3 times.
[0014] Based on further improvements to the above method, the sentence annotation model includes a Bert encoder, BiLSTM, and a Conditional Random Field (CRF); the sentence annotation model is established by:
[0015] The text used for training is segmented into n sentences, and each sentence is assigned a value R. i Concatenate the event summary text W to form a concatenated string (R) i , W);
[0016] Using [CLS] as the starting marker before each concatenated string, we obtain the input data X1 = {([CLS],R1,W),([CLS],R2,W)...,([CLS],R...} n ,W)}, input X1 into the Bert encoder to obtain the sentence vector H represented by the [CLS] position. [CLS] ;
[0017] H [CLS] The input is fed into a BiLSTM to obtain the association features S between concatenated strings with the event summary text W as the common field.
[0018] Input S into a Conditional Random Field (CRF) and use the BIO strategy, with the common field W as the semantic guide, to annotate each sentence.
[0019] Based on further improvements to the above method, the annotation of sentences includes at least attribute tags and sequence tags. The sequence tags are used to mark the sequential position of the sentence in the viewpoint, and the attribute tags are used to mark the viewpoint category of the sentence.
[0020] Further improvements to the above method involve using log-likelihood calculations when annotating sentences, and iteratively minimizing the loss to obtain the optimal model:
[0021]
[0022] Where e is a natural constant. It is the score when the sentence is labeled with the tag i at a certain moment. S represents the total score of all labels at a given time. RealPath The actual label path for the input text; The i-th word is marked as z. i The probability of; Indicates from label z i To z i+1 The transition probability, z i and z i+1 Let i and i+1 be the possible labels for the i-th and i+1-th sentences of the input sequence, respectively, where 0 <= i <= N.
[0023] Based on further improvements to the above method, the evaluation objects of the aforementioned viewpoint are obtained, including:
[0024] After combining the obtained viewpoint O with the event summary text W, [CLS] is used as the starting mark for the combination, and [SEP] is used as the separating mark between viewpoint O and event summary text W, resulting in input X2 = {[CLS], O, [SEP], W}.
[0025] Inputting X2 into the BERT encoder yields the association vector Q between the viewpoint O and the event summary text W;
[0026] Based on the association vector Q, word sequences are extracted from the event summary text W and used as the opinion evaluation objects for opinion O.
[0027] Based on the above method, the steps for extracting word sequences from the event summary text W include:
[0028] Set the start word pointer vector start and the end word pointer vector end in the event summary text, start = Softmax(Q*Ws+bs), end = Softmax(Q*We+be), where Softmax is the activation function, Ws and We are the weight vectors of the start word and the end word respectively, the weight parameter matrix of the fully connected layer, bs and be are the biases, and the start word pointer vector start and the end word pointer vector end represent the probability distribution of the start word and the end word of the opinion evaluation object in the event summary text respectively;
[0029] The start-end combination is selected as the start-end combination by taking a pair of start and end words as start-end words. The start-end combination with the highest cross-entropy loss score of the start and end position vectors is selected as the start and end words.
[0030] Based on the further improvement of the above method, the starting position vector and ending position vector of the start-end combination are selected, including: selecting the top k starting words and ending words with the highest probability distribution values as candidates, filtering out the start-end combination that satisfies the condition of starting word first and ending word last, and calculating the cross-entropy loss score and the start-end combination with the highest score.
[0031] Based on a further improvement of the above method, the calculation method for the sum of cross-entropy loss scores is as follows:
[0032] p start =softmax(T) i )
[0033] p end =softmax(T) j )
[0034]
[0035] Among them, T j and T j Let p represent the learnable parameter matrices with the i-th word as the start word and the j-th word as the end word of the event summary text, respectively. start p end The probability of the start word and the end word is obtained by using the softmax activation function; p start xi p end xj These represent the probabilities that word i and word j are predicted as the start word and end word, respectively.
[0036] Compared with the prior art, the present invention can achieve at least the following beneficial effects:
[0037] This invention takes news text containing news headlines, news content, and commentary as input, generates event summary text, extracts opinion description sentences using sentence sequence labeling methods, and marks the attributes and sequences of opinion points. Using machine reading comprehension matching methods, it uses these opinion sentences as queries to extract opinion objects from the event description text, ultimately obtaining structured text information. This allows for accurate opinion analysis based on opinion data generated from events as evaluation objects. It integrates event extraction, opinion extraction, evaluation angle classification, and opinion object extraction. This method effectively utilizes the entity, event, and sentiment features in the opinion context, significantly impacting analysis performance. This invention plays a crucial role in event-oriented opinion analysis within the field of public opinion analysis.
[0038] In this invention, the above-described technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of this invention will be set forth in the following description, and some advantages may become apparent from the description or be learned by practicing the invention. The objects and other advantages of this invention can be realized and obtained from what is particularly pointed out in the description and drawings. Attached Figure Description
[0039] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.
[0040] Figure 1 This is a flowchart illustrating the construction of a model for obtaining opinion evaluation objects according to the present invention.
[0041] Figure 2 This is a diagram illustrating the model structure for obtaining event summary text using the T5 model.
[0042] Figure 3 This is a diagram illustrating the structure of a sentence tagging model.
[0043] Figure 4 To extract the model of opinion evaluation objects, a model structure diagram of opinion evaluation objects is obtained from the event summary text. Detailed Implementation
[0044] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.
[0045] Traditional opinion analysis often focuses on a specific angle of the object of evaluation, such as opinions categorized by emotional polarity. This application, however, considers an evaluation centered on the factual description of the event, paying attention not only to emotional categories but also to non-emotional categories, such as rational evaluations like judgments, predictions, and suggestions. An event contains factual information about itself, generally including the event's subject, object, trigger words, and tense. When an event generates online public opinion, the evaluators not only express opinions about the event itself but also about its sub-events, related events, and the entities involved. Among the many opinions derived from an event, the objects of evaluation are not necessarily consistent; in fact, many evaluations may not even focus on the event itself. When the object of evaluation is the event, it means the opinion directly addresses the entire event; when the object of evaluation is a sub-event, it means the opinion is not directed at the entire event but at its sub-events or related events.
[0046] To conduct more accurate opinion analysis, it is necessary to determine the object of evaluation in the evaluation statement. Only when the accurate object of evaluation can we perform categorized analysis on opinions with the same object of evaluation.
[0047] Therefore, this invention discloses a method for constructing a model of opinion evaluation objects, such as... Figure 1 The illustration shows a specific embodiment of the present invention, which includes the following:
[0048] S1. Establishing the Event Summary Text Generation Model: The summary text generation model stage is used to input information text containing event content and obtain event summary text.
[0049] S2. Establishing a sentence annotation model: The sentence annotation model is used to input opinion text and event summary text that evaluate the event, and to obtain opinion text that uses the event summary text as semantic guidance; wherein, the opinion text is a sequence of sentences extracted from the opinion text.
[0050] S3. Establish an opinion evaluation object extraction model: The opinion evaluation object extraction model is used to input opinion and event summary text to obtain the evaluation object of the opinion; wherein, the evaluation object is a word sequence extracted from the event summary text. Specifically:
[0051] I. Establishing an Event Summary Text Generation Model
[0052] Considering that opinion pieces centered on events may not appear entirely in the text of a given document, we consider extracting opinion pieces from those that accurately summarize the event content. This requires building a model capable of accurately summarizing the event content. However, currently, there are few datasets available for event-oriented opinion analysis, the task is highly complex, and deep learning algorithms struggle with the limited training data. To address these issues, we provide the following data training steps to build an event summary text generation model. The input is informational text containing event content, and the output is event summary text. The training steps include:
[0053] Training Data Construction: In public opinion analysis scenarios, an event may generate widespread dissemination, thus the related reports, descriptions, and evaluations of a factual event may vary. Based on this assumption, this solution constructs training data by using the benchmark data provided by the open-source dataset ECOB-ZH as a seed, and expanding it with web crawling and similarity ranking techniques to generate nearly 10,000 training corpus pairs (document, event description). Specifically, based on the event description information in this dataset, relevant news and headlines are obtained from the internet using web crawling tools and Elasticsearch search tools. Secondly, by calculating the JCARRD distance between the crawled news headlines and the aforementioned query after word segmentation, the top 3 most similar headlines are selected as new training samples and added to the training set, expanding the training set by 3 times. Specifically, the dataset in this solution is based on the open-source opinion extraction dataset ECOB-ZH (www.e-com.ac.cn), which is divided into training, development, and test sets in a 7:1:2 ratio, including 590 / 78 / 153 event descriptions and 2100 / 299 / 601 documents, respectively.
[0054] Chinese word segmenter: Based on the T5-PEGASUS Chinese pre-trained model with parameter fine-tuning. T5 is a Transformer-based encoder-decoder model. This model incorporates the characteristics of Chinese to improve Chinese word segmentation (adding the first 200,000 words from Jieba segmentation to the original Chinese BERT vocabulary, and then modifying the segmentation logic; words not in these first 200,000 words are used instead of the original BERT vocabulary). Here, when fine-tuning the event summarization task using (document, event description) corpora, the T5-PEGASUS word segmenter is used to first segment the input (document, event description).
[0055] Parameter fine-tuning: Unlike the unsupervised pre-training of T5, this step fine-tunes the parameters of the task based on the prepared corpus pairs to obtain a suitable model. Specifically, the training corpus pairs for T5 require an explicit prefix text for explicit prompts. Therefore, during training, the actual input corpus pair to the model is (summarize: document, event summary text), where "summarize:" is used as a prompt.
[0056] In the stage of establishing the event summary text generation model, since event summary text generation is a sequence-to-sequence task, its input is a long text containing event description information, and the output event summary text is text that can accurately summarize the event. In this scheme, the output event summary text is the minimum text describing the facts, usually describing only one factual event and containing the key elements related to the event. This scheme uses news headlines as the long descriptive text of the event as input, and expands it with related relevant text searched online.
[0057] By summarizing the long text and related information text, a complete picture of the event is obtained. The above text is then summarized to produce an event summary text, as shown in Table 1. Examples of the correspondence between the long text containing event description information and the generated event summary text are provided:
[0058] Table 1
[0059]
[0060] For sequence-to-sequence text conversion models, we fine-tune the task objective based on the powerful pre-trained T5 model, such as... Figure 1 As shown, the event summary text generation model is obtained, thus yielding the event summary text W.
[0061] The event summary text generation model uses the ROUGE-L evaluation method, where L stands for Longest Common Subsequence (LCS), comparing the longest common subsequence between human-generated summaries and model summaries. The ROUGE-L calculation method is as follows:
[0062]
[0063]
[0064]
[0065]
[0066] Here, L refers to the Longest Common Subsequence (LCS), which compares the longest common subsequence between the human-generated summary and the model-generated summary. ROUGE-L is calculated as follows: where C represents the event summary generated by the model, S represents the reference summary, LCS(C,S) is the length of the longest common subsequence of C and S, Len(C) and Len(S) represent the number of words in the reference summary and the event summary generated by the model, respectively, R... LCS P represents recall rate. LCS F represents the accuracy rate. LCS This represents the ROUGE-L score, where β is a constant. ROUGE-L does not require consecutive word matches, only matching in the order of word occurrence, and can reflect sentence-level word order like an n-gram.
[0067] II. Establishing a sentence annotation model:
[0068] In the sentence annotation model development stage, considering the need to extract viewpoints from provided opinion documents containing event viewpoints—where the extracted viewpoints are combinations of sentence sequences after the document is segmented—and the need to determine the viewpoint type for analysis, a sentence annotation model is required. This model should be able to obtain sentence sequence annotations and viewpoint attribute annotations after inputting sentences. Assuming a given viewpoint exists, and the provided opinion document contains either multiple sentences or a single sentence, the identified sentences need to be correctly sequenced to form the viewpoint text.
[0069] Therefore, in this stage, a sentence annotation model is established using the event summary text as semantic guidance. An opinion text evaluating the event is input to obtain the opinion; wherein, the opinion is a sequence of sentences extracted from the opinion text.
[0070] Specifically, such as Figure 3 As shown, this embodiment uses BERT+BiLSTM+CRF to obtain a sentence annotation model. The provided document D (with sentences to be annotated) and event summary text W are used as input. Document D contains n sentences. Each sentence R in W and D is concatenated, and [CLS] is used as the sentence start identifier, resulting in data X1 = {([CLS],R1,W),([CLS],R2,W)...,([CLS],R...}. n Inputting X1 into the BERT model yields the latent vector H. [B*T*C] Where B, T, and C are the number of samples (number of samples in the current batch of data), the sample length (number of words), and the width of the latent vector feature, respectively, and H is... [B*T*C] It is a token-level (word-level) feature vector.
[0071] In this scheme, the [CLS] character vector H is taken. [CLS] The sentence vector representing the current sentence is used to obtain the sentence-level feature representation. To further obtain deep sequence association features between sentences, H... [CLS] The input is fed into a BiLSTM to obtain the inter-sentence association information, i.e., S = BiLSTM(H). [CLS] Finally, S is input into a Conditional Random Field (CRF) to perform sequence labeling on the sentences to obtain sentence-level labels, i.e., Y = CRF(S). The labeling rule adopts the commonly used BIO strategy, which can obtain sentence sequence labels and sentence opinion attribute labels.
[0072] The training steps for the sentence tagging model include:
[0073] Training Data Construction: The training data for the current stage primarily uses ECOB-ZH data. In this dataset, opinions mainly refer to continuous sentence sequences containing a given event and carrying one of the following evaluation perspectives: (judgment, attitude, emotion, belief, suggestion). During the annotation process of the training data, these five evaluation aspects are labeled J (judgements), A (attitudes), E (emotion), B (beliefs), and S (suggestions), respectively. For example:
[0074] {
[0075] News Headline: 80% of Down Jackets Sold by Online Influencers Fail Spot Checks; Some Products Suspected of Fraud
[0076] Event Summary: 80% of down jackets sampled from live-streaming platforms fail to meet standards.
[0077] Sentence 1: The Consumer Protection Committee of Province A conducted random inspections on a batch of down jackets sold on online live streaming platforms. The results showed that 24 out of 30 batches of down jackets failed to meet the standards, accounting for 80%.
[0078] Sentence 2: XX, Secretary-General of the Consumer Protection Committee of City B, Province A: The down filling amount does not meet the national standard requirements. Its cost is relatively low. If it is less than 50%, it cannot be called a down jacket. It is suspected of consumer fraud.
[0079] Sentence 3: The internet age has indeed brought convenience to purchasing goods, but it has also become the best sales channel for some substandard products.
[0080] }
[0081] Sentence 3 is a sentence expressing an opinion, and its opinion category is: attitude. By using the "BIEOS" tags in combination with the opinion aspect, the input sentence is tagged. The "BIEOS" sequence labeling method provides additional end information and gives a single word tag S-tag, providing more information. Among them, B- represents the beginning of the opinion sentence, I- represents the middle, O- represents an irrelevant sentence, E- represents the end, and S- represents a single sentence.
[0082] Chinese word segmenter: Similar to the event summary text generation model, the T5-PEGASUS word segmenter is used to segment the input document text content first.
[0083] Training and optimization:
[0084] The loss function during training is shown below. The loss is calculated using log-likelihood, and the optimal model is obtained by iteratively minimizing the loss:
[0085]
[0086] Among them, S RealPath The actual label path for the input text. Let e be the total score of all labels at a given time, where e is a natural constant. It is the score of label i at a certain moment; This refers to the probability that the i-th word is labeled as zi; Indicates from label z i To z i+1 The transition probability, z i and z i+1 These are the possible labels for the i-th and i+1-th sentences of the input sequence, respectively.
[0087] The Viterbi algorithm is used for prediction. Similar to commonly used sequence labeling prediction methods, the essence of this task is to label the input sentence-level sequence, that is, to predict the state sequence given the observation sequence.
[0088] The F1 score is used as the evaluation metric. A viewpoint is considered correctly identified if and only if all boundary sentences of the viewpoint are correctly identified. Specifically, given an event summary text and related documents, the predicted set of viewpoints is compared with the labeled set of viewpoint fragments, and the model is optimized based on the evaluation metric.
[0089] III. Establishing a Model for Extracting Opinion Evaluation Objects
[0090] By using event summary text and the opinion composed of sentence sequences obtained in the sentence annotation model stage, an opinion evaluation object that can be extracted from the event summary text is established.
[0091] In this stage, an opinion evaluation object extraction model is established. Inputting an opinion, the model obtains the evaluation object of that opinion; wherein, the evaluation object is a sequence of words extracted from the event summary text. The opinion evaluation object extraction model uses Machine Reading Comprehension (MRC) to extract opinion evaluation objects. The input includes questions and paragraphs. A BERT-based extraction machine reading comprehension model is used to match the event summary text with the opinion composed of sentence sequences, obtaining the probability distribution of the answers, thereby obtaining the opinion evaluation object.
[0092] Specifically, given an event summary text W and an opinion O, the two texts are first concatenated to obtain the model input X2 = {[CLS], O, [SEP], W}. Then, the input X2 is encoded using a BERT encoder to obtain the encoded representation H = BERT(X). The start and end pointer vectors represent the probability distributions of the start and end words of the opinion evaluation object, respectively: start = Softmax(H*Ws + bs), end = Softmax(H*We + be), where Ws and We are the weight parameter matrices of the fully connected layer, and bs and be are the biases. During prediction, the candidate opinion evaluation object is judged based on the predicted probabilities of the start and end points. The top k probabilities with the highest probabilities are selected as candidates, and start-end (start-end) combinations that satisfy the condition that start is less than or equal to end are selected. Finally, the combination with the highest sum of the two scores is used as the final target opinion evaluation object fragment's start and end words.
[0093] The training steps for the opinion evaluation object extraction model include:
[0094] Training data construction: In the ECOB-ZH dataset, opinion evaluation objects are mainly categorized into the event itself, sub-events, entities, and event trigger words. That is, opinion evaluation objects are defined as continuous subsequences in the event summary text. The goal of this stage is to extract opinion evaluation objects from the event summary text using opinions. Data examples are as follows:
[0095] Example 1:
[0096] {
[0097] News headline: CCTV's commentary on the acknowledgments in a Chinese Academy of Sciences doctoral dissertation goes viral.
[0098] Event Summary: CCTV's Commentary on the Acknowledgments of a Chinese Academy of Sciences Doctoral Dissertation Goes Viral
[0099] Viewpoint 1: In fact, what moves people to tears is not just hardship, but also the perseverance and struggle behind it. This is the result of yesterday's efforts and the best gift for tomorrow.
[0100] Viewpoint 1: The popularity of acknowledgments in Chinese Academy of Sciences doctoral dissertations
[0101] Viewpoint 2: "Keep studying, then go out into the world, and you won't have lived in vain." Huang Guoping describes his belief as "very simple."
[0102] Viewpoint 2 Target Audience: PhDs from the Chinese Academy of Sciences
[0103] Viewpoint 3: From Juguang Township Primary School, Dayin Town Middle School, Yilong County Middle School, and Mianyang Nanshan Middle School, to Southwest University and the Institute of Automation of the Chinese Academy of Sciences in Chongqing, and now working at Tencent's Artificial Intelligence Laboratory, Huang Guoping has traversed countless thorny paths, including the coldness of human relationships, life and death, and poverty. It is only because he has always held onto hope in his suffering that his path has become wider and wider.
[0104] Opinion on 3 subjects: PhD from the Chinese Academy of Sciences
[0105] Viewpoint 4: Weibo user comment: How can such "simplicity" not be applauded? Despite the muddy road, there is always a beam of faith guiding us forward.
[0106] Viewpoint 4 Target Audience: PhDs from the Chinese Academy of Sciences
[0107] Viewpoint 5: One netizen commented: We really don't need to be stingy with thanking ourselves; we should thank ourselves for being able to smile and persevere through all the hardships.
[0108] Although Huang Guoping's writing is simple, it brings us tremendous power.
[0109] Viewpoint 5: Acknowledgments in Chinese Academy of Sciences doctoral dissertations
[0110] Viewpoint 6: Making others' lives better—it turns out that when personal ideals are perfectly combined with the platform for struggle built by the country, and perfectly aligned with the theme of striving together in this era, our struggles and beliefs take on their best form.
[0111] Viewpoint 6: Acknowledgments in Chinese Academy of Sciences doctoral dissertations go viral.
[0112] Viewpoint 7: CCTV.com Commentary: Compared to the fake inspirational quotes flooding social media, this is the real life of an unknown person!
[0113] Viewpoint 7: Acknowledgments in Chinese Academy of Sciences doctoral dissertations go viral.
[0114] Point 8: This is also an effort by an ordinary person to give us enough hope. Finally, I hope that all those who are working hard will ultimately succeed despite their hardships!
[0115] Viewpoint 8: Acknowledgments in Chinese Academy of Sciences doctoral dissertations go viral.
[0116] }
[0117] Chinese word segmenter: Similar to the event summary text generation model, the T5-PEGASUS word segmenter is used to segment the input document text content first.
[0118] Training and Optimization: In the MRC task, the prediction goal is to obtain the start and end positions of the answer. Therefore, during the training phase, the loss of this task also consists of the start position loss and the end position loss, calculated as follows:
[0119] p start =softmax(T) i )
[0120] p end =softmax(T) j )
[0121]
[0122] During the training phase, each token in X is determined to be either a start or an end. Where T... i and T j Let T represent the learnable parameter matrices with the i-th token at the start position and the j-th token at the end position, respectively. i and T j The probabilities of start and end, i.e., p, can be obtained by applying the softmax activation function. start p end The optimization objective during training is the sum of the cross-entropy loss for correctly classifying the start and end positions (equivalent to performing binary classification on both start and end to determine if they are correct), where p start xi p end xj These represent the probabilities that token i and token j are predicted as start and end, respectively.
[0123] During the prediction process, the candidate viewpoint object is judged based on the predicted scores of the start and end points. The top k most probable returns are selected as candidates, and the position pairs that satisfy the condition that start is less than or equal to end are filtered out. Finally, the position with the highest sum of the two scores is taken as the final target viewpoint object segment's start and end position.
[0124] Accuracy is used as an evaluation method. A viewpoint is considered correctly extracted if and only if the start and end boundaries of the viewpoint evaluation object are correctly identified. Specifically, given a correct viewpoint and event summary text, the predicted viewpoint evaluation object is compared with the labeled viewpoint evaluation object, and the model is evaluated based on the comparison score.
[0125] Through the aforementioned stages of event summary text acquisition, sentence annotation model building, and opinion evaluation object extraction model training, accurate opinions on a specific event can be obtained, which plays a crucial role in subsequent opinion analysis. A specific implementation example is as follows:
[0126] {
[0127] Title: Embarrassing! Chinese Gymnastics Team Ends World Championships Without Gold, a Wake-Up Call
[0128] The 49th World Gymnastics Championships concluded in Stuttgart, Germany. The Philippines and Turkey both won their first-ever World Gymnastics Championships gold medals, while traditional gymnastics powerhouses like China, Russia, and Japan had lackluster performances, with China failing to win a single gold. In the men's floor exercise final, Russia's "twin stars," Nagorny and Dalaloyan, both made significant mistakes, allowing 19-year-old Yulo from the Philippines to win the gold, becoming the Philippines' first-ever World Gymnastics Champion. Ibrahim Clark also made history, winning the men's rings event and securing Turkey's first-ever World Gymnastics Championships gold medal, its first World Championships medal overall. While traditionally smaller gymnastics nations like the Philippines and Turkey made history, the overall performance of Chinese athletes was disappointing, resulting in a gold medalless finish. In the team event, the men's team narrowly missed the championship due to a fall on the horizontal bar in the final round; the women's team, hampered by numerous mistakes, finished fourth and failed to reach the podium. In the all-around competition, the men's team, represented by Xiao Ruoteng and Sun Wei, both failed to win medals; the women's team's biggest surprise came with Tang Xijing, a young athlete who replaced her teammate at the last minute, winning a valuable silver medal in her first major international competition, second only to American star Simone Biles. In the ten individual events, the Chinese team also failed to win any gold medals. Xiao Ruoteng won the bronze medal in the men's floor exercise, while Liu Tingting and Li Shijia won the silver and bronze medals respectively on the balance beam. With only one year until the Tokyo Olympics, the embarrassing performance at the World Championships undoubtedly served as a wake-up call for the Chinese gymnastics team. Lin Chaopan frankly stated after finishing all the competitions: "We must go all out in winter training to improve ourselves and win back what we lost at the Tokyo Olympics!"
[0129] Output:
[0130] Event Summary Text: Gymnastics Team Ends the Season Without a Gold Medal
[0131] Viewpoint 1: The Philippines and Turkey both won their first-ever World Gymnastics Championships gold medals, while traditional gymnastics powerhouses such as China, Russia, and Japan performed poorly, with the Chinese team suffering the embarrassing result of not winning a single gold medal.
[0132] Viewpoint 1: Gymnastics team finishes the season without a gold medal
[0133] Viewpoint 2: While traditionally small gymnastics nations like the Philippines and Turkey made history one after another, the overall performance of Chinese athletes was disappointing, and they ultimately failed to win a single gold medal.
[0134] Viewpoint 2: Gymnastics team finishes the season without a gold medal
[0135] Viewpoint 3: With only one year to go before the Tokyo Olympics, the embarrassing performance at the World Championships has undoubtedly served as a wake-up call for the Chinese gymnastics team.
[0136] Viewpoint 3: Gymnastics team finishes the season without a gold medal.
[0137] Viewpoint 4: After finishing all the competitions, Lin Chaopan frankly said: "I still need to go all out to improve myself during winter training and win back what I lost at the Tokyo Olympics!"
[0138] Viewpoint 4: Gymnastics team finishes the season without a gold medal
[0139] }
[0140] As shown in Table 2, this application demonstrates the test results in the event summary text acquisition stage (Task 1), the sentence annotation model establishment stage (Task 2), and the opinion evaluation object extraction model establishment stage (Task 3). It can be seen that the test results obtained after the three stages of this application have been improved.
[0141] Table 2
[0142] Dataset Model Task 1 Task 2 Task 3 Total Score ECOB-ZH baseline * 0.4614 * 0.3138 ECOB-ZH+ This plan 0.8614 0.5107 0.2451 0.3321
[0143] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0144] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method of constructing an opinion evaluation object model, characterized by, The application relates to an event summary text generation method and device. The event summary text generation model is fine-tuned based on a T5-PEGASUS Chinese pre-training model, the overall situation of an event is obtained by summarizing long text and related information text, and the event summary text is obtained through summarization and generalization. The sentence labeling model is used to input the viewpoint text for evaluating the event and the event summary text, and the viewpoint with the event summary text as semantic guidance is obtained. The viewpoint evaluation object extraction model is used to input the viewpoint and the event summary text, and the evaluation object of the viewpoint is obtained. The sentence labeling model comprises a Bert encoder, a BiLSTM and a conditional random field (CRF). The text for training is segmented into n sentences, and each of the n sentences R i is spliced with the event summary text W to form a spliced string (R i , W). The [CLS] is taken as a start tag before each spliced string, to obtain input data X1={([CLS], R1, W), ([CLS], R2, W)…, ([CLS], R n , W)}, and the X1 is input into a Bert encoder to obtain a sentence vector H [CLS] represented by the [CLS] position. H [CLS] Input to BiLSTM to obtain concatenation string interrelation features S with event summary text W as public field, The sentence labeling model is established by inputting S into the conditional random field (CRF), using a BIO strategy, and performing sentence-level labeling on each sentence with the public field W as semantic guidance to obtain sentence sequence labeling and viewpoint attribute labeling of the sentence.
2. The method of claim 1, wherein the viewpoint evaluation object model is constructed by: The event summary text generation model is established by obtaining related text related to the event content in the provided information text, setting a text similarity threshold, obtaining content with a text similarity greater than the text similarity threshold in the information text as new training samples, expanding the training set, training the T5-PEGASUS pre-training model based on the expanded training set, and optimizing the model by using a ROUGE-L evaluation method. The Jaccard distance of the related text and the information text after word segmentation is calculated as the text similarity, and the content of the related text meeting the text similarity is added to the training set as new training samples. The annotation of the sentence at least comprises an attribute label and a sequence label, the sequence label is used for labeling the sequence position of the sentence in the viewpoint, and the attribute label is used for labeling the viewpoint category of the sentence. The log-likelihood is used for calculation when the sentence is annotated, and the best model is obtained by iteratively minimizing the loss. The viewpoint evaluation object is obtained by combining the obtained viewpoint O and the event summary text W, taking [CLS] as the starting mark of the combination and [SEP] as the separation mark between the viewpoint O and the event summary text W to obtain input X2 = {[CLS], O, [SEP], W}, inputting X2 into the BERT encoder to obtain the association vector Q of the viewpoint O and the event summary text W, and extracting a word sequence in the event summary text W as the viewpoint evaluation object of the viewpoint O.
3. The method of claim 2, wherein the viewpoint evaluation object model is constructed by: The step of extracting the word sequence in the event summary text W comprises the following steps.
4. The method of claim 1, wherein the viewpoint evaluation object model is constructed by: 5. The method of claim 1, wherein the viewpoint evaluation object model is constructed by: where e is a natural constant, is the score of a sentence being labeled as i at some time, is the total score of all labels at some time, S RealPath is the true label path of the input text; denotes the probability of the ith word being labeled as z i ; denotes the transition probability from label z i to z i+1 , z i and z i+1 are the possible labels of the ith and i+1th sentence of the input sequence, respectively, 0<=i<=N.
6. The method of claim 1, wherein the viewpoint evaluation object model is constructed by: 7. The method for constructing a model for obtaining opinion evaluation objects as described in claim 6, characterized in that, A start word pointer vector start and an end word pointer vector end are set in the event summary text, start = Softmax(Q*Ws+bs), end = Softmax(Q*We+be), wherein Softmax is an activation function, Ws and We are weight parameter matrices of full connection layers of start word and end word respectively, bs and be are biases, and the start word pointer vector start and the end word pointer vector end represent probability distributions of start words and end words of the opinion evaluation object in the event summary text respectively; A start-end combination is selected by taking a pair of start words and end words as the start-end combination, and the cross-entropy loss score of the start position vector and the end position vector and the highest start-end combination are selected as the start word and the end word.
8. The method of claim 7, wherein the viewpoint evaluation object model is constructed by: The start position vector and the end position vector of the start-end combination are selected, including: selecting the first k start words and end words with the highest probability distribution values as candidates, screening out start-end combinations that satisfy the condition that the start word is in front of the end word, and calculating the cross-entropy loss score and the highest start-end combination.
9. The method of claim 7, wherein the viewpoint evaluation object model is constructed by: The calculation method of the cross-entropy loss score is: p start = softmax(Ti) p end = softmax(T j ) where T i and T j represent the learnable parameter matrix of the i-th word of the event summary text as the start word and the j-th word as the end word, respectively, p start , p end are the probabilities of the start word and the end word obtained by the activation function softmax; p start xi , p end xj are the probabilities of the i-th word and the j-th word being predicted as the start word and the end word, respectively.
Citation Information
Patent Citations
Viewpoint extraction method, device and equipment
CN115033685A