A fine-grained sentiment analysis method based on event computation

By generating event summaries using a large language model and combining hierarchical density clustering and the Multilingual-BERT model, the limitations of event computation and sentiment analysis are overcome, enabling efficient identification and accurate sentiment analysis of dynamic events, applicable to multilingual text.

CN122114105APending Publication Date: 2026-05-29NANJING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610117838.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-28
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing technologies for event computation and sentiment analysis suffer from problems such as blind spots in event recognition, high maintenance costs, lack of depth in sentiment analysis, and insufficient multilingual capabilities, leading to inaccurate analysis results.

Method used

We use a large language model to generate event summaries, combine hierarchical density clustering algorithm to extract key elements, and use a Multilingual-BERT model for supervised fine-tuning and expert knowledge calibration to construct an event-sentiment joint analysis framework.

Benefits of technology

It achieves efficient identification and accurate sentiment analysis of dynamic events, can process multilingual text, improves the accuracy and scalability of analysis, and breaks the paradigm of isolated modeling of events and sentiments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122114105A_ABST
    Figure CN122114105A_ABST
Patent Text Reader

Abstract

The application discloses a kind of fine-grained sentiment analysis methods based on event calculation, comprising: step 1: using large language model to extract the event summary of each text, unsupervised event clustering analysis is carried out by clustering algorithm, representative data is screened out to obtain event cluster, and event key elements are extracted based on each event cluster using large language model.Step 2: fine-grained six-classification sentiment analysis is realized based on the pre-training model fine-tuned by labeled data, and the model semantic understanding ability is strengthened by introducing expert-driven unsupervised calibration mechanism for secondary fine-tuning training.Step 3: construct event-sentiment joint analysis framework, sentiment analysis is carried out using the trained sentiment classification model for the obtained event cluster, and the final sentiment distribution of each event is counted by designing structured output template.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of text analysis technology, and in particular relates to a fine-grained sentiment analysis method based on event computation. Background Technology

[0002] With the widespread adoption of social media, mainstream news portals, and various search engines, the internet has become the core carrier of information dissemination and public opinion fermentation, with massive amounts of text information emerging at an unprecedented rate. This multi-dimensional and highly timely text information not only provides the public with a convenient channel to quickly understand domestic and international political situations, economic development trends, cultural evolution, and social and livelihood dynamics, but also serves as an important window for reflecting public sentiment and capturing public attention, playing an irreplaceable role in information dissemination and the exchange of viewpoints. However, how to quickly and accurately extract the core information of specific events from this massive amount of text information, and simultaneously and accurately analyze the emotional distribution characteristics in related texts, has become an urgent problem to be solved.

[0003] In the field of natural language processing, event computation and sentiment analysis are key technological directions for addressing this challenge. Event computation focuses on automatically identifying events and extracting key elements from multi-source heterogeneous text, and achieving event classification, clustering, and evolution tracking. Its core objective is to transform unstructured text into structured event knowledge. Sentiment analysis, on the other hand, aims to determine the underlying sentiment and intensity of text through algorithmic models, accurately capturing public attitudes and emotional responses to specific events and topics. Integrating these two technologies to achieve unified analysis of "event recognition and sentiment association" can provide strong support for multiple important scenarios such as public opinion monitoring, public decision-making, and risk warning.

[0004] The core traditional methods of existing event computation rely on training with labeled data and defining fixed event categories as salient features, which are gradually revealing their limitations in dynamic and ever-changing public opinion scenarios. On the one hand, there are supervised learning-based event recognition and classification methods, which require manual labeling of large-scale "text-event category" aligned data. These methods first predefine a fixed event category system using domain knowledge, and then use traditional machine learning algorithms or deep neural networks to determine the event category. However, this method is limited by the predefined categories in the labeled data, and is prone to "recognition blind spots" when facing new event types not included in the system, failing to achieve dynamic adaptation. On the other hand, there are rule template-based event extraction and recognition methods, where domain experts manually formulate rule templates or combine dependency parsing to define association rules between trigger words and event topics, and then match event information that conforms to the rules from the text. However, rule templates also only adapt to predefined event categories, and are costly to maintain. They need to be continuously updated and iterated as public opinion topics and expressions change, making it difficult to cope with massive amounts of dynamic text. They also lack robustness to complex sentences or ambiguous expressions, failing to meet the event recognition needs in complex scenarios.

