Public text analysis method and system based on LDA model and LSTM algorithm

By applying the LDA model and LSTM algorithm in public text analysis, the problems of insufficient topic division, single attention analysis and simple sentiment analysis are solved, and higher analysis accuracy and intelligence are achieved.

CN119721052AActive Publication Date: 2025-03-28GUIZHOU UNIVERSITY OF FINANCE AND ECONOMICS

Patent Information

Application Number
CN202510206190.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-03-28
Estimated Expiration
2045-02-25

AI Technical Summary

Technical Problem

In the prior art, the topic classification is not accurate enough, the focus analysis dimension is single, and the sentiment analysis is too simple, resulting in low accuracy of text analysis.

Method used

The public text analysis method based on the LDA model and LSTM algorithm is adopted to obtain target text data, extract feature words to construct feature word vector matrix, build confusion curves and theme models, determine topic attention, conduct multi-dimensional attention analysis, and use pre-established sentiment analysis models for sentiment analysis.

Benefits of technology

It has achieved improved the accuracy of topic division, multi-dimensional attention analysis, and improved the accuracy of sentiment analysis, and overall improved the analysis accuracy and intelligence level of public texts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119721052A_ABST
    Figure CN119721052A_ABST
Patent Text Reader

Abstract

The invention provides a public text analysis method and system based on an LDA model and an LSTM algorithm. The method comprises the steps of obtaining target text data of a science and technology project; extracting feature words in the target text data, and constructing a feature word vector matrix according to the feature words; constructing a confusion degree curve based on the feature word vector matrix, and constructing a topic model based on the confusion degree curve; based on the topic model, determining the topic attention of the target topic, and based on the topic attention, determining an attention trend feature which is used for indicating the change trend of the target topic in the time dimension, the space dimension and the topic dimension; analyzing the target text data by using a pre-established sentiment analysis model to obtain a sentiment analysis result; and generating a text analysis result of the science and technology project based on the target topic, the attention trend feature and the sentiment analysis result. According to the method and the device, intelligent analysis of the public text is realized, and the text interpretation efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of text analysis, and in particular to a public text analysis method and system based on an LDA model and an LSTM algorithm. Background Art

[0002] With the continuous development of public administration, the amount of public texts has shown explosive growth. How to quickly and accurately extract valuable information from massive texts has become an important challenge faced by various departments and enterprises.

[0003] At present, common public text analysis methods mainly include traditional methods such as manual reading analysis and keyword matching. These methods often rely on manual experience, have low analysis efficiency, and are difficult to cope with the processing needs of large-scale text data.

[0004] In recent years, with the development of machine learning technology, some studies have begun to try to apply topic models to public text analysis. This type of method calculates text features to automatically identify and classify text topics. However, these methods still have some limitations when processing public texts, such as the difficulty in determining the number of topics and the single dimension of attention analysis.

[0005] Therefore, the existing technology has the following technical problems: first, there is a lack of effective topic optimization methods, resulting in inaccurate topic division; second, there is a lack of a multi-dimensional attention analysis framework, making it difficult to fully grasp the evolution trend of public texts; third, sentiment analysis is too simple and cannot accurately identify the specific orientation of the text. Therefore, the text analysis accuracy of the existing technology is relatively low. Summary of the invention

[0006] In view of this, the present application provides a public text analysis method and system based on the LDA model and LSTM algorithm, which solves the problems in the prior art of inaccurate topic division, single dimension of attention analysis and overly simple sentiment analysis.

[0007] The present application embodiment provides a public text analysis method based on the LDA model and the LSTM algorithm, including: Obtain target text data for scientific and technological projects; Extracting feature words from the target text data to construct a feature word vector matrix based on the feature words, wherein the target text data includes word frequency data and inverse document frequency data; Based on the feature word vector matrix, a perplexity curve is constructed, and based on the perplexity curve, a topic model is constructed, wherein the perplexity curve is used to indicate the relationship between the number of topics in the target text data and the perplexity, and the topic model is used to indicate that a plurality of target topics are obtained after topic clustering of the target text data; Based on the topic model, determine the topic attention of the target topic, and determine the attention trend feature based on the topic attention, the topic attention is used to indicate the distribution of each target topic in a specified time period, and the attention trend feature is used to indicate the change trend of the target topic in the time dimension, space dimension and topic dimension; Analyze the target text data using a pre-established sentiment analysis model to obtain a sentiment analysis result; Based on the target topic, the attention trend characteristics and the sentiment analysis results, a text analysis result of the scientific and technological project is generated.

[0008] Optionally, the sentiment analysis model is constructed through the following steps, including: Perform sentence-level segmentation on the sample text data to obtain multiple text sentences; Identifying the encouraging sentences in the text sentence as a first emotion identification value, identifying the restrictive sentences in the text sentence as a second emotion identification value, and identifying the common sentences in the text sentence as a third emotion identification value; Divide the marked text sentences into training sets and test sets according to a preset ratio; Based on the training set, determining training parameters in a preset LSTM model, wherein the training parameters include batch size, dropout rate parameter, number of training rounds, sequence length, vocabulary length, and number of output categories; Based on the training parameters, training the LSTM model using the training set; The trained LSTM model is tested using the test set to obtain performance evaluation indicators, and the sentiment analysis model is obtained by combining the performance evaluation indicators, wherein the performance evaluation indicators include accuracy, precision, recall rate and F1 value.

[0009] Optionally, determining the topic attention of the target topic based on the topic model, and determining attention trend characteristics based on the topic attention includes: Based on the topic model and the target text data, determining the document topic attention of each record document in the target text data, wherein the document topic attention is used to indicate the probability distribution of each target topic in the record document in any time period; Determine the topic attention of the target topic in the time period based on the topic attention of the document and the total number of topics in any time period; Performing time dimension analysis based on the subject attention to obtain time distribution characteristics, the time distribution characteristics include annual trend analysis results, seasonal analysis results and stage analysis results, the annual trend analysis results are used to indicate the attention trend and change characteristics of the target subject, the seasonal analysis results are used to indicate the release time characteristics and periodic laws of the target subject, and the stage analysis results are used to indicate the evolution characteristics and focus transfer paths of the target subject at different project development stages; Based on the subject attention, a spatial dimension analysis is performed to obtain spatial distribution characteristics, which include regional distribution characteristics, provincial distribution characteristics and spatial cluster distribution characteristics. The regional distribution characteristics are used to indicate the subject attention distribution of each region and the project differences between regions. The provincial distribution characteristics are used to indicate the subject attention of each province and the project characteristics of a specified province. The spatial cluster distribution characteristics are used to indicate the geographical distribution characteristics and regional collaborative development trends oriented towards the scientific and technological projects. Performing a topic dimension analysis based on the topic attention to obtain a topic distribution feature, wherein the topic distribution feature is used to indicate the importance ranking, topic relevance, and topic evolution trend among target topics; Based on the time distribution characteristics, the space distribution characteristics and the topic distribution characteristics, a multi-dimensional cross-analysis is performed to obtain attention trend characteristics.

[0010] Optionally, constructing a perplexity curve based on the feature word vector matrix, and constructing a topic model based on the perplexity curve includes: Using the feature word vector matrix, initializing the model parameters of the preset initial topic model, the model parameters including the number of topics, hyperparameters, and the number of iterations; Based on the model parameters and the feature word vector matrix, the initial topic model is iteratively trained, and the perplexity corresponding to each topic number is recorded to construct a perplexity curve; The change rate of the perplexity curve is detected, and the number of topics corresponding to when the change rate is lower than a preset change rate threshold is obtained, and a topic model is constructed based on the obtained number of topics.

[0011] Optionally, extracting the feature words in the target text data to construct a feature word vector matrix according to the feature words includes: Based on the target text data, calculating the word frequency data of each word in the target text data, wherein the word frequency data is used to indicate the frequency of occurrence of the word in the record document; Based on the word frequency data, calculating the inverse document frequency data of the word, wherein the inverse document frequency data is used to indicate the importance of the word; Determining word feature data of the word based on the word frequency data and the inverse document frequency data; Based on the word feature data, feature words are screened.

[0012] Optionally, the training the LSTM model using the training set based on the training parameters includes: Constructing a feature enhancement model, wherein the feature enhancement model includes an encoder and a decoder, the encoder includes a Mamba block for extracting sequence features and a jump connection structure composed of a UNet structure, the jump connection structure is used to indicate the fusion of different scale features, and the decoder includes an LSTM layer for indicating the processing of temporal dependencies; Mapping the training set into a word vector sequence; Constructing an input structure with sentence-level features and document-level features, and forming an enhanced training sample set from the input structure; Based on the enhanced training sample set, performing self-supervised pre-training on the feature enhancement model; Introducing the labeled data, fine-tuning the pre-trained feature enhancement model based on the enhanced training sample set, and generating a feature processing model; Using the feature processing model to perform feature enhancement on the word vector sequence to obtain an optimized training set; The LSTM model is trained using the optimized training set.

[0013] Optionally, the extracting the feature words in the target text data to construct a feature word vector matrix according to the feature words further includes: Performing multi-level semantic analysis on the target text data, and recursively subdividing the target text data into information particles of different granularities, wherein the information particles are used to indicate the hierarchical theme of the granularity; Determine the particle density of each text segment in the information particle at each particle size, wherein the particle density is used to indicate the similarity between the text segment and the hierarchical topic to which the particle size belongs; When it is detected that the particle density is lower than a preset density threshold, marking the corresponding text segment as potential abnormal data; According to the potential abnormal data, the information particles are optimized to obtain a text feature sequence; The word frequency data is calculated by combining the text feature sequence, the particle density and the target text data.

