Public opinion dynamic monitoring and early warning system based on text clustering analysis

The public opinion dynamic monitoring and early warning system based on text clustering analysis solves the problems of continuous tracking and risk assessment of public opinion events, realizes stable tracking and timely early warning of public opinion events, and improves the accuracy of public opinion monitoring and risk identification capabilities.

CN122173656BActive Publication Date: 2026-07-07KUNMING UNIV OF SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
KUNMING UNIV OF SCI & TECH
Filing Date
2026-05-08
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve continuous tracking of events in public opinion monitoring. Semantic drift leads to fragmented events, distorted risk assessment results, and a lack of systematic modeling of the internal emotional distribution structure of events makes it difficult to identify potential risks such as emotional polarization and public opinion backlash.

Method used

A public opinion dynamic monitoring and early warning system based on text clustering analysis is adopted. Through data collection and processing, incremental clustering analysis, event cluster association, feature analysis and risk analysis modules, combined with sliding time window mechanism and semantic drift suppression factor, the continuity and consistency of event clusters are established, event identifiers across time windows are constructed, and stable tracking and risk assessment of public opinion events are carried out.

Benefits of technology

It has achieved stable tracking and continuous management of public opinion events, improved the timeliness and accuracy of public opinion early warning, avoided fragmented events and distorted risk assessments, and enabled early identification of high-risk events.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122173656B_ABST
    Figure CN122173656B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of public opinion monitoring, and particularly relates to a public opinion dynamic monitoring and early warning system based on text clustering analysis. In the clustering process, the semantic center of historical event clusters is introduced as a constraint condition, so that the semantic continuity of existing events can be fully considered when the public opinion text is classified, and event misjudgment or repeated generation caused by short-term expression changes can be effectively avoided. By constructing a drift suppression mechanism based on the semantic center change amplitude, the unstable event clusters are adjusted, the stability and accuracy of event evolution modeling are improved, the cross-time window event clusters are associated and determined, the stable event clusters are formed, the tracking management of public opinion events is realized, the text scale, the emotional mean, the emotional heterogeneity, the evolution characteristics of the scale and the emotion are introduced, and the low sample compensation mechanism is combined to model the public opinion event risk, so that the high-risk events are not ignored, the mature event risk is not excessively enlarged, and the timeliness and accuracy of public opinion early warning are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of public opinion monitoring technology, specifically to a public opinion dynamic monitoring and early warning system based on text clustering analysis. Background Technology

[0002] With the rapid development of internet platforms, social media, news apps, and complaint feedback channels, public opinion information exhibits a series of characteristics, including diverse sources, frequent updates, rapid dissemination, and significant emotional fluctuations.

[0003] Public opinion monitoring often uses keyword matching, static text clustering, or analysis based on a single time segment to classify public opinion texts by topic and assess risks. These methods usually ignore the continuous evolution of public opinion events over time, and are prone to splitting text errors that occur at different stages of the same event into multiple independent events, leading to interruptions in event tracking and potentially making it difficult to accurately depict the evolution path of public opinion.

[0004] On the other hand, although some technologies have introduced text vectorization and cluster analysis, they are mostly based on overall calculations within a fixed time period and fail to effectively combine historical event structure information. When faced with changes in expression, semantic drift, or shifts in discussion focus, the stability and consistency of clustering may be insufficient.

[0005] Secondly, there may be a lack of systematic modeling of the internal emotional distribution structure of events and its changing trends over time, making it difficult to identify potential risks such as emotional polarization and public opinion backlash in a timely manner. Overall, there are technical deficiencies such as insufficient event continuity, single risk characterization dimensions, and delayed early warning. Summary of the Invention

[0006] In view of the above-mentioned shortcomings of the existing technology, the present invention provides a public opinion dynamic monitoring and early warning system based on text clustering analysis, which can effectively solve the problems of difficulty in continuously tracking the evolution of events, semantic drift leading to event fragmentation, and distortion of risk assessment results in the existing technology.

[0007] To achieve the above objectives, the present invention provides the following technical solution:

[0008] This invention provides a public opinion dynamic monitoring and early warning system based on text clustering analysis, comprising at least:

[0009] The data acquisition and processing module collects public opinion texts and maps them into semantic vectors, constructing a set of semantic vectors for the current time window;

[0010] The incremental clustering analysis module analyzes the semantic center vectors of event clusters formed in the previous time window, establishes a corrected similarity based on the semantic vector of the current time window, the semantic center vectors of the event clusters, and the semantic drift suppression factor, determines the event cluster affiliation relationship of the semantic vectors, and generates the event cluster set of the current time window.

