Public opinion early warning method and device
By combining target content and historical behavioral data with a multimodal sentiment analysis model, the problem of insufficient accuracy in existing public opinion analysis technologies has been solved. This enables accurate identification and early warning of user sentiment tendencies and potential risks, thereby improving the comprehensiveness of the analysis and the enterprise's rapid response capabilities.
Patent Information
- Application Number
- CN202511013615.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-11-11
AI Technical Summary
Existing public opinion analysis technologies cannot accurately identify and warn of the sentiment tendencies and potential risks of user public opinion, especially when faced with multimodal information, where there are limitations in identification and early warning.
A multimodal sentiment analysis model is adopted, which combines target content and historical behavioral data to predict sentiment tendencies through sentiment analysis, determine risks based on sentiment tendencies, generate early warning information, and improve the model's adaptability by using reinforcement learning and rule optimization mechanisms.
It improves the comprehensiveness and accuracy of public opinion analysis, reduces the false judgment rate, reduces manual intervention, provides a visual early warning interface, and enhances the company's rapid response capability.
Smart Images

Figure CN120929882A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of public opinion analysis technology, and in particular to a public opinion early warning method and apparatus. Background Technology
[0002] With the widespread use of the internet, users are increasingly expressing their opinions and providing feedback through social media and official corporate apps. This information may include positive reviews, negative feedback, and even potential crisis signals regarding a company's products or services. Therefore, a public opinion analysis tool is needed to monitor user sentiment in real time and provide early warnings of potential risks. Current public opinion analysis solutions typically use sentiment classification of user-posted text, which fails to accurately identify and warn of the emotional bias and potential risks of user sentiment. Summary of the Invention
[0003] This application provides a method and apparatus for public opinion early warning, so as to accurately identify and warn of the emotional tendencies and potential risks of user public opinion.
[0004] Firstly, embodiments of this application provide a method for public opinion early warning, including:
[0005] Obtain public opinion information from target users, including the published target content and the target users' historical behavior data;
[0006] Using sentiment analysis models, based on target content and historical behavioral data, predict the primary sentiment tendency of public opinion information;
[0007] Based on primary sentiment, determine the extent of risk associated with public opinion information;
[0008] In response to the presence of risks in public opinion information, early warning information corresponding to the public opinion information is generated.
[0009] In one implementation, the public opinion information also includes identification information of the target content, and the target content includes at least one type of information;
[0010] Using sentiment analysis models, based on target content and historical behavioral data, the primary sentiment tendency of public opinion information is predicted, including:
[0011] Extract the first feature information from each type of information in the target content;
[0012] Extracting second feature information from historical behavioral data;
[0013] The fusion results of the identification information, each first feature information, and the second feature information are input into the sentiment analysis model to obtain the first sentiment tendency output by the sentiment analysis model.
[0014] In one implementation, the target content includes text information;
[0015] The aforementioned methods for public opinion early warning also include:
[0016] Using a target large language model, text information is analyzed and processed to generate analysis results, which include at least one keyword extracted from the text information and the second sentiment tendency of the text information.
[0017] For the target keyword among at least one of the above keywords, if the target keyword is not included in the preset keyword set, prompt words and sample samples are generated based on the target keyword and the second sentiment tendency.
[0018] The sentiment analysis model is updated based on prompt words and example samples.
[0019] In one implementation, determining the risk level of public opinion information based on a first sentiment bias includes:
[0020] Based on the first sentiment tendency, the target rule is searched in a pre-defined set of rules; wherein any rule in the set of rules includes sentiment tendency and risk level;
[0021] If the target rule is found, it is determined that the public opinion information has a risk level of 1, which is included in the target rule.
[0022] In one implementation, any of the above rules further includes topic tags, and the target content includes a first topic tag;
[0023] Based on the primary sentiment tendency, the target rule is searched within a pre-defined rule set, including:
[0024] Based on the first sentiment and the first topic tag, the target rule is searched in the rule set.
[0025] In one implementation, the target rule also includes an early warning sub-rule;
[0026] Generate early warning information corresponding to public opinion information, including:
[0027] Based on the early warning sub-rules, early warning information corresponding to public opinion information is generated.
[0028] In one implementation, the target rule further includes issuing sub-rules;
[0029] The aforementioned methods for public opinion early warning also include:
[0030] Based on the issued sub-rules, early warning information corresponding to public opinion information is output.
[0031] In one implementation, each rule in the rule set is configured with a weight value;
[0032] After outputting the warning information corresponding to the public opinion information, it also includes:
[0033] Obtain the reward value related to the target rule;
[0034] Using reinforcement learning algorithms, the weight values of the target rules are adjusted based on the reward values.
[0035] In one embodiment, the above-mentioned public opinion early warning method further includes:
[0036] Obtain event information about external public opinion events, including the content, impact, and handling methods of the events.
[0037] Based on the event information, generate a first rule with the same structure as any of the above rules;
[0038] Add the first rule to the rule set.
[0039] Secondly, embodiments of this application provide a public opinion early warning device, including:
[0040] The acquisition unit is configured to acquire public opinion information of the target user, which includes the published target content and the target user's historical behavior data.
[0041] The prediction unit is configured to use a sentiment analysis model to predict the first sentiment tendency of public opinion information based on target content and historical behavioral data.
[0042] The risk identification unit is configured to determine the presence of risk in public opinion information based on the primary sentiment tendency.
[0043] The generation unit is configured to generate early warning information corresponding to public opinion information in response to the existence of risks in public opinion information.
[0044] The solution provided in this application can acquire public opinion information of target users, including published target content and historical behavioral data of target users. Then, using a sentiment analysis model, based on the target content and historical behavioral data, it predicts the first sentiment tendency of the public opinion information. Next, based on the first sentiment tendency, it determines the risk level of the public opinion information and generates corresponding early warning information in response to the risk. Thus, multimodal public opinion analysis can be performed based on multimodal information of target users, such as published target content and historical behavioral data. Compared to single-text analysis, multimodal target content and historical behavioral data can capture more dimensions of information. Combining multimodal information of target users can effectively solve the shortcomings of unclear intent in pure text in some scenarios, greatly improving the comprehensiveness and accuracy of public opinion analysis, and accurately identifying and warning of the sentiment tendency and potential risks of user public opinion. Attached Figure Description
[0045] The technical solution and other beneficial effects of this application will become apparent from the following detailed description of specific embodiments in conjunction with the accompanying drawings.
[0046] Figure 1 This is a flowchart of a public opinion early warning method in an embodiment of this application;
[0047] Figure 2 This is a schematic diagram of the public opinion early warning execution process in the embodiments of this application;
[0048] Figure 3 This is a flowchart of the update process of the sentiment analysis model in the embodiments of this application;
[0049] Figure 4 This is a schematic diagram of the update process of the sentiment analysis model in an embodiment of this application;
[0050] Figure 5 This is a schematic diagram of the rule update process in an embodiment of this application;
[0051] Figure 6 This is a schematic diagram of the public opinion early warning device in the embodiments of this application.
[0052] Reference numerals: 601-Acquisition unit, 602-Prediction unit, 603-Risk identification unit, 604-Generation unit. Detailed Implementation
[0053] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0054] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the term "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Furthermore, the character " / " in this document, unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship.
[0055] Public opinion analysis refers to the process of analyzing users' statements on social media or official corporate apps to identify their sentiments and potential risks.
[0056] As mentioned earlier, relevant public opinion analysis solutions typically employ sentiment classification of user-posted texts, which fails to accurately identify and warn of the sentiment trends and potential risks of user public opinion. For example, relevant public opinion analysis solutions generally use the following techniques:
[0057] Keyword matching: Matches text content against a pre-defined list of keywords to determine if it contains negative information;
[0058] Sentiment analysis: Based on natural language processing (NLP) technology, it classifies text into sentiment categories (positive, negative, neutral).
[0059] Rule engine: Filters and categorizes text content according to predefined rules;
[0060] Manual review: Community text content is regularly reviewed by humans to identify and handle negative information.
[0061] The above-mentioned technologies have the following drawbacks:
[0062] Limitations of keyword matching: It can only identify preset keywords and cannot capture semantically complex or implicit emotions;
[0063] Insufficient accuracy of sentiment analysis: Current sentiment analysis models may not be able to adapt to the semantic features of specific domains (such as the automotive industry), resulting in a high false positive rate;
[0064] The rule engine lacks flexibility: rules need to be maintained manually and are difficult to adapt to rapidly changing user behavior and language styles;
[0065] Manual review is inefficient: When faced with massive amounts of data, manual review is time-consuming and prone to missing important information.
[0066] In summary, the aforementioned technologies, which rely on single text for public opinion analysis, cannot accurately identify and warn of users' sentiment tendencies and potential risks.
[0067] This application provides a public opinion early warning method and apparatus, which can perform multimodal public opinion analysis to accurately identify and warn of the sentiment tendencies and potential risks of user public opinion.
[0068] In some embodiments, the public opinion early warning method provided in this application can be executed by any platform, system, server, device, device cluster or apparatus with computing and processing capabilities.
[0069] In some embodiments, the target user in this application may be a user within a specific internet community. This specific internet community may be, for example, a social media platform or an official corporate app, and is not specifically limited thereto.
[0070] In some embodiments, this application is applied to the automotive industry, and the sentiment analysis model in this application is a dedicated sentiment analysis model developed for the automotive industry to reduce the false positive rate.
[0071] Figure 1 This is a flowchart of a public opinion early warning method in an embodiment of this application. The public opinion early warning method includes the following steps:
[0072] S101: Obtain public opinion information of target users, including the published target content and the historical behavior data of target users;
[0073] S103: Using sentiment analysis models, based on target content and historical behavioral data, predict the primary sentiment tendency of public opinion information;
[0074] S105: Determine the risk level of public opinion information based on the primary sentiment bias;
[0075] S107: In response to the existence of risks in public opinion information, generate early warning information corresponding to the public opinion information.
[0076] Figure 1 The corresponding implementation provides a solution that can acquire public opinion information of target users, including published target content and historical behavioral data of target users. Then, using a sentiment analysis model, based on the target content and historical behavioral data, it predicts the first sentiment tendency of the public opinion information. Next, based on the first sentiment tendency, it determines the risk level of the public opinion information and generates corresponding early warning information in response to the risk. Thus, multimodal public opinion analysis can be performed based on multimodal information of target users, such as published target content and historical behavioral data. Compared to single-text analysis, multimodal target content and historical behavioral data can capture more dimensions of information. Combining multimodal information of target users can effectively solve the shortcomings of unclear intent in pure text in some scenarios, greatly improving the comprehensiveness and accuracy of public opinion analysis, and accurately identifying and warning of the sentiment tendency and potential risks of user public opinion.
[0077] Steps S101 to S107 will be explained below.
[0078] In step S101, public opinion information of target users can be collected. This information includes published target content and historical behavioral data of target users. Target content may include positive evaluations, negative feedback, or even potential crisis signals from target users regarding the company's products or services. Target content includes at least one type of information, which includes at least one of the following: text, images, video, audio, etc. Historical behavioral data can be behavioral data of target users within a set time period, such as the most recent day or two, which can be set according to actual needs and is not specifically limited here.
[0079] In one example, when the target user is a user within a specific internet community, public opinion information about the target user can be collected from the community's server. The historical behavioral data in this public opinion information can be behavioral data generated by the target user performing any operation (such as browsing, information posting, etc.) within the community during a set time period.
[0080] In step S103, a sentiment analysis model is used to predict the first sentiment tendency of public opinion information based on the target content and historical behavior data. Specifically, the sentiment analysis model can be used to predict the probability values of public opinion information under multiple preset sentiment tendencies based on the target content and historical behavior data, and the sentiment tendency corresponding to the highest probability value is taken as the first sentiment tendency of public opinion information. These multiple sentiment tendencies include positive sentiment tendencies (which can be simply referred to as positive) and negative sentiment tendencies (which can be simply referred to as negative). For example, negative sentiment tendencies can be further subdivided into mild negative, moderate negative, and severe negative according to the severity of the risk. Furthermore, these multiple sentiment tendencies can also include neutral sentiment tendencies (which can be simply referred to as neutral). It should be understood that these multiple sentiment tendencies can be set according to actual needs and are not specifically limited here.
[0081] It should be noted that public opinion information is multimodal because it includes various aspects such as the content posted by target users and their historical behavioral data. Since sentiment analysis models can be used to perform sentiment analysis based on multimodal public opinion information, they can be called multimodal sentiment analysis models, or simply multimodal models. Furthermore, sentiment analysis models can be deep learning models. In practice, deep learning models are machine learning methods based on neural networks that can automatically extract features from data and perform classification or prediction.
[0082] In one implementation, the public opinion information further includes identification information of the target content, which includes at least one type of information. Using a sentiment analysis model, based on the target content and historical behavioral data, the first sentiment tendency of the public opinion information is predicted, including:
[0083] Extract the first feature information from each type of information in the target content;
[0084] Extracting second feature information from historical behavioral data;
[0085] The fusion results of the identification information, each first feature information, and the second feature information are input into the sentiment analysis model to obtain the first sentiment tendency output by the sentiment analysis model.
[0086] For each type of information in the target content, it can be as follows: Figure 2As shown, this type of information undergoes preprocessing (such as text cleaning or image preprocessing), followed by feature extraction from the preprocessed information. Figure 2 This is a schematic diagram illustrating the public opinion early warning execution process in an embodiment of this application. It should be noted that... Figure 2 Community text information and community image information can represent the text information and image information in the target content. Figure 2 The user behavior data includes, but is not limited to, the target user's historical behavior data.
[0087] For example, when the information described above is text, the BERT model can be used to extract features from it. BERT (Bidirectional Encoder Representations from Transformers) is a pre-trained language model based on the Transformer architecture. Its core feature is that it significantly improves the performance of Natural Language Processing (NLP) tasks through bidirectional context modeling and a pre-training-fine-tuning mode. In text processing, BERT is often used to extract deep feature vectors, providing high-quality semantic representations for subsequent tasks (such as classification, matching, and analysis), and is one of the most widely used foundational models in the current NLP field.
[0088] When the aforementioned information is image information and / or video information, a CNN (Convolutional Neural Network) can be used to extract features from the image information and / or video information. A CNN is a deep learning model specifically designed for processing data with a grid structure (such as images). It automatically extracts data features through convolution operations, significantly reducing the number of parameters in traditional neural networks and substantially improving model efficiency and performance.
[0089] When the aforementioned information is audio, the ASR (Automatic Speech Recognition) algorithm can be used to extract features from it. The ASR algorithm converts the raw audio signal into a machine-understandable feature vector that effectively represents the speech content.
[0090] Additionally, historical behavioral data can be preprocessed (e.g., data cleaning), and then features can be extracted from the preprocessed historical behavioral data using time window feature derivation algorithms. The time window feature derivation algorithm is a core method for feature extraction from time-series data. Its core logic involves defining a specific "window interval" on the time axis and calculating statistics or pattern features based on the data within the window, thereby transforming continuous time-series data into structured features that reflect "time-dimensional patterns."
[0091] After feature extraction is completed, the extracted feature information can be associated with public opinion IDs (identifiers). Specifically, the identification information of the target content and the extracted feature information are fused (e.g., spliced) to obtain the fusion result. Then, a sentiment analysis model is used to perform multimodal public opinion analysis based on the fusion result to predict the first sentiment tendency of public opinion information.
[0092] In one implementation, to more effectively improve the comprehensiveness and accuracy of public opinion analysis, the public opinion information may also include first behavioral data, which is generated based on a target operation performed on the published target content. This target operation includes at least one of the following: commenting, liking, forwarding, etc. When the public opinion information also includes first behavioral data, Figure 2 The user behavior data shown includes the target user's historical behavior data and the first behavior data.
[0093] In addition, when public opinion information also includes first-behavioral data, a sentiment analysis model is used to predict the first sentiment tendency of public opinion information based on the target content and historical behavioral data. This includes: using a sentiment analysis model to predict the first sentiment tendency of public opinion information based on the target content, historical behavioral data, and first-behavioral data.
[0094] Furthermore, using sentiment analysis models, based on target content, historical behavioral data, and primary behavioral data, the primary sentiment tendency of public opinion information is predicted, including:
[0095] Extract the first feature information from each type of information in the target content;
[0096] Extracting second feature information from historical behavioral data;
[0097] Extract the third feature information from the first row of data;
[0098] The fusion results of the target content's identification information, each first feature information, second feature information, and third feature information are input into the sentiment analysis model to obtain the first sentiment tendency output by the sentiment analysis model.
[0099] In step S105, the risk level of public opinion information is determined based on the first sentiment tendency.
[0100] In practice, it is possible to pre-set such as Figure 2 The rule set shown includes a sentiment tendency and a risk level for each rule. This rule set can be called a rule base. The sentiment tendency of any rule in the rule set is negative. In one example, the risk level is categorized similarly to the previously described method for categorizing negative sentiment, such as based on risk severity. For instance, when negative sentiment is subdivided into mild, moderate, and severe negative sentiment, the risk level can be subdivided into mild, moderate, and severe risk. It should be understood that the risk level and negative sentiment categorization methods can be set according to actual needs and are not specifically limited here.
[0101] Furthermore, at least some of the rules in the rule set also include warning sub-rules and / or distribution sub-rules. Warning sub-rules can describe the method for generating warning information, and distribution sub-rules can describe the sending channel (such as SMS or APP) and recipient of the warning information. Furthermore, distribution sub-rules can also describe the timing of the warning information distribution, such as immediate distribution or distribution after a set interval. In one implementation, warnings can be issued for public opinion information with a risk level higher than a preset level. Based on this, at least some of the rules can be the rules in the rule set whose risk levels are higher than the preset level.
[0102] Given a pre-defined set of rules, risk assessment can be conducted based on the primary sentiment tendency. Specifically, a target rule can be searched within the rule set based on the primary sentiment tendency; this target rule includes the primary sentiment tendency. If a target rule is found, it is determined that the public opinion information carries a risk level of the first risk grade, which is contained within the target rule. It should be understood that the first risk grade is the risk level within the target rule.
[0103] Furthermore, to improve the efficiency of public opinion risk identification, it can be first determined whether the primary sentiment tendency is negative. If the primary sentiment tendency is not negative, then the public opinion information is deemed to pose no risk. If the primary sentiment tendency is negative, then the next step is to search for the target rule in the rule set based on the primary sentiment tendency.
[0104] In one implementation, any rule in the rule set further includes a topic tag, and the target content includes a first topic tag. Searching for a target rule in a preset rule set based on a first sentiment tendency includes: searching for a target rule in the rule set based on the first sentiment tendency and the first topic tag. The target rule includes the first sentiment tendency, and the included topic tags match the first topic tag. This matching can include any of the following: the topic tags in the target rule are the same as the first topic tag; the topic tags in the target rule are contained within the first topic tag; or the similarity between the topic tags in the target rule and the first topic tag is greater than a threshold.
[0105] It should be noted that the subject tags can be tags related to the industry to which this application is applied. Taking the automotive industry as an example, the subject tags can be tags related to automotive components (including but not limited to batteries) or performance.
[0106] In step S107, in response to the presence of risk in the public opinion information, a warning message corresponding to the public opinion information is generated. This warning message can, for example, be used to indicate that the public opinion information poses a risk.
[0107] Furthermore, if, based on the identified target rules, it is determined that the public opinion information carries a risk of level one, then, in response to the target rules, including early warning sub-rules, early warning information corresponding to the public opinion information can be generated based on these sub-rules. This early warning information could, for example, indicate that the public opinion information carries a risk of level one.
[0108] In one implementation, after determining that the public opinion information possesses a risk level of the first risk level based on the found target rules and generating corresponding early warning information, the system can further respond to the target rules by issuing sub-rules and outputting the corresponding early warning information based on these sub-rules. Furthermore, a visual early warning interface containing this information can be output. Providing a visual early warning interface facilitates rapid response from enterprises.
[0109] In one embodiment, emerging trending words can be automatically captured and labeled with sentiment tendencies through online learning. Subsequently, prompts and few-shot data are fed back to multimodal information systems to improve the accuracy of sentiment analysis models in public opinion analysis. Emerging trending words refer to terms that have become widely disseminated and used within a specific timeframe due to social hot topics, public issues, or cultural phenomena. For example, in the technology field, terms like "large-scale artificial intelligence model" might become trending words.
[0110] Specifically, when the target text, as described above, includes text information, it can be achieved by executing, as follows: Figure 3 The update process shown updates the sentiment analysis model. Among them, Figure 3This is a flowchart illustrating the update process of the sentiment analysis model in an embodiment of this application. The update process includes the following steps:
[0111] S301: Using the target large language model, analyze and process the text information in the target content to generate analysis results. The analysis results include at least one keyword extracted from the text information and the second sentiment tendency of the text information.
[0112] S303: For the target keyword among at least one of the above keywords, if the target keyword is not included in the preset keyword set, generate prompt words and sample samples based on the target keyword and the second sentiment tendency;
[0113] S305: Update the sentiment analysis model based on prompt words and example samples.
[0114] Figure 3 The corresponding embodiment provides a solution that analyzes and processes textual information in target content using a target large language model. Leveraging the powerful text understanding capabilities of the target large language model, it fully comprehends the context of the textual information, identifies implicit intentions, and accurately identifies the second sentiment tendency of the textual information. It also extracts at least one keyword from the textual information, achieving context-aware dynamic semantic analysis. Furthermore, a preset keyword set is provided, which may include currently collected hot words. For the target keyword among the aforementioned at least one keyword, if the target keyword is not included in the keyword set, it can be identified as an emerging hot word. Based on the target keyword and the second sentiment tendency, prompt words and example samples can be generated. Based on these prompt words and example samples, the sentiment analysis model is updated, allowing it to adapt to the evolution of online language, new language styles, and user behaviors. This effectively improves the model's timeliness and accuracy in responding to emerging hot words, reducing misjudgments, and minimizing human intervention.
[0115] Steps S301 to S305 will be explained below.
[0116] In S301, the target large language model is used to analyze and process the textual information in the target content, generating analysis results. The analysis results include at least one keyword extracted from the textual information, as well as the secondary sentiment tendency of the textual information. The secondary sentiment tendency can be one of the multiple sentiment tendencies described above.
[0117] Target large language models can include, for example Figure 4 The examples shown are large language models such as BERT or GPT (Generative Pre-trained Transformer). Among them, Figure 4This is a schematic diagram illustrating the update process of the sentiment analysis model in this embodiment. BERT and GPT are two important pre-trained language models in the field of Natural Language Processing (NLP). BERT is a pre-trained language model based on the Transformer encoder, which learns context-dependent word representations through bidirectional language model pre-training. GPT is a pre-trained language model based on the Transformer decoder, which uses an autoregressive language model pre-training method to generate text unidirectionally from left to right, generating coherent text by progressively predicting the next word. Since BERT and GPT are well-known large language models, they will not be elaborated upon further here.
[0118] In step S303, for the target keyword among the above-mentioned at least one keyword, if the target keyword is not included in the preset keyword set, it can be determined that the target keyword is an emerging hot word, and thus, based on the target keyword and the second sentiment tendency, prompt words (such as...) are generated. Figure 4 The Prompt shown) and example samples (such as Figure 4 (as shown in the few-shot). The cue words can be used to indicate the sentiment tendency of the target keyword as the second sentiment tendency. Example samples may include the target keyword and the second sentiment tendency; or, to further improve the accuracy of sentiment analysis model analysis, example samples may include the aforementioned text information and the second sentiment tendency.
[0119] Furthermore, if the target keyword is not included in the aforementioned keyword set, such as after generating prompts and sample samples based on the target keyword and second sentiment tendency, the target keyword is added to the aforementioned keyword set.
[0120] It should be noted that the above keyword set can be dynamically updated, and can be called such as Figure 4 The dynamic lexicon shown. In one implementation, such as Figure 4 As shown, the target large language model and dynamic lexicon can be included in the context understanding module.
[0121] In step S305, the sentiment analysis model is updated based on prompt words and example samples. Specifically, newly discovered samples (such as emerging trending words) and their labels (such as sentiment tendencies) are input into the sentiment analysis model as prompts using prompt word templates. This guides the sentiment analysis model to understand the sentiment expression patterns in specific domains (such as the automotive industry) without altering the model parameters. For example, prompt words clarify the analytical focus of the domain task, and example samples demonstrate the correspondence between domain-specific terminology and sentiment tendencies, ultimately achieving a targeted improvement in the sentiment analysis model's capabilities within that domain.
[0122] In one embodiment, each rule in the rule set described above is configured with a weight value. Reinforcement learning algorithms can be used to optimize the rules, automatically adjusting their weight values. This reduces the workload of manual rule maintenance, and the response time to sudden public opinion events can be shortened to the minute level. It should be noted that when reinforcement learning algorithms are supported for automatically adjusting rule weight values, the rule set can be called an adaptive rule set.
[0123] Specifically, after outputting the early warning information corresponding to the public opinion information, it is also possible to... Figure 5 As shown, the reward value associated with the target rule is obtained, and a reinforcement learning algorithm is used to adjust the weight value of the target rule based on the reward value. For example, when the reward value is positive, the weight value of the target rule is increased; when the reward value is negative, the weight value of the target rule is decreased. Figure 5 This is a schematic diagram of the rule update process in an embodiment of this application. For example... Figure 5 As shown, the reward value associated with the target rule is manually fed back, for example, by personnel who receive the warning information based on the accuracy of the warning. Figure 5 In this context, the input data stream may include, for example, public opinion information and the risk level of that information.
[0124] In one implementation, event information of external public opinion events can also be obtained, for example by calling... Figure 5 The external event API (Application Programming Interface) shown retrieves event information from external public opinion events. This event information includes the event content, impact, and handling methods. Then, based on this event information, a first rule with the same structure as any rule in the rule set can be generated and added to the rule set. This effectively expands the rules in the rule set.
[0125] In one implementation, it can be as follows: Figure 5 As shown, the system supports strategy evaluation of the rule set, such as manual evaluation based on business experience, to filter out abnormal rules and penalize them. Additionally, strategy evaluation can optimize the weight matrix within the rule set. As one implementation, this embodiment utilizes a real-time monitor to collect and output relevant information about the rule set, including but not limited to weight optimization information, abnormal rule filtering information, and public opinion risk information. It should be noted that the real-time monitor represents a manual selection before the rules take effect. This manual selection is then fed back to reinforcement learning to further optimize the reward mechanism and improve the reinforcement learning's ability to extract rules.
[0126] Figure 6 This is a schematic diagram of the public opinion early warning device in an embodiment of this application. Figure 6 As shown, the public opinion early warning device includes:
[0127] The acquisition unit 601 is configured to acquire public opinion information of the target user, including the published target content and the target user's historical behavior data;
[0128] Prediction unit 602 is configured to use a sentiment analysis model to predict the first sentiment tendency of public opinion information based on target content and historical behavior data.
[0129] Risk identification unit 603 is configured to determine the existence of risk in public opinion information based on the first sentiment tendency.
[0130] The generation unit 604 is configured to generate early warning information corresponding to the public opinion information in response to the existence of risks in the public opinion information.
[0131] In one implementation, the public opinion information also includes identification information of the target content, and the target content includes at least one type of information;
[0132] Prediction unit 602 is configured to use a sentiment analysis model to predict the primary sentiment tendency of public opinion information based on target content and historical behavioral data, including:
[0133] Extract the first feature information from each type of information in the target content;
[0134] Extracting second feature information from historical behavioral data;
[0135] The fusion results of the identification information, each first feature information, and the second feature information are input into the sentiment analysis model to obtain the first sentiment tendency output by the sentiment analysis model.
[0136] In one implementation, the target content includes text information;
[0137] The aforementioned public opinion early warning device also includes a model update unit (not shown in the figure), which is configured as follows:
[0138] Using a target large language model, text information is analyzed and processed to generate analysis results, which include at least one keyword extracted from the text information and the second sentiment tendency of the text information.
[0139] For the target keyword among at least one of the above keywords, if the target keyword is not included in the preset keyword set, prompt words and sample samples are generated based on the target keyword and the second sentiment tendency.
[0140] The sentiment analysis model is updated based on prompt words and example samples.
[0141] In one implementation, the risk identification unit 603 is configured to determine the presence of risk in public opinion information based on a first sentiment tendency, including:
[0142] Based on the first sentiment tendency, the target rule is searched in a pre-defined set of rules; wherein any rule in the set of rules includes sentiment tendency and risk level;
[0143] If the target rule is found, it is determined that the public opinion information has a risk level of 1, which is included in the target rule.
[0144] In one implementation, any of the above rules further includes topic tags, and the target content includes a first topic tag;
[0145] The risk identification unit 603 is configured to search for target rules in a preset rule set based on a first sentiment tendency, including:
[0146] The risk identification unit 603 is configured to search for target rules in the rule set based on the first sentiment tendency and the first topic tag.
[0147] In one implementation, the target rule also includes an early warning sub-rule;
[0148] The generation unit 604 is configured to generate early warning information corresponding to public opinion information, including:
[0149] The generation unit 604 is configured to generate early warning information corresponding to public opinion information based on early warning sub-rules.
[0150] In one implementation, the target rule further includes issuing sub-rules;
[0151] The aforementioned public opinion early warning device also includes:
[0152] The output unit (not shown in the figure) is configured to output early warning information corresponding to public opinion information based on the issued sub-rules.
[0153] In one implementation, each rule in the rule set is configured with a weight value;
[0154] The aforementioned public opinion early warning device also includes a first optimization unit (not shown in the figure), which is configured as follows:
[0155] After the output unit outputs the early warning information corresponding to the public opinion information, the reward value related to the target rule is obtained;
[0156] Using reinforcement learning algorithms, the weight values of the target rules are adjusted based on the reward values.
[0157] In one embodiment, the aforementioned public opinion early warning device further includes a second optimization unit (not shown in the figure), which is configured to:
[0158] Obtain event information about external public opinion events, including the content, impact, and handling methods of the events.
[0159] Based on the event information, generate a first rule with the same structure as any of the above rules;
[0160] Add the first rule to the rule set.
[0161] It should be noted that other aspects and implementation details of the public opinion early warning device provided in this application embodiment are the same as or similar to the public opinion early warning method described above, and will not be repeated here.
[0162] This application embodiment also provides a computer device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements, for example, […]. Figure 1 The method for early warning of public opinion is described.
[0163] This application embodiment also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the following... Figure 1 The method for early warning of public opinion is described.
[0164] This application also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implements the following: Figure 1 The method for early warning of public opinion is described.
[0165] The advantages of this invention are derived below through reasoning:
[0166] Reasoning process:
[0167] Multimodal sentiment analysis: Compared to single-text analysis, multimodal information can capture more dimensions of information, thereby improving the accuracy of the analysis;
[0168] Domain-adaptive models: Models developed for the automotive industry can better understand industry terminology and semantic features, reducing the false positive rate;
[0169] Adaptive update mechanism: Through online learning technology, the model can be continuously optimized to adapt to changes in user behavior and reduce manual maintenance costs.
[0170] Summary of advantages:
[0171] Improve the accuracy and comprehensiveness of public opinion analysis;
[0172] Reduce the false positive rate and minimize the impact on the company's reputation;
[0173] Reduce human intervention and improve system operating efficiency;
[0174] It provides a visual early warning interface to facilitate rapid response from businesses.
[0175] Test data:
[0176] The test set contains 100,000 community comments, and the model accuracy reaches over 95%.
[0177] Test results show that this application outperforms general sentiment analysis models when handling automotive industry-specific terms.
[0178] The above description is only a partial implementation of the embodiments of this application and is not intended to limit the application in any way. The protection scope of the embodiments of this application is not limited thereto. Any simple modifications, equivalent changes and alterations that can be easily conceived by those skilled in the art within the technical scope disclosed in the embodiments of this application should be included within the protection scope of the embodiments of this application.
Claims
1. A method for public opinion early warning, characterized in that, include: Obtain public opinion information of target users, including the published target content and the historical behavior data of the target users; Using a sentiment analysis model, based on the target content and the historical behavioral data, the first sentiment tendency of the public opinion information is predicted; Based on the first sentiment tendency, determine the risk level of the public opinion information; In response to the presence of risk in the public opinion information, a warning message corresponding to the public opinion information is generated.
2. The public opinion early warning method according to claim 1, characterized in that, The public opinion information also includes the identification information of the target content, and the target content includes at least one type of information; The method of using a sentiment analysis model to predict the first sentiment tendency of the public opinion information based on the target content and the historical behavioral data includes: Extract first feature information from each type of information in the target content; Extract second feature information from the historical behavior data; The fusion result of the identification information, each of the first feature information and the second feature information is input into the sentiment analysis model to obtain the first sentiment tendency output by the sentiment analysis model.
3. The public opinion early warning method according to claim 1, characterized in that, The target content includes text information; The public opinion early warning method also includes: The text information is analyzed and processed using a target large language model to generate analysis results, which include at least one keyword extracted from the text information and a second sentiment tendency of the text information. For the target keyword among the at least one keyword, if the target keyword is not included in the preset keyword set, prompt words and sample samples are generated based on the target keyword and the second sentiment tendency; The sentiment analysis model is updated based on the prompt words and the example samples.
4. The public opinion early warning method according to any one of claims 1-3, characterized in that, Based on the first sentiment tendency, the risk level of the public opinion information is determined, including: Based on the first sentiment tendency, a target rule is searched in a preset set of rules; wherein any rule in the set of rules includes sentiment tendency and risk level; If the target rule is found, it is determined that the public opinion information has a risk level of the first risk level, which is included in the target rule.
5. The public opinion early warning method according to claim 4, characterized in that, Any of the aforementioned rules also includes topic tags, and the target content includes a first topic tag; Based on the first sentiment tendency, the target rule is searched in a preset rule set, including: Based on the first sentiment tendency and the first topic tag, the target rule is searched in the rule set.
6. The public opinion early warning method according to claim 4, characterized in that, The target rule also includes early warning sub-rules; Generating early warning information corresponding to the aforementioned public opinion information includes: The warning information is generated based on the warning sub-rule.
7. The public opinion early warning method according to claim 4, characterized in that, The target rule also includes issuing sub-rules; The public opinion early warning method also includes: Based on the issued sub-rules, the warning information is output.
8. The public opinion early warning method according to claim 7, characterized in that, Each rule in the rule set is configured with a weight value; After outputting the warning information, the following is also included: Obtain the reward value associated with the target rule; The weight values of the target rule are adjusted based on the reward value using a reinforcement learning algorithm.
9. The public opinion early warning method according to claim 4, characterized in that, Also includes: Obtain event information of external public opinion events, including the event content, impact, and handling methods of the external public opinion events; Based on the event information, a first rule with the same structure as any of the aforementioned rules is generated; Add the first rule to the rule set.
10. A public opinion early warning device, characterized in that, include: The acquisition unit is configured to acquire public opinion information of a target user, the public opinion information including the published target content and the target user's historical behavior data; The prediction unit is configured to use a sentiment analysis model to predict the first sentiment tendency of the public opinion information based on the target content and the historical behavior data. The risk identification unit is configured to determine the presence of risk in the public opinion information based on the first sentiment tendency; The generation unit is configured to generate early warning information corresponding to the public opinion information in response to the existence of risk in the public opinion information.