[0014] Optionally, the obtaining of target text data of scientific and technological projects includes: Obtaining text data to be processed of the scientific and technological project; Constructing a data distribution optimization network, wherein the data distribution optimization network includes a normalized flow transformation layer sequence, and an attention mechanism is arranged in each normalized flow transformation layer in the normalized flow transformation layer sequence; Mapping the text data to be processed to a preset normal distribution space to generate a preliminary mapping result; Based on a preset kernel density estimation model, calculating the local density of data points in the preliminary mapping result; constructing data weights according to the local density; Density optimization is performed on the preliminary mapping result based on the data weight to generate a density-optimized data distribution; Constructing and executing a contrastive learning task, wherein the contrastive learning task is used to instruct the extraction of structural features in the density-optimized data distribution; constructing a domain discriminator, wherein the domain discriminator is used to indicate the difference in data distribution of different data sources; Configuration is used to indicate the dynamic weight mechanism for adjusting weights; Based on the contrastive learning task, the domain discriminator and the dynamic weight mechanism, the density-optimized data distribution is processed to obtain target text data.

[0015] Optionally, the method further comprises: Based on the target text data, generate a data histogram; Generate a corresponding word cloud diagram based on the word features of the target text data, wherein the word features include word frequency data and inverse document frequency data of the word; Based on the attention trend characteristics, generate a corresponding attention time series line graph; Based on the sentiment analysis results, a corresponding sentiment pie chart is generated, wherein the sentiment analysis results include sentiment category proportions; Based on the text analysis results of each region on the scientific and technological projects, generate corresponding regional characteristic distribution maps; The data bar chart, the word cloud chart, the attention time series line chart, the sentiment pie chart and the regional feature distribution chart are visualized.

[0016] The embodiment of the present application also provides a public text analysis system based on the LDA model and the LSTM algorithm, including: Data acquisition module, used to obtain target text data of scientific and technological projects; A feature extraction module, used for extracting feature words from the target text data to construct a feature word vector matrix based on the feature words, wherein the target text data includes word frequency data and inverse document frequency data; A model building module, used to build a perplexity curve based on the feature word vector matrix, and to build a topic model based on the perplexity curve, wherein the perplexity curve is used to indicate the relationship between the number of topics and perplexity in the target text data, and the topic model is used to indicate that a plurality of target topics are obtained after topic clustering of the target text data; An attention analysis module, used to determine the topic attention of the target topic based on the topic model, and determine attention trend characteristics based on the topic attention, wherein the topic attention is used to indicate the distribution of each target topic within a specified time period, and the attention trend characteristics are used to indicate the change trend of the target topic in the time dimension, space dimension and topic dimension; The sentiment analysis module is used to analyze the target text data using a pre-established sentiment analysis model to obtain a sentiment analysis result; The text analysis module is used to generate a text analysis result of the scientific and technological project based on the target topic, the attention trend characteristics and the sentiment analysis result.

[0017] This application has the following technical effects: By constructing the perplexity curve and topic model through the feature word vector matrix, the number of topics is optimized and the accuracy of topic division is improved. Then, the attention trend characteristics are determined through the topic model to achieve multi-dimensional attention analysis and a comprehensive grasp of the text evolution trend. Sentiment analysis is performed through the sentiment analysis model constructed by the LSTM deep learning model to improve the accuracy of sentiment classification. Therefore, the intelligent analysis of public texts is achieved through the attention trend characteristics and sentiment analysis results, providing data support for relevant decisions. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the following briefly introduces the drawings required for use in the embodiment: Figure 1 A flowchart of a common text analysis method based on an LDA model and an LSTM algorithm provided in an embodiment of the present application; Figure 2 A schematic diagram of a flow chart of feature word extraction provided in an embodiment of the present application; Figure 3 A flowchart of the topic model construction provided in the embodiment of the present application; Figure 4 This is a structural diagram of a public text analysis system based on the LDA model and LSTM algorithm in an embodiment of the present application. DETAILED DESCRIPTION

[0019] like Figure 1A flow chart of a public text analysis method based on an LDA model and an LSTM algorithm provided in an embodiment of the present application. An embodiment of the present application provides a public text analysis method based on an LDA model and an LSTM algorithm, including the following steps S1 to S6.

[0020] S1: Obtain target text data of scientific and technological projects.

[0021] In the specific implementation, step S1 first needs to establish a data distribution optimization network. The network adopts the Normalizing Flow architecture and contains multiple transformation layer sequences. Each transformation layer is equipped with an attention mechanism to adaptively adjust the importance of different feature dimensions. For example, when processing scientific and technological project texts, the network can pay more attention to feature dimensions related to "technological innovation" and "R&D investment".

[0022] The data acquisition process uses distributed crawler technology to collect raw text data from the official websites of various scientific and technological projects. The collected content includes fields such as project title, release time, release department, and text content. To ensure data quality, the system will perform preliminary data cleaning to remove duplicate and erroneous entries and irrelevant chart data. At this stage, about 4,000 valid target text data can be obtained.

[0023] Next, the text data to be processed is mapped to a preset normal distribution space. Optionally, this step is implemented through a reversible neural network transformation to ensure the continuity and interpretability of the data distribution. During the mapping process, the system uses the Kernel Density Estimation (KDE) method to calculate the local density of data points, selects the radial basis function (RBF) as the kernel function, and the bandwidth parameter is determined by cross-validation.

[0024] Then, based on the calculated local density values, data weights are constructed. The weight calculation takes into account factors such as the coverage and degree of innovation of the text, and adopts a weighted combination of density values ​​and expert scores. These weights are then used to guide the sampling process, ensuring that more important samples have a higher probability of being selected.

[0025] In order to improve the model's adaptability to data from different sources, contrastive learning tasks and domain discriminators are also introduced. Contrastive learning tasks learn the intrinsic structure of data by generating text representations from multiple perspectives (such as synonym replacement, sentence rearrangement, etc.). The domain discriminator uses the gradient reversal layer technology to prompt the feature extractor to generate feature representations that are independent of the data source.

[0026] Finally, through the dynamic weight mechanism, the weights of different tasks in the total loss function are dynamically adjusted according to the progress of training. For example, in the early stage of training, more emphasis is placed on feature extraction, while in the later stage, more emphasis is placed on domain adaptation. After these processes, high-quality target text data is finally output, providing a reliable data foundation for subsequent topic analysis and sentiment analysis.

[0027] For example, experimental results show that this data acquisition method can significantly improve data quality, increase the utilization rate of effective samples by 25%, reduce the deviation of data distribution by 30%, and achieve 95% detection accuracy of abnormal samples. At the same time, cross-domain generalization ability is improved by 20%, feature extraction accuracy is improved by 15%, and model training speed is accelerated by 35%.

[0028] In some embodiments, step S1 includes: Obtaining text data to be processed of the scientific and technological project; Constructing a data distribution optimization network, wherein the data distribution optimization network includes a normalized flow transformation layer sequence, and an attention mechanism is arranged in each normalized flow transformation layer in the normalized flow transformation layer sequence; Mapping the text data to be processed to a preset normal distribution space to generate a preliminary mapping result; Based on a preset kernel density estimation model, calculating the local density of data points in the preliminary mapping result; constructing data weights according to the local density; Density optimization is performed on the preliminary mapping result based on the data weight to generate a density-optimized data distribution; Constructing and executing a contrastive learning task, wherein the contrastive learning task is used to instruct the extraction of structural features in the density-optimized data distribution; constructing a domain discriminator, wherein the domain discriminator is used to indicate the difference in data distribution of different data sources; Configuration is used to indicate the dynamic weight mechanism for adjusting weights; Based on the contrastive learning task, the domain discriminator and the dynamic weight mechanism, the density-optimized data distribution is processed to obtain target text data.

[0029] In this embodiment, in the stage of obtaining the text data to be processed, a distributed crawler framework is constructed. The framework adopts a master-slave architecture, the master node is responsible for task distribution and scheduling, and the slave node is responsible for specific data collection tasks. The crawler system supports access to multiple data sources, including a science and technology project management platform, a science and technology project declaration system, etc. Optionally, the Scrapy framework is used for implementation, and mechanisms such as automatic retry, proxy switching, and request frequency control are configured to ensure the stability and reliability of data collection. The collected raw data includes fields such as project name, release time, release department, project type, project level, funding amount, and project introduction.

[0030] Furthermore, for the normalized flow transformation layer sequence, each normalized flow transformation layer is composed of three submodules, including an affine transformation module, a nonlinear activation module and an attention module (i.e., an attention mechanism). Optionally, the affine transformation uses a reversible linear transformation to ensure that information is not lost. The nonlinear activation module uses the LeakyReLU function to avoid gradient disappearance. The attention module uses a multi-head self-attention mechanism, the number of heads is set to 8, and the hidden layer dimension is 512. Therefore, this embodiment can adaptively focus on different feature dimensions and improve the expression ability of the model by constructing a data distribution optimization network containing a normalized flow transformation layer sequence.

[0031] Then, the text data to be processed is first preprocessed, including word segmentation, stop word removal, part-of-speech tagging, etc. Then, the pre-trained Word2Vec model is used to convert the text into a vector representation, and the vector dimension is set to 300. Then, these vectors are mapped to the standard normal distribution space through the constructed data distribution optimization network to generate preliminary mapping results. Among them, the mapping process is optimized by maximum likelihood estimation, using the Adam optimizer, the learning rate is set to 0.001, and the batch size is 64. In order to ensure the stability of the mapping, batch normalization layers and residual connections are also introduced.

[0032] Then, an improved kernel density estimation algorithm is used to determine the kernel density estimation model, so as to determine the local density of data points in the preliminary mapping results. Specifically, the kernel density estimation model uses the Gaussian kernel function as the basic kernel function, and the kernel bandwidth is adaptively determined by the Silverman criterion. In order to improve the computational efficiency, the Ball-Tree data structure is used for neighbor search, reducing the computational complexity from O(n²) to O(nlogn). At the same time, an adaptive bandwidth mechanism is introduced to use a larger bandwidth in sparse data areas and a smaller bandwidth in dense areas to improve the estimation accuracy.

[0033] Furthermore, a multi-level weight calculation scheme is determined based on the calculated local density. First, the local density is scaled to the [0,1] interval through min-max normalization. Then, a soft threshold mechanism is introduced and the basic weight is set as: w = 1 / (1+exp(-(d-μ) / σ)) Among them, w represents the basic data weight, d is the normalized local density, μ and σ are the density mean and standard deviation respectively. In addition, the time decay factor is also considered, and recent data is given a higher weight. The final data weight is a weighted combination of the basic data weight and the time weight.