[0011] The event cluster association module responds to the event clusters in the current time window and the event clusters in the previous time window, calculates the association score between the two, and assigns event identifiers to the event clusters in the current time window based on the association score to form stable event clusters;

[0012] The event cluster feature analysis module calculates text size features, sentiment values, and sentiment heterogeneity values ​​for the stable event clusters.

[0013] The evolutionary feature analysis module models the changes in text size and sentiment features of stable event clusters within adjacent time windows, generating event evolution features;

[0014] The event cluster risk analysis module constructs risk values ​​based on the input event cluster characteristics and evolution characteristics, combined with low-sample compensation factors, and provides early warnings for public opinion events.

[0015] Furthermore, the analysis of the semantic center vector of the event cluster formed in the previous time window specifically includes:

[0016] For each event cluster formed in the previous time window, read all the public opinion text semantic vectors contained in that event cluster;

[0017] Sum the semantic vectors and normalize them according to the number of semantic vectors in the event cluster;

[0018] The average vector is obtained and used as the semantic center vector of the event cluster.

[0019] Furthermore, the method for determining the semantic drift suppression factor is as follows:

[0020] Collect the semantic center vectors of the same event cluster in two consecutive historical time windows;

[0021] Calculate the magnitude of change between the two to measure the semantic change of the event over time;

[0022] The magnitude of this change is mapped as a moderating factor to increase the clustering attraction of semantically stable events within the current time window and reduce the impact of events with drastic semantic fluctuations on the attribution of new public opinion texts.

[0023] Further, determining the event cluster affiliation of the semantic vector and generating the event cluster set for the current time window specifically involves:

[0024] Calculate the corrected similarity between the current semantic vector and the semantic center vector of the event cluster in the previous time window:

[0025] Take the maximum corrected similarity, where:

[0026] If the maximum corrected similarity is greater than or equal to the similarity threshold, the semantic vector belongs to the continuation or supplement of the existing event, and the current semantic vector is added to its corresponding event cluster;

[0027] If the corrected similarity is less than the similarity threshold, the semantic vector does not belong to the existing event cluster, and a new event cluster is created with the semantic vector as the initial member;

[0028] Obtain the event clusters of the current time window and create an event cluster set.

[0029] Furthermore, the semantic vectors of public opinion texts are calculated separately with the corrected similarity between them and historical event clusters from multiple previous time windows, where:

[0030] If they have the same maximum corrected similarity:

[0031] Historical event clusters are determined based on historical duration or semantic drift suppression factors.

[0032] Furthermore, the method for determining the correlation score is as follows:

[0033] Obtain the cosine similarity between the semantic centers of the current event cluster and the historical event clusters;

[0034] The proportion of public opinion texts in the current event cluster that trace back to historical event clusters is used to measure the degree of inheritance of event content;

[0035] The two indicators mentioned above are combined to construct the correlation score.

[0036] Furthermore, the method for determining the sentiment value is as follows:

[0037] Sentiment analysis is performed on public opinion texts within stable event clusters to obtain sentiment values;

[0038] The sentiment values ​​of stable event clusters are aggregated, and the overall sentiment value is averaged based on the text size to characterize the overall emotional tendency of the event within the current time window.

[0039] Furthermore, the method for determining the emotional heterogeneity value is as follows:

[0040] Calculate the degree of deviation between the sentiment value of each public opinion text and the overall sentiment value, and statistically analyze all deviations to establish a sentiment heterogeneity value, reflecting whether there is emotional differentiation or opposing viewpoints within the event.

[0041] Furthermore, the low-sample compensation factor is obtained based on the text size and sample size constants, where:

[0042] The low-sample compensation factor exerts an exponential amplification effect when the text size is smaller than the sample size constant;

[0043] The text size is not less than the sample size constant, and the low sample compensation factor is 1.

[0044] It also includes: methods for monitoring and early warning of public opinion dynamics, including:

[0045] Collect public opinion texts and map them into semantic vectors to construct a set of semantic vectors for the current time window;

[0046] Analyze the semantic center vectors of event clusters formed in the previous time window, establish a corrected similarity based on the semantic vector of the current time window, the semantic center vectors of the event clusters, and the semantic drift suppression factor, determine the event cluster affiliation relationship of the semantic vectors, and generate the event cluster set of the current time window.

