Policy text analysis method, device and equipment based on lda topic model, medium and product

By constructing a domain knowledge base and a compound term recognition rule engine, combining rule channels and statistical channels for word segmentation, and using LDA topic modeling, the problems of inaccurate term recognition and reliance on manual model parameters in policy text analysis are solved, thus achieving more efficient policy text analysis.

CN123180134APending Publication Date: 2026-11-27BEIJING NORMAL UNIV AT ZHUHAI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611416923.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing policy text analysis solutions based on LDA topic models suffer from problems such as static single-layer lexicon, simplistic word segmentation strategies, manual model parameters, and one-sided evaluation indicators, leading to inaccurate terminology recognition, large fluctuations in model performance, and high parameter tuning costs.

Method used

A domain knowledge base and a compound term recognition rule engine are constructed. Word segmentation is performed by combining rule channels and statistical channels. Weighted document-term frequency matrix and LDA topic model are used for modeling. The optimal number of topics is automatically searched through the perplexity-consistency joint inflection point detection algorithm. Dynamic optimization is performed by a hybrid inference engine consisting of variational inference and Gibbs sampling.

Benefits of technology

It improves the robustness of word segmentation and the generalization ability of the model in policy text analysis, reduces model selection bias, lowers parameter tuning costs, and enhances the interpretability and accuracy of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123180134A_ABST
    Figure CN123180134A_ABST
Patent Text Reader

Abstract

The application discloses a policy text analysis method and device based on an LDA topic model, equipment, a medium and a product, relates to the field of policy text analysis, and comprises the following steps: constructing a field knowledge base and a composite term recognition rule engine, adopting a double channel to perform word segmentation on policy texts in a sample set and constructing a weighted document-word frequency matrix; dividing the sample set into a training set and a test set, inputting the matrix of the training set into an LDA topic model to obtain a current LDA topic model, wherein the hierarchical weight coefficient of a vocabulary is mapped into a Dirichlet prior hyperparameter in the topic model; adopting a perplexity-consistency joint inflection point detection algorithm to determine an optimal number of topics; adopting a hybrid inference engine composed of variational inference and Gibbs sampling; and dynamically optimizing the current topic model according to the matrix of the test set to determine a final topic model. The application solves the problems of inaccurate term recognition, artificial model parameter dependence and single evaluation dimension in policy text analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of policy text analysis, and in particular to a method, apparatus, equipment, medium and product for policy text analysis based on LDA subject model. Background Technology

[0002] Policy texts are characterized by strong domain specificity (containing a large number of complex terms and idioms), dynamic accumulation (continuous addition of new texts), and analytical specialization (requiring high interpretability). Topic models such as Latent Dirichlet Allocation (LDA) are core technologies for mining the latent semantic structure of such texts. However, current policy text analysis schemes based on LDA topic models suffer from the following systemic technical shortcomings: 1. Static, single-layered lexicons often employ general word segmentation lexicons and fixed stop word lists, which cannot effectively identify complex domain terms, resulting in incorrect word segmentation granularity and fragmented topic semantics.

[0003] 2. The word segmentation strategy is too simplistic. Traditional methods either rely solely on string matching (which is ineffective for out-of-vocabulary words) or solely on statistical models (which are prone to incorrect segmentation of domain-specific compound words), resulting in insufficient robustness of preprocessing.

[0004] 3. The model parameters are manually determined. The setting of the number of topics K and hyperparameters α and β relies entirely on trial and error based on human experience. When faced with policy texts from different batches and sub-domains, the model performance fluctuates greatly, and the parameter tuning cost is high.

[0005] 4. The evaluation metrics are one-sided, often using perplexity (which focuses on statistical fit and is negatively correlated with interpretability) or consistency (which focuses on semantics and ignores topic independence) as the sole metrics. A single metric can easily lead to model selection bias.

[0006] Therefore, there is an urgent need for a new policy text analysis method based on LDA topic model that can systematically solve the above problems. Summary of the Invention

[0007] The purpose of this application is to provide a policy text analysis method, apparatus, equipment, medium, and product based on LDA topic model, which solves the problems of inaccurate terminology identification, reliance on manual model parameters, and single evaluation dimension in policy text analysis.

[0008] To achieve the above objectives, this application provides the following solution: Firstly, this application provides a policy text analysis method based on LDA topic modeling, including: Construct a domain knowledge base and a compound terminology recognition rule engine; the domain knowledge base includes a core terminology lexicon, an extended terminology lexicon, and a stop word lexicon built based on a sample set; the sample set includes multiple policy texts.

[0009] Based on a domain knowledge base and a compound terminology recognition rule engine, the policy texts in the sample set are segmented simultaneously using both rule-based and statistical channels to obtain the segmented word sequences corresponding to each policy text in the sample set under the rule-based and statistical channels. The rule-based channel segments each policy text in the sample set using a bidirectional maximum matching algorithm, while the statistical channel segments each policy text in the sample set using an N-gram statistical language model.

[0010] For any policy text in the sample set, the word segmentation sequence corresponding to the policy text under the rule channel and the statistical channel is fused with confidence vote and filtered for stop words to obtain the final word segmentation sequence corresponding to the policy text.

[0011] A weighted document-term frequency matrix is ​​constructed based on the final word segmentation sequence corresponding to each policy text in the sample set.

[0012] The sample set is divided into a training set and a test set.

[0013] The weighted document-term frequency (FTFM) submatrix corresponding to the training set and the test set are determined based on the weighted document-term frequency (FTFM) matrix. The FTFM submatrix corresponding to the training set is then input into the LDA topic model to perform LDA topic modeling, resulting in the current LDA topic model. Specifically, the hierarchical weight coefficients of the core term lexicon and the extended term lexicon are mapped to Dirichlet prior hyperparameters of the topic-word distribution in the LDA topic model. A perplexity-consistency joint inflection point detection algorithm is used to automatically search and determine the optimal number of topics within a preset candidate topic number range. A hybrid inference engine consisting of variational inference and Gibbs sampling is employed.

[0014] Based on the weighted document-term frequency submatrix corresponding to the test set, the current LDA topic model is dynamically optimized through multi-dimensional quantitative evaluation to determine the final LDA topic model. The final LDA topic model is used to analyze the policy text to be processed.

[0015] Secondly, this application provides a policy text analysis device based on an LDA topic model, comprising: The module is used to build a domain knowledge base and a compound term recognition rule engine; the domain knowledge base includes a core term lexicon, an extended term lexicon, and a stop word lexicon built based on a sample set; the sample set includes multiple policy texts.