[0034] After the above processing, this embodiment can effectively deal with the problem of uneven data distribution. Experiments show that the uniformity of data distribution after processing is improved by 40%, the accuracy of abnormal sample detection reaches 92%, and the data quality is significantly improved. The rationality of weight calculation is verified by cross-validation. In the subsequent topic analysis task, the model performance of weighted samples is 15% higher than that of unweighted samples.

[0035] Furthermore, in the density optimization stage, a density optimization algorithm based on importance sampling can be used. In the specific implementation, a priority queue data structure is first constructed, and the data samples are arranged in descending order of weight. Then, a stratified sampling strategy is used to divide the samples into three density levels of high, medium and low, and the sampling probabilities are set to 0.5, 0.3 and 0.2 respectively. In order to maintain the diversity of the data, a systematic sampling method is adopted within each level, that is, samples are selected at fixed intervals. At the same time, a local density constraint is introduced to ensure that the density difference between adjacent samples does not exceed a preset threshold (the empirical value is set to 0.3). Therefore, this embodiment ensures the retention of high-quality samples and avoids excessive concentration of data distribution through density optimization.

[0036] Optionally, this embodiment also configures four data enhancement strategies: (1) synonym replacement, using a pre-trained word vector model to select words with a similarity greater than 0.8 for replacement; (2) back translation enhancement, generating semantically similar expressions through Chinese-English translation; (3) sentence rearrangement, adjusting the order of sentences while maintaining semantic coherence; (4) random cropping, retaining 60%-90% of the original text content. Two enhanced views are generated for each sample, and the feature extractor is optimized by contrast loss function, with the temperature parameter set to 0.07. The feature extractor adopts a two-layer Transformer structure with a hidden layer dimension of 768 and 12 attention heads.

[0037] In this embodiment, a domain discriminator is constructed, and the domain discriminator is used to indicate the difference in data distribution of different data sources. The construction of the domain discriminator adopts the idea of ​​adversarial learning. Among them, the discriminator network consists of three fully connected layers, the dimensions of the middle layer are 512 and 256 respectively, and the LeakyReLU activation function and Dropout regularization (ratio 0.3) are used. In order to enhance the discriminative ability, feature normalization layers and residual connections are added. The gradient reversal layer technology is used in the training process, and the feature extractor generates domain-independent feature representations through adversarial training. The loss function uses cross entropy loss, and the L2 regularization term is introduced to prevent overfitting.

[0038] S1.9: Configure a dynamic weight mechanism for indicating adjustment weights; Exemplarily, the dynamic weight mechanism is configured with an adaptive weight adjustment strategy. Three weight coefficients are maintained: contrastive learning weight λ1, domain adversarial weight λ2, and data reconstruction weight λ3, with initial values ​​set to 0.5, 0.3, and 0.2, respectively. During training, these weights are dynamically adjusted based on the performance of the validation set. Specifically, after each training cycle, the loss change rate of each task on the validation set is calculated, the weight of the task with poor performance is increased, and the weight of the task with good performance is reduced. The cosine annealing strategy is used to adjust the step size to ensure the stability of training.

[0039] Therefore, based on the contrastive learning task, domain discriminator and dynamic weight mechanism, the density-optimized data distribution is processed to obtain the target text data. Specifically, the final data processing stage adopts a multi-task joint optimization method. The total loss function L is defined as: L = λ1Lcon + λ2Ladv + λ3Lrec Among them, Lcon is the contrastive learning loss, Ladv is the domain adversarial loss, and Lrec is the reconstruction loss. The optimizer uses AdamW, the learning rate is set to 2e-5, and the weight decay is 0.01. To improve the training efficiency, the gradient accumulation strategy is adopted, and the cumulative number of steps is 4. The early stopping strategy is used during the training process, and the training is stopped when the performance of the validation set has not improved for 5 consecutive cycles. Finally, the ensemble learning method is used to fuse the prediction results of different checkpoints to obtain the final target text data.

[0040] Experimental results show that this method performs well in processing scientific and technological project text data. Compared with traditional methods, the feature extraction accuracy is improved by 23%, the domain adaptability is improved by 31%, and the data quality is improved by 28%. In downstream tasks such as topic classification and sentiment analysis, significant performance improvements have also been achieved, with the F1 score increasing by an average of 18%.

[0041] S2: extracting feature words from the target text data to construct a feature word vector matrix based on the feature words, wherein the target text data includes word frequency data and inverse document frequency data.

[0042] In this application, feature word extraction and the construction of feature word vector matrix are key steps in text analysis. First, the target text data is preprocessed, including text segmentation, stop word removal and word form restoration. Among them, the word segmentation adopts the custom mode of Jieba word segmenter, combined with the professional dictionary in the field of science and technology projects for optimization. The professional dictionary contains about 20,000 commonly used terms in the field of science and technology, covering key areas such as artificial intelligence, biomedicine, and new materials. When removing stop words, in addition to using a general stop word list, specific stop words are supplemented according to the characteristics of the science and technology project text, such as "project", "declaration" and other common words that do not contribute much to thematic analysis. In the word form restoration stage, a combination of rule-based and statistical methods is adopted. For English terms, the Porter stem extraction algorithm is used for processing; for Chinese words, they are normalized through the synonym word forest. For example, expressions such as "artificial intelligence", "AI", and "artificial intelligence" will be uniformly normalized to "artificial intelligence". Therefore, this application can significantly reduce the dimension of the feature space and improve the efficiency of subsequent analysis.

[0043] Next, this application calculates the term frequency (TF) and inverse document frequency (IDF). Optionally, when constructing the feature word vector matrix, an improved TF-IDF weight calculation method is used. First, the term frequency TF value and the inverse document frequency IDF value are multiplied to obtain the basic TF-IDF score. Then, the position weight factor and the topic relevance factor are introduced for adjustment. The position weight takes into account the position distribution of words in the document, and words in the title and the beginning and end of a paragraph receive higher weights; the topic relevance is obtained by calculating the cosine similarity with a predefined topic word list, and the weights of words with high relevance will be appropriately increased.

[0044] In order to improve the expressiveness of features, this application also integrates word vector technology. Each feature word is mapped to a 300-dimensional dense vector using a pre-trained Word2Vec model (the training corpus contains 5 million scientific documents). These vectors are reduced in dimension by principal component analysis (PCA), retaining the feature dimensions required to explain 95% of the variance (usually between 100-150 dimensions). The final feature word vector matrix is ​​a combination of TF-IDF weights and word vector representations, weighted fusion through the attention mechanism.

[0045] Experimental results show that compared with the traditional TF-IDF method, the expressive power of features has been improved by 35%, the clustering effect (measured by the silhouette coefficient) in the subsequent topic clustering task has been improved by 28%, and the computational efficiency has been improved by 40%. At the same time, by introducing position weights and topic relevance factors, the discriminative power of features has been significantly enhanced, and the accuracy rate in keyword extraction tasks has reached more than 85%.

[0046] Therefore, this application can understand the decision basis of the model by analyzing the weight distribution of feature words, which is of great value for scientific and technological project managers to understand and apply the analysis results.

[0047] In some embodiments, step S2 includes: Based on the target text data, calculating the word frequency data of each word in the target text data, wherein the word frequency data is used to indicate the frequency of occurrence of the word in the record document; Based on the word frequency data, calculating the inverse document frequency data of the word, wherein the inverse document frequency data is used to indicate the importance of the word; Determining word feature data of the word based on the word frequency data and the inverse document frequency data; Based on the word feature data, feature words are screened.

[0048] In this embodiment, in the word frequency data calculation stage, the text is first standardized. Exemplarily, the standardization process includes: removing special characters and numbers (retaining numbers that are helpful for understanding the content, such as "5G", "IPv6", etc.), unifying the character encoding to UTF-8, and converting full-width characters to half-width characters. Then, an improved word frequency calculation method is adopted, which not only considers the original number of occurrences of the word, but also introduces a position weighting mechanism. Specifically, the word frequency calculation formula is: TF(t,d) = α * f_title(t,d) + β * f_body(t,d) + γ * f_key(t,d) Among them, TF(t,d) represents the word frequency, f_title, f_body and f_key represent the frequency of occurrence of words in the title, body and keyword parts respectively, and the weight coefficients α, β and γ are set to 0.4, 0.3 and 0.3 respectively. This weighting method can better reflect the importance of words in different text positions.

[0049] Furthermore, when calculating the inverse document frequency data, a two-layer IDF calculation strategy is adopted. First, the conventional IDF value is calculated, and then the field weight adjustment is introduced, that is, the IDF value is corrected according to the importance of the word in the science and technology project field dictionary. For example, hot words in the fields of "artificial intelligence" and "blockchain" will obtain higher field weights. In addition, this embodiment also establishes a dynamic update mechanism to regularly update the IDF value based on newly added documents to ensure that it reflects the latest distribution of word importance.

[0050] Furthermore, in the process of determining word feature data, word frequency data and inverse document frequency data are combined to construct a multi-dimensional feature vector. In addition to the basic TF-IDF value, the feature vector also contains the following dimensions: 1) syntactic features of words, such as part of speech, syntactic dependencies, etc.; 2) semantic features, using the contextual semantic representation extracted by the BERT model; 3) statistical features, such as word distribution skewness, kurtosis and other statistics. The calculation of feature vectors uses a distributed processing framework, which divides large-scale text data into multiple batches for parallel processing, significantly improving processing efficiency.

[0051] Thus, based on the word feature data, feature words are screened. Among them, in the feature word screening stage, a multi-layer screening mechanism is configured, including: threshold screening, that is, setting the minimum threshold of the TF-IDF value (the empirical value is 0.01) to filter out low-importance words; entropy screening, that is, calculating the information entropy of the words in the document collection, retaining words with large information content (the entropy threshold is set to 1.5); co-occurrence analysis, that is, building a word co-occurrence network, calculating the centrality index of the words, and retaining the words corresponding to important nodes in the network; expert rules, that is, integrating the screening rules defined by domain experts, such as the retention strategy of words in a specific field; part-of-speech screening, that is, giving priority to retaining nouns, verbs and other content words, and appropriately retaining adverbs and adjectives that can reflect the characteristics of the document. Subsequently, a voting mechanism can be used for screening, that is, words need to meet multiple screening conditions at the same time to be finally retained. At the same time, this application regularly evaluates the quality of the screening results (i.e., feature words), and asks domain experts to evaluate and feedback the screening results through random sampling, and dynamically adjusts the screening parameters according to the feedback results.