[0005] Sentiment analysis, as an important research direction in natural language processing, has seen relatively mature technological development, encompassing various methods from traditional machine learning to deep learning. However, key shortcomings remain. On the one hand, traditional sentiment analysis makes isolated sentiment judgments without considering the event context, only outputting the sentiment tendency of a single text. It fails to associate sentiment with specific events, making it difficult to reveal the sentiment distribution characteristics of the entire event, resulting in a lack of depth in the analysis results. On the other hand, existing models have insufficient sentiment recognition capabilities for multilingual and multi-domain mixed texts, easily leading to misjudgments or omissions of sentiment in complex texts, seriously affecting the accuracy of the analysis results. Summary of the Invention

[0006] Purpose of the invention: The technical problem to be solved by this invention is to address the limitations of separating event and emotion analysis, and to propose a fine-grained emotion analysis method based on event computation, which breaks through the traditional paradigm of isolated modeling of events and emotions, and is used to construct a systematic framework for joint event-emotion analysis.

[0007] Invention Steps: To solve the above-mentioned technical problems, this invention discloses a fine-grained sentiment analysis method based on event calculation, comprising the following steps:

[0008] Step 1: Implement specific event calculation. For all texts to be processed, use the large language model as the summary extraction model to generate a summary for each text. After data filtering and feature extraction, perform cluster analysis through hierarchical density clustering algorithm, and extract representative data from each cluster to obtain specific events. Perform key element analysis for each specific event based on the large language model.

[0009] Step 2: Construct a fine-grained sentiment analysis model. Based on labeled data, conduct supervised fine-tuning training of the six-class sentiment analysis model on the Multilingual-BERT model, and introduce an expert knowledge-driven unsupervised calibration mechanism to construct a calibration dataset for secondary fine-tuning training.

[0010] Step 3: Construct an event-sentiment joint analysis framework. Based on each specific event obtained from the clustering in Step 1, input the sentiment analysis model fine-tuned in Step 2 to perform sentiment proportion statistics. This allows sentiment analysis to rely on specific events rather than isolated judgments. Following a preset structured template, the framework integrates key event elements with sentiment distribution statistics and outputs the event-sentiment joint analysis results.

[0011] Furthermore, the specific event calculation described in step 1 includes the following steps:

[0012] Step 1-1: For the text to be processed, extract a text summary using a summary extraction model; the preferred summary extraction model is Qwen2.5-7B-Instruct model.

[0013] Steps 1-2 involve filtering and extracting features from the extracted summary data to construct a feature matrix.

[0014] Steps 1-3: Dynamically adjust the core parameters of the hierarchical density clustering algorithm to perform cluster analysis on the acquired text features;

[0015] Steps 1-4: Extract representative samples from each cluster based on cosine similarity to obtain the final specific events, and use the summary extraction model to extract the key elements of each specific event.

[0016] Given the significant dynamic evolution of events, traditional classification models struggle to adapt to the characteristics of topics and events across different time periods. Therefore, clustering methods are employed for unsupervised event clustering analysis. To address the issue of lengthy input texts, direct clustering suffers from difficulties in extracting core events, high computational resource consumption, and poor clustering results. To resolve this, a large language model is used to generate summaries, improving the efficiency and accuracy of subsequent clustering. The Qwen2.5-7B-Instruct model is pre-trained on multi-domain data and further fine-tuned using reinforcement learning techniques based on human feedback. This allows it to accurately capture semantic information and key logic within the text, enabling rapid processing of complex contexts and achieving high-quality summary extraction, providing a reliable data foundation for subsequent event analysis. Furthermore, in event analysis, hierarchical density clustering algorithms offer significant advantages over traditional clustering methods. They do not require pre-specifying the number of clusters and can automatically identify natural groupings based on data density, perfectly suited to the dynamic and variable nature of event data and the uncertain number of events.

