A method for acquiring and analyzing opinions on events as evaluation objects
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-06
- Publication Date
- 2026-08-11
AI Technical Summary
[0004]鉴于上述的分析,本发明实施例旨在提供一种以事件作为评价对象的观点的获取及分析方法,用以解决现有在舆情分析过程中需要获得针对事件的观点数据的问题
[0030]本申请能够提供的描述事件内容新闻标题,建立相应的训练集,训练得到语言模型,得到以最小文本描述事件事实内容的事件摘要文本;之后,再根据提供的对所述事件进行评价的观点文本,通过训练句子标注模型,从所述观点文本中抽取出观点以及观点的属性;最后根据观点,从事件摘要文本中抽取出词序列,得到所述观点的评价对象。通过上述方法,能够在保证在以事件的事实内容为语义指导的前提下,得到针对所述事件的观点。极大的影响了分析的性能,对于舆情分析有重要作用。
Smart Images

Figure CN116383373B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of online public opinion analysis technology, and in particular to a method for obtaining and analyzing viewpoints that take events as evaluation objects. Background Technology
[0002] Public opinion, or simply public sentiment, refers to the social attitudes held by the public (as the subject) towards social managers, enterprises, individuals, and other organizations, and their political, social, and moral orientations, surrounding the occurrence, development, and changes of mediating social events within a specific social space. In the current developed network environment, online public opinion, as a reflection of social public opinion in cyberspace, is a direct reflection of social public opinion. Obtaining opinions and comments from netizens as the evaluators and events as the objects of evaluation from online public opinion data, and conducting further data analysis, is of great significance for timely information understanding, strengthening public opinion monitoring, and improving the ability to respond to public opinion.
[0003] The obtained public opinion data often contains many different evaluation directions. Opinions arising from the same event often target different evaluation objects. If a large amount of comment data targeting different evaluation objects is used for opinion analysis, it will lead to biased results and affect the accuracy of the overall analysis. Furthermore, rational public opinion data analysis should be based on substantive and constructive arguments grounded in the factual content of the event itself. However, since much comment data targets emotional content about an entity or sub-event within the event, collecting too much biased comment data will affect the analysis of public opinion regarding the overall event, resulting in biased analytical results. Summary of the Invention
[0004] Based on the above analysis, the embodiments of the present invention aim to provide a method for obtaining and analyzing opinions on events as evaluation objects, in order to solve the problem of needing to obtain opinion data on events in the existing public opinion analysis process.
[0005] On one hand, embodiments of the present invention provide a method for obtaining viewpoints that take events as evaluation objects, including: obtaining event summary text based on provided information text containing event content;
[0006] Based on the provided opinion text evaluating the event, and using the event summary text as semantic guidance, sentence sequences are extracted from the opinion text to obtain the opinion;
[0007] Based on the obtained viewpoints, word sequences are extracted from the event summary text to obtain the evaluation objects of the viewpoints;
[0008] Wherein, when the evaluation object is the entire content of the event summary text, the opinion is an opinion on the event.
[0009] A further improvement to the above method, obtaining the event summary text based on the information text, includes the following steps:
[0010] By using information text as keywords, relevant content can be obtained online through keyword retrieval;
[0011] Calculate the text similarity between the acquired relevant content and the information text, set a similarity threshold, and select relevant content whose text similarity to the information text exceeds the similarity threshold as relevant text;
[0012] Based on informational text and related text, an event summary text generation model is used to obtain a text that describes all the factual information of the event with the minimum text length, which is then used as the event summary text.
[0013] Based on a further improvement of the above method, the acquisition of the viewpoint includes the following steps:
[0014] Segment the provided viewpoint text;
[0015] Using the event summary text as a semantic guide, each sentence is annotated based on its semantic association with the event summary text using a sentence annotation model.
[0016] Based on a further improvement of the above method, the annotation of the sentence includes at least attribute tags and sequence tags. The sequence tags are used to mark the sequence position of the sentence in the viewpoint, and the attribute tags are used to mark the viewpoint category of the sentence; wherein, sentence sequences belonging to the same viewpoint have the same viewpoint category.
[0017] Based on further improvements to the above method, the sequence tags include the opening sentence of the viewpoint, the middle sentence of the viewpoint, the closing sentence of the viewpoint, a single sentence of the viewpoint, and a non-viewpoint sentence.
[0018] Based on further improvements to the above method, the opinion categories include judgments, attitudes, emotions, beliefs, and suggestions.
[0019] Based on further improvements to the above method, the object of opinion evaluation includes the event itself, sub-events of the event, or entities within the event.
[0020] Based on the above method, the evaluation object of the viewpoint is obtained by the following steps: segmenting the event summary text into words;
[0021] Based on the semantic relationship between the viewpoint and the event summary text, the matching degree of each word in the viewpoint and the event summary text is obtained, and the word sequence with the highest matching degree is extracted from the event summary text as the evaluation object of the viewpoint.
[0022] Based on a further improvement of the above method, the opinion evaluation object includes the event itself, sub-events of the event, or entities in the event. When the opinion evaluation object is the entire content of the event summary text, the opinion is directed at the event itself, and opinions directed at the event itself are selected for opinion analysis.
[0023] Further improvements to the above method, extracting word sequences as evaluation objects of viewpoints, include the following steps:
[0024] Based on the semantic association between the viewpoint and the event summary text, two words in the event summary text are selected as the start word and the end word. The cross-entropy loss is minimized when the start word and the end word are selected simultaneously, and the sequence position of the start word precedes the end word.
[0025] The text consisting of a sequence of words from the beginning word to the end word is used as the object of evaluation of opinions.
[0026] On the other hand, embodiments of the present invention also provide a method for obtaining a viewpoint that uses an event as an evaluation object, including the method for obtaining a viewpoint that uses an event as an evaluation object as described in any of the above-described embodiments; and, after obtaining the evaluation object of the viewpoint, further including the following steps:
[0027] Viewpoints that evaluate the entire content of the event summary text are selected as opinions on the event itself.
[0028] Analyze the viewpoints regarding the event itself.
[0029] Compared with the prior art, the present invention can achieve at least the following beneficial effects:
[0030] This application provides news headlines describing event content, establishes a corresponding training set, trains a language model, and obtains event summary text that minimally describes the factual content of the event. Then, based on provided opinion text evaluating the event, a sentence annotation model is trained to extract the opinion and its attributes from the opinion text. Finally, based on the opinion, word sequences are extracted from the event summary text to obtain the evaluation object of the opinion. This method can obtain opinion on the event while ensuring that the factual content of the event serves as semantic guidance. It significantly impacts the performance of the analysis and plays an important role in public opinion analysis.
[0031] 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
[0032] 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.
[0033] Figure 1 This is a flowchart illustrating the implementation process of the three stages of this invention: event summary text acquisition, opinion extraction, and opinion evaluation object extraction.
[0034] Figure 2 This is a diagram illustrating the model structure for obtaining event summary text using the T5 model.
[0035] Figure 3 This is a diagram illustrating the structure of a sentence tagging model.
[0036] 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
[0037] 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.
[0038] Traditional opinion analysis often focuses on a specific angle of the object of evaluation, such as opinion categories based on emotional polarity. However, the needs considered in this application are 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. For example, the opinion evaluation of the event "Shanghai Stock Exchange suspends XX Group's listing" could include "XX Group's most urgent task is to earnestly and promptly rectify the situation according to the requirements of the regulatory authorities." This provides constructive suggestions, going beyond mere emotional generalizations.
[0039] An event contains factual information about the event itself, generally including information such as the subject, object, trigger words, and tense. Examples include "XX food delivery company will give riders 8 minutes of flexibility time", "80% of down jackets promoted by online influencers fail to meet standards in random inspections: some products are suspected of fraud", and "CCTV's commentary on the acknowledgments in a Chinese Academy of Sciences doctoral dissertation goes viral".
[0040] When an event generates online public opinion, the evaluators (netizens) not only express their views on the event itself, but also on sub-events, related events, and the entities involved. Taking the event "Shanghai Stock Exchange suspends XX Group's listing" as an example, besides the event itself, opinions may also be expressed on the sub-event "XX Group's listing" and the participating entities "Shanghai Stock Exchange" and "XX Group." Among the many opinions derived from a single event, the objects of evaluation are not necessarily consistent, and it's even possible that most of the evaluations are not directed at the event itself. For example, when the object of evaluation is the event itself, 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 rather at its sub-events or related events, such as "If Company A wins the appeal in its patent dispute with Company B," which expresses an opinion on the patent dispute; when the object of evaluation is an entity, it means that regardless of what event occurs, the opinion directly targets one of the related entities, such as "Company B is a great company."
[0041] To conduct more accurate opinion analysis, it is essential to first obtain opinions that share the same object of evaluation as the basis for the analysis. For example, when analyzing opinions arising from an event itself, it is necessary to obtain opinions that use the event itself as the object of evaluation.
[0042] Therefore, this invention discloses a method for obtaining opinion evaluation objects regarding an event, such as... Figure 1 The illustration shows a specific embodiment of the present invention, which includes the following three stages:
[0043] S1. Event Summary Text Acquisition Stage: Based on the provided information text containing event content, obtain the event summary text.
[0044] S2. Opinion Extraction Stage: Based on the provided opinion text evaluating the event, and using the event summary text as semantic guidance, sentence sequences are extracted from the opinion text to obtain the opinion.
[0045] S3. Opinion Evaluation Object Extraction Stage: Based on the obtained opinion, word sequences are extracted from the event summary text to obtain the evaluation objects of the opinion. Specifically:
[0046] I. Event Summary Text Acquisition Phase
[0047] 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:
[0048] 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.
[0049] 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).
[0050] 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.
[0051] In the event summary text generation stage, 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 accurately summarizes the event. In this scheme, the output event summary text is the minimum text describing the facts, typically describing only one factual event and containing key elements related to the event. This scheme uses news headlines as the long descriptive text of the event as input, and simultaneously expands it with related information text found online.
[0052] 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:
[0053] Table 1
[0054]
[0055] For sequence-to-sequence text conversion models, we fine-tune the task objective based on the powerful pre-trained T5 model, such as... Figure 2 As shown, the event summary text generation model is obtained, thus yielding the event summary text W.
[0056] The event summary text generation model is evaluated using 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:
[0057]
[0058]
[0059]
[0060]
[0061] 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. 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.
[0062] After the model is trained, based on the provided information text containing event content, the event summary text is obtained specifically by: using the information text as keywords, obtaining relevant content on the Internet by searching for keywords; calculating the text similarity between the obtained relevant content and the information text, setting a similarity threshold, and selecting relevant content whose text similarity with the information text exceeds the similarity threshold as relevant text; and using the event summary text generation model based on the information text and relevant text to obtain the text describing all the factual information of the event with the minimum text length as the event summary text.
[0063] II. Viewpoint Extraction Stage:
[0064] In the opinion extraction stage, considering the need to extract opinions from provided opinion documents containing event viewpoints, where the extracted opinions are combinations of sentence sequences after the document is segmented, and to analyze the opinions, it is also necessary to determine the type of opinion. Therefore, a sentence annotation model needs to be established. After inputting sentences, it can obtain sentence sequence annotations and opinion attribute annotations. Assuming a given opinion is provided, the opinion in the provided opinion document containing event viewpoints may contain multiple sentences or single sentences. The identified sentences need to be correctly sequenced as the opinion text.
[0065] 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.
[0066] Specifically, such as Figure 3As 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.
[0067] 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.
[0068] The training steps for the sentence tagging model include:
[0069] 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:
[0070] {
[0071] News Headline: 80% of Down Jackets Sold by Online Influencers Fail Spot Checks; Some Products Suspected of Fraud
[0072] Event Summary: 80% of down jackets sampled from live-streaming platforms fail to meet standards.
[0073] 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%.
[0074] 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.
[0075] 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.
[0076] }
[0077] Sentence 3 is a sentence expressing an opinion, and its opinion category is: attitude. By using the "BIEOS" tags in combination with the opinion category, 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.
[0078] 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.
[0079] Training and optimization:
[0080] 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:
[0081]
[0082] 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.
[0083] 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.
[0084] 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.
[0085] III. Selection of Opinion Evaluation Subjects
[0086] By using event summary text and opinion extraction phase to obtain opinion sequences composed of sentence sequences, an opinion evaluation object is established that can extract opinion from event summary text.
[0087] 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.
[0088] 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.
[0089] The training steps for the opinion evaluation object extraction model include:
[0090] Training data construction: In the ECOB-ZH dataset, opinion evaluation objects mainly fall into several categories, such as 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 task is to extract opinion evaluation objects from the event summary text using opinions. Data examples are as follows:
[0091] Example 1:
[0092] {
[0093] News headline: CCTV's commentary on the acknowledgments in a Chinese Academy of Sciences doctoral dissertation goes viral.
[0094] Event Summary: CCTV's Commentary on the Acknowledgments of a Chinese Academy of Sciences Doctoral Dissertation Goes Viral
[0095] 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.
[0096] Viewpoint 1: The popularity of acknowledgments in Chinese Academy of Sciences doctoral dissertations
[0097] Viewpoint 2: XX describes his belief as "very simple".
[0098] Viewpoint 2 Target Audience: PhDs from the Chinese Academy of Sciences
[0099] Viewpoint 3: XX has traversed countless thorny paths, including the coldness of human relationships, separation from loved ones, death, and poverty. It is only because he has always held onto hope amidst suffering that his path has become wider and wider.
[0100] Viewpoint 3 Target Audience: PhDs from the Chinese Academy of Sciences
[0101] 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.
[0102] Viewpoint 4 Target Audience: PhDs from the Chinese Academy of Sciences
[0103] 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.
[0104] Although XX's writing is simple, it brings us tremendous power.
[0105] Viewpoint 5: Acknowledgments in Chinese Academy of Sciences doctoral dissertations
[0106] 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.
[0107] Viewpoint 6: Acknowledgments in Chinese Academy of Sciences doctoral dissertations go viral.
[0108] Viewpoint 7: CCTV.com Commentary: Compared to the fake inspirational quotes flooding social media, this is the real life of an unknown person!
[0109] Viewpoint 7: Acknowledgments in Chinese Academy of Sciences doctoral dissertations go viral.
[0110] 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!
[0111] Viewpoint 8: Acknowledgments in Chinese Academy of Sciences doctoral dissertations go viral.
[0112] }
[0113] 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.
[0114] 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:
[0115] p start =softmax(T) i )
[0116] p end =softmax(T) j )
[0117]
[0118] 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.
[0119] 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.
[0120] 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.
[0121] By training the model through the above-mentioned event summary text acquisition, opinion extraction, and opinion evaluation object extraction stages, accurate opinions on a specific event can be obtained, which plays a crucial role in subsequent opinion analysis, as shown in the following specific implementation example:
[0122] {
[0123] Title: China's Gymnastics Team's Poor Performance at the World Championships Sounds the Alarm
[0124] Text: The World Gymnastics Championships have concluded. Countries A and B both won their first-ever World Gymnastics Championships gold medals, while Country C's performance was mediocre. ... With only one year until the next Olympics, the disappointing results at the World Championships undoubtedly serve as a wake-up call for Country C's gymnastics team. ...
[0125] Output:
[0126] Event Summary Text: Gymnastics Team Ends the Season Without Winning Gold
[0127] Viewpoint 1: Both countries A and B won their first-ever World Gymnastics Championships gold medals, while country C's performance was mediocre.
[0128] Viewpoint 1: Gymnastics team finishes the season without a gold medal
[0129] Viewpoint 2: With only one year until the next Olympic Games, the unsatisfactory results at the World Championships undoubtedly served as a wake-up call for the C country's gymnastics team.
[0130] Viewpoint 2: Gymnastics team finishes the season without a gold medal
[0131] ...
[0132] }
[0133] Furthermore, the method for analyzing viewpoints that use events as evaluation objects specifically includes the following steps: selecting viewpoints whose evaluation objects are the entire content of the event summary text, and using these viewpoints as the focus of the event itself, then analyzing the selected viewpoints. Specifically, according to the above embodiment, based on the obtained event summary text and viewpoint objects, viewpoints 1, 2, 3, and 4 are selected as the evaluation objects of the event itself. Therefore, viewpoints 1, 2, 3, and 4 are used as the focus of data analysis for the event itself.
[0134] As shown in Table 2, this application demonstrates the test results in the event summary text acquisition stage (Task 1), opinion extraction stage (Task 2), and opinion evaluation object extraction stage (Task 3). It can be seen that the test results obtained after the three stages of this application have been improved.
[0135] Table 2
[0136] ECOB-ZH baseline * 0.4614 * 0.3138 ECOB-ZH+ This plan 0.8614 0.5107 0.2451 0.3321
[0137] 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.
[0138] 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 for obtaining viewpoints that use events as evaluation objects, characterized in that, Includes the following steps: Based on the provided information text containing event content, an event summary text is obtained; wherein, the information text is used as keywords, and relevant content on the Internet is obtained by searching for keywords; Calculate the text similarity between the acquired relevant content and the information text, set a similarity threshold, and select relevant content whose text similarity to the information text exceeds the similarity threshold as relevant text; Based on informational and related texts, an event summary text generation model is used to obtain a text that describes all the factual information of an event with the minimum text length, which is then used as the event summary text. The event summary text generation model is then fine-tuned based on the T5 pre-trained model. Based on the provided opinion text evaluating the event, and using the event summary text as semantic guidance, a sentence sequence is extracted from the opinion text through sentence-level annotation using a sentence annotation model based on BERT+BiLSTM+CRF to obtain the opinion. The sentence-level annotation includes at least attribute labels and sequence labels. The sequence labels are used to indicate the sentence's position within the opinion, and the attribute labels are used to indicate the opinion category of the sentence. Sentence sequences belonging to the same opinion have the same opinion category. Specifically, this includes: The provided document D containing the sentence annotations to be obtained and the event summary text W are taken as input. Document D is set to contain n sentences. Each sentence R in W and D is concatenated, and [CLS] is used as the sentence start identifier to obtain the data X1 = {([CLS] , R1 ,W) ,([CLS] ,R2 ,W)…,([CLS] ,R n ,W)}; Inputting X1 into the BERT model yields the latent vector H. [B*T*C] Where B, T, and C are the number of samples, sample length, and latent vector feature width, respectively, and H is... [B*T*C] It is a word-level feature vector; Take the [CLS] character vector H [CLS] The sentence vector representing the current sentence is used to obtain the sentence-level feature representation, and H is used to... [CLS] Input the data into a BiLSTM to obtain the inter-sentence association information S; The S-input conditional random field is used to perform sequence labeling on the sentences to obtain sentence-level annotations, including sentence sequence annotations and sentence opinion attribute annotations; Based on the obtained viewpoints, word sequences are extracted from the event summary text to obtain the evaluation objects of the viewpoints; Wherein, when the evaluation object is the entire content of the event summary text, the opinion is an opinion on the event.
2. The method for obtaining viewpoints using events as evaluation objects as described in claim 1, characterized in that, Obtaining viewpoints involves the following steps: Segment the provided viewpoint text; Using the event summary text as a semantic guide, and based on the semantic relationship between each sentence and the event summary text, a sentence annotation model is used to annotate each sentence to obtain the viewpoint.
3. The method for obtaining viewpoints using events as evaluation objects as described in claim 2, characterized in that, The sequence tags include the opening sentence of the viewpoint, the middle sentence of the viewpoint, the closing sentence of the viewpoint, a single sentence of the viewpoint, and a non-viewpoint sentence.
4. The method for obtaining viewpoints using events as evaluation objects as described in claim 2, characterized in that, The opinion categories include judgments, attitudes, emotions, beliefs, and recommendations.
5. The method for obtaining viewpoints using events as evaluation objects as described in claim 1, characterized in that, The objects of the opinion evaluation include the event itself, sub-events of the event, or entities within the event.
6. The method for obtaining viewpoints based on events as evaluation objects according to claim 1, characterized in that, The process of obtaining an evaluation of an opinion involves the following steps: Segment the event summary text into words; Based on the semantic relationship between the viewpoint and the event summary text, the matching degree of each word in the viewpoint and the event summary text is obtained. Using the viewpoint evaluation object extraction model, the word sequence with the highest matching degree is extracted from the event summary text as the evaluation object of the viewpoint.
7. The method for obtaining viewpoints based on events as evaluation objects according to claim 6, characterized in that, Extracting word sequences as the object of opinion evaluation includes the following steps: Based on the semantic association between the viewpoint and the event summary text, two words in the event summary text are selected as the start word and the end word. The cross-entropy loss is minimized when the start word and the end word are selected simultaneously, and the sequence position of the start word precedes the end word. The text consisting of a sequence of words from the beginning word to the end word is used as the object of evaluation of opinions.
8. A method for analyzing viewpoints using events as evaluation objects, characterized in that, The method includes the method for obtaining the viewpoint as described in any one of claims 1-7; and, after obtaining the evaluation object of the viewpoint, it further includes the following steps: Viewpoints that evaluate the entire content of the event summary text are selected as opinions on the event itself. Analyze the viewpoints regarding the event itself.