[0052] Based on the above embodiments, in some embodiments, such as Figure 2 As shown, step S2 also includes: S2.1: performing a multi-level semantic analysis on the target text data, and recursively subdividing the target text data into information particles of different granularities, wherein the information particles are used to indicate a hierarchical theme of the granularity; S2.2: Determine the particle density of each text segment in the information particle at each particle size, wherein the particle density is used to indicate the similarity between the text segment and the hierarchical topic to which the particle size belongs; S2.3: When it is detected that the particle density is lower than a preset density threshold, marking the corresponding text segment as potential abnormal data; S2.4: Optimizing the information granules according to the potential abnormal data to obtain a text feature sequence; S2.5: Calculate the word frequency data by combining the text feature sequence, the particle density and the target text data.

[0053] In this embodiment, in the multi-level semantic analysis and information granularity division stage, a hierarchical topic modeling method can be adopted. First, four semantic levels are constructed: document level, paragraph level, sentence level and phrase level. At each level, an improved hierarchical LDA (Hierarchical Latent Dirichlet Allocation) model is used for topic extraction. The hyperparameters of the model are optimized by grid search, and the number of topics is set to 20 at the document level, 50 at the paragraph level, 100 at the sentence level, and 200 at the phrase level. In order to improve the accuracy of topic modeling, this embodiment integrates the semantic representation of the pre-trained language model BERT, and fuses the contextual representation of BERT with the topic representation of LDA through the attention mechanism. The recursive subdivision process adopts a top-down strategy to ensure semantic consistency between the upper-level topics and the lower-level topics.

[0054] Furthermore, in the particle density calculation stage, a multi-dimensional density calculation method can be used. For each text fragment, calculate its similarity with the corresponding level topic, specifically including the following dimensions: semantic similarity, that is, use Word2Vec to calculate the cosine similarity between the text fragment and the subject word; topic probability, that is, calculate the probability distribution of the text fragment belonging to each topic based on the LDA model; structural similarity, that is, consider the position and contextual relationship of the text fragment in the document structure; vocabulary overlap, that is, calculate the degree of vocabulary overlap between the text fragment and the subject feature words. The final particle density is obtained by a weighted combination of these dimensions, as shown in the following formula: Density = Σ(wi * si) Among them, Density represents the particle density, wi is the dimension weight of each dimension, and si is the corresponding similarity score. The weights are determined by cross-validation and are 0.4, 0.3, 0.2, and 0.1 respectively.

[0055] In this regard, an adaptive threshold mechanism can be used in the abnormal data detection and marking stage. It should be noted that the density threshold is not a fixed value and can be dynamically adjusted according to the density distribution of each level. For example, at each level, the kernel density estimation (KDE) method is used to fit the distribution of particle density, and samples below the distribution mean minus 1.5 times the standard deviation are marked as potential anomalies. At the same time, this embodiment also takes into account the correlation between levels. If a text segment is marked as abnormal at multiple levels, its abnormal probability will increase accordingly.

[0056] Furthermore, according to the potential abnormal data, the information particles are optimized to obtain a text feature sequence. Among them, in the information particle optimization stage, the present embodiment processes the marked abnormal data. First, the abnormal fragments are corrected by context reconstruction, that is, the abnormal fragments are supplemented and corrected by using the semantic information of adjacent text fragments. If the density after reconstruction is still low, consider merging the fragment with other fragments with similar semantics, or downgrading it to a lower level for processing. The optimization process adopts an iterative strategy, and the density is recalculated after each optimization until the threshold requirement is met or the maximum number of iterations is reached to obtain a text feature sequence.

[0057] Thus, the word frequency data is calculated by combining the text feature sequence, granular density and target text data. That is, in the final word frequency calculation stage, this application considers the text feature sequence, granular density and original text data. The word frequency calculation formula is: TF(t) = base_freq(t) * (1 + α * density_score(t)) * (1 + β * seq_weight(t)) Among them, TF(t) represents the word frequency data calculated by this embodiment, base_freq(t) is the basic word frequency, density_score(t) is the adjustment factor based on particle density, seq_weight(t) is the weight adjustment based on the feature sequence, α and β are adjustment parameters, which are set to 0.3 and 0.2 through experiments. Therefore, this embodiment can better reflect the importance of words in different semantic levels and topic structures.

[0058] S3: Based on the feature word vector matrix, a perplexity curve is constructed, and based on the perplexity curve, a topic model is constructed, wherein the perplexity curve is used to indicate the relationship between the number of topics in the target text data and the perplexity, and the topic model is used to indicate that multiple target topics are obtained after topic clustering of the target text data.

[0059] In this application, for building a topic model, the appropriate number of topics K is a key parameter that determines the model effect. Too few topics will result in a rough topic division that cannot reflect the detailed characteristics of the text; too many topics will cause topic overlap, increasing the difficulty of interpretation. Therefore, this application determines the optimal number of topics through perplexity analysis.

[0060] First, this application determines a reasonable search range for the number of topics. Based on experience and literature research, the number of topics in science and technology policy texts is generally more appropriate between 5 and 15. Too few topics make it difficult to cover multiple areas of policy, while too many topics will lead to a decrease in the distinction between topics. Therefore, this application sets the search range to 5 to 15, with a step size of 1, that is, to evaluate the model effect when the number of topics is 5, 6, 7...15.

[0061] For each candidate topic number K, this application needs to fully train an LDA model (i.e., topic model) and calculate its perplexity. The perplexity calculation formula is: perplexity(D) = exp{-∑log p(wd) / N}, where perplexity(D) represents perplexity, D is the test set document collection (i.e., target text data), wd is the word in the target text data, and N is the total number of words. A lower perplexity indicates that the model has a stronger ability to predict text. In the Python implementation, this application uses the LdaModel class of the gensim library, sets fixed hyperparameters (α=50 / k, β=0.01), trains the model through multiple iterations (such as 1000 times), and records the perplexity corresponding to each K value. Then, the perplexity corresponding to different numbers of topics is plotted into a curve to form a perplexity curve. Among them, the horizontal axis of the perplexity curve is the number of topics K, and the vertical axis of the perplexity curve is the perplexity value. Usually, as the number of topics increases, the perplexity will first drop rapidly and then level off. This "inflection point" phenomenon indicates that continuing to increase the number of topics will no longer significantly improve the model performance. For example, by observing the perplexity curve, it is found that when the number of topics is 9, the perplexity begins to level off, so K=9 is selected as the final number of topics.

[0062] To verify the rationality of this choice, this application also needs to conduct a qualitative analysis in combination with the interpretability of the topic. By checking the topic-word distribution when K=9, it is found that each topic has clear semantic characteristics and can better reflect different aspects of science and technology policies, such as scientific research funding, talent training, market supervision, etc., which further confirms the rationality of the optimal number of topics obtained through perplexity analysis. In practical applications, this application recommends using cross-validation to calculate perplexity multiple times to reduce the impact of randomness. At the same time, other evaluation indicators such as Topic Coherence can be combined to comprehensively determine the final number of topics. In addition, it is necessary to regularly update the model based on the newly added policy text and re-evaluate the optimal number of topics to adapt to changes in the policy environment.

[0063] It should be noted that the target topic is obtained by clustering and analyzing the topic model. For example, the topics are classified into four categories: first, funding-related, including requirements for the use of scientific research funds, project funding applications, venture capital and loans, and scientific research results review and awards; second, talent education, including student education, university laboratory and talent cooperation, and talent training; third, agricultural technology, including agricultural technology promotion and application; fourth, market supervision, including production quality and market supervision and management.

[0064] In some embodiments, Figure 3 As shown, step S3 includes: S3.1: using the feature word vector matrix, initializing the model parameters of the preset initial topic model, the model parameters including the number of topics, hyperparameters, and the number of iterations; S3.2: Based on the model parameters and the feature word vector matrix, iteratively train the initial topic model, and record the perplexity corresponding to each topic number to construct a perplexity curve; S3.3: Detect the rate of change of the perplexity curve, and obtain the number of topics corresponding to when the rate of change is lower than a preset rate of change threshold, and construct a topic model based on the obtained number of topics.

[0065] In this embodiment, an adaptive parameter configuration strategy is adopted in the stage of initializing the topic model parameters. First, the search range of the number of topics K is preliminarily set. According to the scale of the data set and the characteristics of the field, the search range is set to [5,100]. For hyperparameters (such as the Dirichlet prior parameters of the document-topic distribution and the Dirichlet prior parameters of the topic-word distribution), the grid search method is used for optimization. The search range of the Dirichlet prior parameters of the document-topic distribution is [0.01, 1.0], and the search range of the Dirichlet prior parameters of the topic-word distribution is [0.01, 0.5], and the step size is 0.01. The number of iterations is set using a dynamic adjustment mechanism, and the basic number of iterations is set to 1000. At the same time, the convergence condition is set: the iteration is stopped when the log-likelihood change of 10 consecutive iterations is less than 1e-6.

[0066] Optionally, in order to improve the quality of model initialization, this embodiment also introduces prior information based on expert knowledge. Specifically, according to the domain classification system of scientific and technological projects, a seed word list is constructed, and 10-20 high-confidence seed words are configured for each potential topic. These seed words are used to guide the generation of the initial topic-word distribution, improve the model convergence speed and topic quality. At the same time, in order to handle new words and cross-domain terms, the system reserves a certain proportion (about 20%) of the free topic space, allowing the model to discover new topic structures during training.

[0067] Further, based on the model parameters and the feature word vector matrix, the initial topic model is iteratively trained, and the perplexity corresponding to each topic number is recorded to construct a perplexity curve. In the model training and perplexity calculation stages, this embodiment uses an improved Gibbs sampling algorithm for model training. In order to improve the training efficiency, a distributed training architecture is introduced to divide the data set into multiple subsets for parallel processing. Each training round includes the following steps: topic redistribution of words, using Collapsed Gibbs Sampling; updating of topic-word distribution, using a variational Bayes method; calculation of perplexity, using a cross-validation method to evaluate model performance.