[0017] Further, step 1-1 includes: designing structured cue words for extracting the summary. The text to be processed As input, the Qwen2.5-7B-Instruct model is used to generate an event summary for a single data point. :

[0018]

[0019] in, This represents the Qwen2.5-7B-Instruct model.

[0020] Further, steps 1-2 include: using the event summary text of each data point as the core clustering feature; if the number of samples is less than or equal to 2, all samples are uniformly marked as cluster 0 and returned, completing the preliminary clustering determination; then processing the text features, using the TF-IDF vectorization method to convert the text data into vector features, setting the maximum feature dimension to 500; and, in case of a possible empty vocabulary, using all-zero vectors as feature replacements when the conversion fails.

[0021]

[0022] in, , This represents the TF-IDF vectorization method. The vector features representing the text summary data are used; after text vectorization, the generated text vector features are standardized to eliminate the differences in units between different features, thus obtaining the final feature matrix. :

[0023]

[0024] in, for The eigenmean vector, for The characteristic standard deviation vector.

[0025] Furthermore, steps 1-3 include: based on the feature matrix obtained in steps 1-2 The core parameter of the hierarchical density clustering algorithm, the minimum cluster size, is dynamically adjusted based on the number of samples. When the number of samples When the number of samples is 40, the minimum cluster size is set to 10; if the number of samples is... If the sample size is 40, then the maximum value among half the sample size, 7, and 2 is taken as the minimum cluster size. This ensures good clustering performance while avoiding clustering anomalies due to insufficient samples. Simultaneously, Euclidean distance is used as the metric, and a hierarchical density clustering algorithm is employed to analyze the feature matrix. Perform cluster analysis to obtain the cluster label for each sample. :

[0026]

[0027] in, This represents the hierarchical density clustering algorithm. This indicates Euclidean distance.

[0028] Further, steps 1-4 include: based on the clusters obtained in steps 1-3, calculating the similarity between the samples and the cluster centers using cosine similarity, extracting the 20% of data closest to the center from each cluster as representative samples, ensuring that the events represented by each cluster have clear uniqueness and typicality, thus obtaining the final specific event clusters; designing a prompt word template for extracting key elements of events, inputting it into the Qwen2.5-7B-Instruct model, extracting key elements of each event, including event name, location, event subject, event summary, and event keywords, to achieve key element analysis of events. Considering that if the sample ratio is too high, it will lead to an excessive amount of text input to the model, increasing inference time; if the ratio is too low, it will not be able to support the model in accurately extracting key information such as event names. Therefore, after testing, 20% of the samples can achieve a balance between information completeness and computational efficiency.

[0029] Furthermore, the construction of the fine-grained sentiment analysis model described in step 2 specifically includes the following steps:

[0030] Step 2-1: Based on labeled data, perform supervised fine-tuning of the Multilingual-BERT model to train a six-class sentiment analysis model; labeled data can be obtained from public datasets.

[0031] Step 2-2: Introduce an expert knowledge-driven unsupervised calibration mechanism for secondary fine-tuning to obtain the final sentiment analysis model.

[0032] For sentiment analysis, the Multilingual-BERT model was chosen as the base model. Based on the BERT architecture, this model constructs a cross-lingual shared semantic space through pre-training on Wikipedia corpora in 104 languages. This effectively captures semantic relationships between different languages, thus better handling complex linguistic phenomena such as language mixing and dialect variations. Compared to large language models, the Multilingual-BERT model demonstrates significantly superior performance in sentiment analysis tasks, greatly reducing computational resource consumption and enabling efficient fine-tuning for specific task data, providing a reliable foundation for sentiment analysis of events.