[0016] The word segmentation module is used to simultaneously segment each policy text in the sample set using both rule-based and statistical channels based on a domain knowledge base and a compound term recognition rule engine, obtaining the word segmentation sequences corresponding to each policy text in the sample set under the rule-based and statistical channels. The rule-based channel segments each policy text in the sample set using a bidirectional maximum matching algorithm; the statistical channel segments each policy text in the sample set using an N-gram statistical language model. For any policy text in the sample set, the word segmentation sequences corresponding to the policy text under the rule-based and statistical channels are fused using confidence voting and stopped word filtering to obtain the final word segmentation sequence corresponding to the policy text.

[0017] The weighted document-term frequency matrix construction module is used to construct a weighted document-term frequency matrix based on the final word segmentation sequence corresponding to each policy text in the sample set.

[0018] The LDA topic modeling module is used to divide the sample set into a training set and a test set. Based on the weighted document-to-word frequency (VoF) matrix, it determines the weighted VoF sub-matrix corresponding to the training set and the test set. The VoF sub-matrix corresponding to the training set is then input into the LDA topic model for LDA topic modeling, resulting in the current LDA topic model. Specifically, the hierarchical weight coefficients of the core terminology lexicon and the extended terminology lexicon are mapped to Dirichlet prior hyperparameters of the topic-word distribution in the LDA topic model. A perplexity-consistency joint inflection point detection algorithm is used to automatically search and determine the optimal number of topics within a preset candidate topic number range. A hybrid inference engine consisting of variational inference and Gibbs sampling is employed.

[0019] The dynamic optimization module is used to dynamically optimize the current LDA topic model through multi-dimensional quantitative evaluation based on the weighted document-term frequency sub-matrix corresponding to the test set, and determine the final LDA topic model. The final LDA topic model is used to analyze the policy text to be processed.

[0020] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the policy text analysis method based on the LDA topic model described above.

[0021] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the policy text analysis method based on the LDA topic model described above.

[0022] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the policy text analysis method based on the LDA topic model described above.

[0023] According to the specific embodiments provided in this application, this application has the following technical effects: This application provides a policy text analysis method, apparatus, device, medium, and product based on LDA topic model. This application constructs a domain knowledge base and a compound term recognition rule engine. The domain knowledge base includes a core term lexicon, an extended term lexicon, and a stop word lexicon constructed from multiple policy texts. By using policy texts to construct the knowledge base, the application avoids the problems of using general word segmentation lexicons and fixed stop word lists, which cannot effectively identify compound domain terms and lead to errors in word segmentation granularity and fragmentation of topic semantics.

[0024] This application uses a rule channel to segment the original policy text using a bidirectional maximum matching algorithm; and a statistical channel to segment the original policy text using an N-gram statistical language model. By using both rule and statistical channels to segment the original policy text simultaneously, the corresponding segmented word sequences are obtained. Combining the two approaches solves the problem that traditional methods either rely solely on string matching or solely on statistical models, resulting in insufficient preprocessing robustness.

[0025] This application maps the hierarchical weight coefficients of the core terminology lexicon and the hierarchical weight coefficients of the extended terminology lexicon to the bias terms of the topic-word distribution prior in the LDA topic model; it adopts a perplexity-consistency joint inflection point detection algorithm to automatically search and determine the optimal number of topics within a preset range of candidate topic numbers; and it employs a hybrid inference engine consisting of variational inference and Gibbs sampling to solve the problem that the setting of the number of topics K and hyperparameters relies entirely on manual trial and error, resulting in large fluctuations in model performance and high parameter tuning costs when facing policy texts from different batches and sub-domains.

[0026] This application dynamically optimizes the current LDA topic model through multi-dimensional quantitative evaluation to determine the final LDA topic model, thus solving the problem that using perplexity or consistency indicators alone can easily lead to model selection bias. Attached Figure Description

[0027] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0028] Figure 1 This is a flowchart illustrating a policy text analysis method based on an LDA topic model, provided as an embodiment of this application.

[0029] Figure 2This is a schematic diagram of the functional modules of a policy text analysis device based on an LDA topic model, provided in an embodiment of this application.

[0030] Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0031] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0032] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0033] In one exemplary embodiment, such as Figure 1 As shown, a policy text analysis method based on LDA topic model is provided. This method is executed by computer equipment, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method specifically includes: Step 201: Construct a domain knowledge base and a compound terminology recognition rule engine; the domain knowledge base includes a core terminology lexicon, an extended terminology lexicon, and a stop word lexicon constructed based on a sample set; the sample set includes: multiple policy texts.

[0034] Step 202: Based on the domain knowledge base and the compound term recognition rule engine, the policy texts in the sample set are segmented simultaneously using rule channels and statistical channels to obtain the segmented word sequences corresponding to each policy text in the sample set under the rule channels and statistical channels; the rule channels are segmented using a bidirectional maximum matching algorithm; the statistical channels are segmented using an N-gram statistical language model.

[0035] Step 203: For any policy text in the sample set, perform confidence voting fusion and stop word filtering on the word segmentation sequence corresponding to the policy text under the rule channel and the statistical channel to obtain the final word segmentation sequence corresponding to the policy text.

[0036] Step 204: Construct a weighted document-term frequency matrix based on the final word segmentation sequence corresponding to each policy text in the sample set.

[0037] Step 205: Divide the sample set into a training set and a test set; determine the weighted document-frequency sub-matrix corresponding to the training set and the weighted document-frequency sub-matrix corresponding to the test set based on the weighted document-frequency matrix, and input the weighted document-frequency sub-matrix corresponding to the training set into the LDA topic model to perform LDA topic modeling and obtain the current LDA topic model; wherein, the hierarchical weight coefficients of the core term lexicon and the hierarchical weight coefficients of the extended term lexicon are mapped to the Dirichlet prior hyperparameters of the topic-word distribution in the LDA topic model; the perplexity-consistency joint inflection point detection algorithm is adopted to automatically search and determine the optimal number of topics within the preset candidate topic number interval; a hybrid inference engine consisting of variational inference and Gibbs sampling is adopted.

[0038] Step 206: Based on the weighted document-term frequency sub-matrix corresponding to the test set, the current LDA topic model is dynamically optimized through multi-dimensional quantitative evaluation to determine the final LDA topic model. The final LDA topic model is used to analyze the policy text to be processed.

[0039] In another exemplary embodiment of this application, a weighted document-term frequency matrix is ​​constructed based on the final word segmentation sequence corresponding to each policy text in the sample set, specifically as follows: For any policy text in the sample set, determine the word frequency of each word in the final word segmentation sequence corresponding to the policy text.

[0040] The hierarchical weight coefficients of each core word in the final word segmentation sequence corresponding to the policy text are obtained based on the hierarchical weight coefficients of the core terminology lexicon; the core words belong to the core terminology lexicon.

[0041] The hierarchical weight coefficients of each extended word in the final word segmentation sequence corresponding to the policy text are obtained based on the hierarchical weight coefficients of the extended terminology lexicon; the extended words belong to the extended terminology lexicon.