[0068] Optionally, in the process of perplexity calculation, penalty items for topic consistency and topic diversity are added. In order to ensure the stability of the evaluation, each topic number configuration is run 5 times and the average perplexity value is taken. At the same time, this embodiment also records auxiliary indicators such as topic consistency (Topic Coherence) and topic distinguishability (Topic Distinctiveness).

[0069] Furthermore, the change rate of the perplexity curve is detected, and the number of topics corresponding to the change rate is obtained when the change rate is lower than the preset change rate threshold, and the topic model is constructed based on the obtained number of topics. In the stage of determining the number of topics, this embodiment configures a multi-index comprehensive evaluation mechanism. In addition to the traditional perplexity change rate, the following factors are also considered: Topic consistency variation: PMI (pointwise mutual information) and NPMI (normalized pointwise mutual information) are used to evaluate the semantic consistency of topics; Topic coverage: evaluates the coverage of topics in the document collection; Topic differentiation: Calculate the JS divergence between topics to ensure that there is enough differentiation between topics; Computational complexity: Consider the computational resource requirements for different numbers of topics.

[0070] Optionally, the setting of the change rate threshold adopts an adaptive method, and the basic threshold is set to 0.01, but it will be dynamically adjusted according to the size of the data set and the topic quality index. In this embodiment, a sliding window (window size is 5) is used to calculate the change rate of the perplexity. When the change rate of three consecutive windows is lower than the threshold, it is considered that the appropriate number of topics has been found.

[0071] Optionally, in order to verify the rationality of the selection of the number of topics, this embodiment performs a stability analysis, including the following steps: The data were randomly sampled multiple times to verify the stability of the selection of the number of topics; Use different initialization parameters to test the robustness of the results; The interpretability of the topics was ensured by manually evaluating the sampled topic content.

[0072] In this regard, experimental results show that this method of determining the number of topics performs well in the analysis of scientific and technological project texts. Compared with a fixed number of topics or a simple heuristic method, the number of topics determined by this embodiment can better balance model complexity and topic quality. Specifically, topic consistency increased by 35%, and topic coverage increased by 28%, while maintaining a low computational overhead. In practical applications, this embodiment can accurately capture the topic structure of scientific and technological project texts, providing a reliable basis for subsequent project classification and topic analysis.

[0073] S4: Based on the topic model, determine the topic attention of the target topic, and determine the attention trend characteristics based on the topic attention, the topic attention is used to indicate the distribution of each target topic within a specified time period, and the attention trend characteristics are used to indicate the change trend of the target topic in the time dimension, space dimension and topic dimension.

[0074] In this application, the calculation of topic attention can be done by multi-dimensional analysis. For example, a time window sequence is first constructed, with the basic time unit set to month, while supporting aggregate analysis of multiple time granularities such as quarter, half year and year. For each time window, the weight distribution of each topic is calculated, and the topic attention calculation formula is: Attention(t,i) = λ1Doc_Ratio(t,i) + λ2Citation_Score(t,i) + λ3*Impact_Factor(t,i) Among them, Attention(t,i) represents the attention of the topic, t represents the time window, i represents the topic, λ1, λ2, λ3 are weight coefficients (determined to be 0.4, 0.3, 0.3 through cross-validation). Doc_Ratio(t,i) represents the proportion of the topic in the document collection, Citation_Score(t,i) reflects the citation influence of the relevant documents, and Impact_Factor(t,i) represents external factors such as the project funding amount and the level of participating units.

[0075] Furthermore, in the trend analysis of the time dimension, this application uses time series decomposition technology to decompose the topic attention sequence into trend items, seasonal items, and random items. Trend item extraction is smoothed using LOESS (local weighted regression scatter point smoothing), and seasonal items are identified through the STL (Seasonal and Trend decomposition using Loess) method to identify periodic patterns. Optionally, in order to capture sudden changes, this application also introduces a change point detection algorithm, using the PELT (Pruned Exact Linear Time) method to identify significant change points in attention. These change points usually correspond to key events such as major policy adjustments, technological breakthroughs, or market changes.

[0076] In the analysis of the spatial dimension, this application constructs a geographic information association network. First, the geographical location of the project execution unit is mapped to the provincial and municipal administrative divisions, and then the contribution intensity of each region to different topics is calculated. The spatial distribution characteristics are quantified through spatial autocorrelation analysis, and the Moran's I index is used to evaluate the spatial aggregation degree of topic attention. At the same time, by constructing a spatial weight matrix, the geographical path of topic propagation and the regional innovation network structure are identified. This application also introduces a regional innovation capability index to adjust the topic weights of different regions to ensure that the analysis results can reflect the differences in innovation strength between regions.

[0077] In the analysis of the topic dimension, this application adopts a dynamic topic evolution model. First, a topic similarity matrix is ​​constructed, and the semantic distance between topics is measured using Jensen-Shannon divergence. Based on this matrix, topic groups are identified through a hierarchical clustering method, and the evolution of these groups over time is tracked. The topic evolution model includes: Theme continuity: the core semantics remain stable, but the expression may change over time; Theme splitting: a theme is divided into multiple sub-themes; Theme merging: multiple related themes merged into larger thematic categories; Theme demise: Attention continues to decline until it disappears; Emergence of new topics: The emergence of new technologies or new concepts leads to the formation of new topics.

[0078] In order to improve the accuracy of trend forecasting, the system integrates multiple forecasting models: ARIMA model: handles linear time series characteristics; Prophet model: captures trends with seasonal and holiday effects; LSTM neural network: learn complex nonlinear patterns; XGBoost model: Integrate external features for prediction.

[0079] These models are combined through ensemble learning methods, and the weights are dynamically adjusted based on the historical forecast performance of each model. The forecast results also take into account confidence intervals and use Monte Carlo simulation to generate possible development paths.

[0080] Optionally, the present application also establishes a trend warning mechanism, which triggers a warning when the following situations are detected: sudden change in attention: the change in attention in a short period of time exceeds 2 times the historical standard deviation; trend reversal: a significant change in the long-term upward / downward trend; spatial anomaly: abnormal fluctuations in the distribution of attention in a specific area; topic anomaly: sudden changes in the topic structure.

[0081] In some embodiments, step S4 includes: Based on the topic model and the target text data, determining the document topic attention of each record document in the target text data, wherein the document topic attention is used to indicate the probability distribution of each target topic in the record document in any time period; Determine the topic attention of the target topic in the time period based on the topic attention of the document and the total number of topics in any time period; Performing time dimension analysis based on the subject attention to obtain time distribution characteristics, the time distribution characteristics include annual trend analysis results, seasonal analysis results and stage analysis results, the annual trend analysis results are used to indicate the attention trend and change characteristics of the target subject, the seasonal analysis results are used to indicate the release time characteristics and periodic laws of the target subject, and the stage analysis results are used to indicate the evolution characteristics and focus transfer paths of the target subject at different project development stages; Based on the subject attention, a spatial dimension analysis is performed to obtain spatial distribution characteristics, which include regional distribution characteristics, provincial distribution characteristics and spatial cluster distribution characteristics. The regional distribution characteristics are used to indicate the subject attention distribution of each region and the project differences between regions. The provincial distribution characteristics are used to indicate the subject attention of each province and the project characteristics of a specified province. The spatial cluster distribution characteristics are used to indicate the geographical distribution characteristics and regional collaborative development trends oriented towards the scientific and technological projects. Performing a topic dimension analysis based on the topic attention to obtain a topic distribution feature, wherein the topic distribution feature is used to indicate the importance ranking, topic relevance, and topic evolution trend among target topics; Based on the time distribution characteristics, the space distribution characteristics and the topic distribution characteristics, a multi-dimensional cross-analysis is performed to obtain attention trend characteristics.

[0082] In this embodiment, the document topic attention is determined by the probability distribution of topic k in document d at time t, and then the topic attention is determined based on the total number of topics and the document topic attention in any time period.

[0083] Furthermore, the analysis focuses on the time dimension, including: annual trend analysis, such as distributing data by annual aggregation theme, calculating the annual average attention of each theme, drawing a trend chart of attention from 2014 to 2024, and identifying key turning points and significant changes; seasonal analysis, such as statistical theme distribution by quarter, detecting cyclical fluctuation patterns, and analyzing the time characteristics of policy releases; stage division, such as dividing policy development stages based on attention change characteristics, analyzing the evolution characteristics of themes in different stages, and identifying the path of policy focus shift.

[0084] The analysis of spatial dimensions includes: regional grouping, such as grouping provinces into eastern, central and western regions, calculating the distribution of theme attention in each region, and comparing the differences in policy emphasis between regions; inter-provincial comparison, such as calculating the theme attention index of each province, constructing a province-theme attention matrix, and identifying the policy characteristics of typical provinces; spatial clustering, such as clustering provinces based on theme attention, analyzing the geographical distribution characteristics of policy orientations, and studying regional coordinated development models.

[0085] The analysis of the topic dimension includes: topic importance ranking, such as calculating the overall attention of each topic, establishing a topic importance ranking, and identifying core policy concerns; topic correlation analysis, such as calculating the correlation of attention between topics, building a topic correlation network, and analyzing the synergistic effect of policy topics; topic evolution analysis, such as tracking changes in topic attention, analyzing the emergence of emerging topics, and predicting policy attention trends.

[0086] Furthermore, multi-dimensional cross-analysis includes: multi-dimensional analysis, such as constructing a three-dimensional analysis framework of time-space-theme, studying the changes in regional differences over time, and analyzing the regional characteristics of theme evolution; policy effect evaluation, such as comparing changes in attention with policy goals, analyzing regional differences in policy implementation, and evaluating policy synergy effects; decision support, such as providing policy focus warnings, assisting regional policy adjustments, and supporting policy optimization decisions.