[0047] In response to the event clusters of the current time window and the event clusters of the previous time window, a correlation score between the two is calculated, and an event identifier is assigned to the event cluster of the current time window based on the correlation score to form a stable event cluster;

[0048] Calculate the text size feature, sentiment value, and sentiment heterogeneity value for the stable event cluster;

[0049] Model the changes in text size and sentiment features of stable event clusters within adjacent time windows to generate event evolution features;

[0050] Based on the characteristics and evolution of the input event clusters, a risk value is constructed by combining a low-sample compensation factor, and an early warning is issued for public opinion events.

[0051] The technical solution provided by this invention has the following advantages compared with the known prior art:

[0052] By introducing a sliding time window mechanism, public opinion data is divided into time sequences to avoid textual clutter. Public opinion texts are mapped to semantic vectors. Incremental clustering of historical event cluster semantic centers is combined with a semantic drift suppression mechanism. This maintains the continuity and consistency of the same event across different time windows while adapting to the natural evolution of public opinion semantics, effectively preventing event fragmentation or erroneous merging. By constructing event cluster associations, unified identifiers are assigned to events across time windows, achieving stable tracking and evolution management of public opinion events. Furthermore, text size, sentiment mean, sentiment heterogeneity, and the evolutionary characteristics of size and sentiment are introduced. Combined with a low-sample compensation mechanism, risk modeling of public opinion events at different development stages is performed, ensuring that early high-risk events are not ignored and the risks of mature events are not excessively amplified, thus improving the timeliness and accuracy of public opinion early warning. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.

[0054] Figure 1 This is a schematic diagram of the overall system of the present invention. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0056] 1) Public opinion analysis is mostly based on single time or static clustering methods, lacking modeling of the continuity of public opinion events across time. This leads to the same event being misjudged as multiple independent events due to changes in expression at different stages of dissemination, making it difficult to achieve stable tracking and affecting the accuracy of public opinion evolution analysis and risk assessment.

[0057] 2) Public opinion texts contain a large number of paraphrased texts, emotional expressions, and periodic semantic drift. If clustering is based solely on the semantic similarity of the current time window, event clusters are easily reconstructed due to short-term semantic fluctuations, which reduces the consistency of event identification and the reliability of clustering results.

[0058] 3) Under multiple time windows, there may be a lack of effective event cluster association, making it impossible to determine the inheritance relationship between current events and historical events. This leads to frequent changes in event identifiers, making it difficult to form a consistent and stable event structure across time windows, which is not conducive to long-term monitoring and management.

[0059] 4) Current public opinion risk assessments often rely on text size or single-dimensional sentiment. Small-scale public opinion events are easily underestimated in the early stages. Even if the sentiment is extreme or changes drastically, it is difficult to trigger early warnings in time, affecting the accurate identification of potential high-risk public opinion events.

[0060] This invention introduces time-window-based semantic incremental clustering and event association to continuously model the semantic evolution and emotional changes of public opinion texts. It aims to solve the problems of public opinion events being easily fragmented, difficult to track stably, and difficult to identify small-scale high-risk public opinion events in a timely manner, thereby achieving accurate monitoring and early warning of public opinion risks.

[0061] The present invention will be further described below with reference to embodiments.

