An opinion analysis method based on LNMF
By using the LNMF-based public opinion analysis method and optimizing the decomposition of public opinion data matrix through Laplace matrix and manifold learning, the problems of geometric structure loss, poor robustness and low computational efficiency in public opinion analysis on social platforms are solved, and more accurate and stable public opinion analysis and insights are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NINGBO DAHONGYING UNIV
- Filing Date
- 2026-03-12
- Publication Date
- 2026-07-03
AI Technical Summary
Existing technologies for analyzing public opinion on social media platforms suffer from problems such as loss of geometric structure during the dimensionality reduction process of high-dimensional data, poor robustness to abnormal data, and low computational efficiency, leading to analysis distortion, decreased accuracy, and insufficient real-time performance.
We adopt an LNMF-based public opinion analysis method. By constructing a Laplacian matrix to preserve the local geometric structure of the data, we combine manifold learning and nonnegative matrix factorization to optimize the coefficients and basis matrices to maintain the local manifold structure of the data. We also reduce the computational complexity by using sparse similarity matrices and calculate the comprehensive public opinion influence index.
It significantly improves the accuracy and stability of public opinion topic identification, enhances the robustness and computational efficiency of the model, and enables rapid response to sudden public opinion events, achieving more accurate, stable, and faster analysis and insights.
Smart Images