[0042] The hierarchical weight coefficients of the remaining words in the final word segmentation sequence corresponding to the policy text are determined based on the hierarchical weight coefficients of the common words; the remaining words are the words in the final word segmentation sequence corresponding to the policy text other than the core words and extended words.

[0043] Calculate the product of the word frequency of each core word corresponding to the policy text and the hierarchical weight coefficient of the corresponding core word.

[0044] Calculate the product of the word frequency of each extended word corresponding to the policy text and the hierarchical weight coefficient of the corresponding extended word.

[0045] Calculate the product of the word frequency of each remaining word in the policy text and the hierarchical weight coefficient of the corresponding remaining word.

[0046] A weighted document-term frequency matrix is ​​constructed based on the product of each core term, the product of each extended term, and the product of each remaining term in each policy text.

[0047] In another exemplary embodiment of this application, the hierarchical weight coefficients of the core terminology lexicon and the hierarchical weight coefficients of the extended terminology lexicon are mapped to the Dirichlet prior hyperparameters of the topic-word distribution in the LDA topic model, specifically including: For any word segment in the corpus vocabulary, if the word segment belongs to the extended terminology lexicon, then the hierarchical weight coefficients of the extended terminology lexicon are mapped to the component values ​​of the Dirichlet prior hyperparameter of the topic-word distribution of the word segment through a linear transformation; the corpus vocabulary includes each word segment in the final word segmentation sequence corresponding to each policy text in the training set.

[0048] If the word segmentation belongs to the core term lexicon, then the hierarchical weight coefficients of the core term lexicon are mapped to the component values ​​of the Dirichlet prior hyperparameter of the topic-word distribution of the word segmentation through a linear transformation.

[0049] If the word segmentation does not belong to either the core term lexicon or the extended term lexicon, then the hierarchical weight coefficients of ordinary words are mapped to the component values ​​of the Dirichlet prior hyperparameters of the topic-word distribution of the word segmentation through a linear transformation.

[0050] The Dirichlet prior hyperparameters of the topic-word distribution are obtained by taking the component values ​​of the Dirichlet prior hyperparameters of the topic-word distribution of all words in the corpus vocabulary.

[0051] In another exemplary embodiment of this application, a perplexity-consistency joint inflection point detection algorithm is used to automatically search and determine the optimal number of topics within a preset range of candidate topic numbers, specifically including: Preset range for the number of candidate topics.

[0052] For any number of topics within a preset range of candidate topics, run the LDA topic model under that number of topics to obtain the corresponding perplexity curve and consistency curve.

[0053] The optimal number of topics is determined based on the perplexity curve and consistency curve corresponding to each topic number.

[0054] In another exemplary embodiment of this application, the current LDA topic model includes: the topic-word distribution of the training set and the document-topic distribution of the training set; the current LDA topic model is dynamically optimized through multi-dimensional quantitative evaluation based on the weighted document-word frequency sub-matrix corresponding to the test set to determine the final LDA topic model, specifically including: Input the weighted document-term frequency submatrix corresponding to the test set into the current LDA topic model to obtain the perplexity of the current LDA topic model on the test set.

[0055] The consistency of the current LDA topic model is obtained based on the topic-word distribution of the training set.

[0056] The topic separation degree of the current LDA topic model is obtained based on the document-topic distribution of the training set.

[0057] The perplexity, consistency, and topic separation of the current LDA topic model on the test set are normalized to obtain the normalized perplexity, normalized consistency, and normalized topic separation.

[0058] The normalized perplexity, normalized consistency, and normalized inter-topic separation are weighted and fused to obtain the comprehensive quality index.

[0059] If the overall quality index is less than the threshold, then the optimal number of topics is searched again or the hyperparameters of the current LDA topic model are adjusted until the overall quality index is greater than or equal to the threshold or the preset iteration termination condition is met, and the final LDA topic model is obtained.

[0060] If the overall quality index is greater than or equal to the threshold, then the current LDA topic model is determined to be the final LDA topic model.

[0061] In another exemplary embodiment of this application, the policy text analysis method based on LDA topic modeling further includes: A similarity matrix is ​​constructed based on the Jansen-Shannon divergence between topics in the final LDA topic model.

[0062] The t-SNE algorithm is used to reduce the similarity matrix to a two-dimensional plane to obtain the initial coordinates of each topic.

[0063] A force-directed layout engine is used to process the initial coordinates of each theme to obtain a two-dimensional topology map.

[0064] This application also provides a more specific embodiment to illustrate the above method in detail, specifically including: Step 1: Build a domain knowledge base and a compound term recognition rule engine.

[0065] Step 1.1: Constructing a Domain Knowledge Base. The computer system first constructs a domain knowledge base based on the domain corpus, using a combination of statistical and rule-based methods. This domain knowledge base consists of two parallel subsystems: a multi-layered domain lexicon and a hierarchical stop word lexicon. The multi-layered domain lexicon includes a core terminology layer (core terminology lexicon) and an extended terminology layer (extended terminology lexicon).

[0066] The process of constructing a multi-level domain thesaurus is as follows: Step 1.1.1: The computer system loads an initial corpus containing approximately 100,000 original policy texts, performs coarse-grained word segmentation on the corpus, and then calculates the document frequency and inverse document frequency of each candidate word.

[0067] Step 1.1.2: The construction of the core term layer adopts a filtering strategy combining document frequency interval constraints and TF-IDF ranking: first, candidate words with a document frequency between 20% and 80% are filtered out (to remove overly common and overly rare words), then sorted in descending order according to TF-IDF values, and the top 5% of terms, such as "cybersecurity" and "data sovereignty", are selected and stored in the core term layer.

[0068] Step 1.1.3: The computer system calculates the co-occurrence frequency of adjacent word pairs and the distribution of left and right adjacent words for each candidate word string based on the above initial corpus, and computes mutual information (MI) and left and right adjacent entropy to identify compound terms and abbreviations. Specifically: (a) For any adjacent word pair (A, B), count the individual frequency of A, the individual frequency of B, and the adjacent co-occurrence frequency of (A, B), calculate the MI value, and when the MI value is higher than a preset threshold, determine that (A, B) should be merged into a compound term, such as "Internet + government services"; (b) For abbreviations (such as "Fangguanfu"), count the set of left adjacent words and right adjacent words for each occurrence in the corpus, calculate the left adjacent entropy and right adjacent entropy respectively, and when both the left and right adjacent entropy values are higher than preset thresholds, combined with the full name mapping rule "Fangguanfu" → "streamline administration, delegate power, improve regulation, and upgrade services", store it in the extended term layer.

[0069] The hierarchical stop word library includes: a general stop word layer, a domain low-frequency noise layer, and a context-sensitive stop word layer. The general stop word layer includes "de, le, bingqie"; the domain low-frequency noise layer includes high-frequency but classification-meaningless words such as "implement", "issue".