[0062] Example 1 (see Figure 1 A public opinion dynamic monitoring and early warning system based on text clustering analysis includes at least:

[0063] The data acquisition and processing module continuously collects public opinion texts from multiple preset public opinion data sources. Each piece of text includes at least the text content and the publication time. Because public opinion is highly time-sensitive, the risk level, dissemination intensity, and emotional structure of the same topic can vary significantly across different time periods. If public opinion data is not divided into time windows and instead processed uniformly over a long period, it will lead to a mix of texts from different events or different evolutionary stages, easily disrupting subsequent event clustering and risk evolution analysis. Therefore, a fixed-length sliding time window is set based on the current time t. The release time falls within the range The public opinion text within the current time window is constructed as a collection of public opinion texts:

[0064]

[0065] in, This represents a collection of public opinion texts. This represents the i-th piece of public opinion text. Indicates public opinion text Release time.

[0066] Furthermore, public opinion texts are unstructured data, and the similarity between texts cannot be accurately characterized directly through literal word matching. Especially in online public opinion, the same event often contains a large number of paraphrased, metaphorical, or emotional expressions. Therefore, it is necessary to uniformly map public opinion texts to a computable semantic space:

[0067] Each piece of public opinion text in the output set is preprocessed, typically including word segmentation, stop word removal, and noise character cleaning. This preprocessing process is a common method and will not be elaborated upon in this embodiment. The preprocessed public opinion text is then mapped into a fixed-dimensional semantic vector.

[0068]

[0069] in, Indicates public opinion text The semantic vector corresponding to the time window Semantic representation functions are used to map public opinion texts into fixed-dimensional semantic vectors. These functions typically employ pre-trained language models, such as BERT, RoBERTa, and SimCSE, to encode the public opinion texts, ensuring that semantic and contextual information is fully expressed. The vector dimensions are fixed to facilitate subsequent event clustering and risk analysis.

[0070] Then, the semantic vector set for the current time window can be constructed. :

[0071]

[0072] Furthermore, public opinion events undergo semantic evolution during their dissemination. If clustering is based solely on static similarity within the current window, it is easy to misclassify different stages of the same event as different events. Therefore, this includes:

[0073] The incremental clustering analysis module introduces semantic center change constraints across time windows, enabling the clustering process to adapt to event evolution without causing event breakage due to short-term semantic fluctuations. Specifically:

[0074] Incremental clustering is performed based on the semantic vector set of the current time window and the event clusters of the previous time window:

[0075] Let the semantic center vector of the m-th event cluster in the previous time window (where m represents the index of the event cluster in the previous time window) be:

[0076]

[0077] in, This represents the semantic center vector of the m-th event cluster in the previous time window, which is also the average vector of semantic vectors within the cluster. It is used to describe the overall semantic features of this event cluster. This represents the m-th event cluster within the previous time window, which is a set of public opinion events. Each element within it corresponds to a semantic vector representation of a public opinion text. This indicates the number of semantic vectors contained in an event cluster. Represents event clusters semantic center Represents event clusters The semantic vector of a single public opinion text is an iterable variable, and , This represents the semantic vector corresponding to the j-th public opinion text within the previous time window, where j=1,2,... , This represents the summation of the semantic vectors of all texts in the event cluster dimension by dimension. This represents the normalization factor for averaging vectors. The entire formula is used to describe the arithmetic mean of all semantic vectors in an event cluster, representing the overall semantic features of the event.

[0078] Calculate the current semantic vector With event clusters The corrected similarity of the semantic center vectors of the event clusters in the previous time window, i.e., all existing event clusters:

[0079]

[0080] in, This indicates a modified similarity score, used to measure the degree of matching between current public opinion text and historical event clusters. The cosine similarity between two vectors (the current sentiment text vector and the semantic center vector of the event cluster in the previous time window) measures semantic similarity. Indicates the semantic drift suppression factor;

[0081] Based on the magnitude of the corrected similarity, the maximum corrected similarity is selected:

[0082] If the maximum corrected similarity is greater than or equal to the similarity threshold, then the semantic vector is considered to be a continuation or supplement to an existing event, and the current semantic vector is... Add it to its corresponding event cluster (the historical event cluster corresponding to the maximum similarity, that is, the event cluster of the previous time window).

[0083] If the corrected similarity is less than the similarity threshold, the semantic vector is considered not to belong to any existing event cluster, and a new event cluster is created with the semantic vector as the initial member.

[0084] When the semantic vector of a public opinion text within the current time window is calculated with the historical event clusters of multiple previous time windows, and they have the same maximum corrected similarity, priority is given to selecting event clusters with a longer historical duration (referring to the length of time a certain event cluster has existed continuously in the time series from its first appearance or first identification in the current time window; if it exceeds a certain threshold time, or if the event cluster has corresponding stable event cluster identifiers in multiple consecutive time windows, then the longer its historical duration, the more priority is given to selecting event clusters with a longer duration, to ensure the temporal continuity and stability of events and avoid the erroneous merging of short-lived or sporadic event clusters) or a larger semantic drift inhibition factor (greater than the threshold, prioritizing the association of semantically stable and slowly evolving events rather than those clusters that fluctuate drastically and may have deviated from the original events) as the association objects. This ensures that the association of event clusters is not only based on instantaneous similarity, but also considers the continuity and stability of events in history and semantics, thereby avoiding the erroneous merging or breakage of events.

[0085] Then, we can obtain the set of event clusters within the current time window. , This represents the k-th event cluster within the current time window, where It will contain several semantic vectors It should be noted that regardless of whether the corrected similarity between the semantic vector and the historical event cluster reaches the preset similarity threshold, an event cluster set is generated within the current time window. The similarity threshold is only used to control the event cluster affiliation method of the semantic vector.

[0086] It should be noted that within the current time window, when a new public opinion text is categorized into an event cluster, the semantic center of that cluster is updated in real time. To reflect the latest textual information and ensure that incremental clustering calculations within the same time window use the latest semantic centers. This improves clustering accuracy and the real-time performance of event tracking.

[0087] By using maximum corrected similarity analysis, we can determine the most likely event to which the current semantic vector belongs when it has a high similarity with multiple historical event clusters, thus avoiding cross-attribution or random classification between event clusters and ensuring the certainty and consistency of event tracking results.

[0088] On the other hand, by determining the similarity threshold, we can clearly distinguish between the semantic continuation of existing events and the triggering conditions of new events, which will help us in subsequent evolutionary analysis and risk assessment based on event clusters.

[0089] In this embodiment,

[0090] in, This represents the drift adjustment parameter, used to control the sensitivity of the drift distance to similarity decay. Indicates the previous time window, This indicates the previous time window. The Euclidean norm of a vector is used to measure the distance between two semantic center vectors, that is, to measure the drastic change in focus of the event over two consecutive time periods. exp represents the exponential function used to map the drift intensity to... The interval, therefore, when the drift is small, If the value tends to 1, it tends to 0. By introducing a semantic drift suppression factor based on the magnitude of changes in historical semantic centers, the weights of event clusters with unstable semantic evolution are reduced. This reduces their ability to attract the semantic vectors corresponding to newly collected public opinion texts during the incremental clustering process in the current time window, thus avoiding semantic mutation events from misleading the decision on the continuation of events and ensuring the continuity and accuracy of event evolution modeling.

[0091] It should be noted that throughout the process, by introducing a semantic center for historical event clusters and suppressing semantic drift, incremental clustering of the current semantic vector is performed in the time dimension, so that the same public opinion event can maintain semantic continuity and structural consistency in different time windows, avoiding event fragmentation caused by changes in expression or topic evolution.

[0092] The event cluster association module is used to associate event clusters within the current time window. Compared to each event cluster in the previous time window (Historical, the entire cluster used to represent the m-th event cluster in the previous time window) Calculate the correlation score:

[0093]

[0094] in, This represents the association score between the current event cluster and historical event clusters, used to determine whether they belong to the same stable event. This represents the weighting coefficient, ranging from 0 to 1, used to balance the influence of semantic similarity and the intersection of event clusters. The cosine similarity between the center vectors of the current event cluster and the historical event clusters measures semantic similarity. Indicates the event cluster of the previous time window. The semantic center vector, This represents the intersection of members between the current event cluster and the historical event cluster. The criteria for determining the intersection are:

[0095] 1) Identical public opinion text IDs: Original text information collected from public opinion monitoring platforms, news sources, social media, complaint systems, and other information sources is assigned a unique text identifier ID to each collected original text. This ID is used to identify the consistency of the same text in different time windows and different processing stages. In the process of associating event clusters, if texts with the same text ID appear in the event clusters of the previous time window and the current time window, then the text can be considered to be a continuation or supplement to the same public opinion information and participate in the intersection of event cluster members.