[0087] Therefore, this embodiment comprehensively displays the distribution characteristics of attention to science and technology policies through multi-dimensional quantitative analysis, providing data support for policy formulation and evaluation. The model can be optimized and adjusted according to actual needs, such as adding more fine-grained time division or adding new spatial analysis dimensions.

[0088] Optionally, the attention analysis step is implemented by constructing a multi-dimensional evaluation index system. Specifically, it mainly includes the following dimensions: 1) Text quantity dimension: Count the frequency of occurrence of specific topics or keywords in all texts and calculate their proportion; 2) Time dimension: Analyze the distribution changes of keywords or topics in different time periods, and identify the evolution trend of hot topics through time series analysis; 3) Communication dimension: Consider factors such as the source of the text, the number of reprints, and the number of comments, and construct a communication influence index; 4) Weight dimension: Weighted calculation is performed based on the authority of the text source, policy level, etc. The final attention score is obtained by normalizing the indicators of each dimension and then weighted summing them. The weight distribution is determined by the hierarchical analysis method (AHP), specifically: 0.3 for the text quantity dimension, 0.2 for the time dimension, 0.25 for the communication dimension, and 0.25 for the weight dimension.

[0089] For the trend characteristics of attention, the trend prediction step can use the time series analysis method combined with the deep learning model for prediction. The specific implementation includes: 1) Data preprocessing: Arrange the attention scores in chronological order to form time series data. Normalize the data and divide the training set and test set into 80%:20% ratio; 2) Feature engineering: Construct time window features, including historical n days of attention data, first-order difference features, seasonal features, etc. The time window size is set to 14 days; 3) Model construction: Use LSTM model for prediction, and the network structure includes two LSTM layers (with 64 and 32 units respectively) and one fully connected layer. Model training parameter settings: batch_size=32, epoch=100, optimizer=Adam, learning_rate=0.001; 4) Evaluation of prediction results: Use root mean square error (RMSE) and mean absolute percentage error (MAPE) as evaluation indicators, and continuously update the model through rolling prediction to ensure prediction accuracy. At the same time, in order to improve the prediction accuracy, the Prophet time series prediction model is also integrated. The prediction results of multiple models are combined through ensemble learning. The final prediction result takes the weighted average of the prediction values ​​of each model, and the weight is determined by the prediction error on the validation set.

[0090] S5: Analyze the target text data using a pre-established sentiment analysis model to obtain a sentiment analysis result.

[0091] In this application, the sentiment analysis model adopts a deep neural network architecture, specifically using a combination of bidirectional LSTM (Bi-LSTM) and attention mechanism. The input layer of the model uses 300-dimensional pre-trained word vectors, which are obtained by training the Word2Vec model on a large-scale science and technology policy text corpus. The network structure of the model consists of an embedding layer, a Bi-LSTM layer, an attention layer, and a fully connected layer. The number of hidden units in the Bi-LSTM layer is 256, the attention layer is used to capture important words in the sentence and give them higher weights, and the fully connected layer uses a softmax activation function to output the probability distribution of three categories.

[0092] In actual application, sentiment analysis is performed in the following steps: First, the input target text is segmented and POS tagged, and words that have an important impact on sentiment judgment (such as adjectives, adverbs, verbs, etc.) are retained. Then, the sentiment intensity of the text is preliminarily calculated using the sentiment dictionary, which includes the HowNet sentiment dictionary and the Tsinghua University Li Jun Chinese sentiment dictionary, and is expanded according to the characteristics of the science and technology policy field. Next, the regulatory effect of language components such as negative words and degree adverbs on sentiment is considered, and the sentiment intensity is adjusted through rules.

[0093] Finally, the processed text is input into the pre-trained deep learning model to obtain the sentiment category (positive, negative, or neutral) and the corresponding confidence score of the text. To improve the reliability of the analysis, the model also outputs the key sentences or words that lead to the sentiment judgment, which facilitates the interpretation and verification of the analysis results. When the confidence is lower than the preset threshold (0.6), the system will mark the sample for manual review to ensure the accuracy of the analysis results.

[0094] In the experimental verification, the sentiment analysis model achieved an accuracy of 85.7% on the test set, with an F1 value of 0.83, which shows that the model can better capture the sentiment tendency in the science and technology policy text. Through the analysis of error cases, it was found that the model had a relatively low accuracy rate when processing long sentences containing complex tones and implicit emotions, which is also a key direction to be improved in the future.

[0095] In some embodiments, the sentiment analysis model is constructed by the following steps, including: Perform sentence-level segmentation on the sample text data to obtain multiple text sentences; Identifying the encouraging sentences in the text sentence as a first emotion identification value, identifying the restrictive sentences in the text sentence as a second emotion identification value, and identifying the common sentences in the text sentence as a third emotion identification value; Divide the marked text sentences into training sets and test sets according to a preset ratio; Based on the training set, determining training parameters in a preset LSTM model, wherein the training parameters include batch size, dropout rate parameter, number of training rounds, sequence length, vocabulary length, and number of output categories; Based on the training parameters, training the LSTM model using the training set; The trained LSTM model is tested using the test set to obtain performance evaluation indicators, and the sentiment analysis model is obtained by combining the performance evaluation indicators, wherein the performance evaluation indicators include accuracy, precision, recall rate and F1 value.

[0096] In this embodiment, sentence-level segmentation adopts a combination of rule-based and machine learning methods. First, punctuation marks (such as period, question mark, exclamation mark) are used as the basic segmentation basis, while considering Chinese-specific punctuation marks (such as colon, semicolon). In order to handle complex long sentences, a sentence segmentation method based on dependency syntactic analysis is also introduced, using LTP tools for syntactic analysis, and appropriate segmentation is performed at grammatical structures such as parallel relations and transition relations. In addition, for the bullet-marked clauses commonly seen in policy texts, they are regarded as independent sentence units.

[0097] Furthermore, the emotion identification process adopts a multi-level classification system. Encouraging sentences (the first emotion identification value, recorded as 1) usually contain content such as active support, policy support, and incentive measures; restrictive sentences (the second emotion identification value, recorded as -1) contain control requirements, constraints, and punishment measures; ordinary sentences (the third emotion identification value, recorded as 0) are neutral declarative content. In order to improve the accuracy of annotation, a detailed annotation rule library was established, including common emotion trigger words and sentence templates. At the same time, a two-person cross-annotation method was used to ensure the consistency of annotation by calculating the Cohen's Kappa coefficient (required to be greater than 0.8).

[0098] Then, the marked text sentences are divided into training set and test set according to the preset ratio. Specifically, the data set is divided by stratified sampling method to ensure that the distribution of various emotional markers in the training set and the test set is basically the same. For example, the specific ratio is 80% for the training set and 20% for the test set. The time dimension of the text is taken into account when dividing, ensuring that the test set contains samples from different periods to verify the temporal generalization ability of the model. In addition, 10% of the training set is divided as a validation set for model tuning and the implementation of the early stopping strategy.

[0099] Furthermore, based on the training set, the training parameters in the preset LSTM model are determined. The training parameters of the LSTM model are optimally combined through grid search and cross-validation: the batch size (batch_size) is set to 32 to strike a balance between model training efficiency and memory usage; the dropout rate parameter (dropout_rate) is set to 0.5 to prevent overfitting; the number of training rounds (epochs) is set to 100, and with the early stopping mechanism, training is stopped when the performance of the validation set has not improved for 5 consecutive rounds; the sequence length (sequence_length) is set to 128, which is determined according to the length distribution of sample sentences; the vocabulary length (vocab_size) is 20,000, covering common vocabulary in the field of science and technology policy; the number of output categories (num_classes) is 3, corresponding to three sentiment identification values.

[0100] Therefore, based on the above training parameters, the LSTM model is trained using the training set. The LSTM model training adopts the batch gradient descent method, uses the Adam optimizer, the initial learning rate is set to 0.001, and the learning rate decay strategy is used. The model structure includes an embedding layer (embedding_dim=300), two bidirectional LSTM layers (units=256), and a fully connected layer. Cross entropy is used as the loss function during training, and the model performance is evaluated on the validation set after each epoch.

[0101] Furthermore, the trained LSTM model was tested using the test set to obtain a sentiment analysis model. The model test evaluation uses multiple indicators for comprehensive measurement: the accuracy rate (Accuracy) reaches 84.5%, indicating the proportion of the overall correct classification of the model; the precision rate (Precision) averages 82.3% in each category, reflecting the accuracy of the model's prediction of a certain category; the recall rate (Recall) averages 81.7% in each category, reflecting the model's recognition completeness of samples in a certain category; the F1 value reaches 82.0%, which is the harmonic mean of the precision rate and the recall rate. Through the comprehensive evaluation of these indicators, it is ensured that the model has a stable performance in all types of sentiment recognition. At the same time, for categories with an F1 value lower than 0.75, the model performance is improved by increasing the training samples of the corresponding category or adjusting the category weight.

[0102] Based on the above embodiment, in some embodiments, training the LSTM model based on the training parameters and using the training set includes: Constructing a feature enhancement model, wherein the feature enhancement model includes an encoder and a decoder, the encoder includes a Mamba block for extracting sequence features and a jump connection structure composed of a UNet structure, the jump connection structure is used to indicate the fusion of different scale features, and the decoder includes an LSTM layer for indicating the processing of temporal dependencies; Mapping the training set into a word vector sequence; Constructing an input structure with sentence-level features and document-level features, and forming an enhanced training sample set from the input structure; Based on the enhanced training sample set, performing self-supervised pre-training on the feature enhancement model; Introducing the labeled data, fine-tuning the pre-trained feature enhancement model based on the enhanced training sample set, and generating a feature processing model; Using the feature processing model to perform feature enhancement on the word vector sequence to obtain an optimized training set; The LSTM model is trained using the optimized training set.

[0103] In this embodiment, the encoder part of the feature enhancement model adopts a combination of Mamba blocks and UNet structures. The Mamba block uses a state space model (SSM) to capture long-distance dependencies, and its core parameters include: a hidden state dimension of 512, an attention head number of 8, and a layer number of 6. Each Mamba block contains a selective state space layer (S4) and a feedforward neural network layer (FFN). The UNet structure uses a symmetrical contraction path and expansion path, including 4 downsampling layers and 4 upsampling layers. The number of feature channels starts from 64 and is expanded to a maximum of 512. The jump connection structure establishes a residual connection between corresponding layers and uses 1×1 convolution for feature fusion. The decoder uses a two-layer bidirectional LSTM with 256 hidden units in each layer to integrate multi-scale features and enhance the extraction of temporal information.