[0070] Step 1.2: Based on the domain knowledge base, the system further establishes a set of compound term identification rule engine. The engine guides the subsequent word segmentation process by defining suffix merging rules, prefix cleaning rules, and abbreviation restoration rules, fundamentally avoiding the problem of excessive segmentation of compound terms caused by insufficient coverage of the static lexicon.

[0071] The compound term identification rule engine specifically sets the following rules: Rule A (suffix merging): If a core term (such as "data") is immediately followed by a suffix word such as "security, strategy, law", it is forcibly merged into "data security".

[0072] Rule B (prefix cleaning): If the stop word "de" is preceded by a proper noun with a length ≥ 2 (such as "cross-border data") and followed by a core term (such as "flow"), delete "de" and retain "cross-border data" and "flow" as independent semantic units.

[0073] Rule C (Abbreviation Restoration): If "数安法" is detected and its adjacency entropy in the context differs from that of "数据安全法" by less than 0.15, it shall be replaced with "数据安全法".

[0074] Step 2: Text preprocessing based on a rule-statistical dual-channel approach.

[0075] Built upon the multi-layer lexicon and rule engine constructed in Step 1, the computer system performs dual-channel parallel preprocessing on the original policy text. The first channel is the rule channel, which relies on the multi-layer lexicon and uses a bidirectional maximum matching algorithm for scanning, prioritizing the matching of vocabulary in the core term layer to ensure the integrity of domain keywords. The second channel is the statistical channel, which calculates probabilities for all possible segmentation paths of the text based on an N-gram statistical language model, performs optimal ranking, and outputs the segmentation path with the maximum probability, providing probability-optimized candidate results for subsequent dual-channel confidence voting fusion, so as to assist in resolving segmentation ambiguities and effectively covering out-of-vocabulary words. Subsequently, the system performs confidence voting fusion on the output results of the two channels, and executes stop word filtering, word form normalization, and weighted document-term matrix construction, providing high-quality numerical input for subsequent modeling.

[0076] Take the sentence "Implement the Data Security Law to safeguard the sovereign security of cross-border data." as an example.

[0077] Rule channel: Based on the above lexicon and rules, a bidirectional maximum matching algorithm is adopted (implemented by combining the Forward Maximum Matching (FMM) algorithm and the Reverse Maximum Matching (RMM) algorithm for bidirectional scanning). It prioritizes matching the core terms "数据安全法" and "主权", applies Rule B, and finally outputs the word segmentation sequence: "数据安全法", "保障", "跨境数据", "主权", "安全".

[0078] Statistical channel: Segmentation probabilities are calculated based on the Bigram model. This model may identify "贯彻落实" as a high-frequency bigram and retain it as an out-of-vocabulary word. The output sequence may be: "贯彻落实", "数据安全法", "保障", "跨境数据", "的", "主权", "安全".

[0079] Dual-channel fusion: For "implement thoroughly", no match is found in the rule channel, while it is recognized by the statistical channel, so the result of the statistical channel is adopted according to the rules. For "de", the statistical channel retains it, while the rule channel deletes it according to Rule B, so the result of the rule channel is adopted preferentially according to the rules. The final fusion results are "implement thoroughly", "Data Security Law", "guarantee", "cross-border data", "sovereignty" and "security". Then, the system calls the hierarchical stop word library to filter out "implement thoroughly".

[0080] The system constructs a weighted document-term frequency matrix, specifically: the weighted document-term frequency matrix corresponding to this sentence is generated by calculating the product of the term frequency of each word in the word segmentation sequence obtained in the above steps and the corresponding hierarchical weight coefficient. Among them, the hierarchical weight coefficient of the core term layer is 1.5, that of the extended term layer is 1.2, and that of common words is 1.0. This weighted matrix is used as the input for subsequent LDA topic modeling, in which core terms and extended terms obtain higher numerical weights.

[0081] After constructing the complete weighted document-term frequency matrix, the system randomly divides all documents (100,000 original policy texts used when constructing the domain knowledge base) into a training set and a test set according to a preset ratio (e.g., 80%:20%). Among them, the training set is used for the LDA topic modeling in the subsequent Step 3; the test set is used as a held-out set, does not participate in model training, and is dedicated to model evaluation in Step 4.

[0082] Step 3: Adaptive LDA topic modeling incorporating lexicon prior constraints.

[0083] The system obtains the weighted document-term frequency submatrix corresponding to the training set according to the weighted document-term frequency matrix generated in Step 2 as the core input; in the subsequent inflection point detection and hybrid inference process, the system only performs topic parameter iteration based on the statistical counts of the weighted document-term frequency submatrix corresponding to the training set.

[0084] The computer system inputs the weighted document-term frequency submatrix corresponding to the training set and the multi-layer lexicon constructed in Step 1 into the LDA topic model to perform adaptive topic modeling. Among them, the weighted document-term frequency submatrix corresponding to the training set is used as the observation data for the LDA topic modeling in Step 3: each row of this submatrix corresponds to a policy text in the training set, each column corresponds to a word in the corpus vocabulary V (composed of the final word segmentation sequences corresponding to each policy text in the training set obtained in Step 2), and the matrix element is the weighted term frequency count of the corresponding word in the corresponding policy text. The optimal topic number search described below and the topic parameter estimation of the hybrid inference engine both take this submatrix as the observation input, perform iterative estimation of document-topic distribution and topic-word distribution based on the weighted term frequency counts in the submatrix, and the training set participates in the entire training process of Step 3 through this submatrix.

[0085] First, the system maps the hierarchical weight coefficients of the core term layer and the extended term layer in step one to the component values ​​of the Dirichlet prior hyperparameter β of the topic-word distribution in the LDA topic model (the component value is the prior bias term applied to the corresponding word), and assembles the complete Dirichlet prior hyperparameter β from each component value.

[0086] The specific process is as follows: During model initialization, the system iterates through every word in the entire corpus vocabulary V (composed of the final word segmentation sequences corresponding to each policy text in the training set obtained in step two). Since the test set does not participate in any parameter estimation in step three, any out-of-vocabulary words that may appear in the test set are not included in the current corpus vocabulary V, nor are they included in the construction of the β prior, to ensure the independence and unbiasedness of the evaluation. For the current word w in the vocabulary, the system queries its level in the domain knowledge base constructed in step one, and determines its level weight coefficient weight_w accordingly: if w exists in the core term vocabulary, then weight_w = 1.5; if w exists in the extended term vocabulary, then weight_w = 1.2; if w does not belong to either of the above two vocabulary sets (i.e., it is a common word), then weight_w = 1.0. Subsequently, the level weight coefficient weight_w of each word is mapped to the prior bias term β_w (i.e., the component values ​​of the Dirichlet prior hyperparameter β) through a linear transformation, that is: .