[0033] Furthermore, step 2-1 includes: for the six emotion dimensions of "happiness, neutrality, anger, sadness, fear, and surprise," using existing labeled datasets, fine-tuning the training optimization process starts with a pre-trained Multilingual-BERT model, using the labeled data as the training set for supervised training; initial parameters are set with a learning rate of 5e-5, a batch size of 16, and 6 training epochs. During training, the backpropagation algorithm is used to minimize the crossover loss function, continuously adjusting the model parameters to enhance the semantic understanding and emotion recognition capabilities of the text.

[0034]

[0035]

[0036] in, For batch size, For Multilingual-BERT model Predicted text The tag is The probability is determined, and after each round of training, the model performance is evaluated using a validation set, with a focus on monitoring the classification accuracy metric. Based on this metric, the training parameters are fine-tuned to prevent the model from getting stuck in local optima. This optimization process is repeated until the model achieves stability.

[0037]

[0038] in, This is the fine-tuned and optimized sentiment analysis model.

[0039] Furthermore, step 2-2 includes: introducing an expert knowledge-driven unsupervised calibration mechanism; using the trained model to predict sentiment on unlabeled text; after generating initial prediction results, domain experts manually verify and correct the labels of key samples to construct a calibration dataset; using this dataset as a training set to perform secondary fine-tuning training on the model, enhancing the model's ability to understand complex semantics. Key samples include, but are not limited to, samples whose sentiment prediction results contradict common sense, samples with cross-linguistic mixed expressions, and some long text samples.

[0040] Furthermore, the construction of the event-sentiment joint analysis framework described in step 3 includes the following steps:

[0041] Step 3 specifically includes the following steps:

[0042] Step 3-1: For each specific event in the set of specific events, use the sentiment analysis model to identify the sentiment tag of the text;

[0043] Step 3-2: Analyze the distribution of various emotions in each specific event;

[0044] Step 3-3: Integrate the key elements of each specific event with its corresponding sentiment distribution, and generate joint analysis results of events and sentiments according to the preset structured output template. Specifically, this includes: event name, event subject, location, event summary, event keywords, and sentiment distribution that analyzes the quantity and proportion of the six types of sentiments.

[0045] Beneficial effects:

[0046] This invention breaks through the traditional "manual classification + single model" event analysis model, innovatively coupling a large language model with a clustering algorithm. It generates high-quality event summaries through the large language model, solving the problem of ambiguity in core information during direct clustering of long texts. Simultaneously, addressing the shortcomings of hierarchical density clustering algorithms in clustering small events, it optimizes clustering features using key event elements extracted from the large language model, improving event recognition accuracy. In sentiment analysis, it effectively solves the problem of insufficient sentiment recognition capabilities for multilingual texts in existing methods. Furthermore, it breaks the paradigm of isolated event and sentiment modeling in traditional text analysis, proposing a unified framework integrating event computation and sentiment analysis. This achieves full automation from raw data input to intelligent analysis output, possessing excellent scalability. Attached Figure Description

[0047] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments, and the advantages of the present invention in the above and / or other aspects will become clearer.

[0048] Figure 1 This is a schematic diagram of the overall process of the present invention.

[0049] Figure 2 This is a flowchart illustrating the process of generating event summaries.

[0050] Figure 3 This is a flowchart illustrating the event clustering process.

[0051] Figure 4 This is a flowchart illustrating the process of building and optimizing an emotion model.

[0052] Figure 5 This is an example of the event calculation and sentiment analysis results generated by an embodiment of the present invention. Detailed Implementation

[0053] The embodiments of the present invention will now be described with reference to the accompanying drawings.