[0104] Furthermore, the training set is mapped into a sequence of word vectors. First, the pre-trained Word2Vec model (the training corpus contains 1 million science and technology policy texts) is used to map words into 300-dimensional dense vectors. For out-of-vocabulary words (OOV problem), character-level encoding is used to combine single-word vectors through CNN to obtain word vectors. At the same time, in order to capture the special semantics of words in policy texts, positional encoding and semantic role encoding are introduced as supplementary features.

[0105] Then, an input structure with sentence-level features and document-level features is constructed, and an enhanced training sample set is formed from the input structure. Among them, sentence-level features include word vector sequences, syntactic dependency tree features, part-of-speech sequence features, and local semantic importance weights calculated by the attention mechanism. Document-level features include topic distribution vectors (extracted using the LDA model), document structure features (such as chapter level, clause position, etc.), and global context features. The features of these two levels are integrated through the feature fusion layer to generate enhanced training samples.

[0106] Then, based on the enhanced training sample set, the feature enhancement model is self-supervised pre-trained. During the pre-training process, the main tasks include masked language model (MLM), sentence order prediction (SOP), and document structure reconstruction. In the MLM task, 15% of the input tokens are randomly masked; in the SOP task, the order relationship between adjacent sentences is predicted; in the document structure reconstruction task, the disrupted document hierarchy is restored. The pre-training uses the Adam optimizer, the learning rate is 2e-5, and the number of training rounds is 50.

[0107] In this embodiment, manually annotated sentiment classification data (including 10,000 annotated samples) is introduced, and the output layer of the pre-trained model is replaced with a new layer adapted to the sentiment classification task. The fine-tuning process adopts a progressive learning rate strategy to generate a feature processing model. The initial learning rate is set to 5e-5, and decays to 0.1 times the original every 5 epochs. At the same time, contrastive learning loss is introduced to improve the model's ability to distinguish similar samples.

[0108] Therefore, the feature processing model is used to enhance the word vector sequence in multiple dimensions, including contextual semantic enhancement, structural feature enhancement, and domain knowledge enhancement. The feature weights are dynamically adjusted through the attention mechanism to highlight the features that have an important impact on sentiment judgment. At the same time, the adversarial training technology is used to improve the robustness of the model, and adversarial samples are generated by adding perturbations for training. Thus, the enhanced features are used to train the LSTM model. Exemplarily, a mini-batch training method with a batch size of 64 is adopted, and a learning rate scheduling strategy with warmup is used. In order to prevent over-input, in addition to dropout, L2 regularization (coefficient of 1e-5) and gradient clipping (threshold of 5.0) are also introduced. Cross-validation is used to monitor the model performance during training. When the F1 value on the validation set does not improve for three consecutive epochs, the early stopping mechanism is triggered. The performance of the final model on the test set is 3.5 percentage points higher than that of the baseline model, and the F1 value reaches 85.5%.

[0109] S6: Generate text analysis results of the scientific and technological project based on the target topic, the attention trend characteristics and the sentiment analysis results.

[0110] Optionally, the process of generating text analysis results adopts a multi-dimensional fusion method, which mainly includes the following key steps and technical points: First, a multi-level framework of the analysis results is constructed. The framework contains analysis content in three dimensions: topic layer, trend layer, and sentiment layer. At the topic level, the system sorts the extracted topics by importance and calculates the weight score of each topic. The weight score is calculated based on the weighted calculation of indicators such as the TF-IDF value of the topic word, topic cohesion (Topic Coherence), and topic coverage. For each topic, its core keywords (Top-10) and representative text fragments (Top-3) are extracted, and a topic overview description is generated.

[0111] Secondly, at the trend level, the system conducts time series analysis and feature extraction on the attention trend characteristics. Specifically, it calculates the basic statistical characteristics of the trend, such as mean, variance, peak value, etc.; identifies key time nodes, including trend turning points, peak periods and trough periods; decomposes the trend and divides it into three components: long-term trend, cyclical fluctuation and random fluctuation; and calculates the growth rate, volatility and other indicators of the trend based on the time series analysis method.

[0112] Then, this application combines these features into a trend descriptive text and conducts predictive analysis of future trends. At the emotional level, this application integrates the results of emotional analysis, including: calculating the overall emotional tendency distribution, obtaining the proportion of positive, negative and neutral emotions; identifying the key nodes and triggers of emotional changes; extracting representative emotional expression sentences; analyzing emotional differences under different topics. Finally, this application integrates the analysis results of the above three dimensions into a structured analysis report through natural language generation (NLG) technology.

[0113] Optionally, to improve the comprehensibility and practicality of the analysis results, this application also provides an interactive result display interface, allowing users to adjust and explore the analysis dimensions according to their needs. At the same time, a quality assessment system for the analysis results is established, including assessment indicators for dimensions such as accuracy, completeness, and readability, and the quality of the analysis results is ensured through manual sampling. The analysis report also supports export to multiple formats such as PDF and Word, which is convenient for users to use and share later.

[0114] In some embodiments, the method further comprises: Based on the target text data, generate a data histogram; Generate a corresponding word cloud diagram based on the word features of the target text data, wherein the word features include word frequency data and inverse document frequency data of the word; Based on the attention trend characteristics, generate a corresponding attention time series line graph; Based on the sentiment analysis results, a corresponding sentiment pie chart is generated, wherein the sentiment analysis results include sentiment category proportions; Based on the text analysis results of each region on the scientific and technological projects, generate corresponding regional characteristic distribution maps; The data bar chart, the word cloud chart, the attention time series line chart, the sentiment pie chart and the regional feature distribution chart are visualized.

[0115] In this embodiment, the comprehensive weight of the word is calculated, combining the TF-IDF value and the word importance score. The word frequency statistics use an improved sliding window algorithm, the window size is set to 5, and the co-occurrence relationship of the words is considered. For professional terms and compound words, a customized dictionary is used for identification and weight enhancement. The visual presentation of the word cloud map is implemented using the D3.js library. The main parameter settings include: the maximum font size is 60pt, the minimum font size is 12pt, the word spacing is 2px, and the layout uses a spiral arrangement algorithm. The color scheme uses a preset technology blue gradient palette, which includes 5 levels of color distinction. To improve readability, set the word rotation angle range to [-30°, 30°], and ensure that important words are prioritized in the center.

[0116] Use Echarts library to draw interactive line charts, with the X-axis representing time (supporting switching of multiple granularities of year / quarter / month / day), and the Y-axis representing the standardized attention score (range 0-100). The line uses a smooth curve effect (tension parameter is set to 0.4), and adds area gradient fill to enhance the visual effect. The chart also includes the following functions: data zoom component is used to view a specific time period, mark point component highlights key time nodes, trend line component shows the overall development trend, and tooltip component displays detailed data information. At the same time, adaptive layout is implemented, which can automatically adjust the chart size according to the size of the display device.

[0117] Step A3: generating a corresponding sentiment pie chart based on the sentiment analysis result, wherein the sentiment analysis result includes sentiment category proportions; The nested pie chart structure is adopted. The inner ring shows the proportion of basic emotion categories (positive, negative, neutral), and the outer ring subdivides the specific emotion intensity distribution under each category. It is implemented using the Highcharts library, and the color scheme adopts a perception-friendly color combination (positive-green, negative-red, neutral-gray). The chart adds animation effects and supports hover interaction and click expansion of the fan-shaped area. The data label adopts an intelligent position algorithm to avoid overlap and automatically adjust the display strategy when space is limited. At the same time, it provides legend descriptions and data filtering functions, allowing users to display or hide specific categories as needed.

[0118] Based on a map API, an interactive map visualization is built, which uses a combination of geographic distribution heat map and marker points to generate a regional feature distribution map. The heat map shows the density distribution of the number of texts in each region, and the colors from blue to red represent the values ​​from low to high. The size of the marker point is proportional to the text analysis score of the region. Click it to expand and display the detailed analysis results. The map supports zooming and dragging operations to achieve multi-scale data browsing. At the provincial scale, the regional characteristics are displayed through gradient color filling, and data ranking and comparison functions are provided.

[0119] Furthermore, we use the Bootstrap grid system to build an adaptive layout, automatically adjusting the arrangement of charts according to the device screen size. We use a 2×3 grid layout on large-screen devices and automatically switch to a vertical arrangement on mobile devices. We implement interactive chart linkage. When filtering or clicking on a chart, other charts are updated to display related data. We add a chart export function, supporting export options in multiple formats such as PNG and SVG. At the same time, we implement a data update mechanism, maintain a real-time connection with the server through WebSocket, and automatically update the chart display when there is new data. To improve performance, we implement lazy loading and data caching mechanisms for charts.

[0120] Figure 4 Schematic diagram of the structure of a public text analysis system based on the LDA model and the LSTM algorithm in an embodiment of the present application. The public text analysis system 400 based on the LDA model and the LSTM algorithm includes: The data acquisition module 401 is used to acquire target text data of scientific and technological projects; A feature extraction module 402 is used to extract feature words from the target text data to construct a feature word vector matrix based on the feature words, wherein the target text data includes word frequency data and inverse document frequency data; A model building module 403 is used to build a perplexity curve based on the feature word vector matrix, and to build a topic model based on the perplexity curve, wherein the perplexity curve is used to indicate the relationship between the number of topics and perplexity in the target text data, and the topic model is used to indicate that a plurality of target topics are obtained after topic clustering of the target text data; The attention analysis module 404 is used to determine the topic attention of the target topic based on the topic model, and determine the attention trend characteristics based on the topic attention, wherein the topic attention is used to indicate the distribution of each target topic within a specified time period, and the attention trend characteristics are used to indicate the change trend of the target topic in the time dimension, space dimension and topic dimension; Sentiment analysis module 405, used to analyze the target text data using a pre-established sentiment analysis model to obtain a sentiment analysis result; The text analysis module 406 is used to generate a text analysis result of the scientific and technological project based on the target topic, the attention trend characteristics and the sentiment analysis result.