[0087] The hierarchical weight coefficient weight_w of each word w is mapped to the w-th component value β_w of the Dirichlet prior hyperparameter β through a linear transformation (this component value is the prior bias term applied to that word). By traversing all words in the corpus vocabulary V, a complete asymmetric prior hyperparameter vector β=[β_1,β_2,…,β_V] is obtained. This vector β will be directly injected into the training process as the hyperparameter of the topic-word distribution Dirichlet(β) in the LDA topic model. Here, β_w is the component value (bias term) of the Dirichlet prior hyperparameter β corresponding to the topic-word w. β is the bias strength coefficient, weight_w is the hierarchical weight coefficient of word w, and β_base is the default baseline value (usually 1.0).

[0088] Therefore, when the model performs topic-word distribution sampling, the expected probability of domain terms is systematically increased, while the relative probability of ordinary words decreases accordingly (ordinary words remain unchanged). This results in domain terms obtaining a higher prior probability of generation in all topics, realizing the guiding constraint of the lexicon knowledge on topic modeling, and effectively avoiding dilution by common noise words.

[0089] Next, the system employs a perplexity-consistency joint inflection point detection algorithm to automatically search and determine the optimal number of topics K within a preset range of candidate topic numbers. This replaces manual setting. Specifically, the preset candidate topic number K is set to the range [2, 20]. For each K value, the LDA topic model is run using the weighted document-word frequency submatrix corresponding to the above training set as the observation data, and its perplexity and consistency are calculated. After plotting two curves and smoothing them, the second-order difference is calculated.

[0090] The system makes a determination based on the following three combined conditions: Condition 1 (Perplexity Inflection Point Condition): When the absolute value of the first-order difference rate of change of the perplexity curve drops below the preset threshold (5%) for the first time, it indicates that the improvement of the model's generalization ability by continuing to increase the number of topics has reached saturation.

[0091] Condition 2 (Consistency Inflection Point Condition): The second difference of the consistency curve changes from positive to negative for the first time, indicating that the semantic cohesion of word pairs within the topic has changed from continuous growth to decline, that is, consistency has reached the peak inflection point.

[0092] Condition 3 (Inflection Point Consistency Condition): The absolute value of the difference between the K value corresponding to Condition 1 and the K value corresponding to Condition 2 does not exceed the preset tolerance window (ΔK≤2), ensuring that the number of topics with the best statistical fit is basically consistent with the number of topics with the best semantic interpretation, and avoiding single index bias.

[0093] The system iterates through all K values ​​in the interval [2, 20]. Through the joint judgment mentioned above, it detects that when K=8, the absolute value of the rate of change of the first difference of the perplexity curve drops to 4.8% (less than 5%), the second difference of the consistency curve changes from positive to negative for the first time, and the K value corresponding to conditions 1 and 2 is 8 (difference 0≤2). All three conditions are met simultaneously, therefore the optimal number of topics K is automatically selected. =8.

[0094] Then, after determining K=8, the system launches a hybrid inference engine consisting of variational inference and Gibbs sampling to perform topic parameter estimation on the weighted document-word frequency submatrix corresponding to the training set: first, it runs 100 iterations of variational inference, using the weighted word frequency counts of each document in the submatrix as the observation input, alternately updating the variational parameters of the document-topic distribution and the topic-word distribution to quickly approximate the posterior distribution; then it switches to Collapsed Gibbs Sampling (CGS), using the weighted word frequency counts in the submatrix as the observation data to iterate topic attribution word by word, performing 500 fine samplings to ensure parameter convergence, and obtaining the current LDA topic model. The current LDA topic model includes: the topic-word distribution learned based on the weighted document-word frequency submatrix corresponding to the training set (i.e., the topic-word distribution of the training set), and the document-topic distribution corresponding to each policy text in the training set (i.e., the document-topic distribution of the training set); the above two types of distributions are the basis for calculating the consistency index and topic separation index in step four, multi-dimensional quantitative evaluation. This hybrid inference engine employs a sampling strategy for small counts and variational updates for large counts. This hybrid approach significantly improves perplexity performance on the test set without increasing computational cost. In recent years, the hybrid variational-Gibbs algorithm has been proven to "combine the best characteristics of both." Through adaptive switching and warm-start integration between the two stages, the hybrid inference engine balances convergence speed and estimation unbiasedness, making it particularly suitable for application scenarios such as policy texts, which have uneven count distributions, strong domain specificity, and high requirements for topic interpretability.

[0095] If a new batch of policy documents concerning "cross-border data flow" subsequently arrives, the system will activate an incremental update mechanism. Based on the previous model, it will perform a warm-start and local parameter optimization, eliminating the need for full retraining. The incremental update mechanism works as follows: When new policy texts arrive, the system first loads the topic-word distribution obtained in step three as the warm-start parameter. Then, for each new document, it uses folded Gibbs sampling (or variational inference) to infer its document-topic distribution, keeping the existing topic-word distribution unchanged when calculating the topic assignment probability. Finally, the topic assignment results for the new document are stored in the model without retraining the old documents. To adapt to domain concept drift, a slow learning rate can be set to update the topic-word distribution using a small-amplitude exponential moving average. Through this mechanism, the system integrates incremental text information with extremely low computational cost without disrupting the original topic structure.

[0096] Step 4: Evaluation of the closed-loop model with multiple coupled indicators.

[0097] The computer system performs a multi-dimensional quantitative evaluation of the LDA topic model generated in step three.

[0098] First, the system performs parallel computing on three core metrics: Perplexity: Calculated on the weighted document-term frequency submatrix corresponding to the test set reserved in step two, it measures the model's generalization prediction ability for unseen documents. After completing the topic parameter estimation on the training set, i.e., obtaining the current LDA topic model, the system inputs the weighted document-term frequency submatrix corresponding to the test set reserved in step two into the current LDA topic model. At this time, the model keeps the topic-term distribution learned in step three unchanged and does not perform any iterative updates to this distribution; it only performs single-document inference for each document in the test set using folded Gibbs sampling or variational inference to estimate the document-topic distribution of each test document. Based on the document-topic distribution of each test document and the fixed topic-term distribution, the joint likelihood probability of all terms in the test document generated by the model is calculated, and then the perplexity of the current LDA topic model on the test set is obtained. This perplexity will be one of the core indicators of the multi-dimensional quantitative evaluation in step four, used to measure the model's generalization prediction ability for "unseen" policy texts that were not involved in the training. The above inference process only involves the calculation of the topic distribution of the test documents, without updating the topic-word distribution throughout the process, thus providing a quantitative basis for the evaluation in step four.

[0099] Consistency: The topic-word distribution of the training set obtained in step three is calculated to measure the semantic cohesion, i.e., interpretability, of word pairs within a topic.