[0054] This invention provides a fine-grained sentiment analysis method based on event computation. By jointly processing specific event identification with multi-granularity sentiment analysis, it achieves the discrimination of sentiment distribution for different events, and can be applied to scenarios such as risk warning, public opinion monitoring, and public decision-making. Figure 1As shown, the specific steps include:

[0055] Step 1, implementing specific event calculations, includes: for all texts to be processed, using a large language model as the summary extraction model to generate a summary for each text; after data filtering and feature extraction, performing cluster analysis using a hierarchical density clustering algorithm; extracting representative data from each cluster to obtain specific events; and performing key element analysis for each event cluster based on the large language model, including:

[0056] Step 1-1: Design structured cue words for extracting the abstract. The text to be processed As input, the Qwen2.5-7B-Instruct model is used to generate an event summary for a single data point. :

[0057]

[0058] in, This demonstrates the use of the Qwen2.5-7B-Instruct model to extract structured prompts from the abstract. The goal is to: "Extract the key summary information of the most important event from the given data. This summary must include location and people involved; irrelevant or unnecessary information must not be output. Output a concise and clear one-sentence summary." The specific summary generation process is as follows: Figure 2 As shown.

[0059] Steps 1-2: Using the event summary text of each data point as the core clustering feature, if the number of samples is less than or equal to 2, all samples are uniformly marked as cluster 0 and returned, completing the initial clustering determination. Then, the text features are processed, and the TF-IDF vectorization method is used to convert the text data into vector features, setting the maximum feature dimension to 500. To address the possibility of an empty vocabulary, when the conversion fails, all-zero vectors are used as feature replacements.

[0060]

[0061] in, , This represents the TF-IDF vectorization method. The vector features representing the text summary data are used; after text vectorization, the generated text vector features are standardized to eliminate the differences in units between different features, thus obtaining the final feature matrix. :

[0062]

[0063] in, for The eigenmean vector, for The characteristic standard deviation vector.

[0064] Steps 1-3: Based on the feature matrix obtained in Step 1-2 The core parameter of the hierarchical density clustering algorithm, the minimum cluster size, is dynamically adjusted based on the number of samples. When the number of samples When the number of samples is 40, the minimum cluster size is set to 10; if the number of samples is... If the sample size is 40, then the maximum value among half the sample size, 7, and 2 is taken as the minimum cluster size. This ensures good clustering performance while avoiding clustering anomalies due to insufficient samples. Simultaneously, Euclidean distance is used as the metric, and a hierarchical density clustering algorithm is employed to analyze the feature matrix. Perform cluster analysis to obtain the cluster label for each sample. :

[0065]

[0066] in, This represents the hierarchical density clustering algorithm. This indicates Euclidean distance.

[0067] Steps 1-4: Based on the clusters obtained in steps 1-3, cosine similarity is used to calculate the similarity between the samples and the cluster centers. The 20% of data closest to the center are extracted from each cluster as representative samples, ensuring that the events represented by each cluster have clear uniqueness and typicality, thus obtaining the final specific event clusters. The entire event clustering process is as follows: Figure 3 As shown; next, design a prompt template for extracting key elements of an event. Input the Qwen2.5-7B-Instruct model to extract the key elements of each event, including the event name, location, main body, abstract, and keywords, to achieve key element analysis of the event. The prompt template for extracting key elements of an event is: "Based on the given data, summarize the event with the highest attention and extract the key information of the event, including the event name, location, main body, abstract, and keywords. The abstract must include location and people information. Other irrelevant information and attention information are not allowed to be output. Strictly follow the required output format, which is {"name": "xxx", "place": "xxx", "character": "xxx", "abstract": "xxx", "keywords": "xxx"}.

[0068] Step 2: Construct a fine-grained sentiment analysis model. The specific process is as follows: Figure 4 As shown, this includes: a six-class sentiment analysis model is trained in a supervised manner on the Multilingual-BERT model based on labeled data, and an unsupervised calibration mechanism driven by expert knowledge is introduced to construct a calibration dataset for secondary fine-tuning training, including:

[0069] Step 2-1: For the six emotion dimensions of "happiness, neutrality, anger, sadness, fear, and surprise," an existing labeled dataset is used to fine-tune the training optimization process. Starting with the pre-trained Multilingual-BERT model, the labeled data is used as the training set for supervised training. Initial parameters are set as follows: learning rate 5e-5, batch size 16, and training epochs 6. During training, the backpropagation algorithm is used to minimize the crossover loss function, continuously adjusting the model parameters to enhance the semantic understanding and emotion recognition capabilities of the text.

[0070]

[0071]

[0072] in, For batch size, For Multilingual-BERT model Predicted text The tag is The probability is determined, and after each round of training, the model performance is evaluated using a validation set, with a focus on monitoring the classification accuracy metric. Based on this metric, the training parameters are fine-tuned to prevent the model from getting stuck in local optima. This optimization process is repeated until the model achieves stability.

[0073]

[0074] in, This is the fine-tuned and optimized sentiment analysis model.

[0075] Step 2-2 introduces an expert knowledge-driven unsupervised calibration mechanism. The trained model is used to predict the sentiment of unlabeled text. After the initial prediction results are formed, domain experts manually verify and correct the labels of key samples to build a calibration dataset. This dataset is then used as the training set to fine-tune the model and enhance its ability to understand complex semantics.

[0076] Step 3: Construct an event-sentiment joint analysis framework, including: for each specific event obtained from clustering, using the sentiment analysis model obtained after fine-tuning the training to identify the sentiment tags of the text, and statistically analyzing the sentiment distribution of the event; designing a structured output template to integrate the key elements of the event with the sentiment distribution statistics to form a joint analysis result of the key information of each event and the sentiment analysis.

[0077] This embodiment analyzes the issue from two aspects: the accuracy of sentiment analysis and the output of the event calculation and sentiment analysis fusion framework.

[0078] This embodiment selects the CPME Weibo Chinese sentiment dataset and an English sentiment dataset publicly available on the Kaggle platform as experimental datasets. Since each data point in the CPME dataset contains the intensity of six sentiment categories rather than a single label, this embodiment uses the sentiment with the highest intensity for each data point as its sentiment label. For both datasets, 1200 data points are randomly selected from each dataset, with 200 data points for each sentiment category, ultimately constructing a Chinese and English dataset containing 2400 data points as the test set. The event-based fine-grained sentiment analysis method provided in this embodiment is not limited by language and can perform sentiment analysis on multilingual text data. Testing using the sentiment analysis model of this invention achieves an accuracy rate of 70%.

[0079] To further verify the effectiveness and validity of this invention, this embodiment selects a portion of the DuEE Chinese dataset for experimentation. This data contains event information, which aligns with the application scenario of this invention. Taking this data as an example... Figure 5 The schematic diagram illustrates in detail an example of the output analysis results after performing event calculation and sentiment analysis in the embodiments of this application. Figure 5 The diagram illustrates the analysis results of Chinese text, while the fine-grained sentiment analysis method based on event computation provided in this application is not limited by language. In this embodiment, for the text to be analyzed, event summaries are first extracted using the Qwen2.5-7B-Instruct model. The extracted summaries are then clustered using a hierarchical density clustering algorithm to obtain event clusters. Representative data is further extracted to obtain specific events, and the Qwen2.5-7B-Instruct model is used to extract key elements for each event. Next, six-category sentiment analysis is performed on the corresponding raw data for each specific event. Finally, the event computation and sentiment analysis results are fused to output the final analysis result.

[0080] Practical application results demonstrate that this invention can accurately analyze specific events contained in text and perform key element analysis and sentiment analysis on these events. Compared with other event calculation methods, this invention is not limited to fixed event categories and can analyze constantly updated social hot topics, making it closer to practical application scenarios and proving its high application value and effectiveness. Furthermore, this invention can analyze multilingual texts from different data sources, compensating for the shortcomings of previous sentiment analysis methods in language perception and possessing a wider range of practical applications. In addition, this invention breaks the paradigm of isolated event and sentiment analysis, realizing a joint analysis framework and providing a new method for integrating event calculation and sentiment analysis.