[0096] 2) If the semantic similarity between two semantic vectors exceeds a threshold, they are considered to be the same member. This means that for the public opinion text in the current time window and the public opinion text in the event cluster of the previous time window, each public opinion text is converted into a semantic vector, for example, extracted through word vectors, sentence vectors, or pre-trained language models, and then their cosine similarity is calculated. If the calculated result is greater than the preset similarity threshold, the two public opinion texts are considered to be highly consistent in semantics, and are regarded as expressing the same or closely related event information. They are considered to be members of the same event cluster, and the intersection is used to determine the association of the event cluster.

[0097] This indicates the number of sentiment texts (or semantic vectors) from historical event clusters within the current event cluster. This indicates the total number of members in the current event cluster. This indicates what percentage of the content in the current event cluster can be traced back to historical event clusters, and It is used to measure the degree of inheritance of the current event cluster from a certain historical event cluster at the member level, and the strength of the association score is controlled by the weight coefficient.

[0098] Then, for each current event cluster, find the historical event cluster with the highest correlation score;

[0099] If the highest correlation score exceeds a threshold, the current event cluster is considered a continuation of a historical event cluster. An identifier from the historical event cluster is then assigned to form a stable event cluster. Conversely, if the event is not a new event, a new stable event cluster with a new identifier is generated independently. It should be noted that the stable event cluster identifier here is a unified ID that is given to each event cluster across a time window, used to track the evolution of events.