[0100] Topic Separation: Calculated based on the document-topic distribution of the training set obtained in step three, it measures the average Jensen-Shannon divergence (JS divergence) between different topics, i.e., discriminability.

[0101] Specifically, the perplexity of the current model is calculated on the weighted document-word frequency submatrix corresponding to the test set reserved in step two; the consistency of the topic-word distribution is calculated based on the training set obtained in step three; and the average JS divergence between topics is calculated based on the document-topic distribution of the training set obtained in step three, that is, the average JS divergence between each pair of the eight topics is taken.

[0102] Subsequently, the system weights and fuses the three normalized indicators to construct a Comprehensive Quality Index (CQI). The system compares this CQI with a preset dynamic threshold: if the CQI is below the threshold, the system automatically generates a feedback signal and sends it back to step three, triggering adaptive topic modeling and re-searching for K. Alternatively, the model hyperparameters can be adjusted to form a closed-loop iteration of "evaluation-feedback-optimization" until the model quality meets the requirements or reaches the preset iteration termination condition. Specifically, through Min-Max normalization (based on historical best and worst values), the normalized perplexity P_norm=0.8, the normalized consistency C_norm=0.7, and the normalized topic separation D_norm=0.6 are obtained. Using a weight configuration that emphasizes interpretability (w1=0.30, w2=0.50, w3=0.20), the CQI is calculated to be 0.3. 0.8 + 0.5 0.7 + 0.2 0.6 = 0.24 + 0.35 + 0.12 = 0.71. This value is higher than the preset dynamic threshold CQI_th = 0.70, the model evaluation passes, and no feedback optimization is needed. If the CQI is lower than 0.70, the system will automatically send an instruction to step three, around K (e.g., K±1 or K). ±2) Re-search for the optimal number of topics and re-execute the topic modeling and β-bias mapping in step three until the model evaluation passes or the preset iteration termination condition is met.

[0103] Step 5: Multidimensional semantic topology visualization based on force-directed layout.

[0104] The computer system visualizes the final LDA topic model determined in step four (i.e., the LDA topic model confirmed through multi-dimensional quantitative evaluation and dynamic optimization) and the evaluation results generated in step four.

[0105] First, a similarity matrix is ​​constructed based on the Jansen-Shannon divergence between topics in the final LDA topic model, and then mapped to a two-dimensional semantic space using a dimensionality reduction algorithm. Specifically, based on the document-topic distribution of the training set corresponding to the final LDA topic model (this distribution is obtained by training on the training set in step three, i.e., the distribution used to calculate the average JS divergence between topics in step four), the JS divergence between each pair of topics is calculated: for any two topics, the proportion of these two topics in each policy text of the training set is normalized to the corresponding probability distribution, and the JS divergence between the two probability distributions is calculated; thus, a total of 28 topic pairs' JS divergence values ​​are obtained, forming an 8×8 similarity matrix. The element in the i-th row and j-th column of the matrix is ​​the JS divergence value between the i-th topic and the j-th topic. The average JS divergence D between topics in step four is the average of the JS divergence values ​​of all 28 topic pairs in this matrix; here, instead of taking the average, the JS divergence value of each topic pair is retained to characterize the pairwise differences between topics. Using t-SNE, this matrix is ​​reduced to a two-dimensional plane to obtain the initial coordinates of each subject.

[0106] Next, the system applies a force-directed layout engine to simulate the attraction and repulsion forces of the physical world in this two-dimensional space. This causes semantically similar topics to move closer together and dissimilar topics to move away from each other, ultimately forming a stable topology graph. On this topology graph, the system enhances the visualization of each topic using a multi-dimensional encoded bubble diagram: the horizontal and vertical coordinates of the bubbles are determined by their semantic spatial location; the bubble area encodes the topic strength; the bubble color depth encodes the topic consistency score; and the bubble transparency encodes its confusion contribution. This integrates and displays the semantic relationships, influence, and intrinsic quality of topics in the same view. Specifically, the force-directed layout engine begins iterating: a maximum of 500 iterations are set, with an initial temperature T=0.5. Attraction is generated between similar topics, and repulsion is generated between dissimilar topics. After approximately 300 iterations, the average node displacement change is less than 1e-4, and the layout converges. Finally, the system renders a two-dimensional topology graph containing 8 bubbles. For example, the "Data Security" topic bubble has a larger area (high topic strength), a darker blue color (high consistency score), and is located close to the "Data Governance" topic bubble (semantic distance is short). Users can click on any bubble to trigger the system to retrieve and display a list of high-frequency words under that topic; users can verify or correct the words in the list, and the correction results are fed back to the domain knowledge base in step one, realizing dynamic updates of the word base and closed-loop optimization of human-computer collaboration.

[0107] This application includes: constructing a multi-layered domain lexicon and composite term recognition rules, comprising a core term layer, an extended term layer, and a hierarchical stop word lexicon; performing accurate word segmentation and weighted representation of policy texts through a dual-channel preprocessing mechanism that integrates rule matching and statistical language models; further, injecting prior knowledge from the lexicon as a bias term into the LDA topic model, and adaptively determining the optimal number of topics through perplexity-consistency joint inflection point detection, and employing a hybrid inference engine for topic modeling; establishing a three-dimensional Comprehensive Quality Index (CQI) comprising perplexity, consistency, and topic separation, and automatically optimizing model parameters based on CQI closed-loop feedback; finally, generating an interactive topic topology visualization view that integrates multi-dimensional semantic information based on force-directed layout. This application systematically solves the technical problems of inaccurate term recognition, reliance on manual model parameters, single evaluation dimensions, and low visualization information density in policy text analysis.

[0108] This application has the following technical effects: 1. Regarding the accuracy of domain terminology recognition, through the multi-layered lexicon and compound word rules in step one and the prior injection in step three, the system can automatically identify and protect the boundaries of compound words using statistical quantities such as mutual information, and enhance the weight of domain words in topic generation through prior β bias. This dual guarantee from both word segmentation and modeling stages effectively avoids diluting the semantics of topics with common noise words.

[0109] 2. Regarding the robustness of text preprocessing, the rule-statistical dual-channel plus confidence voting mechanism in step two enables the rule channel to use expert knowledge to ensure that known terms are not broken down, while the statistical channel uses a probability model to handle out-of-vocabulary words and segmentation ambiguities. The fusion of the two takes into account both matching accuracy and recall coverage, significantly improving the system's adaptability to multi-sample and heterogeneous texts.

[0110] 3. In terms of the degree of automation in modeling, the adaptive K-search and hybrid inference in step three and the closed-loop feedback in step four enable the joint inflection point detection algorithm to automatically replace manual trial and error in setting the K value, the hybrid inference engine to automatically switch optimization strategies according to the modeling stage, and the CQI closed-loop feedback mechanism to automatically replace manual repeated parameter tuning, thereby realizing dynamic optimization of model quality and significantly reducing the cost of manual intervention.