[0081] In its specific implementation, this application provides a computer storage medium and a corresponding data processing unit. The computer storage medium is capable of storing a computer program, which, when executed by the data processing unit, can run the invention's content regarding a fine-grained sentiment analysis method based on event computation, as well as some or all of the steps in various embodiments. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0082] Those skilled in the art will clearly understand that the technical solutions in the embodiments of the present invention can be implemented using computer programs and their corresponding general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of computer programs, i.e., software products. These computer program software products can be stored in a storage medium and include several instructions to cause a device containing a data processing unit (which may be a personal computer, server, microcontroller, MUU, or network device, etc.) to execute the methods described in various embodiments or certain parts of the embodiments of the present invention.

[0083] This invention provides a fine-grained sentiment analysis method based on event calculation. Many methods and approaches exist for implementing this technical solution; the above description is merely a preferred embodiment of the invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this invention, and these improvements and modifications should also be considered within the scope of protection of this invention. All components not explicitly stated in this embodiment can be implemented using existing technologies.

Claims

1. A fine-grained sentiment analysis method based on event computation, characterized in that, Includes the following steps: Step 1: Implement specific event calculation. Extract a summary of each text for all texts to be processed. Based on the summary, extract features to obtain a text feature matrix. Perform cluster analysis on the text feature matrix using a clustering algorithm to obtain several event clusters. Extract representative data based on each event cluster to determine the specific event set, and extract the key structured elements of each specific event. Step 2: Construct a fine-grained sentiment analysis model, perform supervised fine-tuning on the pre-trained language model to obtain the initial sentiment analysis model; introduce an expert knowledge-driven unsupervised calibration mechanism, construct a calibration dataset, perform secondary fine-tuning training, and obtain the final sentiment analysis model. Step 3: Construct an event-sentiment joint analysis framework. Based on each specific event obtained from the clustering in Step 1, input the sentiment analysis model fine-tuned in Step 2 to perform sentiment proportion statistics. This allows sentiment analysis to rely on specific events rather than isolated judgments. Following a preset structured template, the framework integrates key event elements with sentiment distribution statistics and outputs the event-sentiment joint analysis results.

2. The fine-grained sentiment analysis method based on event computation according to claim 1, characterized in that, The specific event calculation described in step 1 includes the following steps: Step 1-1: Extract a text summary from the text to be processed using a summary extraction model. ; Steps 1-2: Perform data filtering and feature extraction on the extracted summary data to construct a feature matrix. ; Steps 1-3: Dynamically adjust the core parameters of the hierarchical density clustering algorithm to perform cluster analysis on the acquired text features; Steps 1-4: Extract representative samples from each cluster based on cosine similarity to obtain the final specific events, and use the summary extraction model to extract the key elements of each specific event.

3. The fine-grained sentiment analysis method based on event computation according to claim 2, characterized in that, Step 1-1 includes: designing structured cue words for extracting the summary. The text to be processed As input, the Qwen2.5-7B-Instruct model is used to generate an event summary for a single data point. : in, This represents the Qwen2.5-7B-Instruct model.

4. The fine-grained sentiment analysis method based on event computation according to claim 2, characterized in that, Step 1-2 specifically includes the following steps: Step 1-2-1: Using the event summary text of each data point as the core clustering feature, preliminary clustering determination is completed. Then, the text features are processed by converting the text data into vector features using the TF-IDF vectorization method. The vector features of the text summary data are obtained using the following formula. : Among them, the event summary collection , This indicates the TF-IDF vectorization method, which sets the maximum feature dimension to 500. To address the possibility of an empty vocabulary, when the transformation fails, an all-zero vector is used as a feature replacement. Step 1-2-2: Obtain the feature matrix by standardizing the generated text vector features. .