[0100] All event clusters in the current event window can then form a stable set of event clusters. In general, the association score is used to measure the semantic and membership overlap between the current event cluster and historical event clusters. The current event cluster is assigned an identifier by the maximum matching, thereby forming a stable set of event clusters that are consistent across time windows, enabling continuous tracking and evolution management of events.

[0101] The event cluster feature analysis module is used to consider the stable event clusters established above respectively:

[0102] In the process of monitoring public opinion events, individual public opinion texts often have a strong element of chance and subjectivity. Relying solely on a single text or a small number of texts to judge an event is easily influenced by extreme expressions, emotional amplification, or noisy information, which can distort the assessment of the event's importance. Therefore, the following calculations are made:

[0103] Text size

[0104] By introducing text size, the number of public opinion texts contained in an event cluster is quantified to reflect the level of attention and the breadth of dissemination of the event within the current time window;

[0105] Public opinion texts typically exhibit diverse emotional expressions and significant mood swings. Judging events directly based on the sentiment value of a single text can easily lead to biased overall sentiment assessments due to isolated extreme sentiments. Furthermore, the same event is often composed of multiple public opinion texts; its overall sentiment should reflect the comprehensive result of group expression, rather than a simple representation of individual texts. Therefore, the calculation is as follows:

[0106] Emotional Value

[0107] in, This represents the sentiment value corresponding to the i-th collected public opinion text, obtained by a sentiment analysis model (an analysis model that performs sentiment tendency analysis on public opinion texts based on text content and outputs sentiment quantification results; it can be implemented based on rule-based methods, machine learning methods, or deep learning methods, and is used to output sentiment values ​​that reflect the sentiment polarity or intensity of public opinion texts; common existing technologies include BERT and LSTM), with a value range of 0-1. Represents a cluster of stable events The average sentiment of public opinion texts within an event cluster; by calculating the average sentiment of public opinion texts within an event cluster, discrete and fluctuating text-level sentiment signals can be smoothed into stable event-level sentiment indicators, more accurately depicting the overall sentiment of the event within the current time window.

[0108] In public opinion event analysis, average sentiment scores often fail to reflect the complexity of the internal emotional structure of an event. Even if different events have similar average sentiment levels, their internal textual sentiment distribution may vary significantly. For example, highly consistent negative sentiment events and controversial events with severely conflicting positive and negative sentiments are fundamentally different in terms of risk characteristics. There is a general lack of quantitative characterization of the degree of emotional dispersion or opposition within event clusters, making it difficult to promptly identify potentially high-risk events such as emotional polarization and opinion splits. Therefore, calculation is necessary.

[0109] Emotional Heterogeneity Value , This measure describes the heterogeneity of sentiment in public opinion texts within an event cluster, reflecting the degree of dispersion in sentiment distribution. By introducing sentiment heterogeneity indicators, the degree to which the sentiment in texts within an event cluster deviates from the average can be statistically analyzed, effectively characterizing the consistency or differentiation of emotions within the event.

[0110] The evolutionary feature analysis module, by quantitatively modeling the scale and sentiment changes of event clusters within adjacent time windows, transforms static public opinion states into measurable evolutionary features, including:

[0111] Relying solely on the text size within the current time window is insufficient to determine whether a public opinion event is spreading, converging, or remaining stable. Therefore, the calculation is as follows:

[0112] Rate of change in size:

[0113]

[0114] in, It represents the rate of change in the size of a stable event cluster within a unit of time, used to reflect changes in the intensity of public opinion dissemination. By performing differential calculations on the same stable event cluster within adjacent time windows, it quantifies the speed of event dissemination and growth trend, providing a dynamic basis for subsequent risk enhancement and early warning judgment.

[0115] Public opinion risk depends not only on the emotional state itself, but also on the trajectory of that emotion; therefore, the calculation is as follows:

[0116]

[0117] in, This represents the change in emotional state within a stable cluster of events, used to reflect the direction and magnitude of emotional evolution. This represents the average sentiment value of the same stable event cluster within the previous time window; by comparing the changes in the average sentiment value of stable event clusters within adjacent time windows, trends of mood deterioration or mitigation can be identified, which can be used to detect potential risky behaviors in advance.

