Public opinion quantitative early warning method
By using two-dimensional tag grading and computing power optimization, combined with sentiment analysis and clustering technology, the problem of uneven computing power distribution in the public opinion monitoring system has been solved, achieving efficient and differentiated public opinion monitoring and early warning, and improving the coverage and accuracy of public opinion monitoring.
Patent Information
- Application Number
- CN202511512126.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-22
- Publication Date
- 2026-02-10
AI Technical Summary
Existing public opinion monitoring systems suffer from poor computing power allocation in large-scale data environments, making it difficult to achieve efficient monitoring. Furthermore, traditional public opinion indices fail to accurately reflect public opinion risks and dissemination potential, resulting in monitoring blind spots and resource waste.
A two-dimensional tagging system is used to classify users, and a greedy algorithm and integer programming are combined to optimize computing power allocation. Negative comments are identified through sentiment analysis and clustering, a suspiciousness threshold is set to identify malicious accounts, and a weighted sentiment index is used to calculate the public opinion index to achieve differentiated processing and early warning.
With limited computing power, it has achieved efficient and differentiated public opinion monitoring, improved the efficiency of supervising high-influence accounts, reduced the resource consumption of ordinary accounts, and ensured the coverage and accuracy of public opinion monitoring.
Smart Images

Figure CN121504449A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network monitoring, and in particular to a method for quantitative early warning of public opinion. Background Technology
[0002] In existing public opinion monitoring systems, conventional practices mainly rely on single-dimensional account segmentation or full-volume public opinion capture and processing, which makes it difficult to achieve efficient allocation of computing power in a large-scale data environment. Existing methods typically only focus on monitoring high-influence accounts, while monitoring ordinary accounts, given their large number, would incur enormous computing costs if done routinely. Furthermore, due to computing power constraints, there is a lack of tiered management for ordinary or latent accounts, based on monitoring blind spots where public opinion emerges.
[0003] Furthermore, traditional public opinion indices typically employ simple averaging or weighted methods, failing to adequately consider the dissemination influence of key groups. This makes the overall index often inadequate to accurately reflect public opinion risks and dissemination potential. Therefore, under conditions of routine monitoring and limited computing power, current methods of public opinion quantification and early warning have areas for improvement. Summary of the Invention
[0004] The purpose of this invention is to propose a quantitative early warning method for public opinion monitoring, in order to solve the problem that current public opinion monitoring is limited by computing power, resulting in poor monitoring effect under limited computing power cost.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: a method for quantitative early warning of public opinion, comprising the following steps:
[0006] The data acquisition channel connects to the platform's API access port and preprocesses the data.
[0007] Two-dimensional labels with characteristic information are labeled based on user data;
[0008] Establish priority weights for two-dimensional labels to optimize computing power matching;
[0009] Identify and filter negative comments based on text sentiment.
[0010] Cluster negative comments to understand their causes;
[0011] Based on the negative comments identified through cluster analysis, a suspiciousness score is defined to identify malicious accounts, and a response strategy and processing priority are customized for each identified group.
[0012] Calculate the public opinion index for different groups, and set thresholds for the public opinion index to trigger early warnings and interventions.
[0013] As a further description of the above technical solution: the acquisition channel is divided into high-frequency stream and batch stream. Specifically, it is implemented by three modes: interface polling, file capture and streaming subscription to read platform popularity and interaction information. Streaming subscription is event-driven, and each message is stamped with a timestamp t and a unique ID when enqueued to support idempotent processing and backtracking.
[0014] The high-frequency stream and batch stream are queued and processed by the flow controller according to priority and written into the time series database, thereby providing a time series index for subsequent processing;
[0015] The high-frequency stream channel collects key node data triggered by passive amplification to ensure timeliness, while the batch stream channel periodically collects historical and long-tail account data to ensure representativeness, and preprocesses the data collected from the channels.
[0016] As a further description of the above technical solution: the data preprocessing includes data cleaning, named entity recognition, time synchronization and language detection, deduplication, noise reduction, word segmentation, named entity recognition, time synchronization and language detection.
[0017] As a further description of the above technical solution: the marking method of the two-dimensional label is as follows:
[0018] Based on account user profiles and behavioral characteristic data, influence scores are calculated using normalized linear combinations, and account types are classified and role types are labeled.
[0019] Identify user vectors and input them into the K-Means model for clustering. Then, manually label the clustering results and map them to a preset nickname type.
[0020] The role type label and nickname type are combined to form a matrix label, and a baseline priority weight is assigned to each matrix label combination;
[0021] Based on priority weights, high-priority accounts are assigned to high-frequency streaming channels, while low-priority accounts are assigned to batch streaming channels.
[0022] As a further description of the above technical solution: the computing power matching optimization method includes:
[0023] A greedy algorithm is used to sort the real-time layer data of high-frequency streams by account and priority from largest to smallest, and the computing power cost is included in the total consumption in turn. If the current remaining computing power is greater than the computing power cost, the data is marked as real-time monitoring until the data is traversed or the computing power is exhausted. This achieves a fast allocation mechanism based on account value and cost, ensuring low latency and prioritizing computing power.
[0024] Integer programming is used to consider group constraints and minimum guarantee rules on the candidate set of batch processing layer data of batch streams. It gives a near-global optimal resource allocation scheme and adjusts the strategy parameters. Specifically, "whether to monitor a certain account" is represented by a binary variable. Then, under the constraint of computing power budget, the total benefit is maximized. The specific approach is to model the problem as a 0 / 1 knapsack, where each account has value and cost. Combined with the total computing power budget, a group of accounts is selected to maximize the benefit and keep the cost within the budget.
[0025] As a further description of the above technical solution: the identification of text sentiment classification and screening of negative comments includes the following steps:
[0026] Sentiment classification uses a fine-tuned Transformer model to output sentiment probability vectors, defines sentiment scores, and filters out negative text.
[0027] The screened negative texts are clustered a second time to discover the causes. The clustering algorithm is used to automatically divide the negative texts into several clusters, and each cluster represents the subject or cause of a type of negative comments.
[0028] It enables the extraction of information on topics where there is a large amount of negative comments.
[0029] Set a self-inspection cycle, regularly update accounts within the cluster, set a retention threshold, identify the number of cycles in which accounts within the same cluster are retained, and recombine negative topic content by adding role type labels and nickname types, so that negative tags are written back to two-dimensional labels.
[0030] As a further description of the above technical solution: the definition of the suspiciousness of the malicious account includes the following methods:
[0031] For each account, a set of features, including behavioral feature vectors, content similarity, and network structure indicators, are input into the GNN graph neural network model to output the account's suspiciousness score.
[0032] Set a suspiciousness threshold; if the suspiciousness exceeds the threshold, the account is determined to be a malicious account.
[0033] The goal is to extract which comments from negative information are being promoted by malicious accounts.
[0034] As a further description of the above technical solution: the identified groups and corresponding processing priorities include:
[0035] The character type label j is divided into three categories: leader j1, white j2, and blue j3.
[0036] The preset nickname type y1 is: Leader type y2, Debate type y3, Agreeing type y4, Forwarding type y5, and Lurking type y6;
[0037] The negative topic index is based on the official sensitive word database, and is classified into levels from u1, u2 to un according to the sensitivity of the sensitive words involved in the database.
[0038] Among them, the maximum values of jyu information marked by the same account are j1, y1 and u1, and the minimum values are j3, y6 and un, and the processing priority is determined accordingly;
[0039] Response strategies include rapid contact and targeted communication for high-priority groups, delivery of caring content to medium-priority groups to restore trust, and automatic labeling and reporting of low-priority groups such as malicious accounts, with increased monitoring frequency or restricted dissemination weight.
[0040] Traffic to accounts is limited based on the sensitivity of the topic, with the specific limiting ratio preset manually.
[0041] As a further description of the above technical solution: the public opinion index uses a weighted sentiment index to calculate the overall sentiment of different groups and the public opinion of key groups, which reflects both the overall sentiment and highlights the role of key groups.
[0042] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0043] This solution first establishes a two-dimensional tagging system in terms of user segmentation, combining role labeling and user type identification. The former highlights the influence of public opinion dissemination, while the latter emphasizes behavioral characteristics. The combination of the two can form a priority matrix in computing power allocation. For example, high computing power can be allocated to "leading and influential" accounts, while low computing power can be allocated to "innocent and lurking" accounts, achieving computing power optimization under routine monitoring. For higher priority accounts, a greedy algorithm is used to implement more computing power for routine monitoring, while for low priority accounts, integer programming is used for batch computing power allocation. Under the constraint of computing power budget, the overall benefits are optimized to achieve near-global optimal allocation of candidate accounts, ensuring maximum monitoring coverage with limited resources. This approach not only enhances the supervision of high-influence and high-risk accounts but also provides overall supervision and protection for the entire account group, enabling it to have relatively reliable control over public opinion.
[0044] Secondly, in handling negative comments, negative texts are first screened out through sentiment analysis, and then the causes are extracted using clustering. Furthermore, K-Means are used to cluster user groups. By addressing the homogeneity issues of different clusters in a unified manner, rapid response can be achieved. Different response strategies are implemented for different groups. For example, targeted reassurance and communication are adopted for KOL groups, warnings and reports are issued for malicious account clusters, and core fan groups are maintained by focusing on winning back key accounts to stabilize public opinion. This method, through clustering, groups of homogeneous accounts together, enabling unified management while facilitating routine public opinion guidance.
[0045] This scheme also introduces a weighting mechanism in terms of quantification, which weights the overall sentiment score according to the importance of the cluster. Key opinion leaders or core groups are given higher weights, while ordinary netizens are given medium to low weights. This makes the public opinion index more realistically reflect the risk of dissemination and actual impact. This can ensure the efficient use of limited computing power and form a closed-loop logic at the monitoring and intervention level.
[0046] Meanwhile, this solution updates accounts within negative comment topic clusters periodically, and repeatedly updates accounts within the clusters by labeling them with negative topics and writing them back to two-dimensional tags. In conjunction with the introduction of an official sensitive word database, it obtains topic sensitivity assessments, allowing for differentiated handling of different accounts, achieving risk-based traffic restriction, and effectively realizing [the desired outcome]. Attached Figure Description
[0047] Figure 1 This is a schematic diagram of the public opinion quantitative early warning system of the present invention;
[0048] Figure 2 This is a flowchart illustrating the process of quantitative early warning of public opinion in this invention;
[0049] Figure 3 This is a topological diagram of the public opinion quantitative early warning system of this invention. Detailed Implementation
[0050] 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 embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0051] The goal of this solution is to achieve routine quantitative monitoring of public opinion under limited computing power and support differentiated early warning and intervention based on user groups. The solution aims to achieve quantitative monitoring and timely early warning of online public opinion. It ensures timely monitoring of key accounts and emerging negative topics through high-frequency and batch tiered data collection combined with priority allocation of computing power. It quickly identifies and locates persistent or malicious dissemination entities through periodic write-back of negative topic clusters and topic sensitivity weighting for differentiated handling. It improves model recognition accuracy through write-back and closed-loop training and retains traceable audit records to reduce misjudgments and compliance risks. Simultaneously, it optimizes resource utilization and system scalability, providing automated, controllable, and auditable handling capabilities for decision-making and intervention.
[0052] like Figure 1 - Figure 3 As shown, the present invention provides a method for quantitative early warning of public opinion, comprising the following steps:
[0053] The data collection channel accesses the platform's API access port; the data collection channel is divided into high-frequency stream and batch stream, and is specifically implemented in three modes: interface polling, file capture and streaming subscription to read platform popularity and interaction information. Streaming subscription is event-driven, and each message is given a timestamp t and a unique ID when enqueued to support idempotent processing and backtracking.
[0054] The high-frequency stream and batch stream are queued and processed by the flow controller according to priority and written into the time series database, thereby providing a time series index for subsequent processing;
[0055] The high-frequency stream channel collects key node data triggered by passive amplification to ensure timeliness, while the batch stream channel periodically collects historical and long-tail account data to ensure representativeness, and preprocesses the data collected from the channels.
[0056] The data is preprocessed, including data cleaning, named entity recognition, time synchronization and language detection, deduplication, noise reduction, word segmentation, named entity recognition, time synchronization and language detection.
[0057] Two-dimensional labels with feature information are labeled based on user data; the labeling method for the two-dimensional labels is as follows:
[0058] Based on account user profiles and behavioral characteristic data, influence scores are calculated using normalized linear combinations, and account types are classified and role types are labeled.
[0059] Normalized linear combination calculation formula:
[0060] ;
[0061] in Let α, β, γ and δ be the influence score of account i, where α, β, γ and δ are all adjustable weights, and norm(·) represents min-max normalization;
[0062] Based on thresholds, they are divided into leading, white, and blue categories. The thresholds can be set according to quantiles, for example, the top 5% are leading categories, 5% to 30% are white categories, and those after 30% are blue categories.
[0063] Identify user vectors and input them into the K-Means model for clustering. Then, manually label the clustering results and map them to a preset nickname type.
[0064] The role type label and nickname type are combined to form a matrix label, and a baseline priority weight is assigned to each matrix label combination;
[0065] Based on priority weights, high-priority accounts are assigned to high-frequency streaming channels, while low-priority accounts are assigned to batch streaming channels.
[0066] Establish priority weights for two-dimensional labels to optimize computing power matching;
[0067] The computing power matching optimization employs a two-layer strategy: a real-time greedy allocation layer to ensure low latency for critical accounts, and a batch processing layer using integer programming to select the most valuable accounts for batch processing within the budget. Key implementation points: For each account, the processing cost *c* and value *v* are estimated. The real-time layer sorts by priority or *v / c*, allocating resources sequentially until exhausted and supporting high-priority tasks preempting low-priority resources. The batch processing layer models whether to process a particular account as a 0 / 1 variable, maximizing the total value and finding a near-optimal solution under the computing power budget constraint.
[0068] A greedy algorithm is used to sort the real-time layer data of high-frequency streams by account and priority from largest to smallest, and the computing power cost is included in the total consumption in turn. If the current remaining computing power is greater than the computing power cost, the data is marked as real-time monitoring until the data is traversed or the computing power is exhausted. This achieves a fast allocation mechanism based on account value and cost, ensuring low latency and prioritizing computing power.
[0069] Integer programming is used to consider group constraints and minimum guarantee rules on the candidate set of batch processing layer data of batch streams. It gives a near-global optimal resource allocation scheme and adjusts the strategy parameters. Specifically, "whether to monitor a certain account" is represented by a binary variable. Then, under the constraint of computing power budget, the total benefit is maximized. The specific approach is to model the problem as a 0 / 1 knapsack, where each account has value and cost. Combined with the total computing power budget, a group of accounts is selected to maximize the benefit and keep the cost within the budget.
[0070] Identify and filter negative comments based on text sentiment.
[0071] The definition of suspiciousness of malicious accounts includes the following methods:
[0072] For each account, a set of features, including behavioral feature vectors, content similarity, and network structure indicators, are input into the GNN graph neural network model to output the account's suspiciousness score.
[0073] Set a suspiciousness threshold; if the suspiciousness exceeds the threshold, the account is determined to be a malicious account.
[0074] The goal is to extract which comments from negative information are being promoted by malicious accounts.
[0075] The process of identifying text sentiment classification and filtering negative comments includes the following steps:
[0076] Sentiment classification uses a fine-tuned Transformer model to output sentiment probability vectors, defines sentiment scores, and filters out negative text.
[0077] The screened negative texts are clustered a second time to discover the causes. The clustering algorithm is used to automatically divide the negative texts into several clusters, and each cluster represents the subject or cause of a type of negative comments.
[0078] It enables the extraction of information on topics where there is a large amount of negative comments.
[0079] Set a self-inspection cycle, regularly update accounts within the cluster, set a retention threshold, identify the number of cycles in which accounts within the same cluster are retained, and recombine negative topic content by adding role type labels and nickname types, so that negative tags are written back to two-dimensional labels.
[0080] Cluster negative comments to understand their causes;
[0081] Based on the negative comments identified through cluster analysis, a suspiciousness score is defined to identify malicious accounts, and a response strategy and processing priority are customized for each identified group.
[0082] The identified groups and corresponding processing priorities include:
[0083] The character type label j is divided into three categories: leader j1, white j2, and blue j3.
[0084] The preset nickname type y1 is: Leader type y2, Debate type y3, Agreeing type y4, Forwarding type y5, and Lurking type y6;
[0085] The negative topic index is based on the official sensitive word database, and is classified into levels from u1, u2 to un according to the sensitivity of the sensitive words involved in the database.
[0086] Among them, the maximum values of jyu information marked by the same account are j1, y1 and u1, and the minimum values are j3, y6 and un, and the processing priority is determined accordingly;
[0087] Response strategies include rapid contact and targeted communication for high-priority groups, delivery of caring content to medium-priority groups to restore trust, and automatic labeling and reporting of low-priority groups such as malicious accounts, with increased monitoring frequency or restricted dissemination weight.
[0088] Traffic to accounts is limited based on the sensitivity of the topic, with the specific limiting ratio preset manually.
[0089] Calculate the public opinion index for different groups, and set thresholds for the public opinion index to trigger early warnings and interventions.
[0090] The public opinion index uses a weighted sentiment index to calculate the overall sentiment of different groups and the public opinion of key groups, reflecting both the overall sentiment and the role of key groups.
[0091] Data sources include news sites, microblogs, forums, comment streams, private channels, and third-party public opinion APIs. The data collection channels access the platform's API ports and preprocess the collected data. These channels are divided into high-frequency streams and batch streams. High-frequency streams acquire real-time trending information and interaction nodes through interface polling and streaming subscription. Streaming subscription uses an event-driven mechanism, adding a globally unified clock-generated timestamp `t` and a unique message ID to each message upon enqueueing to support idempotent processing and historical backtracking. Batch streams supplement historical data and long-tail account data through periodic file crawling and interface polling to ensure data coverage and representativeness. Both high-frequency and batch streams are queued and processed by a flow controller based on priority and uniformly written to a time-series database. This time-series database establishes dual indexes for messages based on both time and account dimensions, providing efficient retrieval for subsequent analysis and aggregation.
[0092] The data preprocessing includes steps such as character normalization, encoding standardization, data cleaning, deduplication, noise reduction, language detection, time synchronization, word segmentation, and named entity recognition. Time synchronization uses a unified network clock source to eliminate cross-platform clock drift. Language detection is based on a multilingual classifier to identify and label language types. Named entity recognition is used to extract names of people, organizations, places, and key event words. The noise reduction step filters out duplicate forwards, emoticons, and spam advertising information, thereby ensuring the accuracy and analyzability of the input data.
[0093] After data processing, users are labeled with two-dimensional tags based on account user profiles and behavioral characteristics. These tags consist of role type and username type. Role types include three categories: Leader, White Leader, and Blue Leader. Username types include five categories: Leader, Debate, Conformist, Forwarder, and Lurker. Role type is calculated using an influence score, which is based on a normalized linear combination of follower count, interaction frequency, content diffusion coefficient, and cross-community dissemination power. Username type is determined by extracting user vectors and performing K-Means clustering, then combining this with manual annotation to map the clusters to the five preset username types, ultimately forming a two-dimensional matrix of account tags. Each matrix tag is assigned a baseline priority weight. Based on these priority weights, high-priority accounts enter the high-frequency flow channel, while low-priority accounts enter the batch flow channel.
[0094] The computing power matching optimization method comprises two parts: For high-frequency real-time layer data, a greedy algorithm is used for scheduling, prioritizing accounts from highest to lowest priority and incorporating their computing power costs into the total consumption. When the remaining computing power exceeds the cost, the account is assigned to real-time monitoring until the computing power is exhausted, thus ensuring minimal latency and computing power priority. For batch processing layer data in batch streams, a mixed integer programming model with group constraints and minimum coverage rules is used to maximize the total benefit under computing power budget constraints. The benefit is defined as a weighted function of account influence and topic sensitivity, and the cost is defined as the computing power expenditure required for collection and analysis. The objective function is... Under constraints And find the near-global optimal solution while satisfying the coverage requirement.
[0095] In the sentiment recognition stage, the Transformer model is used to classify the text for sentiment and output sentiment probability vectors. Negative texts are filtered out by threshold judgment. The negative texts are further divided into several clusters through semantic embedding. Each cluster represents a type of negative opinion cause or topic, thereby realizing the discovery of negative public opinion concentration points.
[0096] In the malicious account identification stage, an interaction graph is constructed for the accounts. The account behavior feature vector, content similarity and network structure index are input into the graph neural network model to output a suspiciousness score. A threshold is selected through ROC curve analysis. Accounts exceeding the threshold are marked as malicious accounts. The account identification results are then mapped to their corresponding negative comments to distinguish between natural spread and spread effects driven by malicious accounts.
[0097] During the group priority classification and response strategy stage, the processing priority is calculated based on the combination value of two-dimensional tags. The combination of "leading voice" and "leader type" is marked as the highest priority group, and the combination of "lurking type" and "blue voice" is marked as the lowest priority group. The corresponding strategies include: triggering rapid contact and targeted communication for high priority groups, implementing care content delivery to stabilize trust for medium priority groups, and triggering automatic reporting and key monitoring strategies for low priority groups such as malicious account groups. The platform can generate intervention suggestions or risk warnings, rather than directly interfering with the platform's weight.
[0098] During the public opinion index calculation phase, a weighted sentiment index is constructed for each group, and the calculation formula is as follows:
[0099] ;
[0100] Where w_i is the account influence weight, s_i is the sentiment score, Δt is the time difference from the current time, and λ is the time decay factor, this index reflects both the overall sentiment of the group and highlights the role of key groups, and is smoothed within a sliding window. A mechanism combining static and dynamic adaptive thresholds is set, along with hysteresis judgment to avoid frequent triggering. Finally, when the public opinion index exceeds the threshold, an early warning is output and an intervention plan is generated.
[0101] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for quantitative early warning of public opinion, characterized in that, Includes the following steps: The data acquisition channel connects to the platform's API access port and preprocesses the data. Two-dimensional labels with characteristic information are labeled based on user data; Establish priority weights for two-dimensional labels to optimize computing power matching; Identify and filter negative comments based on text sentiment. Cluster negative comments to understand their causes; Based on the negative comments identified through cluster analysis, a suspiciousness score is defined to identify malicious accounts, and a response strategy and processing priority are customized for each identified group. Calculate the public opinion index for different groups, and set thresholds for the public opinion index to trigger early warnings and interventions.
2. The method for quantitative early warning of public opinion according to claim 1, characterized in that, The acquisition channels are divided into high-frequency streams and batch streams. Specifically, they are implemented in three modes: interface polling, file capture, and streaming subscription to read platform popularity and interaction information. Streaming subscription is event-driven, and each message is given a timestamp t and a unique ID when it is enqueued to support idempotent processing and backtracking. The high-frequency stream and batch stream are queued and processed by the flow controller according to priority and written into the time series database, thereby providing a time series index for subsequent processing; The high-frequency stream channel collects key node data triggered by passive amplification to ensure timeliness, while the batch stream channel periodically collects historical and long-tail account data to ensure representativeness, and preprocesses the data collected from the channels.
3. The method for quantitative early warning of public opinion according to claim 1, characterized in that, The data preprocessing includes data cleaning, named entity recognition, time synchronization and language detection, deduplication, noise reduction, word segmentation, named entity recognition, time synchronization and language detection.
4. The method for quantitative early warning of public opinion according to claim 1, characterized in that, The marking method for the two-dimensional label is as follows: Based on account user profiles and behavioral characteristic data, influence scores are calculated using normalized linear combinations, and account types are classified and role types are labeled. Identify user vectors and input them into the K-Means model for clustering. Then, manually label the clustering results and map them to a preset nickname type. The role type label and nickname type are combined to form a matrix label, and a baseline priority weight is assigned to each matrix label combination; Based on priority weights, high-priority accounts are assigned to high-frequency streaming channels, while low-priority accounts are assigned to batch streaming channels.
5. The method for quantitative early warning of public opinion according to claim 4, characterized in that, The computing power matching optimization method includes: A greedy algorithm is used to sort the real-time layer data of high-frequency streams by account and priority from largest to smallest, and the computing power cost is included in the total consumption in turn. If the current remaining computing power is greater than the computing power cost, the data is marked as real-time monitoring until the data is traversed or the computing power is exhausted. This achieves a fast allocation mechanism based on account value and cost, ensuring low latency and prioritizing computing power. Integer programming is used to consider group constraints and minimum guarantee rules on the candidate set of batch processing layer data of batch streams. It gives a near-global optimal resource allocation scheme and adjusts the strategy parameters. Specifically, "whether to monitor a certain account" is represented by a binary variable. Then, under the constraint of computing power budget, the total benefit is maximized. The specific approach is to model the problem as a 0 / 1 knapsack, where each account has value and cost. Combined with the total computing power budget, a group of accounts is selected to maximize the benefit and keep the cost within the budget.
6. The method for quantitative early warning of public opinion according to claim 1, characterized in that, The process of identifying text sentiment classification and filtering negative comments includes the following steps: Sentiment classification uses a fine-tuned Transformer model to output sentiment probability vectors, defines sentiment scores, and filters out negative text. The screened negative texts are clustered a second time to discover the causes. The clustering algorithm is used to automatically divide the negative texts into several clusters, and each cluster represents the subject or cause of a type of negative comments. Set a self-inspection cycle, regularly update accounts within the cluster, set a retention threshold, identify the number of cycles in which accounts within the same cluster are retained, and recombine negative topic content by adding role type labels and nickname types, so that negative tags are written back to two-dimensional labels.
7. The method for quantitative early warning of public opinion according to claim 6, characterized in that, The definition of suspiciousness of malicious accounts includes the following methods: For each account, a set of features, including behavioral feature vectors, content similarity, and network structure indicators, are input into the GNN graph neural network model to output the account's suspiciousness score. Set a suspiciousness threshold; if the suspiciousness exceeds the threshold, the account is determined to be a malicious account. The goal is to extract which comments from negative information are being promoted by malicious accounts.
8. The method for quantitative early warning of public opinion according to claim 5, characterized in that, The identified groups and corresponding processing priorities include: The character type label j is divided into three categories: leader j1, white j2, and blue j3. The preset nickname type y1 is: Leader type y2, Debate type y3, Agreeing type y4, Forwarding type y5, and Lurking type y6; The negative topic index is based on the official sensitive word database, and is classified into levels from u1, u2 to un according to the sensitivity of the sensitive words involved in the database. Among them, the maximum values of jyu information marked by the same account are j1, y1 and u1, and the minimum values are j3, y6 and un, and the processing priority is determined accordingly; Response strategies include rapid contact and targeted communication for high-priority groups, delivery of caring content to medium-priority groups to restore trust, and automatic labeling and reporting of low-priority groups such as malicious accounts, with increased monitoring frequency or restricted dissemination weight. Traffic to accounts is limited based on the sensitivity of the topic, with the specific limiting ratio preset manually.
9. The method for quantitative early warning of public opinion according to claim 8, characterized in that, The public opinion index uses a weighted sentiment index to calculate the overall sentiment of different groups and the public opinion of key groups, reflecting both the overall sentiment and the role of key groups.