Figure CN122332940A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of public opinion analysis, and more specifically, to a public opinion analysis method based on LNMF. Background Technology
[0002] With the widespread use of social media, platforms such as Weibo and WeChat have become the main battleground for the generation and dissemination of online public opinion. Faced with the massive, high-dimensional, and unevenly valued public opinion data generated daily, how to quickly, accurately, and stably analyze the influence of public opinion and identify hotspots is a core technical challenge that urgently needs to be addressed in the field of online public opinion monitoring.
[0003] Currently, mainstream public opinion analysis methods, such as K-means-based clustering or classic non-negative matrix factorization (NFF) methods, generally face the following interrelated technical bottlenecks when addressing the aforementioned challenges: First, the loss of inherent geometric structure during dimensionality reduction of high-dimensional data leads to analytical distortion. Social media sentiment data (such as sentiment trends, keyword frequencies, user interactions, and other multi-dimensional features) often resides on a complex low-dimensional manifold in high-dimensional space. Traditional methods like Natural Factorial Reduction (NMF) typically focus solely on minimizing the global reconstruction error during dimensionality reduction. This goal-oriented approach ignores the local adjacency relationships and inherent geometric structure between data points, resulting in the low-dimensional representation failing to maintain the similarity relationships from the original high-dimensional space. The direct consequence is that semantically similar sentiments are incorrectly separated, while semantically dissimilar sentiments are incorrectly aggregated, blurring the boundaries of subsequent clustering analysis and significantly reducing the accuracy of sentiment topic identification.
[0004] Secondly, the lack of robustness to outlier data leads to biased model evaluation. Emotionally charged and extreme comments, malicious spamming, and other outlier data commonly found on social media platforms can severely interfere with model training. Traditional methods typically fail to differentiate these outliers at the model level. For example, in the gradient descent optimization of standard NMF, outliers and normal data are used with equal weight to update model parameters. This easily causes the generated basis matrix and coefficient matrix to deviate from the normal data distribution of public opinion, resulting in a shift in cluster centers and severely distorted quantitative assessments of public opinion influence.
[0005] Furthermore, the slow convergence of optimization algorithms makes it difficult to meet the real-time requirements of public opinion monitoring. Existing gradient descent-based NMF optimization methods heavily rely on the selection of hyperparameters such as the learning rate for convergence speed and are prone to getting trapped in local optima. When processing large-scale public opinion data with tens of thousands of samples, it often requires hundreds of iterations and several minutes or even longer of computation time to converge. This low computational efficiency is ill-suited to the needs of rapid response and analysis of sudden public opinion events at the minute or even second level.
[0006] In summary, existing technologies for processing public opinion on social media platforms suffer from systemic deficiencies in three areas: data structure preservation, robustness to abnormal data, and real-time computation. These deficiencies are not isolated but interconnected: loss of structure reduces robustness, and poor robustness necessitates more complex processing, thus hindering efficiency. Therefore, the industry urgently needs an innovative analytical method that can comprehensively address these issues to achieve more accurate, stable, and rapid analysis and insight into public opinion. Summary of the Invention
[0007] The technical problem this invention aims to solve is how to achieve more accurate, stable, and rapid analysis and insight into public opinion. To overcome the shortcomings of the existing technology (or related technology), this invention provides a public opinion analysis method based on LNMF.
[0008] This invention provides a public opinion analysis method based on LNMF, comprising the following steps: Step S1: Collect comment texts and associated metadata of public opinion events from the target social media platform to form multiple samples. Construct a public opinion data matrix through feature extraction and normalization. The public opinion data matrix integrates the number of samples and the dimensions of public opinion features. Step S2: Calculate the similarity between each sample based on the public opinion data matrix to construct a Laplace matrix that reflects the local geometric structure of the data; Step S3: Construct a manifold regularization term using the Laplacian matrix, decompose the public opinion data matrix V into the product of a coefficient matrix and a basis matrix, and jointly optimize the coefficient matrix and the basis matrix by minimizing the objective function that incorporates the manifold regularization term; Step S4: Perform cluster analysis on the dimensionality-reduced feature representation based on the optimized coefficient matrix, and calculate the comprehensive influence index of the public opinion event based on the clustering results, the comment text, and the associated metadata.
[0009] Compared with existing technologies, the public opinion analysis method based on LNMF proposed in this invention has the following advantages: This invention introduces the Laplace matrix and constructs it as a manifold regularization term, integrating it into matrix factorization. This forces the dimensionality reduction process to maintain the local geometric structure and adjacency relationships of the original high-dimensional public opinion data, thereby significantly reducing information loss during dimensionality reduction and improving the accuracy of subsequent public opinion topic identification. Furthermore, the organic integration of manifold learning and non-negative matrix factorization forms a unified optimization framework. This framework not only pursues the minimum global reconstruction error but also constrains the smoothness of the local manifold structure, making the algorithm insensitive to noise and outliers in the data, thus enhancing the model's stability and generalization ability. Simultaneously, it automatically generates a quantifiable comprehensive influence index from the original comment text and associated metadata, transforming unstructured public opinion information into structured decision-making basis. This greatly improves the efficiency and objectivity of public opinion monitoring, meets real-time requirements, and enables more accurate, stable, and rapid analysis and insight into public opinion.
[0010] In one possible implementation, step S2, the process of constructing the Laplace matrix, includes: Step A1: For each column feature vector of the public opinion data matrix, calculate the Euclidean distance between the feature vector of that column and all other column feature vectors; Step A2: For each feature vector, identify its k nearest neighbor samples to form a neighborhood set; Step A3: Calculate the similarity between samples within the neighborhood based on the Gaussian kernel function. For non-neighborhood samples, set the similarity to 0 to construct a sparse similarity matrix. Step A4: Calculate the degree matrix and the Laplacian matrix based on the similarity matrix.
[0011] Compared with existing technologies, the above-mentioned technical solution can construct similarity relationships by using the k-nearest neighbor strategy, which only considers the few nearest neighbors of each sample. This conforms to the assumption that "the local area of the manifold is Euclidean," and can more accurately characterize the true geometric shape of high-dimensional public opinion data in local regions, avoiding the failure of global distance metrics in high-dimensional space. Furthermore, using the Gaussian kernel function to calculate similarity can adaptively adjust the similarity weight according to the distance between samples, making the model more robust to scale changes. At the same time, assigning non-zero similarity only to nearest neighbors results in a sparse similarity matrix, which makes the subsequently constructed Laplacian matrix also sparse, significantly reducing the storage and computational complexity of subsequent matrix operations, enabling the algorithm to handle large-scale social media data.
[0012] In one possible implementation, in step S3, the objective function is obtained using the following calculation formula: in, Represents the coefficient matrix, Denotes the basis matrix, This represents the public opinion data matrix. Describing the Frobenius norm, Represents the regularization coefficient. Let L denote the trace of the matrix, and let L denote the Laplace matrix.
[0013] In one possible implementation, in step S3, the minimization of the objective function is iteratively optimized using a multiplicative update rule derived from KKT conditions. The multiplicative update rule is as follows: Update of the coefficient matrix: ; Update of the basis matrix: ; in, The first element of the coefficient matrix represents the first element of the coefficient matrix. Line number Column elements, This represents the public opinion data matrix. The basis matrix represents the first... Line number Column elements, Represents the similarity matrix, The degree matrix is represented and iteratively updated until the change in the objective function value is less than the preset convergence threshold.
[0014] In one possible implementation, the extracted public opinion features in step S1 include at least sentiment score, keyword frequency, normalized number of likes, normalized number of reposts, and user authority; wherein the user authority is calculated by weighting user type weight and registration years weight.
[0015] Compared with existing technologies, the above-mentioned technical solution enables the extracted public opinion features to cover the sentiment tendency, text content, dissemination intensity and source credibility of public opinion. This multi-dimensional feature integration enables the constructed public opinion data matrix to comprehensively and three-dimensionally represent public opinion events, laying a solid foundation for subsequent in-depth analysis.
[0016] In one possible implementation, step S4, calculating the comprehensive influence index, includes: Step B1: Cluster the eigenvectors of each column of the basis matrix to obtain multiple clusters; Step B2: Calculate the weight of each cluster, whereby the weight is determined by the proportion of samples corresponding to the cluster and its average sentiment intensity. Step B3: Calculate the average propagation range of each cluster C, the average propagation range being calculated based on the normalized interaction data of samples within the cluster; Step B4: Calculate the comprehensive influence index based on the cluster, the weight, and the average propagation range.
[0017] Compared with existing technologies, the above-mentioned technical solution enables the calculated comprehensive influence index to not rely solely on the volume of dissemination, but to integrate the cluster size, emotional intensity, and dissemination range, making the assessment results more comprehensive and scientific. It can reflect not only the volume of public opinion, but also its emotional intensity and dissemination depth.
[0018] In one possible implementation, step S4 further includes: For each cluster, calculate the feature vector of its center in the reduced-dimensional space. The feature vector is then mapped and reconstructed to the original feature space using the basis matrix to obtain the original feature center representation of the cluster. Combining the comment text within the cluster, keywords corresponding to the highest weight features are extracted from the original feature center representation to generate a hot topic description of the cluster.
[0019] Compared with existing technologies, the above technical solution can automatically generate understandable and describable hot topic tags such as "positive environmental protection evaluation" and "traffic congestion complaints" for each public opinion group by mapping the center of the dimensionality reduction space cluster back to the original feature space and extracting keywords corresponding to key features.
[0020] In one possible implementation, the public opinion analysis method is applied to continuously updated public opinion stream data in an incremental learning manner, including: Step C1: When a new batch of public opinion data is added, it is preprocessed and transformed into a new data matrix; Step C2: Merge the newly added data matrix with the public opinion data matrix to form an updated overall data matrix; Step C3: When optimizing the updated objective function, the coefficient matrix is kept unchanged, and only some sub-matrices of the basis matrix corresponding to the newly added data matrix and the corresponding sub-blocks of the Laplace matrix are updated.
[0021] Compared with existing technologies, the above technical solution can complete model updates within minutes or even seconds by fixing the existing model body, i.e., the coefficient matrix, and only locally updating the newly added data-related parts, i.e., the sub-matrices of the basis matrix and the sub-blocks of the Laplace matrix, thus enabling rapid response and continuous tracking of sudden public opinion events. Attached Figure Description
[0022] Figure 1 This is a flowchart of the steps of the present invention; Figure 2 This is a flowchart illustrating the Laplace matrix construction process of the present invention; Figure 3 This is a flowchart illustrating the calculation process of the comprehensive influence index of the present invention; Figure 4This is a schematic diagram of the incremental learning and updating process of the present invention. Detailed Implementation
[0023] First, those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention. Those skilled in the art can make adjustments as needed to adapt to specific application scenarios.
[0024] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0025] See Figure 1 This invention discloses a public opinion analysis method based on LNMF, comprising the following steps: Step S1: Collect comment texts and related metadata of public opinion events from the target social media platform to form multiple samples. Construct a public opinion data matrix through feature extraction and normalization. The public opinion data matrix integrates the number of samples and the dimensions of public opinion features. Step S2: Calculate the similarity between samples based on the public opinion data matrix to construct a Laplace matrix that reflects the local geometric structure of the data; Step S3: Construct a manifold regularization term using the Laplace matrix, decompose the public opinion data matrix V into the product of the coefficient matrix and the basis matrix, and jointly optimize the coefficient matrix and the basis matrix by minimizing the objective function that incorporates the manifold regularization term. Step S4: Perform cluster analysis on the dimensionality-reduced feature representation based on the optimized coefficient matrix, and calculate the comprehensive influence index of the public opinion event based on the clustering results, comment text, and associated metadata.
[0026] In this embodiment of the invention, in step S1, comments and metadata of a specific public opinion event (such as "#Environmental Governance of a Certain City#") are collected through the social platform API. These include at least: user ID, user type (ordinary user / verified user / big V), user registration years, comment text, number of likes, number of reposts, and number of comments. The number of items collected is set to n=1000 (which can be adjusted to 500~5000 depending on the popularity of the event).
[0027] In this embodiment of the invention, in step S1, feature calculation is performed on each comment sample using a method based on a sentiment dictionary or a pre-trained model. For example, a dictionary containing positive, negative, and neutral words is used for matching. The calculation formula can be: SS = (number of positive words - number of negative words) / (number of positive words + number of negative words + 1), with a score range between [-1, 1]. For a predefined thesaurus of public opinion-related topics (such as "environment," "rectification," "air quality," etc.), the number of thematic words appearing in each comment is counted. To eliminate differences in magnitude, the points are... Likes and reposts are log-normalized, for example: Normalized likes = log(1 + actual likes) / log(1 + maximum likes in the dataset); User type and activity history are considered for evaluation. A feasible calculation method is: UA = α * type weight + β * years weight. For example, set the type weight (big V = 1.0, verified user = 0.7, ordinary user = 0.3), and the years weight = min(registration years / 10, 1.0), and take α = 0.6 and β = 0.4.
[0028] In this embodiment of the invention, assuming that n comments are collected and m features are extracted (e.g., m=5: SS, KF, normalized Likes, normalized Reposts, UA), then a public opinion data matrix is constructed. , of which Line number Column elements Indicates the first The comment is in the 1st To improve model stability, the values of each feature are min-max normalized to scale their numerical range to the [0,1] interval.
[0029] In this embodiment of the invention, the core of step S2 is to construct a Laplacian matrix using the similarity relationship between samples to encode the local geometric structure of high-dimensional data. See [link to relevant documentation]. Figure 2 The process of constructing the Laplace matrix includes: Step A1: For each column feature vector of the public opinion data matrix, calculate the Euclidean distance between that column feature vector and all other column feature vectors; Step A2: For each feature vector, identify its k nearest neighbor samples to form a neighborhood set; Step A3: Calculate the similarity between samples within the neighborhood based on the Gaussian kernel function. For non-neighborhood samples, set the similarity to 0 to construct a sparse similarity matrix. Step A4: Calculate the degree matrix and Laplacian matrix based on the similarity matrix.
[0030] In this embodiment of the invention, in public opinion analysis, it is generally desired that comments on similar topics remain similar after dimensionality reduction. Therefore, the similarity between samples is calculated based on the original feature vectors (i.e., each row of the public opinion data matrix represents a comment text), and a similarity matrix is constructed. For the public opinion data matrix, each column (a total of m columns, each feature dimension) is regarded as an n-dimensional vector (i.e., the value distribution of the feature across all comments), and the Euclidean distance between these m feature vectors is calculated. Specifically, for the p-th feature vector... and the q-th eigenvector Its Euclidean distance For each feature vector Calculate the distance between it and all other feature vectors, and select the k feature vectors with the smallest distance as its nearest neighbors (k is a preset parameter, usually 5-15). For each nearest neighbor pair... The similarity is calculated using the Gaussian kernel function: Where σ is the bandwidth parameter (usually taken as 0.1-1.0), and for non-nearest neighbor pairs, it is set to... Finally, let And ensure that the similarity matrix is a symmetric matrix (i.e. This yields a sparse similarity matrix. Calculate the degree matrix It is a diagonal matrix whose diagonal elements That is, the sum of all similarities of the p-th eigenvector. Finally, calculate the Laplacian matrix. The matrix L is positive semidefinite, reflecting the local adjacency relationships between feature dimensions based on data distribution.
[0031] In this embodiment of the invention, step S3 introduces a Laplace regularization term to maintain the manifold structure while reducing dimensionality. The goal is to decompose the public opinion data matrix V (n×m) into the product of two non-negative matrices: V ≈ WH, where W (n×k) is called the coefficient matrix, H (k×m) is called the basis matrix, k is the dimension after dimensionality reduction (number of topics), and k << m; the objective function defined in this invention is: F(W, H) = ‖V - WH‖_F 2 + λ * tr(HLH^T), where the first term is ||V -WH||_F 2The first term is the standard NMF reconstruction error (Frobenius norm squared), ensuring the accuracy of the decomposition; the second term λ * tr(HLH^T) is the Laplace regularization term, where λ > 0 is the regularization coefficient (usually empirically 10-30). The mathematical meaning of tr(HLH^T) is: for the dimension-reduced representation H, it penalizes those that are similar in the original manifold (S_pq is large) but have excessively large differences in the dimension-reduced representation (the p-th and q-th columns of H), thereby forcing the dimension reduction process to maintain the local geometric structure of the data.
[0032] In this embodiment of the invention, in step S3, the minimization of the objective function is iteratively optimized using a multiplicative update rule derived from KKT conditions. The multiplicative update rule is as follows: Update of the coefficient matrix: ; Update of the basis matrix: ; in, The first element of the coefficient matrix represents the first element of the coefficient matrix. Line number Column elements, Represents a public opinion data matrix. The basis matrix represents the first... Line number Column elements, Represents a similarity matrix. The degree matrix is represented and iteratively updated until the change in the objective function value is less than the preset convergence threshold.
[0033] In this embodiment of the invention, the optimization algorithm flow is as follows: a. Initialization: Randomly generate non-negative matrices W0 and H0 (element values can be in the range [0,1]), or use other advanced initialization methods; b. Set parameters: Set the dimensionality reduction dimension k (e.g., k=20), regularization coefficient λ (e.g., λ=15), maximum number of iterations MaxIter (e.g., 300), and convergence threshold ε (e.g., 1e-6). c. Iterative update: for t = 1 to MaxIter: i. Calculate W_t and H_t using the multiplicative update rule described above; ii. Calculate the current objective function value F_t = ‖V - W_t H_t‖_F 2 + λ * tr(H_t L H_t^T); iii. Determine the convergence condition: if |F_t - F_{t-1}| / F_{t-1} < ε, then stop the iteration; otherwise, continue; d. Output: obtain the optimized coefficient matrix W and basis matrix H.
[0034] See Figure 3 In this embodiment of the invention, step S4, the process of calculating the comprehensive influence index, includes: Step B1: Cluster the eigenvectors of each column of the basis matrix to obtain multiple clusters; Step B2: Calculate the weight of each cluster. The weight is determined by the proportion of samples corresponding to the cluster and its average sentiment intensity. Step B3: Calculate the average propagation range for each cluster C. The average propagation range is calculated based on the normalized interaction data of samples within the cluster. Step B4: Calculate the comprehensive influence index based on clusters, weights, and average propagation range.
[0035] In this embodiment of the invention, in step S4, the dimensionality-reduced basis matrix is... Each column (A total of m columns, corresponding to the representation of m feature dimensions in the topic space) are considered as a k-dimensional feature vector. Cluster analysis is performed on these vectors (e.g., using the K-means algorithm), dividing them into C clusters (C can be determined based on indicators such as the silhouette coefficient, e.g., C=5). Each cluster represents a set of feature dimensions similar in the topic space, corresponding to a potential sub-topic of public opinion. For the c-th cluster, its weight can be defined as: (Number of feature dimensions in the cluster / m) * (1 + |Average sentiment tendency of the features within the cluster|); The latter part introduces sentiment intensity, giving higher weight to topics with strong sentiment; Since the columns of H correspond to the original features, they need to be mapped back to the samples; One approach is: for each feature dimension belonging to cluster c, find the top few comment texts with the highest values for that feature in the original public opinion data matrix, and then calculate the average normalized interaction data (likes, shares, etc.) of these comment texts as the propagation range of the cluster. Comprehensive Influence Index I: The comprehensive influence index I can be normalized to 0-100 points and a threshold can be set (e.g., >80 is high influence, 50-80 is medium influence, and <50 is low influence).
[0036] In this embodiment of the invention, for each cluster c, the vector of its cluster center in the k-dimensional topic space is calculated. Through the coefficient matrix W, we can... Mapping back to the original n-dimensional feature space: (approximate); It is an n-dimensional vector, where each element reflects the strength of the cluster on each of the original features; select The top feature dimensions with the highest median values, combined with the actual meanings of these feature dimensions (such as "high sentiment score" or "contains the keyword 'environment'"), and the representative comment texts associated with the features belonging to this cluster, can generate a description of the hot topics of this cluster. For example: "Topic 1: Strong positive emotions, focusing on environmental improvement and air quality".
[0037] See Figure 4 In this embodiment of the invention, the public opinion analysis method is applied to continuously updated public opinion stream data using an incremental learning approach, including: Step C1: When a new batch of public opinion data is added, it is preprocessed and transformed into a new data matrix; Step C2: Merge the newly added data matrix with the public opinion data matrix to form the updated overall data matrix; In step C3, when optimizing the updated objective function, the coefficient matrix remains unchanged, and only some sub-matrices of the basis matrix corresponding to the newly added data matrix and the corresponding sub-blocks of the Laplace matrix are updated.
[0038] In this embodiment of the invention, to cope with real-time public opinion streams, this method supports incremental learning. When new data is added... When processing a comment, proceed to step S1 to obtain the new data block. Update the original data matrix to (Vertical splicing); the coefficient matrix W is expanded to ,in This is the new part that needs to be optimized; in optimizing the new objective function At that time, the original coefficient matrix W is kept unchanged, and only the newly added coefficient matrix is changed. Iterative updates are performed on the global basis matrix H (the Laplacian matrix L may need to be locally recalculated or dynamically updated based on the updated feature distribution; for simplification, L can be temporarily left unupdated or only the local blocks related to the new samples can be updated). This approach can significantly reduce the computational load and enable rapid online updates of the model.
[0039] In the description of this invention, the references to "one embodiment," "some embodiments," "in this embodiment," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0040] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A public opinion analysis method based on LNMF, characterized in that, Includes the following steps: Step S1: Collect comment texts and associated metadata of public opinion events from the target social media platform to form multiple samples. Construct a public opinion data matrix through feature extraction and normalization. The public opinion data matrix integrates the number of samples and the dimensions of public opinion features. Step S2: Calculate the similarity between each sample based on the public opinion data matrix to construct a Laplace matrix that reflects the local geometric structure of the data; Step S3: Construct a manifold regularization term using the Laplacian matrix, decompose the public opinion data matrix V into the product of a coefficient matrix and a basis matrix, and jointly optimize the coefficient matrix and the basis matrix by minimizing the objective function that incorporates the manifold regularization term; Step S4: Perform cluster analysis on the dimensionality-reduced feature representation based on the optimized coefficient matrix, and calculate the comprehensive influence index of the public opinion event based on the clustering results, the comment text, and the associated metadata.
2. The public opinion analysis method according to claim 1, characterized in that, In step S2, the process of constructing the Laplace matrix includes: Step A1: For each column feature vector of the public opinion data matrix, calculate the Euclidean distance between the feature vector of that column and all other column feature vectors; Step A2: For each feature vector, identify its k nearest neighbor samples to form a neighborhood set; Step A3: Calculate the similarity between samples within the neighborhood based on the Gaussian kernel function. For non-neighborhood samples, set the similarity to 0 to construct a sparse similarity matrix. Step A4: Calculate the degree matrix and the Laplacian matrix based on the similarity matrix.
3. The public opinion analysis method according to claim 2, characterized in that, In step S3, the objective function is obtained using the following calculation formula: in, Represents the coefficient matrix, Denotes the basis matrix, This represents the public opinion data matrix. Denotes the Frobenius norm. Represents the regularization coefficient. Let L denote the trace of the matrix, and let L denote the Laplace matrix.
4. The public opinion analysis method according to claim 3, characterized in that, In step S3, the minimization of the objective function is iteratively optimized using a multiplicative update rule derived from KKT conditions. The multiplicative update rule is as follows: Update of the coefficient matrix: ; Update of the basis matrix: ; in, The first element of the coefficient matrix represents the first element of the coefficient matrix. Line 1 Column elements, This represents the public opinion data matrix. The basis matrix represents the first... Line 1 Column elements, Represents the similarity matrix, The degree matrix is represented and iteratively updated until the change in the objective function value is less than the preset convergence threshold.
5. The public opinion analysis method according to claim 1, characterized in that, In step S1, the extracted public opinion features include at least sentiment score, keyword frequency, normalized number of likes, normalized number of reposts, and user authority; wherein, the user authority is calculated by weighting user type weight and registration years weight.
6. The public opinion analysis method according to claim 1, characterized in that, In step S4, the process of calculating the comprehensive influence index includes: Step B1: Cluster the eigenvectors of each column of the basis matrix to obtain multiple clusters; Step B2: Calculate the weight of each cluster, whereby the weight is determined by the proportion of samples corresponding to the cluster and its average sentiment intensity. Step B3: Calculate the average propagation range of each cluster C, the average propagation range being calculated based on the normalized interaction data of samples within the cluster; Step B4: Calculate the comprehensive influence index based on the cluster, the weight, and the average propagation range.
7. The public opinion analysis method according to claim 6, characterized in that, Step S4 also includes: For each cluster, calculate the feature vector of its center in the reduced-dimensional space. The feature vector is then mapped and reconstructed to the original feature space using the basis matrix to obtain the original feature center representation of the cluster. Combining the comment text within the cluster, keywords corresponding to the highest weight features are extracted from the original feature center representation to generate a hot topic description of the cluster.
8. The public opinion analysis method according to claim 1, characterized in that, The aforementioned public opinion analysis method applies incremental learning to continuously updated public opinion stream data, including: Step C1: When a new batch of public opinion data is added, it is preprocessed and transformed into a new data matrix; Step C2: Merge the newly added data matrix with the public opinion data matrix to form an updated overall data matrix; Step C3: When optimizing the updated objective function, the coefficient matrix is kept unchanged, and only some sub-matrices of the basis matrix corresponding to the newly added data matrix and the corresponding sub-blocks of the Laplace matrix are updated.