[0118] The event cluster risk analysis module addresses the issue that, in actual public opinion monitoring, early or small-scale events often involve fewer text samples but exhibit strong emotional polarity, high heterogeneity, or rapid changes. Assessments based solely on text quantity or a single indicator are prone to underestimation or even neglect. Conversely, large-scale events in the mature stage may be overemphasized due to sample accumulation. Therefore, a low-sample compensation factor is introduced to correct for the amplification of risk in small-sample events. Then, event cluster characteristics (text size, sentiment value, and sentiment heterogeneity) are combined with evolutionary characteristics (rate of change in size, change in the emotional state of the event cluster). After unifying the dimensions (indicators typically use Min-Max normalization), an event risk model is established.

[0119]

[0120] in, Indicates a low sample compensation factor. This represents the comprehensive risk value of the k-th event cluster within the time window t, used for subsequent early warning level analysis. , , , as well as These are the corresponding weight coefficients. For the low-sample compensation factor of the k-th event cluster within the time window t, a piecewise threshold processing method is used to ensure that the low-sample compensation factor in the comprehensive risk value only occurs when the scale of the public opinion event is less than the constant sample size. When applying an exponential amplification effect, for mature or large-scale public opinion events, the low-sample compensation factor is set to 1, which no longer weakens the comprehensive risk value and ensures that the comprehensive risk of mature public opinion events is not underestimated.

[0121] Therefore, the warning level of stable event clusters is determined based on preset thresholds:

[0122]

[0123] in, , All are preset thresholds, and Less than Both range from 0 to 1, thus reflecting the overall situation of public opinion events and enabling real-time early warning from the public opinion monitoring system. Furthermore, it also allows managers to initiate response procedures for medium- or high-risk events.

[0124] Methods for monitoring and early warning of public opinion dynamics include:

[0125] Collect public opinion texts and map them into semantic vectors to construct a set of semantic vectors for the current time window;

[0126] Analyze the semantic center vectors of event clusters formed in the previous time window, establish a corrected similarity based on the semantic vector of the current time window, the semantic center vectors of the event clusters, and the semantic drift suppression factor, determine the event cluster affiliation relationship of the semantic vectors, and generate the event cluster set of the current time window.

[0127] In response to the event clusters of the current time window and the event clusters of the previous time window, a correlation score between the two is calculated, and an event identifier is assigned to the event cluster of the current time window based on the correlation score to form a stable event cluster;

[0128] Calculate the text size feature, sentiment value, and sentiment heterogeneity value for the stable event cluster;

[0129] Model the changes in text size and sentiment features of stable event clusters within adjacent time windows to generate event evolution features;

[0130] Based on the characteristics and evolution of the input event clusters, a risk value is constructed by combining a low-sample compensation factor, and an early warning is issued for public opinion events.

[0131] Furthermore, if the aforementioned function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0132] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0133] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0134] Furthermore, in order to provide a concise description of exemplary embodiments, not all features of actual embodiments (i.e., those features that are not relevant to the best mode of carrying out the invention as currently considered, or those features that are not relevant to implementing the invention) may be omitted.

[0135] It should be understood that numerous specific implementation decisions can be made during the development of any practical implementation, such as in any engineering or design project. Such development efforts may be complex and time-consuming, but for those skilled in the art who benefit from this disclosure, the development effort will be a routine work of design, manufacturing, and production without requiring much experimentation.

[0136] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions will not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.

Claims

1. A public opinion dynamic monitoring and early warning system based on text clustering analysis, characterized in that, include: The data acquisition and processing module collects public opinion texts and maps them into semantic vectors, constructing a set of semantic vectors for the current time window; The incremental clustering analysis module analyzes the semantic center vectors of event clusters formed in the previous time window, establishes a corrected similarity based on the semantic vectors of the current time window, the semantic center vectors of the event clusters, and the semantic drift suppression factor, determines the event cluster affiliation relationship of the semantic vectors, and generates the event cluster set of the current time window. The event cluster association module responds to the event clusters in the current time window and the event clusters in the previous time window, calculates the association score between the two, and assigns event identifiers to the event clusters in the current time window based on the association score to form stable event clusters; The event cluster feature analysis module calculates text size features, sentiment values, and sentiment heterogeneity values ​​for the stable event clusters. The evolutionary feature analysis module models the changes in text size and sentiment features of stable event clusters within adjacent time windows, generating event evolution features; The event cluster risk analysis module constructs risk values ​​based on the input event cluster characteristics and evolution characteristics, combined with low-sample compensation factors, and provides early warnings for public opinion events. in, Indicates the drift adjustment parameter. Indicates the previous time window, This indicates the previous time window. Let exp denote the Euclidean norm of a vector, and let exp denote the exponential function. This represents the semantic center vector of the m-th event cluster in the previous time window. This represents the semantic center vector of the m-th event cluster in the previous time window. Indicates semantic drift suppression factor. Indicates a sliding time window; in, Indicates a low sample compensation factor. This represents the overall risk value of the k-th event cluster within the time window t. , , , as well as These are the corresponding weight coefficients. Indicates text size. Indicates sentiment value, Indicates the heterogeneity of sentiment. This represents the rate of change in the size of a stable event cluster per unit time. This represents the change in the emotional state of a stable cluster of events; The low-sample compensation factor is obtained based on the text size and sample size constants, where: The low-sample compensation factor exerts an exponential amplification effect when the text size is smaller than the sample size constant; The text size is not less than the sample size constant, and the low sample compensation factor is 1.

