A public opinion case analysis-based large language model public opinion propagation graph generation method
By optimizing the large language model and integrating it with knowledge graph technology, a public opinion propagation graph with multiple types of nodes and attribute features suitable for public opinion analysis was generated. This solved the problems of targeting and efficiency in existing public opinion analysis technologies and achieved accurate public opinion propagation analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG UNIVERSITY OF MEDIA AND COMMUNICATIONS
- Filing Date
- 2026-03-17
- Publication Date
- 2026-06-19
AI Technical Summary
Existing technologies lack specificity in large language models for public opinion analysis, are unable to effectively identify professional terms and implicit semantics in the public opinion field, have incomplete graph node identification, have simplistic edge attribute construction, and exhibit low levels of technology integration, thus failing to meet the needs for accurate and efficient public opinion analysis.
By constructing a public opinion case dataset, we perform specialized distillation optimization on the basic large language model to generate a distilled large language model suitable for the public opinion field. We then combine knowledge graph technology to generate multi-type node information and attribute features, design a public opinion knowledge graph schema, and optimize the graph generation process.
It achieves accurate identification of key public opinion information and complete coverage of multiple types of nodes, improves the efficiency and accuracy of public opinion dissemination map generation, and supports precise analysis in areas such as government public opinion supervision and corporate crisis public relations.
Smart Images