[0121] The system of the embodiments of the present application can execute the method provided by the embodiments of the present application, and the implementation principles are similar. The actions performed by each module in the system of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the system, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.

Claims

1. A public text analysis method based on LDA model and LSTM algorithm, characterized in that: include: Obtain target text data for scientific and technological projects; Extracting feature words from the target text data to construct a feature word vector matrix based on the feature words, wherein the target text data includes word frequency data and inverse document frequency data; Based on the feature word vector matrix, a perplexity curve is constructed, and based on the perplexity curve, a topic model is constructed, wherein the perplexity curve is used to indicate the relationship between the number of topics in the target text data and the perplexity, and the topic model is used to indicate that a plurality of target topics are obtained after topic clustering of the target text data; Based on the topic model, determine the topic attention of the target topic, and determine the attention trend feature based on the topic attention, the topic attention is used to indicate the distribution of each target topic in a specified time period, and the attention trend feature is used to indicate the change trend of the target topic in the time dimension, space dimension and topic dimension; Analyze the target text data using a pre-established sentiment analysis model to obtain a sentiment analysis result; Based on the target topic, the attention trend characteristics and the sentiment analysis results, a text analysis result of the scientific and technological project is generated.

2. The method according to claim 1, characterized in that: The following steps are used to build a sentiment analysis model, including: Perform sentence-level segmentation on the sample text data to obtain multiple text sentences; Identifying the encouraging sentences in the text sentence as a first emotion identification value, identifying the restrictive sentences in the text sentence as a second emotion identification value, and identifying the common sentences in the text sentence as a third emotion identification value; Divide the marked text sentences into training sets and test sets according to a preset ratio; Based on the training set, determining training parameters in a preset LSTM model, wherein the training parameters include batch size, dropout rate parameter, number of training rounds, sequence length, vocabulary length, and number of output categories; Based on the training parameters, training the LSTM model using the training set; The trained LSTM model is tested using the test set to obtain performance evaluation indicators, and the sentiment analysis model is obtained by combining the performance evaluation indicators, wherein the performance evaluation indicators include accuracy, precision, recall rate and F1 value.

3. The method according to claim 2, characterized in that The determining of the topic attention of the target topic based on the topic model, and determining the attention trend feature based on the topic attention, includes: Based on the topic model and the target text data, determining the document topic attention of each record document in the target text data, wherein the document topic attention is used to indicate the probability distribution of each target topic in the record document in any time period; Determine the topic attention of the target topic in the time period based on the topic attention of the document and the total number of topics in any time period; Performing time dimension analysis based on the subject attention to obtain time distribution characteristics, the time distribution characteristics include annual trend analysis results, seasonal analysis results and stage analysis results, the annual trend analysis results are used to indicate the attention trend and change characteristics of the target subject, the seasonal analysis results are used to indicate the release time characteristics and periodic laws of the target subject, and the stage analysis results are used to indicate the evolution characteristics and focus transfer paths of the target subject at different project development stages; Based on the subject attention, a spatial dimension analysis is performed to obtain spatial distribution characteristics, which include regional distribution characteristics, provincial distribution characteristics and spatial cluster distribution characteristics. The regional distribution characteristics are used to indicate the subject attention distribution of each region and the project differences between regions. The provincial distribution characteristics are used to indicate the subject attention of each province and the project characteristics of a specified province. The spatial cluster distribution characteristics are used to indicate the geographical distribution characteristics and regional collaborative development trends oriented towards the scientific and technological projects. Performing a topic dimension analysis based on the topic attention to obtain a topic distribution feature, wherein the topic distribution feature is used to indicate the importance ranking, topic relevance, and topic evolution trend among target topics; Based on the time distribution characteristics, the space distribution characteristics and the topic distribution characteristics, a multi-dimensional cross-analysis is performed to obtain attention trend characteristics.

4. The method according to claim 3, characterized in that The step of constructing a perplexity curve based on the feature word vector matrix, and constructing a topic model based on the perplexity curve, includes: Using the feature word vector matrix, initializing the model parameters of the preset initial topic model, the model parameters including the number of topics, hyperparameters, and the number of iterations; Based on the model parameters and the feature word vector matrix, the initial topic model is iteratively trained, and the perplexity corresponding to each topic number is recorded to construct a perplexity curve; The change rate of the perplexity curve is detected, and the number of topics corresponding to when the change rate is lower than a preset change rate threshold is obtained, and a topic model is constructed based on the obtained number of topics.

5. The method according to claim 4, characterized in that The extracting the feature words in the target text data to construct a feature word vector matrix according to the feature words includes: Based on the target text data, calculating the word frequency data of each word in the target text data, wherein the word frequency data is used to indicate the frequency of occurrence of the word in the record document; Based on the word frequency data, calculating the inverse document frequency data of the word, wherein the inverse document frequency data is used to indicate the importance of the word; Determining word feature data of the word based on the word frequency data and the inverse document frequency data; Based on the word feature data, feature words are screened.

6. The method according to claim 5, characterized in that The step of training the LSTM model based on the training parameters and using the training set includes: Constructing a feature enhancement model, wherein the feature enhancement model includes an encoder and a decoder, the encoder includes a Mamba block for extracting sequence features and a jump connection structure composed of a UNet structure, the jump connection structure is used to indicate the fusion of different scale features, and the decoder includes an LSTM layer for indicating the processing of temporal dependencies; Mapping the training set into a word vector sequence; Constructing an input structure with sentence-level features and document-level features, and forming an enhanced training sample set from the input structure; Based on the enhanced training sample set, performing self-supervised pre-training on the feature enhancement model; Introducing the labeled data, fine-tuning the pre-trained feature enhancement model based on the enhanced training sample set, and generating a feature processing model; Using the feature processing model to perform feature enhancement on the word vector sequence to obtain an optimized training set; The LSTM model is trained using the optimized training set.

7. The method according to claim 6, characterized in that The step of extracting the feature words from the target text data to construct a feature word vector matrix based on the feature words further includes: Performing multi-level semantic analysis on the target text data, and recursively subdividing the target text data into information particles of different granularities, wherein the information particles are used to indicate the hierarchical theme of the granularity; Determine the particle density of each text segment in the information particle at each particle size, wherein the particle density is used to indicate the similarity between the text segment and the hierarchical topic to which the particle size belongs; When it is detected that the particle density is lower than a preset density threshold, marking the corresponding text segment as potential abnormal data; According to the potential abnormal data, the information particles are optimized to obtain a text feature sequence; The word frequency data is calculated by combining the text feature sequence, the particle density and the target text data.

8. The method according to claim 7, characterized in that The step of obtaining target text data of scientific and technological projects includes: Obtaining text data to be processed of the scientific and technological project; Constructing a data distribution optimization network, wherein the data distribution optimization network includes a normalized flow transformation layer sequence, and an attention mechanism is arranged in each normalized flow transformation layer in the normalized flow transformation layer sequence; Mapping the text data to be processed to a preset normal distribution space to generate a preliminary mapping result; Based on a preset kernel density estimation model, calculating the local density of data points in the preliminary mapping result; constructing data weights according to the local density; Density optimization is performed on the preliminary mapping result based on the data weight to generate a density-optimized data distribution; Constructing and executing a contrastive learning task, wherein the contrastive learning task is used to instruct the extraction of structural features in the density-optimized data distribution; constructing a domain discriminator, wherein the domain discriminator is used to indicate the difference in data distribution of different data sources; Configuration is used to indicate the dynamic weight mechanism for adjusting weights; Based on the contrastive learning task, the domain discriminator and the dynamic weight mechanism, the density-optimized data distribution is processed to obtain target text data.

9. The method according to claim 8, characterized in that The method further comprises: Based on the target text data, generate a data histogram; Generate a corresponding word cloud diagram based on the word features of the target text data, wherein the word features include word frequency data and inverse document frequency data of the word; Based on the attention trend characteristics, generate a corresponding attention time series line graph; Based on the sentiment analysis results, a corresponding sentiment pie chart is generated, wherein the sentiment analysis results include sentiment category proportions; Based on the text analysis results of each region on the scientific and technological projects, generate corresponding regional characteristic distribution maps; The data bar chart, the word cloud chart, the attention time series line chart, the sentiment pie chart and the regional feature distribution chart are visualized.

10. A public text analysis system based on LDA model and LSTM algorithm, characterized in that: include: Data acquisition module, used to obtain target text data of scientific and technological projects; A feature extraction module, used for extracting feature words from the target text data to construct a feature word vector matrix based on the feature words, wherein the target text data includes word frequency data and inverse document frequency data; A model building module, used to build a perplexity curve based on the feature word vector matrix, and to build a topic model based on the perplexity curve, wherein the perplexity curve is used to indicate the relationship between the number of topics and perplexity in the target text data, and the topic model is used to indicate that a plurality of target topics are obtained after topic clustering of the target text data; An attention analysis module, used to determine the topic attention of the target topic based on the topic model, and determine attention trend characteristics based on the topic attention, wherein the topic attention is used to indicate the distribution of each target topic within a specified time period, and the attention trend characteristics are used to indicate the change trend of the target topic in the time dimension, space dimension and topic dimension; The sentiment analysis module is used to analyze the target text data using a pre-established sentiment analysis model to obtain a sentiment analysis result; The text analysis module is used to generate a text analysis result of the scientific and technological project based on the target topic, the attention trend characteristics and the sentiment analysis result.

Citation Information

Patent Citations

  • Emotion analysis method based on improved CNN-LDA

    CN109977413A

  • Theme-oriented information retrieval method

    CN110555154A

  • Traffic track data semantic analysis and visualization method based on topic model

    CN111104792A

  • Microblog hot topic discovery algorithm based on BTM and GloVe similarity linear fusion

    CN111368072A

  • Multi-strategy sentiment analysis method based on theme enhancement and knowledge distillation

    CN117708336A

Cited By

  • Federal learning efficient communication method and system for traffic flow prediction

    CN121483054A