2. The public opinion dynamic monitoring and early warning system according to claim 1, characterized in that, The analysis of the semantic center vector of the event cluster formed in the previous time window is specifically as follows: For each event cluster formed in the previous time window, read all the public opinion text semantic vectors contained in that event cluster; Sum the semantic vectors and normalize them according to the number of semantic vectors in the event cluster; The average vector is obtained and used as the semantic center vector of the event cluster.

3. The public opinion dynamic monitoring and early warning system according to claim 1, characterized in that, The specific steps for determining the event cluster affiliation of the semantic vector and generating the event cluster set for the current time window are as follows: Calculate the corrected similarity between the current semantic vector and the semantic center vector of the event cluster in the previous time window: Take the maximum corrected similarity, where: If the maximum corrected similarity is greater than or equal to the similarity threshold, the semantic vector belongs to the continuation or supplement of the existing event, and the current semantic vector is added to its corresponding event cluster; If the corrected similarity is less than the similarity threshold, the semantic vector does not belong to the existing event cluster, and a new event cluster is created with the semantic vector as the initial member; Obtain the event clusters of the current time window and create an event cluster set.

4. The public opinion dynamic monitoring and early warning system according to claim 3, characterized in that, Calculate the similarity between the semantic vector of public opinion text and the historical event clusters of multiple previous time windows, respectively, where: If they have the same maximum corrected similarity: Historical event clusters are determined based on historical duration or semantic drift suppression factors.

5. The public opinion dynamic monitoring and early warning system according to claim 1, characterized in that, The method for determining the correlation score is as follows: Obtain the cosine similarity between the semantic centers of the current event cluster and the historical event clusters; The proportion of public opinion texts in the current event cluster that trace back to historical event clusters is used to measure the degree of inheritance of event content; The two indicators mentioned above are combined to construct the correlation score.

6. The public opinion dynamic monitoring and early warning system according to claim 1, characterized in that, The method for determining the sentiment value is as follows: Sentiment analysis is performed on public opinion texts within stable event clusters to obtain sentiment values; The sentiment values ​​of stable event clusters are aggregated, and the overall sentiment value is averaged based on the text size to characterize the overall emotional tendency of the event within the current time window.

7. The public opinion dynamic monitoring and early warning system according to claim 6, characterized in that, The method for determining the emotional heterogeneity value is as follows: Calculate the degree of deviation between the sentiment value of each public opinion text and the overall sentiment value, and statistically analyze all deviations to establish a sentiment heterogeneity value, reflecting whether there is emotional differentiation or opposing viewpoints within the event.

8. A method for monitoring and early warning public opinion dynamics, applied to the public opinion monitoring and early warning system according to any one of claims 1-7, characterized in that, include: Collect public opinion texts and map them into semantic vectors to construct a set of semantic vectors for the current time window; Analyze the semantic center vectors of event clusters formed in the previous time window, establish a corrected similarity based on the semantic vector of the current time window, the semantic center vectors of the event clusters, and the semantic drift suppression factor, determine the event cluster affiliation relationship of the semantic vectors, and generate the event cluster set of the current time window. In response to the event clusters of the current time window and the event clusters of the previous time window, a correlation score between the two is calculated, and an event identifier is assigned to the event cluster of the current time window based on the correlation score to form a stable event cluster; Calculate the text size feature, sentiment value, and sentiment heterogeneity value for the stable event cluster; Model the changes in text size and sentiment features of stable event clusters within adjacent time windows to generate event evolution features; Based on the characteristics and evolution of the input event clusters, a risk value is constructed by combining a low-sample compensation factor, and an early warning is issued for public opinion events.