Figure CN122242701A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the interdisciplinary field of artificial intelligence and public opinion analysis, specifically to a method for generating a public opinion propagation map based on a large language model of public opinion case analysis. Background Technology
[0002] With the rapid development of internet technology, information dissemination channels such as social media, news platforms, and forums have become increasingly diversified, significantly increasing the frequency and speed of public opinion events. Their impact on social stability, public decision-making, and corporate image is becoming increasingly profound. Against this backdrop, public opinion analysis technology has become one of the core technologies of concern in various fields. Currently, existing technologies in this field mainly revolve around two main directions: the extraction of public opinion information and the visualization of dissemination relationships. Related invention patents also largely focus on the optimization and improvement of these two types of technical solutions.
[0003] One typical existing technical solution is the public opinion dissemination graph construction scheme based on traditional methods. This type of scheme relies on manually defined rules, statistical analysis, and simple machine learning algorithms (such as Naive Bayes and Support Vector Machines) to construct the graph. It typically begins by collecting public opinion data through web crawlers, preprocessing it, and then identifying entities as graph nodes based on manually preset keywords or regular expressions. Next, it determines the relationships between nodes as graph edges by statistically analyzing features such as entity co-occurrence frequency, and finally supplements simple edge attributes to generate the graph. Another mainstream approach is the preliminary public opinion analysis scheme based on large language models. This type of scheme directly applies general-purpose large language models such as the GPT series and LLaMA series to public opinion analysis, guiding the model to complete tasks such as sentiment analysis, content summarization, or keyword extraction through prompts. Some schemes simply construct an undirected graph from the extracted keywords to display the relationships.
[0004] However, existing technologies have some shortcomings: First, the application of large language models is not targeted enough. Existing solutions do not specifically optimize general large language models based on the characteristics of public opinion cases, resulting in weak understanding of professional terms and implicit semantics in the public opinion field, low accuracy in identifying key information such as public opinion users and core demands, and easy problems of extraction omissions or misjudgments. Second, the completeness of graph node identification is poor. Traditional solutions rely on manual rules, which are difficult to cover implicit entities. Solutions based on general large language models can only output scattered keywords and cannot build a complete system of multi-type nodes. Third, the construction of graph edge attributes is too simplistic. The edge attributes of existing solutions are mostly simple statistical features such as the number of propagations, lacking the mining of deep attributes such as propagation methods and propagation intensity, and failing to fully reflect the propagation patterns. Fourth, the degree of technology integration is low. The analysis results of large language models cannot be efficiently converted into graph structured data, and the advantages of both technologies cannot be fully utilized.
[0005] The aforementioned shortcomings mean that existing technologies cannot meet the needs of various fields for accurate and efficient public opinion analysis. Therefore, there is a need for a public opinion dissemination graph generation method that can achieve deep integration of domain-specific large language models and knowledge graph technology, and is specifically optimized for public opinion cases, in order to solve the deficiencies of existing technologies. Summary of the Invention
[0006] To address the aforementioned issues, this invention provides a method for generating a public opinion dissemination graph based on a large language model using public opinion case analysis. This method primarily involves performing specialized distillation optimization on a basic large language model using a public opinion case dataset to obtain a distilled large language model with high-precision public opinion information analysis capabilities. This model is then used to extract multi-type node information, relationships, and attribute features from the target public opinion data. Finally, a knowledge graph construction method is used to integrate this information to generate a public opinion dissemination knowledge graph containing rich attributes.
[0007] A method for generating a public opinion dissemination map based on a large language model using public opinion case analysis includes the following steps: Step 1: Construct a public opinion case dataset; Step 2: For the public opinion case dataset, distill and optimize the basic large language model to obtain a dedicated distilled large language model suitable for the public opinion field; Step 3: Collect target public opinion data and clean the data to obtain cleaned target public opinion data. Then, use the dedicated distillation big language model from Step 2 to extract public opinion information and obtain structured public opinion data. Step 4: Design the schema of the public opinion knowledge graph, and import the knowledge graph schema and the structured public opinion data in Step 3 into the graph database to finally generate a complete public opinion dissemination graph; Step 5: Optimize and output the public opinion dissemination map generated in Step 4.
[0008] In step 1, a public opinion case dataset is constructed, which includes: 1.1) collection of public opinion case data; 1.2) data filtering and cleaning; 1.3) data annotation, to obtain the public opinion case dataset.
[0009] In step 2, the basic large-scale language model is distilled and optimized for the public opinion case dataset, specifically including: 2.1) Generate soft labels for the multi-teacher model; 2.2) Construction of the public opinion feature enhancement module; 2.3) Construction of the quaternary joint loss function.
[0010] 2.4) A model training mechanism with dynamic weight adjustment and a quaternary joint loss function are adopted, and a new student model structure is used for training to obtain a dedicated distilled large language model suitable for the public opinion field. In step 2.1), soft labels for the multi-teacher model are generated, specifically including: We constructed a teacher model combination of main teacher and assistant teacher. We selected the open-source large model LLaMA 3-70B as the main teacher to output structured soft tags of core entities, relationships and emotions. We selected the open-source model ChatGLM4-9B, which is good at fine-grained semantic analysis, as the assistant teacher to focus on mining the implicit demands and dissemination triggers in public opinion texts. Design prompt word templates to guide primary and secondary teachers to output soft tags in their respective professional dimensions, which is to generate soft tags for the multi-teacher model.
[0011] Step 2.2) involves the construction of the public opinion feature enhancement module, which specifically includes: To supplement the student model Qwen-1.3B with public opinion feature input, a public opinion feature embedding layer is added to the input end of the student model Qwen-1.3B. The dissemination data features, sentiment polarity features, and entity type features in the public opinion case dataset are transformed into feature vectors, which are then weighted and fused to obtain the final fused feature vector, thus obtaining a new student model structure.
[0012] A public opinion feature enhancement module was constructed for the student model Qwen-1.3B. A public opinion feature embedding layer was added to the model input to process the derived feature data of the input and generate a public opinion data feature vector by normalizing the dissemination data. The raw sentiment values are extracted using the VADER tool and then mapped using the sigmoid function to generate sentiment polarity feature vectors. The entity type annotation information is used to generate entity type feature vectors through one-hot encoding. Simultaneously construct model-adaptive feature vectors To ensure compatibility with the feature format of the student model, the feature vectors are then combined with the original word embedding vectors from the student model using a weighted fusion formula. To integrate.
[0013] The formula for weighted fusion is: in: This is the final fused feature vector; The weight matrix is a learnable matrix; To propagate the data feature vector; This represents the feature vector of emotional polarity. For entity type feature vectors; Adapt the feature vectors to the model; This is the original word embedding vector for the model.
[0014] In step 2.3), the construction of the quaternary joint loss function specifically includes: Based on the soft labels of the multi-teacher model and the final fused feature vector, a public opinion feature constraint loss is introduced. This forms a quaternary joint loss function: in: This is the overall loss value; These are the weighting coefficients; Cross-entropy loss; For KL divergence loss; Losses are constrained by public opinion characteristics; This is the L2 regularization loss.
[0015] A dynamic weight adjustment model training mechanism is adopted, which dynamically adjusts the weights of loss terms based on performance feedback during training. First, the weight coefficients are initialized to balance the various loss terms. The training period is set to 5 epochs, with weight updates performed every 5 epochs of full-data training. A performance threshold is set to determine if there is a significant improvement in model performance. Every 5 epochs of training, the recall rate on the validation set is calculated, and the weight coefficients are adjusted based on the improvement (current recall rate minus the recall rate of the previous epoch): if the improvement is greater than the performance threshold, the current weights are maintained; if the performance threshold is greater than 0 but less than the performance threshold, the weights of KL divergence loss and sentiment feature loss are increased; otherwise, the weight of hard loss is significantly increased.
[0016] In step 4, the schema of the public opinion knowledge graph is designed, which specifically includes 4 types of nodes and 3 types of edges; The four types of nodes include public opinion events, key participants, core demands, and dissemination channels; The three types of edges include published content, related comments, and expressed demands.
[0017] Step 5 involves optimizing the graph output. This includes using algorithms to clean up redundant nodes and edges and complete the relationships, resulting in an optimized graph. Finally, based on the optimized graph content, a public opinion dissemination analysis report is automatically generated, including core node identification, dissemination path analysis, dissemination intensity ranking, public opinion evolution trends, and risk warning alerts.
[0018] The application scenarios of this invention cover multiple fields such as government public opinion monitoring, corporate crisis public relations, and social governance. In government public opinion monitoring, it can help relevant departments accurately grasp the trend of public opinion dissemination and public demands, providing data support for decision-making; in corporate crisis public relations, it can help companies quickly identify the focus of public opinion and key communication nodes, and formulate targeted response strategies.
[0019] Compared with the prior art, the present invention has the following advantages: 1. The large language model is highly targeted, significantly improving the accuracy and efficiency of identifying key public opinion information. This invention uses a three-element joint optimization strategy of "knowledge distillation + instruction fine-tuning + public opinion feature enhancement" to construct a specialized dataset, enabling the model to focus on knowledge in the public opinion domain and accurately identify information that is easily missed by existing technologies, such as "hidden public opinion users" and "potential core demands".
[0020] 2. The public opinion dissemination graph node system is complete, with wide coverage and accurate identification. This invention defines four types of node systems and, combined with refined information extraction instructions, achieves complete identification of multiple types of nodes. Experimental data shows that the graph comprehensively reflects the participating entities and core elements of public opinion events.
[0021] 3. The technology is closely integrated, resulting in high efficiency and low cost in generating public opinion dissemination maps. This invention designs a complete technical process, realizing fully automated processing from raw public opinion data to the final map, significantly improving the feasibility and economy of practical applications. Attached Figure Description
[0022] Figure 1 This is a schematic diagram of the overall process of the intelligent generation method for text and image manuscripts based on multimodal fusion learning of the present invention. Detailed Implementation
[0023] The objective of this invention is achieved through the following technical solution, specifically including the following steps: Step 1: Construct a public opinion case dataset; Step 2: For the public opinion case dataset, distillation optimization is performed on the basic large language model to obtain a dedicated distilled large language model suitable for the public opinion field; Step 3: Collect target public opinion data and perform data cleaning to obtain cleaned target public opinion data. Then, use the dedicated distillation big language model from Step 2 to extract public opinion information and obtain structured public opinion data.
[0024] Step 4: Design the schema of the public opinion knowledge graph, and import the knowledge graph schema and the structured public opinion data in Step 3 into the graph database to finally generate a complete public opinion dissemination graph; Step 5: Optimize and output the public opinion dissemination map generated in Step 4.
[0025] Step 1 involves constructing a public opinion case dataset, specifically including: 1.1) Data Collection: A multi-source data collection strategy was adopted, using web crawlers to collect public opinion case data from mainstream information platforms such as Weibo, WeChat official accounts, Douyin, Xinhua Net, People's Daily Online, Zhihu, and Douban over the past 5 years. The collected content covers fields such as public opinion text (including title, body, comments, and reposts), publication time, publisher information (including name, identity, and number of followers), and dissemination data (including number of reposts, comments, and likes). During the collection process, anti-crawling mechanisms of the platforms were circumvented by setting up User-Agent spoofing, controlling request frequency (e.g., no more than 1000 requests per hour), and using a proxy IP pool for rotation. At the same time, the "Cybersecurity Law" and the data usage specifications of each platform were strictly followed to ensure the legality and stability of the data collection.
[0026] 1.2) Data Filtering and Cleaning 1.2.1) Data Filtering: Based on the event popularity and type, the data collected in 1.1) are filtered to select public opinion cases with a dissemination volume of ≥1000 and covering multiple fields such as public health, social governance, and corporate crises. 1.2.2) Data Cleaning: The public opinion case data obtained in 1.2.1) is cleaned, including removing duplicate data, filtering invalid characters, unifying the time format to "YYYY-MM-DD HH:MM:SS", correcting typos, etc., to obtain a preliminary dataset.
[0027] 1.3) Data Labeling: Data labeling content covers four types of information, specifically including 1.3.1) Public opinion event tags, such as "a company's drinking water contains microplastics", are generated by a text topic clustering algorithm, and ambiguity and mismatch of tags are manually corrected; 1.3.2) Node information labeling: Candidate nodes such as public opinion users (name, identity, etc.), involved entities, and dissemination channels are extracted through named entity recognition algorithm. Missing attributes are manually supplemented and valid nodes are screened. At the same time, public opinion keywords (core appeal words, event-related words, and sentiment words) are labeled. 1.3.3) Association relationship annotation: Based on entity co-occurrence and semantic dependency analysis, candidate "node-relationship-node" pairs are generated. The rationality of the relationship is judged manually and implicit associations are supplemented. 1.3.4) Attribute feature annotation: The machine identifies the propagation mode (forwarding, commenting, etc.) based on text behavior features, calculates the propagation intensity reference value, and outputs the sentiment tendency (positive, negative, neutral) in combination with sentiment analysis tools. The human verifies and corrects abnormal results.
[0028] 1.4) Dataset partitioning: The labeled dataset is divided into training set, validation set and test set in a ratio of 7:2:1. The training set is used for updating model parameters, the validation set is used for hyperparameter tuning during training, and the test set is used for final performance evaluation of the model.
[0029] Step 2 involves distillation optimization of the basic large language model, specifically including... 2.1) Employing a ternary joint optimization strategy combining multi-teacher collaborative distillation, hierarchical knowledge transfer, and domain feature anchoring: 2.1.1) Soft Tag Fusion Generation from Multiple Open-Source Teacher Models. A combination of open-source teacher models (main teacher and assistant teacher) is constructed. The large open-source model LLaMA 3-70B is selected as the main teacher, outputting structured soft tags for core entities, relationships, and sentiments. The open-source model ChatGLM4-9B, which excels in fine-grained semantic analysis, is selected as the assistant teacher, focusing on uncovering implicit demands and dissemination triggers in public opinion texts. A four-dimensional prompt word template of "public opinion entity-relationship-sentiment-trigger factor" is designed to guide the main and assistant teachers to output soft tags in their respective professional dimensions.
[0030] 2.1.2) Construction of the Public Opinion Feature Enhancement Module. Based on the "Multi-Open Source Teacher Model Soft Tag Fusion Generation," public opinion feature input is added to the student model (Qwen-1.3B). A public opinion feature embedding layer is added to the student model input, converting the preprocessed public opinion text features (including dissemination data features, sentiment polarity features, and entity type features) into feature vectors, which are then fused with the model's word embedding vectors. The weighted fusion formula is: in: This is the final fused feature vector; The weight matrix is learnable and is automatically updated during model training. The feature vector of propagation data is generated by normalizing propagation data such as the number of reposts and comments. The sentiment polarity feature vector is obtained by mapping the sentiment values extracted by the VADER tool to a sigmoid function. It is an entity type feature vector, generated by one-hot encoding of entity types such as the parties involved and users of public opinion. To adapt feature vectors for the model, which are used to adapt to the feature formats of different base models; This is the original word embedding vector for the model.
[0031] 2.1.3) Construction of Joint Loss Function. Based on the soft label set and fused feature vectors, a targeted loss function is constructed to guide model training. Sentiment feature constraints are introduced into the loss function. This forms a quaternary joint loss function: in: This is the overall loss value; These are the weighting coefficients; The cross-entropy loss is calculated based on manually labeled hard tags. The input consists of the model's prediction results for public opinion entities and relationships, and the manually labeled tags. The KL divergence loss is calculated based on the soft labels of the primary and secondary teacher models, with the input being the output distributions of the student and teacher models. The loss is constrained by public opinion features. The input consists of the sentiment tendency value predicted by the student model and the sentiment features output by the feature embedding layer, which enhances the sentiment capture capability. The L2 regularization loss is used, with all trainable parameters of the model as input, to prevent overfitting.
[0032] 2.2) Model training mechanism with dynamic weight adjustment: The weights of the loss term are dynamically adjusted through performance feedback during training. First, the weight coefficients are initialized. The initial values are 0.3, 0.4, 0.2, and 0.1, used to balance the various loss terms; the period is set to 5 epochs, with weights updated every 5 epochs of full data training. The performance threshold θ = 0.02 is used to determine if there is a significant improvement in model performance. After every 5 epochs of training, the F1 score (recall) on the validation set is calculated, and the weight coefficients are adjusted according to the improvement ΔF (current F1 score minus the F1 score of the previous epoch): if... Maintain the current weights; if Increase the weights β and γ of the KL divergence loss and the public opinion feature loss; if ΔF < 0, significantly increase the weight of the hard loss α. After training, the model's F1 value is ≥ 0.85, and the trained distillation model will be used as a tool for public opinion information extraction in step 4.
[0033] In step 3, target public opinion data is collected and cleaned to obtain cleaned target public opinion data. Then, the dedicated distillation big data model from step 2 is used to extract public opinion information, resulting in structured public opinion data. Specifically, this includes: 3.1) Target public opinion data collection and processing, specifically, 3.1.1) Target Data Collection: Identify the target public opinion event, for example, input "a certain brand of bottled water was exposed to contain microplastics in 2025" as the target event. After identifying the target event, clarify the time frame, core theme, and focus of attention. Based on the information of the target public opinion event, use targeted web crawling technology to collect data from relevant information sources. The collection scope focuses on news reports, social media posts, comments, and forwarded content directly related to the target event. The collected fields are consistent with the fields in 1.1) Data Collection, and must cover public opinion text (including title, body, comments, and forwarded content), publication time, publisher information (including name, identity, and number of followers), and dissemination data (including number of forwards, comments, and likes), etc., to obtain the target public opinion data.
[0034] 3.1.2) Data Preprocessing: First, the collected target public opinion data is preliminarily processed, including deduplication, filtering invalid information, and format correction; second, the length of the target public opinion text is standardized, short texts are truncated or padded to 512 tokens according to the number of tokens, and long texts are extracted using a sliding window method to extract the core segments; finally, the text format is unified, and all texts are converted into the standard format of "event time + publisher + text content + dissemination data" to obtain a standardized target public opinion data set.
[0035] 3.2) Public opinion information extraction specifically includes 3.2.1) Design structured extraction instructions, clarify the extraction tasks and corresponding relationships, and design extraction instructions based on the following requirements: 1) Public opinion event node extraction: identify event name, time, core elements, and current status; 2) Core participant node extraction: extract information on opinion leaders (name, identity, number of followers, core statements) and involved entities (name, type), covering the core attributes of the "core participant" node; 3) Core demand extraction: clarify the content, initiator, and type of the demand, corresponding to the attributes of the "core demand" node; 4) Dissemination channel extraction: record the channel name and platform type, matching the attributes of the "dissemination channel" node; 5) Entity relationship extraction: identify three types of relationships: "dissemination-demand-association", corresponding to the graph edge type; 6) Core attribute extraction: determine sentiment tendency, statistically analyze dissemination data (number of reposts / comments / likes), and record dissemination time as the core attributes of the edges.
[0036] 3.2) Batch Information Extraction: A batch inference framework is built, and standardized target public opinion data and extraction instructions are input into the Distillation Large Language Model in batches, processing 16-32 text data points per batch. The model output format is JSON to ensure the structured nature of the output results, facilitating subsequent parsing and processing.
[0037] Step 4 involves designing a knowledge graph schema and storing the public opinion data output from step 4 into a graph database with the corresponding knowledge graph schema structure. This includes: 4.1) Design a knowledge graph schema, including 4 types of nodes and 3 types of edges. The 4 types of nodes include public opinion events (attributes include event name, event time, core elements, and current status), core participants (attributes include name, core attributes, and core opinions), core demands (attributes include demand content, initiator, and demand type), and dissemination channels (attributes include channel name, platform type, and core characteristics). The 3 types of edges include published content (core participants → public opinion events / dissemination channels), comment association (core participants → public opinion events / core participants), and expressed demands (core participants → core demands).
[0038] 4.2) Graph storage: Select Neo4j, a graph database that supports efficient graph query and analysis, import the node data and edge data tables into the database, and store them in a graph structure data format. During the import process, create indexes for fields such as node ID and public opinion event name.
[0039] Step 5 involves optimizing the output of the graph, specifically including: 5.1) Graph optimization: First, redundant nodes and edges are cleaned up. Duplicate nodes are cleaned up based on the node attribute similarity ≥ 0.9, and meaningless edges with propagation strength ≤ 0.5 are deleted. Second, the relationship is completed. Potential relationships are inferred by distilling the large language model, and the GNN link prediction algorithm is used to assist in the completion. The completed relationships are added to the graph after being manually sampled and verified.
[0040] 5.2) Graph Output: Three core output formats are designed: First, visualization output, integrating visualization tools such as Neo4j Browser and ECharts, supporting interactive operations such as node filtering, path query, and timeline display; second, structured data output, providing downloads of structured data in multiple formats such as JSON, CSV, and Excel; and third, analysis report output, automatically generating public opinion dissemination analysis reports based on the graph content, including core node identification, dissemination path analysis, dissemination intensity ranking, public opinion evolution trend, and risk warning prompts, with report formats supporting Word and PDF, two commonly used formats.
[0041] Specifically, such as Figure 1 As shown, the present invention proposes a method for generating a public opinion propagation map based on a large language model of public opinion case analysis, which includes the following steps: Step 1: Construction of Public Opinion Case Dataset. A multi-source data collection strategy was adopted to collect public opinion case data from mainstream platforms over the past 5 years. Cases with a dissemination volume of ≥1000 were selected from multiple fields. After cleaning, the data was labeled using a combination of manual annotation and machine-assisted verification. The data was then stratified into training, validation, and test sets in a 7:2:1 ratio to ensure an annotation accuracy of ≥95%.
[0042] Step 2: Distillation Optimization of the Basic Large Language Model. A collaborative and hierarchical distillation strategy was adopted, selecting LLaMA 3-70B as the main teacher and ChatGLM4-9B as the assistant teacher, with Qwen-1.3B as the student model for simultaneous distillation training. Soft labels for the main and assistant teachers were obtained using a four-dimensional prompt template and fused with confidence weights. A sentiment feature embedding layer was constructed at the student model input to complete feature fusion, and parameters were optimized based on the corresponding joint loss function. During training, the weight coefficients were dynamically adjusted based on the F1 score on the validation set, and training stopped after the loss stabilized.
[0043] Step 3: Target Public Opinion Data Collection and Preprocessing. The user specified "a certain brand of bottled water was exposed to contain microplastics in 2025" as the target event, with the time range set from January 10 to February 10, 2025. 8200 relevant data entries were collected from platforms such as Weibo, WeChat official accounts, Autohome forums, Xinhua Net, and People's Daily Online using targeted web crawlers. After cleaning operations such as deduplication and filtering of invalid information, and specialized text processing, 6700 standardized target public opinion data entries were obtained.
[0044] Step 4: Distillation of public opinion information from a large language model. Instructions are designed to input 6700 standardized data points into the trained distillation model. GPU-accelerated inference is used to output standard data in JSON format. The extraction results are corrected through rule validation and cross-validation, ultimately yielding a structured extraction result containing 890 node information points, 1320 relationships, and 1320 sets of attribute features.
[0045] Step 5: Construction of the Knowledge Graph for Public Opinion Dissemination. This invention employs a system of 4 node types and 3 edge types, supplementing node attributes to address the characteristics of automotive public opinion. Unique IDs are assigned to 890 node entries, and the Neo4j database is used to create indexes and import node and edge data.
[0046] Step 6: Graph Optimization and Output. Redundancy is cleaned up by merging two groups of duplicate involved nodes, and 126 meaningless edges are deleted. Potential relationships are completed using distilled large language model inference and GNN link prediction algorithm, and then manually verified. For output, visualization is achieved using Neo4j Browser and ECharts, JSON-formatted structured data is available for download, and a PDF analysis report is automatically generated.
[0047] The above description is merely illustrative of examples of the present invention and is not intended to limit the invention. Those skilled in the art should recognize that any modifications or alterations made to the present invention will fall within the scope of protection of the present invention.
[0048] To more clearly illustrate the technical solution and beneficial effects of the present invention, the specific implementation process of the present invention will be described in detail using the "2025 incident in which a certain brand of bottled water was exposed to contain microplastics" as an example.
[0049] Step 1: Construct a dataset of public opinion cases First, a dataset of public opinion cases in areas such as "food safety" and "corporate crises" from the past five years was constructed. This dataset was collected from platforms such as Weibo, Douyin, and Xinhua News Agency via web crawling and underwent rigorous screening (≥1000 views) and cleaning. Subsequently, a combination of human and machine annotation was used for further processing. Public opinion event tags: For example, "the incident of excessive additives in a dairy company in 2024".
[0050] Node information: Mark all involved “core participants” (such as the companies involved, regulatory authorities, KOLs), “core demands” (such as “demanding the release of test reports”, “calling for the removal of products from shelves”), and “dissemination channels” (such as “Weibo topic #XX incident#”, “Douyin short video”).
[0051] Related relationships: marked with "Published content" (e.g., "State Administration for Market Regulation → Issued Notice"), "Comment related" (e.g., "Netizen A → Comment → KOL Zhang San"), and "Expressed demands" (e.g., "Consumer Union → Expressed demands → Requested compensation").
[0052] Step 2: Distillation and Optimization of the Basic Large Language Model Qwen-1.3B was selected as the student model, LLaMA 3-70B as the main teacher model, and ChatGLM4-9B as the assistant teacher model.
[0053] Soft tag generation: Using a pre-designed four-dimensional prompt word template, the main teacher model is guided to output structured entities and relationships (such as {"entity":"a certain brand company", "relationship": "the subject involved", "emotion": "negative"}), while the auxiliary teacher model is guided to dig out implicit information (such as {"implicit demand": "a crisis of trust in the safety of domestic drinking water", "trigger point": "overseas testing agency report"}).
[0054] Feature enhancement: Add a sentiment feature embedding layer to training samples related to the target event. For example, a Weibo post from a KOL with 5 million followers will have a high dissemination data feature vector; a comment full of anger will have a sentiment polarity feature vector close to 1.
[0055] Model training: The model was trained using a quaternary joint loss function and a dynamic weight adjustment mechanism. The resulting dedicated distilled large language model achieved an F1 score of 0.88 on the test set for identifying "core demands" and "implicit participants," significantly outperforming the general model.
[0056] Step 3: Target public opinion data collection and preprocessing Regarding the "2025 bottled water incident involving a certain brand," a time frame was set (January 10, 2025 to February 10, 2025), and approximately 8,200 relevant data entries were collected from platforms such as Weibo, Xiaohongshu, and CCTV News using targeted web scraping. After cleaning and standardization, 6,700 valid data entries were obtained, each in a uniform format of [time, publisher, content, number of reposts / comments / likes].
[0057] Step 4: Distillation of public opinion information from large language models The 6700 standardized data points and structured extraction instructions were batch-input into the distillation model trained in the previous step. The model efficiently output structured JSON results, for example: { "Public Opinion Event": {"Name": "Microplastic Incident Involving a Certain Brand of Bottled Water", "Time": "2025-01-15", "Status": "Under Investigation"}, "Key Participants": [ {"Name": "A certain drinking water company", "Type": "Company involved", "Statement": "Products meet national standards"}, {"Name": "@Health Science Popularizer Dr. Li", "Identity": "Medical KOL", "Number of Followers": 3,200,000} ], "Core Demand": {"Content": "Demands the National Health Commission to intervene and release comprehensive testing results", "Initiator": "Consumers", "Type": "Regulatory Demand"} "Dissemination Channel": {"Name": "Weibo Hot Search List", "Platform Type": "Social Media"}, "relation": [ {"Header Entity": "@Health Science Popularizer Dr. Li", "Relationship": "Published Content", "Tail Entity": "Weibo Hot Search List"}, {"Head Entity": "Consumer", "Relationship": "Expressing Demands", "Tail Entity": "Requesting Intervention from the National Health Commission..."} ] } In the end, a total of 890 node information entries and 1320 relationship entries were extracted.
[0058] Step 5: Construction of a Knowledge Graph for Public Opinion Dissemination Based on the schema designed according to this invention, four types of node tags (public opinion events, core participants, core demands, and dissemination channels) and three types of relationship types (published content, comment association, and expressed demands) were created in the Neo4j graph database. After importing the structured data extracted in the previous step, a complete public opinion dissemination graph was constructed.
[0059] Step 6: Graph Optimization and Output Optimization Three duplicate core participant nodes with different nicknames but belonging to the same person were cleaned up, and 89 invalid edges with insufficient propagation strength were deleted. Simultaneously, a potentially important relationship was completed using the GNN link prediction algorithm: "@HealthPopularizerDr.Li" → Comment Association → "Official Account of a Certain Brand of Drinking Water Co., Ltd."
[0060] The final PDF report pointed out that "@Health Science Popularization Expert Dr. Li" was the key dissemination node of this incident (ranked first in dissemination intensity), and the core demand has evolved from "product removal" to "industry standard revision". It also issued a warning that "if there is no official response within 72 hours, the public opinion risk level will rise to red".
Claims
1. A large language model public opinion propagation graph generation method based on public opinion case analysis, characterized in that, The method comprises the following steps: Step 1: Construct a public public opinion case data set; Step 2: Distill and optimize the basic large language model for the public public opinion case data set to obtain a special distilled large language model suitable for the public opinion field; Step 3: Collect target public opinion data and perform data cleaning to obtain cleaned target public opinion data, and use the special distilled large language model in step 2 to extract public opinion information to obtain structured public opinion data; Step 4: Design a schema for a public opinion knowledge graph, and import the knowledge graph schema and the structured public opinion data in step 3 into a graph database to finally generate a complete public opinion propagation graph; Step 5: Optimize the public opinion propagation graph generated in step 4 and output.
2. The public opinion case analysis-based large language model public opinion propagation graph generation method of claim 1, characterized in that, In step 1, the public public opinion case data set is constructed, specifically including: 1.1) public public opinion case data collection; 1.2) data screening and cleaning; 1.3) data labeling, to obtain a public public opinion case data set.
3. The public opinion case analysis-based large language model public opinion propagation graph generation method of claim 1, characterized in that, In step 2, the basic large language model is distilled and optimized for the public public opinion case data set, specifically including: 2.1) Generate multi-teacher model soft labels; 2.2) Construct an opinion feature enhancement module; 3) Construct a four-element joint loss function; 2.4) Use a dynamic weight adjustment model training mechanism and a four-element joint loss function to train a new student model structure, a special distilled large language model suitable for the public opinion field.
4. The public opinion case analysis-based large language model public opinion propagation graph generation method of claim 3, characterized in that, In step 2.1), the multi-teacher model soft labels are generated, specifically including: Construct a teacher model combination of main teachers and auxiliary teachers, select an open source large model LLaMA 3-70B as the main teacher to output structured soft labels of core entities, relationships and emotions, and select an open source model ChatGLM4-9B that is good at semantic fine-grained analysis as the auxiliary teacher to focus on mining implicit appeals and propagation triggers in public opinion text; Design a prompt word template to guide the main and auxiliary teachers to output soft labels of professional dimensions, that is, to generate multi-teacher model soft labels.
5. The public opinion case analysis-based large language model public opinion propagation graph generation method of claim 3, characterized in that, In step 2.2), the public opinion feature enhancement module is constructed, specifically including: Supplement the public opinion feature input for the student model Qwen-1.3B, add a public opinion feature embedding layer to the input end of the student model Qwen-1.3B, convert the propagation data features, sentiment polarity features and entity type features in the public public opinion case data set into feature vectors, weight them and fuse them to obtain the final fused feature vector, and obtain a new student model structure.
6. The public opinion case analysis-based large language model public opinion propagation graph generation method of claim 4, characterized in that, In step 2.2), the formula for weighted fusion is: ; wherein: is the final fused feature vector; is the learnable weight matrix; is the propagated data feature vector; is the sentiment polarity feature vector; is the entity type feature vector; is the model adaptation feature vector; is the model original word embedding vector.
7. The public opinion case analysis-based large language model public opinion propagation graph generation method of claim 3, characterized in that, In step 2.3), the four-element joint loss function is constructed, specifically including: Based on the multi-teacher model soft label and the final fused feature vector, introduce the public opinion feature constraint loss , form a four-element joint loss function: ; wherein: is a comprehensive loss value; is a weight coefficient; is a cross-entropy loss; is a KL divergence loss; is an opinion feature constraint loss; is an L2 regularization loss.
8. The public opinion case analysis-based large language model public opinion propagation graph generation method of claim 1, wherein, In step 4, the schema of the public opinion knowledge graph is designed, specifically including 4 types of nodes and 3 types of edges; The 4 types of nodes include public opinion events, core participants, core appeals and propagation channels; The 3 types of edges include publishing content, comment association and expressing appeals.