5. The fine-grained sentiment analysis method based on event computation according to claim 2, characterized in that, Steps 1-3 specifically include the following steps: Step 1-3-1: Based on the feature matrix obtained in Step 1-2 The core parameters of the hierarchical density clustering algorithm are dynamically adjusted based on the number of samples, with the minimum cluster size being [not specified]. The specific strategy is when the number of samples When the number of samples is 40, the minimum cluster size is set to 10; if the number of samples is... If the sample size is 40, then the maximum value among half the sample size, 7, and 2 is taken as the minimum cluster size; Step 1-3-2: Using Euclidean distance as a metric, apply the hierarchical density clustering algorithm to the feature matrix. Perform cluster analysis to obtain the cluster label for each sample. .

6. The fine-grained sentiment analysis method based on event computation according to claim 2, characterized in that, Steps 1-4 include: Based on the clusters obtained in steps 1-3, the similarity between the samples and the cluster centers is calculated using cosine similarity. The 20% of data closest to the center are extracted from each cluster as representative samples to ensure that the events represented by each cluster have clear uniqueness and typicality, thus obtaining the final specific event clusters; a prompt word template for extracting key elements of events is designed, input into the Qwen2.5-7B-Instruct model, and key elements of each event are extracted, including event name, location, event subject, event summary, and event keywords, to achieve key element analysis of events.

7. The fine-grained sentiment analysis method based on event computation according to claim 1, characterized in that, Step 2, which describes building a fine-grained sentiment analysis model, specifically includes the following steps: Step 2-1: Based on labeled data, perform supervised fine-tuning of the Multilingual-BERT model to train a six-class sentiment analysis model; Step 2-2: Introduce an expert knowledge-driven unsupervised calibration mechanism for secondary fine-tuning to obtain the final sentiment analysis model.

8. The fine-grained sentiment analysis method based on event computation according to claim 7, characterized in that, Step 2-1 includes: For the six emotion dimensions of "happiness, neutrality, anger, sadness, fear, and surprise", an existing labeled dataset was used. The training optimization process was fine-tuned starting with a pre-trained Multilingual-BERT model, using the labeled data as the training set for supervised training. Initial parameters were set as follows: learning rate of 5e-5, batch size of 16, and training epochs of 6. During training, the crossover loss function was minimized using the backpropagation algorithm. We continuously adjust the model parameters to enhance its semantic understanding and sentiment recognition capabilities. in, For batch size, Multilingual-BERT model Predicted text The tag is The probability is determined by the model's performance. After each training round, the model performance is evaluated using a validation set, and the classification accuracy metric is monitored. Based on this metric, the training parameters are fine-tuned to prevent the model from getting stuck in local optima. This optimization process is repeated until the model achieves stability. in, This is the fine-tuned and optimized sentiment analysis model.

9. The fine-grained sentiment analysis method based on event computation according to claim 8, characterized in that, Step 2-2 includes: introducing an expert knowledge-driven unsupervised calibration mechanism, using the trained model to predict sentiment on unlabeled text, forming an initial prediction result, and then having domain experts manually verify and correct the labels of key samples to build a calibration dataset; using this dataset as a training set to fine-tune the model a second time to enhance the model's ability to understand complex semantics.

10. The fine-grained sentiment analysis method based on event computation according to claim 1, characterized in that, Step 3 specifically includes the following steps: Step 3-1: For each specific event in the set of specific events, use the sentiment analysis model to identify the sentiment tag of the text; Step 3-2: Analyze the distribution of various emotions in each specific event; Step 3-3: Integrate the key elements of each specific event with its corresponding sentiment distribution, and generate joint analysis results of events and sentiments according to the preset structured output template. Specifically, this includes: event name, event subject, location, event summary, event keywords, and sentiment distribution that analyzes the quantity and proportion of the six types of sentiments.