[0111] 4. Regarding the model's sustainable evolution capability, the online LDA incremental update in step three adopts a hot start and local parameter update strategy. When new policy texts (such as newly released laws and regulations) arrive, the system only needs to update the local parameters related to the new document, avoiding the huge computational overhead and catastrophic forgetting of historical knowledge caused by retraining with full data.

[0112] 5. In terms of comprehensive evaluation dimensions, the three-dimensional comprehensive quality index of confusion degree, consistency and topic separation degree constructed in step four evaluates the model quality from three orthogonal dimensions: predictive generalization ability, topic semantic cohesion and topic independence. This overcomes the bias of a single indicator and provides a more reliable decision basis for closed-loop optimization.

[0113] 6. Current visualizations are often static and superficial. Existing visualization methods such as bubble charts are mostly static two-dimensional displays, encoding only limited information such as position and size. They cannot intuitively reflect multi-dimensional information such as topic quality and semantic distance, and lack interactive analysis capabilities. In terms of visualization information density and interactivity, this application's force-oriented layout in step five intuitively transforms semantic distance into spatial distance. The multi-dimensional encoded bubble chart simultaneously carries four types of information—semantic position, topic strength, topic consistency, and confusion contribution—in the same view, significantly improving single-screen information density and analytical insight efficiency.

[0114] Based on the same inventive concept, this application also provides an LDA-based policy text analysis device for implementing the LDA-based policy text analysis method described above. The solution provided by this device is similar to the implementation described in the above method. Therefore, the specific limitations of one or more LDA-based policy text analysis device embodiments provided below can be found in the limitations of the LDA-based policy text analysis method described above, and will not be repeated here.

[0115] In one exemplary embodiment, such as Figure 2 As shown, a policy text analysis device based on LDA topic model is provided, comprising: The module is used to build a domain knowledge base and a compound term recognition rule engine; the domain knowledge base includes a core term lexicon, an extended term lexicon, and a stop word lexicon built based on a sample set; the sample set includes multiple policy texts.

[0116] The word segmentation module is used to simultaneously segment each policy text in the sample set using both rule-based and statistical channels based on a domain knowledge base and a compound term recognition rule engine, obtaining the word segmentation sequences corresponding to each policy text in the sample set under the rule-based and statistical channels. The rule-based channel segments each policy text in the sample set using a bidirectional maximum matching algorithm; the statistical channel segments each policy text in the sample set using an N-gram statistical language model. For any policy text in the sample set, the word segmentation sequences corresponding to the policy text under the rule-based and statistical channels are fused using confidence voting and stopped word filtering to obtain the final word segmentation sequence corresponding to the policy text.

[0117] The weighted document-term frequency matrix construction module is used to construct a weighted document-term frequency matrix based on the final word segmentation sequence corresponding to each policy text in the sample set.

[0118] The LDA topic modeling module is used to divide the sample set into a training set and a test set. Based on the weighted document-to-word frequency (VoF) matrix, it determines the weighted VoF sub-matrix corresponding to the training set and the test set. The VoF sub-matrix corresponding to the training set is then input into the LDA topic model for LDA topic modeling, resulting in the current LDA topic model. Specifically, the hierarchical weight coefficients of the core terminology lexicon and the extended terminology lexicon are mapped to Dirichlet prior hyperparameters of the topic-word distribution in the LDA topic model. A perplexity-consistency joint inflection point detection algorithm is used to automatically search and determine the optimal number of topics within a preset candidate topic number range. A hybrid inference engine consisting of variational inference and Gibbs sampling is employed.

[0119] The dynamic optimization module is used to dynamically optimize the current LDA topic model through multi-dimensional quantitative evaluation based on the weighted document-term frequency sub-matrix corresponding to the test set, and determine the final LDA topic model. The final LDA topic model is used to analyze the policy text to be processed.

[0120] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 3As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs in the non-volatile storage media to run. The database stores policy text analysis data based on the LDA topic model. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a policy text analysis method based on the LDA topic model.

[0121] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0122] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method embodiments.

[0123] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the above-described method embodiments.

[0124] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described method embodiments.

[0125] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0126] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0127] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, etc., and are not limited to these.

[0128] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0129] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A policy text analysis method based on LDA topic model, characterized in that, The policy text analysis method based on LDA topic model includes: Construct a domain knowledge base and a compound terminology recognition rule engine; the domain knowledge base includes a core terminology lexicon, an extended terminology lexicon, and a stop word lexicon built based on a sample set; the sample set includes: multiple policy texts; Based on a domain knowledge base and a compound terminology recognition rule engine, the policy texts in the sample set are segmented simultaneously using both rule-based and statistical channels to obtain the segmented word sequences corresponding to each policy text in the sample set under the rule-based and statistical channels. The rule-based channel uses a bidirectional maximum matching algorithm to segment each policy text in the sample set; the statistical channel uses an N-gram statistical language model to segment each policy text in the sample set. For any policy text in the sample set, the word segmentation sequence corresponding to the policy text under the rule channel and the statistical channel is fused with confidence vote and filtered with stop words to obtain the final word segmentation sequence corresponding to the policy text. A weighted document-term frequency matrix is ​​constructed based on the final word segmentation sequence corresponding to each policy text in the sample set. The sample set is divided into a training set and a test set; The weighted document-to-word frequency (VoF) sub-matrices for the training and test sets are determined based on the weighted document-to-word frequency (VoF) matrix. These VoF sub-matrices are then input into the LDA topic model for LDA topic modeling, resulting in the current LDA topic model. Specifically, the hierarchical weight coefficients of the core terminology lexicon and the extended terminology lexicon are mapped to Dirichlet prior hyperparameters of the topic-word distribution in the LDA topic model. A perplexity-consistency joint inflection point detection algorithm is employed to automatically search and determine the optimal number of topics within a preset candidate topic number range. A hybrid inference engine consisting of variational inference and Gibbs sampling is used. Based on the weighted document-term frequency submatrix corresponding to the test set, the current LDA topic model is dynamically optimized through multi-dimensional quantitative evaluation to determine the final LDA topic model. The final LDA topic model is used to analyze the policy text to be processed.

2. The policy text analysis method based on LDA topic model according to claim 1, characterized in that, A weighted document-term frequency matrix is ​​constructed based on the final word segmentation sequence corresponding to each policy text in the sample set, specifically as follows: For any policy text in the sample set, determine the word frequency of each word in the final word segmentation sequence corresponding to the policy text; The hierarchical weight coefficients of each core word in the final word segmentation sequence corresponding to the policy text are obtained based on the hierarchical weight coefficients of the core terminology lexicon; the core words belong to the core terminology lexicon. The hierarchical weight coefficients of each extended word in the final word segmentation sequence corresponding to the policy text are obtained based on the hierarchical weight coefficients of the extended terminology lexicon; the extended words belong to the extended terminology lexicon. The hierarchical weight coefficients of each remaining word in the final word segmentation sequence corresponding to the policy text are determined based on the hierarchical weight coefficients of ordinary words; the remaining words are all words in the final word segmentation sequence corresponding to the policy text other than the core words and extended words. Calculate the product of the word frequency of each core word corresponding to the policy text and the hierarchical weight coefficient of the corresponding core word; Calculate the product of the word frequency of each extended word corresponding to the policy text and the hierarchical weight coefficient of the corresponding extended word; Calculate the product of the word frequency of each remaining word in the policy text and the hierarchical weight coefficient of the corresponding remaining word; A weighted document-term frequency matrix is ​​constructed based on the product of each core term, the product of each extended term, and the product of each remaining term in each policy text.

3. The policy text analysis method based on LDA topic model according to claim 1, characterized in that, The hierarchical weight coefficients of the core terminology lexicon and the extended terminology lexicon are mapped to Dirichlet prior hyperparameters of the topic-word distribution in the LDA topic model, specifically including: For any word segment in the corpus vocabulary, if the word segment belongs to the extended terminology lexicon, then the hierarchical weight coefficients of the extended terminology lexicon are mapped to the component values ​​of the Dirichlet prior hyperparameter of the topic-word distribution of the word segment through a linear transformation; the corpus vocabulary includes each word segment in the final word segmentation sequence corresponding to each policy text in the training set; If the word segmentation belongs to the core term lexicon, then the hierarchical weight coefficients of the core term lexicon are mapped to the component values ​​of the Dirichlet prior hyperparameter of the topic-word distribution of the word segmentation through linear transformation. If the word segmentation does not belong to either the core term lexicon or the extended term lexicon, then the hierarchical weight coefficients of ordinary words are mapped to the component values ​​of the Dirichlet prior hyperparameter of the topic-word distribution of the word segmentation through a linear transformation. The Dirichlet prior hyperparameters of the topic-word distribution are obtained by taking the component values ​​of the Dirichlet prior hyperparameters of the topic-word distribution of all words in the corpus vocabulary.

4. The policy text analysis method based on LDA topic model according to claim 1, characterized in that, A perplexity-consistency joint inflection point detection algorithm is employed to automatically search and determine the optimal number of topics within a preset range of candidate topic numbers. Specifically, this includes: Preset range for the number of candidate topics; For any number of topics within a preset range of candidate topics, run the LDA topic model under that number of topics to obtain the corresponding perplexity curve and consistency curve; The optimal number of topics is determined based on the perplexity curve and consistency curve corresponding to each topic number.

5. The policy text analysis method based on LDA topic model according to claim 1, characterized in that, The current LDA topic model includes: the topic-word distribution and the document-topic distribution of the training set; based on the weighted document-word frequency sub-matrix corresponding to the test set, the current LDA topic model is dynamically optimized through multi-dimensional quantitative evaluation to determine the final LDA topic model, specifically including: Input the weighted document-term frequency submatrix corresponding to the test set into the current LDA topic model to obtain the perplexity of the current LDA topic model on the test set; The consistency of the current LDA topic model is obtained based on the topic-word distribution of the training set; The topic separation degree of the current LDA topic model is obtained based on the document-topic distribution of the training set; The perplexity, consistency, and topic separation of the current LDA topic model on the test set are normalized to obtain the normalized perplexity, normalized consistency, and normalized topic separation. The normalized perplexity, normalized consistency, and normalized inter-topic separation are weighted and fused to obtain the comprehensive quality index. If the overall quality index is less than the threshold, then the optimal number of topics is searched again or the hyperparameters of the current LDA topic model are adjusted until the overall quality index is greater than or equal to the threshold or the preset iteration termination condition is met, and the final LDA topic model is obtained. If the overall quality index is greater than or equal to the threshold, then the current LDA topic model is determined to be the final LDA topic model.

6. The policy text analysis method based on LDA topic model according to claim 1, characterized in that, The policy text analysis method based on LDA topic model also includes: Construct a similarity matrix based on the Jansen-Shannon divergence between topics in the final LDA topic model; The t-SNE algorithm is used to reduce the similarity matrix to a two-dimensional plane to obtain the initial coordinates of each topic; A force-directed layout engine is used to process the initial coordinates of each theme to obtain a two-dimensional topology map.

7. A policy text analysis device based on LDA topic model, characterized in that, The policy text analysis device based on LDA topic model includes: The building module is used to construct a domain knowledge base and a compound term recognition rule engine; the domain knowledge base includes a core term lexicon, an extended term lexicon, and a stop word lexicon built based on a sample set; the sample set includes multiple policy texts; The word segmentation module is used to simultaneously segment each policy text in the sample set using both rule-based and statistical channels, based on a domain knowledge base and a composite terminology recognition rule engine. This yields the word segmentation sequences corresponding to each policy text in the sample set under both rule-based and statistical channels. The rule-based channel segments each policy text in the sample set using a bidirectional maximum matching algorithm. The statistical channel segments each policy text in the sample set using an N-gram statistical language model. For any policy text in the sample set, the word segmentation sequences corresponding to the policy text under both rule-based and statistical channels are fused using confidence voting and stopped word filtering to obtain the final word segmentation sequence corresponding to the policy text. The weighted document-term frequency matrix construction module is used to construct a weighted document-term frequency matrix based on the final word segmentation sequence corresponding to each policy text in the sample set. The LDA topic modeling module is used to divide the sample set into a training set and a test set. Based on the weighted document-to-word frequency (VoF) matrix, it determines the weighted VoF sub-matrix corresponding to the training set and the test set. The VoF sub-matrix corresponding to the training set is then input into the LDA topic model for LDA topic modeling, resulting in the current LDA topic model. Specifically, the hierarchical weight coefficients of the core terminology lexicon and the extended terminology lexicon are mapped to Dirichlet prior hyperparameters of the topic-word distribution in the LDA topic model. A perplexity-consistency joint inflection point detection algorithm is used to automatically search and determine the optimal number of topics within a preset candidate topic number range. A hybrid inference engine consisting of variational inference and Gibbs sampling is employed. The dynamic optimization module is used to dynamically optimize the current LDA topic model through multi-dimensional quantitative evaluation based on the weighted document-term frequency sub-matrix corresponding to the test set, and determine the final LDA topic model. The final LDA topic model is used to analyze the policy text to be processed.

8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the policy text analysis method based on the LDA topic model as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the policy text analysis method based on the LDA topic model as described in any one of claims 1-6.

10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the policy text analysis method based on the LDA topic model as described in any one of claims 1-6.