Mining and analysis method and system for government public data

Through the processing of text vector coding, semantic embedded and characteristics of the government affairs public text, the problem of incomplete semantic semantic semantic semantics of government affairs was solved, and more accurate semantic information mining and government decision -making support was achieved.

CN119025626BActive Publication Date: 2025-01-28贵州华谊联盛科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411505594.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-01-28
Estimated Expiration
2044-10-28

AI Technical Summary

Technical Problem

Traditional data mining and analysis methods are difficult to effectively solve the semantic incompleteness in government public texts, affecting the accuracy and effectiveness of government decision-making, management and service optimization.

Method used

Putting a method of mining and analysis of public data for government affairs, the steps such as text vector coding, semantic embedding decomposition, characteristic merger, and feature extraction are enhanced to enhance the semantic integrity of public text of government affairs.

Benefits of technology

Through this method, we can more accurately excavate the complete semantic information in the public text of government affairs, and improve the scientific nature of government decision -making and the optimization effect of government services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025626B_ABST
    Figure CN119025626B_ABST
Patent Text Reader

Abstract

The present application provides a mining and analysis method and system for government public data. When performing text mining analysis on a first government public text, the first text encoding vector of the first government public text is decomposed from a semantic perspective to obtain a main semantic component vector and a secondary semantic component vector, and then merged based on weights to obtain a second text encoding vector. The weight is obtained by debugging the training government public text, and can focus on the main semantic features in the government public text. The feature extractor is also debugged in combination with the training government public text, and can fill in the feature differences between the government public text with missing semantics and the government text with complete semantics. It can restore the more important feature differences between the first government public text and the government text with complete semantics, so as to obtain a second government public text covering more complete semantic information, so that the accuracy of the semantic completion of the government public text is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of text processing, and in particular to a method and system for mining and analyzing government public data. Background Art

[0002] With the rapid development of information technology, the process of government digitalization is accelerating, and government public data is showing an explosive growth trend. Government public data contains rich information resources. Effective mining and analysis of these data is of vital importance to improving the scientific nature of government decision-making, optimizing government services, and improving the level of social governance.

[0003] In government public data, government public text is an important data form. Incomplete semantic government public text will bring many difficulties to data mining and analysis, affecting the accuracy and effectiveness of decision-making, management and service optimization based on these data. For example, when conducting policy analysis, if the semantics of the government public text is incomplete, it may lead to misunderstanding of the policy intention, thus affecting the correct implementation and adjustment of the policy; in terms of public service optimization, incomplete semantic information may lead to deviations in the judgment of public needs and fail to provide accurate and effective services.

[0004] Traditional data mining and analysis methods are difficult to effectively solve the problem of incomplete semantics when processing government public texts. Some conventional text processing methods focus on general text feature extraction and analysis, and are not optimized for the particularity of government public texts. There is a lack of effective solution mechanisms for the semantic missing problem in government public texts, which makes it impossible to accurately mine the complete semantic information in government public texts, and it is difficult to meet the accuracy and effectiveness requirements of government work for data mining and analysis. Summary of the invention

[0005] In view of this, the present application provides a method and system for mining and analyzing government public data.

[0006] The technical solution of this application is implemented as follows:

[0007] On the one hand, an embodiment of the present application provides a mining and analysis method for government public data, the method comprising: performing text vector encoding on a first government public text to obtain a first text encoding vector; performing semantic embedding decomposition on the first text encoding vector to obtain a first main semantic component vector and a first secondary semantic component vector; merging the first main semantic component vector and the first secondary semantic component vector based on a main eccentricity adjustment coefficient and a secondary eccentricity adjustment coefficient to obtain a second text encoding vector, wherein the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient are obtained by debugging a semantically missing government training text and a corresponding semantically complete government training text; calling a first feature extractor to perform feature extraction on the second text encoding vector to obtain an error feature representation, wherein the error feature representation is used to characterize the feature difference between the first government public text and the corresponding semantically complete government text, wherein the first feature extractor is obtained by debugging a semantically missing government training text and a semantically complete government training text; merging the first government public text with the error feature representation to obtain a second government public text, wherein the semantic completeness of the second government public text is greater than that of the first government public text.

[0008] On the other hand, an embodiment of the present application provides a computer system, including a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and the processor implements the steps in the above method when executing the program.

[0009] The beneficial effects of the present application include: in the embodiment of the present application, when performing text mining analysis on the first government affairs public text, the first text encoding vector of the first government affairs public text is decomposed from a semantic perspective to obtain a main semantic component vector and a secondary semantic component vector, and the main semantic component vector and the secondary semantic component vector are merged in combination with the eccentricity parameter to obtain a second text encoding vector, because the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient are obtained by debugging by calling the training government affairs public text, so that the main semantic features in the government affairs public text can be focused. The feature extractor is also debugged in combination with the training government affairs public text, and the feature extractor can fill in the feature differences between the government affairs public text with missing semantics and the semantically complete government affairs text, and the feature extractor is called to extract features from the second text encoding vector, which can restore the more important feature differences between the first government affairs public text and the semantically complete government affairs text, so as to obtain a second government affairs public text covering more complete semantic information, so that the accuracy of the semantic completion of the government affairs public text is higher. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 A schematic diagram of the implementation process of a method for mining and analyzing government public data provided in an embodiment of the present application.

[0011] Figure 2 A hardware entity schematic diagram of a computer system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0012] The embodiment of the present application provides a method for mining and analyzing government public data, which can be executed by a processor of a computer system, wherein the computer system can refer to a device with data processing capabilities such as a server, a laptop, a tablet computer, a desktop computer, a mobile device, etc.

[0013] Figure 1 A schematic diagram of the implementation process of a method for mining and analyzing government public data provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes:

[0014] Step S110: Perform text vector encoding on the first government public text to obtain a first text encoding vector.

[0015] In the field of government public data mining and analysis, government public texts contain a variety of rich information, such as policy and regulatory provisions, government reports, public service information, etc. These texts exist in the form of natural language, and it is difficult for computer systems to directly process and analyze natural language texts efficiently, so they need to be converted into vector form. Text vector encoding is a technical means of mapping words, phrases, or the entire text in a text to a low-dimensional vector space. When the computer system performs this operation, it first determines the appropriate encoding method. Feasible encoding methods include Bag-of-Words (BoW), TF-IDF (Term Frequency-Inverse Document Frequency), etc.

[0016] Taking the bag-of-words model as an example, suppose that the first government public text is a policy document on urban environmental governance, which contains words such as "environmental monitoring", "pollution control", and "air quality". The bag-of-words model will ignore the order of these words in the text and only count the number of times each word appears. For example, "environmental monitoring" appears 3 times, "pollution control" appears 5 times, "air quality" appears 2 times, and so on. Then these words and their word frequency information are converted into a vector. Assuming that a vocabulary is set in advance, which contains N different words, for this policy document, an N-dimensional vector can be constructed. Each element in the vector corresponds to a word in the vocabulary. If a word in the vocabulary appears in the policy document, the value of the corresponding vector element is the word frequency of the word; if it does not appear, it is 0. This results in a text vector encoding based on the bag-of-words model, which is a possible form of the first text encoding vector.

[0017] TF-IDF is another text vector encoding method. It not only considers the term frequency (TF) of a word in a single text, but also the rarity (IDF) of the word in the entire document collection. Its calculation formula is: TF-IDF (t, d) = TF (t, d) × IDF (t), where t represents a certain word and d represents a certain document (here, the first government public text). TF (t, d) is calculated by dividing the number of occurrences of word t in document d by the total number of words in document d; IDF (t) is calculated by log (total number of documents in the document collection / number of documents containing word t). Through such calculations, each word gets a TF-IDF value, and a vector can also be constructed to represent the first government public text. This vector is also a form of the first text encoding vector.

[0018] In addition to the above traditional methods, deep learning-based encoding methods can also be used, such as pre-trained models such as Word2Vec and GloVe. These models learn the semantic information of words by pre-training on a large-scale corpus, and then convert the words in the first government public text into vector representations in the pre-trained model. Taking Word2Vec as an example, it has two architectures, namely CBOW (Continuous Bag-of-Words) and Skip-Gram. In the CBOW architecture, the computer system predicts a word based on the words around it; in the Skip-Gram architecture, it predicts the words around it based on a word. In this way, the words are mapped to a low-dimensional vector space, and words with semantic similarity are closer in the vector space. For each word in the first government public text, the corresponding vector can be obtained through the Word2Vec model, and then these word vectors can be combined into a vector representing the entire text through some combination methods (such as average pooling, weighted average, etc.), which is also the first text encoding vector.

[0019] Regardless of the encoding method, the computer system converts the first government public text into a mathematically processable vector form, namely the first text encoding vector, by executing these technical means. This vector contains the vocabulary information in the first government public text and is organized in a specific way, providing a basis for subsequent operations such as semantic embedding and decomposition. Such text vector encoding helps the computer system better understand and analyze the semantic information in the government public text, thereby realizing the mining and analysis tasks of government public data.

[0020] Step S120: performing semantic embedding decomposition on the first text encoding vector to obtain a first main semantic component vector and a first secondary semantic component vector.

[0021] Step S120 requires the computer system to perform semantic embedding decomposition on the first text encoding vector, thereby obtaining a first main semantic component vector and a first secondary semantic component vector.

[0022] In the embodiment of the present application, semantic embedding decomposition is an operation that deeply mines the semantic information of a text vector. When the computer system obtains the first text encoding vector, although this vector has converted the government public text into a vector form that is easy to calculate, the semantic information therein is still complex and mixed. The purpose of semantic embedding decomposition is to decompose this mixed semantic information into different components according to its importance or semantic role.

[0023] Word embedding is a technology that maps words to a low-dimensional vector space, in which the semantic relationship between words can be reflected through geometric relationships such as the distance and direction between vectors. For example, in government public texts, the two words "urban planning" and "urban construction" are semantically similar. After mapping them to the vector space through word embedding technology, the distance between their corresponding vectors in the space will be relatively close. When the entire first text encoding vector is semantically embedded, the computer system attempts to decompose the semantic information in the vector based on similar semantic relationship principles.

[0024] One technical approach is principal component analysis (PCA). For the first text encoding vector, assume that this vector is an n-dimensional vector. The goal of PCA is to find a set of new orthogonal bases so that under this set of bases, the variance of the data can be retained to the greatest extent in the directions corresponding to a few basis vectors. Specifically, the computer system first calculates the covariance matrix of the first text encoding vector. Suppose the first text encoding vector is , the covariance matrix , where m is the number of samples (here it can be regarded as a certain number of samples related to government public texts, such as the number of relevant samples selected from a large-scale government text corpus), is the mean vector of vector X. Then, the computer system calculates the eigenvalues ​​and eigenvectors of the covariance matrix C. The eigenvalues ​​are sorted from large to small, and the corresponding eigenvectors form a new orthogonal basis.

[0025] Through PCA, the computer system can decompose the first text encoding vector into different components. The components represented by the eigenvectors corresponding to larger eigenvalues ​​can be regarded as the main semantic component vectors, because they account for a larger proportion of the variance explanation of the vector, which means that these components contain more important semantic information in the text. For example, in a government public text on education policy, after the first text encoding vector is decomposed by PCA, if one of the main semantic component vectors may be related to "education resource allocation", because this aspect is a core theme in the entire education policy text, it is reflected in the vector representation as a part that contributes more to the vector variance. The components represented by the eigenvectors corresponding to smaller eigenvalues ​​can be regarded as secondary semantic component vectors. Although they also contain semantic information, their contribution to the overall semantics is relatively small, and they may involve some auxiliary semantic content, such as some minor provisions on the management process of educational institutions in the education policy text.

[0026] Another technical approach can be based on singular value decomposition (SVD). For the first text encoding vector A (assuming A is a vector representation in the form of an m×n matrix), SVD decomposes it into , where U is an m×m orthogonal matrix, is an m×n diagonal matrix whose diagonal elements are singular values, and V is an n×n orthogonal matrix. The size of the singular value reflects the importance of the corresponding component. The computer system can divide the decomposed components into primary semantic components and secondary semantic components according to the size of the singular value. For example, in the first text encoding vector decomposition of a government public text on medical and health policies, the components corresponding to the larger singular values ​​may be related to the main semantics such as "medical resource allocation" and "disease prevention and control system", thus forming the main semantic component vector; while the components corresponding to the smaller singular values ​​may be related to some secondary semantics such as specific medical equipment management details, forming a secondary semantic component vector.

[0027] Semantic embedding decomposition helps the computer system understand the semantic structure in the first text encoding vector in more detail. By decomposing it into the first main semantic component vector and the first secondary semantic component vector, the computer system can carry out targeted processing of semantic components of different importance in subsequent steps, which is of great significance for accurately mining semantic information in government public texts and improving the accuracy and effectiveness of government public data mining and analysis. For example, in government work scenarios such as policy formulation and implementation effect evaluation, accurately separating the main and secondary semantic components can better grasp the core points and auxiliary information of the policy, and provide more accurate data support for relevant decisions.

[0028] Step S130: Based on the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient, the first main semantic component vector and the first secondary semantic component vector are merged to obtain a second text encoding vector. The main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient are obtained by debugging the semantically missing government affairs training text and the corresponding semantically complete government affairs training text.

[0029] Step S130 mainly involves the operation of the computer system merging the first main semantic component vector and the first secondary semantic component vector to obtain a second text encoding vector based on the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient.

[0030] In the government public data mining analysis, the first main semantic component vector and the first secondary semantic component vector represent different semantic parts decomposed from the first text encoding vector. The main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient are two key parameters, which are obtained by debugging the computer system with semantically missing government training texts and corresponding semantically complete government training texts.

[0031] Semantically missing government training texts refer to government-related text samples that are partially missing or incomplete in semantic expression. For example, a government training text on urban traffic planning may lack important semantic content such as traffic flow analysis in a specific area. Semantically complete government training texts are government-related text samples that have complete semantic expression and cover all the key information they should have, such as a text that comprehensively explains urban traffic planning, including all key elements such as traffic flow analysis, road planning, and public transportation facility layout.

[0032] The computer system determines the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient by analyzing and learning a large number of semantically missing government training texts and semantically complete government training texts. This process may involve a variety of technical means, such as regression analysis. Assume that the semantic completeness is set as the dependent variable Y, some features in the first main semantic component vector are set as the independent variable X1, and some features in the first secondary semantic component vector are set as the independent variable X2. In a simple linear regression model, the regression equation can be expressed as Y=β0+β1X1+β2X2+ε, where β1 and β2 can be regarded as the prototypes of the adjustment coefficients related to the main semantic component vector and the secondary semantic component vector, respectively (this is just an analogy for ease of understanding, and the actual situation may be more complicated). By performing regression analysis on a large number of training text samples, the computer system can determine the appropriate coefficient values, and obtain the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient after adjustment and optimization.

[0033] After obtaining these two coefficients, the computer system merges the first main semantic component vector and the first secondary semantic component vector. For example, let the first main semantic component vector be V1=[v11, v12,…, v1n], the dimension of the first main semantic component vector be n, and the main eccentricity adjustment coefficient be α; let the first secondary semantic component vector be V2=[v21, v22,…, v2n], and the secondary eccentricity adjustment coefficient be β. The computer system merges these two vectors in a weighted summation manner to obtain the second text encoding vector V. The specific calculation method can be V=α*V1+β*V2=[α*v11+β*v21, α*v12+β*v22,…, α*v1n+β*v2n].

[0034] In this merging method, the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient can adjust the weights of the main semantic components and the secondary semantic components in the merging process according to the semantic information learned from the training text. Taking the analysis of environmental protection policies in government public texts as an example, if the description of pollution control measures (corresponding to the main semantic components) accounts for a large proportion in the semantically complete environmental protection policy text, and the description of related environmental protection equipment maintenance (corresponding to the secondary semantic components) accounts for a small proportion, then in the merging process, the main eccentricity adjustment coefficient may be large, and the secondary eccentricity adjustment coefficient may be small. In this way, when calculating the second text encoding vector, the semantic information related to pollution control measures will occupy a more important position in the merged vector, thereby better reflecting the semantic structure of the semantically complete environmental protection policy text.

[0035] This merging operation based on the eccentricity adjustment coefficient helps the computer system to more accurately integrate the semantic components decomposed from the first text encoding vector, thereby obtaining a second text encoding vector that can better reflect the semantic information of the government public text. This provides a more suitable basis for subsequent operations such as feature extraction, and helps to improve the accuracy and effectiveness of the entire government public data mining analysis.

[0036] In addition, in the process of determining the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient, the computer system may also use other technical means, such as the back propagation algorithm in the neural network. Assume that a simple neural network model is constructed, the input layer is the processed feature representation of the semantically missing government training text and the corresponding semantically complete government training text, the hidden layer is used to learn the relationship between the two, and the output layer is the predicted value of the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient. During the training process, according to the error between the output value and the actual expected value (which can be determined by manual annotation or based on some prior knowledge), the weight of the neural network is adjusted through the back propagation algorithm, and the model is continuously optimized until the appropriate main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient are obtained.

[0037] Step S140: Call the first feature extractor to perform feature extraction on the second text encoding vector to obtain an error feature representation, where the error feature representation is used to characterize the feature difference between the first government public text and the corresponding semantically complete government text. The first feature extractor is debugged by combining the semantically missing government training text and the semantically complete government training text.

[0038] In step S140, the computer system calls the first feature extractor to perform feature extraction on the second text encoding vector, thereby obtaining an error feature representation. The error feature representation can characterize the feature difference between the first government affairs public text and the corresponding semantically complete government affairs text.

[0039] The second text encoding vector is the result of the previous steps. It combines the information of the first main semantic component vector and the first secondary semantic component vector, and performs weighted merging according to the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient. This vector contains the processed semantic information of the government public text, but it may still have certain feature differences from the semantically complete government text.

[0040] The first feature extractor is a key component, which is obtained by debugging the semantically missing government training text and the semantically complete government training text. When constructing the first feature extractor, the computer system needs to use a large amount of training data to learn how to extract effective features. For example, the semantically missing government training text and the semantically complete government training text can be regarded as paired sample data.

[0041] Assume that the semantically missing government training text is a partial planning text about the construction of urban public facilities, which may lack some key information, such as the description of the maintenance cycle of the facilities or the source of funds, while the semantically complete government training text contains all aspects of the public facility construction plan, including complete information such as facility type, construction location, maintenance cycle, source of funds, etc. The computer system debugs the first feature extractor by analyzing a large number of such paired training texts.

[0042] One technical means for constructing the first feature extractor is a convolutional neural network (CNN). In CNN, the convolution kernel is its core component, and the first feature extractor here can be a convolution kernel. The convolution kernel extracts features by sliding on the second text encoding vector and performing a convolution operation. Assume that the second text encoding vector is represented as a two-dimensional matrix (for ease of understanding, the actual situation may be a high-dimensional vector), whose elements are , the size of the convolution kernel is k×k (k is an odd number, for example, k=3), and the elements of the convolution kernel are The formula for the convolution operation can be expressed as:

[0043] ;

[0044] in is the result of the convolution operation. By sliding the convolution kernel over the entire second text encoding vector matrix, the computer system can obtain a series of eigenvalues ​​that constitute the error feature representation.

[0045] Another technical means is Support Vector Machine (SVM). The computer system takes the feature representation of semantically missing government training text and semantically complete government training text as input, and trains the SVM model to construct the first feature extractor. In this process, SVM attempts to find a hyperplane so that the two types of samples (semantically missing and semantically complete) can be separated to the greatest extent in the feature space. For the second text encoding vector, SVM judges the feature difference between the vector and the semantically complete government text based on the hyperplane parameters obtained by training, thereby obtaining the error feature representation.

[0046] This error feature representation provides a key basis for semantic completion of the first government public text in the subsequent steps. By accurately obtaining the feature differences between the first government public text and the semantically complete government text, the computer system can process more specifically to improve the semantic integrity of the government public text, thereby better serving the goals of government data mining and analysis, such as policy evaluation and decision support.

[0047] Step S150: Merge the first government affairs public text and the error feature representation to obtain a second government affairs public text, wherein the semantic completeness of the second government affairs public text is greater than the semantic completeness of the first government affairs public text.

[0048] In step S150, the first government public text is an original text that may have some missing semantics. For example, the first government public text is a preliminary report on the urban transportation improvement plan, which may only mention some basic road widening and new bus line planning, but lacks important semantic information such as traffic flow forecasts and response measures, and connection planning of different transportation modes.

[0049] The error feature representation is the result of feature extraction of the second text encoding vector by the first feature extractor in step S140. This error feature representation is intended to characterize the feature differences between the first government public text and the corresponding semantically complete government text. Continuing with the above-mentioned urban traffic improvement plan as an example, the error feature representation may contain feature information corresponding to missing semantic parts such as traffic flow prediction and connection between different modes of transportation. These feature information exists in the form of a specific vector or data structure, which is generated based on the technical means adopted by the first feature extractor.

[0050] When the computer system merges the first government public text with the error feature representation, it needs to be implemented according to certain rules or technical means. One possible way is vector concatenation. Assume that the first government public text is encoded in some way (such as bag-of-words model encoding or text encoding based on deep learning, etc.) to obtain a vector , the error characteristic is represented as a vector Here n and m are the dimensions of two vectors, and n and m are not necessarily equal. By concatenating vectors, the computer system can obtain a new vector This new vector C contains the original information of the first government public text and the error feature information representing the difference from the semantically complete text.

[0051] Another way is to combine based on weighted sum. The computer system assigns weights to the first government public text vector A and the error feature representation vector B respectively. and The weights here can be obtained based on the characteristics of the data or through pre-training. For example, the weights =0.6, =0.4, then the elements of the merged vector D are calculated as (Assume i=1, 2,…, max(n, m), the vector part with insufficient dimension can be padded with zeros).

[0052] The computer system converts the result obtained through the above-mentioned merging operation into a second government affairs public text. This conversion process may involve decoding operations. If the previous encoding adopts the bag-of-words model encoding, the computer system needs to perform reverse operations according to the vocabulary and encoding rules. For example, for each element in the vector, if the element corresponds to a word in the vocabulary and the element value represents a certain weight or number of occurrences of the word, the computer system restores the word based on this information and then combines it into a text. If it is an encoding based on a deep learning model (such as the Transformer architecture), the computer system uses the decoder part of the model and uses the merged vector as input to generate a second government affairs public text with higher semantic completeness.

[0053] The second government public text obtained in this way is more semantically complete and contains more key information that was originally missing. This is of great significance for the mining and analysis of government public data. In government work scenarios such as policy analysis and decision support, texts with higher semantic completeness can provide more accurate and comprehensive information. For example, decision makers can better evaluate the feasibility of the plan and predict the effect after implementation based on the semantically complete urban traffic improvement plan text, so as to make more scientific and reasonable decisions. At the same time, this improvement in the semantic completeness of government public texts will also facilitate information exchange and collaboration between different departments, and improve the overall efficiency of government work.

[0054] In one implementation, step S120, performing semantic embedding decomposition on the first text encoding vector to obtain a first main semantic component vector and a first secondary semantic component vector, specifically includes:

[0055] Step S121: semantically decomposing the first text encoding vector based on word frequency to obtain a second main semantic component vector and a second secondary semantic component vector, and merging the second main semantic component vector and the second secondary semantic component vector to obtain a third text encoding vector;

[0056] Step S122: Perform local semantic enhancement on the third text encoding vector to obtain a first main semantic component vector, and perform global semantic smoothing on the third text encoding vector to obtain a first secondary semantic component vector.

[0057] Step S120 aims to perform semantic embedding decomposition on the first text encoding vector to obtain a first main semantic component vector and a first secondary semantic component vector, wherein steps S121-S122 describe a specific implementation.

[0058] In step S121, the computer system performs semantic decomposition based on word frequency on the first text encoding vector. Assume that the first text encoding vector is obtained by encoding a government public text about education policy. This text contains words such as "education resources", "teaching staff", "education equity", etc. The computer system will count the frequency of occurrence of these words in the text. For example, "education resources" appears 15 times, "teaching staff" appears 10 times, "education equity" appears 8 times, etc.

[0059] The main and secondary semantic components are distinguished according to the frequency of the words. Words with higher frequency tend to contribute more to the semantics of the text. Taking this education policy text as an example, the semantic part related to "educational resources" may be more likely to be classified as the main semantic component in the vector due to its higher frequency. The computer system decomposes the first text encoding vector into the second main semantic component vector and the second secondary semantic component vector according to the word frequency through a specific algorithm (such as a threshold-based partitioning algorithm). Assuming that a word frequency threshold is set to 10 times, the semantic information corresponding to words with a word frequency greater than or equal to 10 times is classified as the second main semantic component vector, and the semantic information corresponding to words with a word frequency less than 10 times is classified as the second secondary semantic component vector.

[0060] A technical means that can be used in the embodiments of the present application is a simple statistical analysis and sorting algorithm. First, the computer system counts the word frequency of each element in the first text encoding vector (assuming that each element corresponds to the encoding representation of a word). Then, these elements are sorted in descending order according to the word frequency. Then, according to a pre-set division ratio or threshold, the sorted elements are divided into two parts, and the second main semantic component vector and the second secondary semantic component vector are constructed respectively. If expressed in a formula, let the first text encoding vector be ,in Represents the i-th element in the vector, and the corresponding vocabulary frequency is . Let the threshold be T, then the second main semantic component vector , the second secondary semantic component vector .

[0061] After obtaining the second main semantic component vector and the second secondary semantic component vector, the computer system merges them into the third text encoding vector. This merging is not a simple addition, but an integration based on semantic structure. Continuing with the above-mentioned education policy text as an example, if the second main semantic component vector contains encoding information about important semantic parts such as "educational resources" and "teaching staff", and the second secondary semantic component vector contains encoding information about relatively minor semantic parts such as "educational equity", the computer system should consider how to recombine them into a vector that can reflect the semantic structure of the entire text.

[0062] One technical approach is weighted merging, where a computer system assigns weights to the second main semantic component vector and the second secondary semantic component vector. For example, based on the analysis of a large number of government public texts or based on predefined rules, the second main semantic component vector is assigned a weight. , assign weights to the second secondary semantic component vector . Let the second main semantic component vector be , the second secondary semantic component vector is , then the third text encoding vector The element calculation method of is: for i=1,2,…, max(m,n), if and ,but ; if i>m, then ; if i>n, then In this way, a third text encoding vector is obtained that combines the main and secondary semantic components.

[0063] In step S122, local semantic enhancement means that the computer system highlights certain local semantic information on the basis of the third text encoding vector to obtain the first main semantic component vector. Taking a government public text on medical and health policies as an example, it is assumed that the third text encoding vector contains semantic information such as "allocation of medical resources", "construction of medical facilities", and "training of medical staff". Among them, the local semantic information of "allocation of resources to primary medical institutions" in "allocation of medical resources" may be the focus of the current analysis.

[0064] The computer system can use a local weighted technical means to achieve local semantic enhancement. Assume that the third text encoding vector is , where the elements related to “resource allocation to primary medical institutions” are The computer system assigns an enhanced weight to these related elements. (For example = 1.5), and for other elements, weights are assigned =1. Then the first main semantic component vector after local semantic enhancement is The element calculation method of is: for j = 1, 2, ..., p, if the element corresponding to j is related to "resource allocation to primary medical institutions", then ;otherwise In this way, the local important semantic information is highlighted and the first main semantic component vector is obtained.

[0065] Global semantic smoothing is to process the third text encoding vector as a whole to obtain a relatively smooth first secondary semantic component vector that better reflects the overall semantic trend. For a government public text about urban planning, the third text encoding vector contains semantic information such as "urban function zoning", "infrastructure construction" and "environmental protection".

[0066] The computer system can use the moving average technology to achieve global semantic smoothing. Suppose the third text encoding vector is , assuming that a moving average with a window size of k (for example, k=3) is used. For l=1,2,…,q, if and , then the first secondary semantic component vector Elements in ;right , ;for , Through this moving average method, local fluctuations are reduced, making the vector more able to reflect the overall semantic trend, thereby obtaining the first secondary semantic component vector.

[0067] In one implementation, the method provided in the embodiment of the present application may further include:

[0068] Step S121a: calling the second feature extractor to perform feature extraction on the third text encoding vector to obtain a global semantic smoother, wherein the second feature extractor is obtained by debugging the semantically missing government training text and the semantically complete government text;

[0069] Step S121b: Determine the difference between the all-one vector and the global semantic smoother to obtain a local semantic enhancer, and the feature dimension of the all-one vector is consistent with the feature dimension of the global semantic smoother.

[0070] In step S121a, the computer system calls the second feature extractor to perform feature extraction on the third text encoding vector to obtain a global semantic smoother.

[0071] The third text encoding vector is the result obtained through a series of operations in the previous steps. For example, when processing a government public text on agricultural policy, the third text encoding vector is obtained after semantic decomposition and merging based on word frequency. This vector contains various semantic information related to agricultural policy, such as the encoding representation of concepts such as "agricultural subsidies", "cultivated land protection" and "quality of agricultural products" in the vector space. The second feature extractor is debugged by combining semantically missing government training texts and semantically complete government training texts. Semantically missing government training texts and semantically complete government training texts play a key role in the debugging process. Taking a government text on rural infrastructure construction as an example, the semantically missing training text may only mention part of the infrastructure construction content, such as only mentioning road construction, but lacking descriptions of water conservancy facilities construction; while the semantically complete training text covers all infrastructure construction related content such as roads, water conservancy, and electricity.

[0072] The computer system constructs and debugs the second feature extractor by analyzing a large number of such paired semantically missing and semantically complete government training texts. This process may involve a variety of technical means, such as supervised learning algorithms in machine learning. Assume that the decision tree algorithm is used to construct the second feature extractor. For each pair of training texts, its features (such as the encoded vector features of vocabulary features, grammatical structure features, etc. in the text) are used as input, and whether it is a semantically complete text (0 can be used to indicate semantic missing and 1 can indicate semantic complete) is used as output. The decision tree algorithm constructs a decision tree based on these input and output pairs. Each node of the tree is a feature judgment condition, and the branches are different directions based on the judgment results. By continuously adjusting the structure and node conditions of the decision tree, the decision tree can accurately distinguish between semantically missing and semantically complete texts. This trained decision tree can be used as a way to implement the second feature extractor.

[0073] When the computer system uses this second feature extractor to extract features from the third text encoding vector, it is actually looking for certain feature patterns in the third text encoding vector that are related to global semantic smoothness. For example, in the example of agricultural policy, perhaps certain feature patterns related to the overall framework of agricultural policy are important for global semantic smoothness. Assume that the third text encoding vector is , the second feature extractor is a model based on a decision tree. The decision tree model performs a series of judgments and calculations based on the element values ​​in the vector V. If a node in the decision tree judges If a certain condition is met, the calculation continues along the corresponding branch, and finally a feature representation related to global semantic smoothing is obtained. This feature representation is the global semantic smoother.

[0074] In step S121b, the computer system performs difference determination on the all-ones vector and the global semantic smoother to obtain a local semantic enhancer.

[0075] The all-one vector is a special vector whose feature dimension is consistent with the feature dimension of the global semantic smoother. The role of the all-one vector in this operation is to provide a benchmark so that the local semantic enhancement part can be highlighted by the difference with the global semantic smoother. For example, if the global semantic smoother is a vector representing the overall trend characteristics in agricultural policy, such as , then the all-one vector U=[1, 1,…, 1] (the dimension m here is the same as the dimension of the global semantic smoother G).

[0076] The local semantic enhancer is obtained by calculating UG. Assume , each element of this difference vector represents the degree of deviation from the overall trend (represented by the global semantic smoother) in the corresponding dimension. This degree of deviation can be regarded as the potential or demand for local semantic enhancement. For example, if in the global semantic smoother, an element g_i represents an overall trend weight of agricultural subsidies in the entire agricultural policy semantics (assuming = 0.6), then the corresponding element in the local semantic enhancer =0.4, which means that when local semantics are enhanced, there is a certain room or demand for enhancement of the agricultural subsidies.

[0077] Step S122, performing local semantic enhancement on the third text encoding vector to obtain a first main semantic component vector, and performing global semantic smoothing on the third text encoding vector to obtain a first secondary semantic component vector, including:

[0078] Step S1221: call the local semantic enhancer to perform local semantic enhancement on the third text encoding vector to obtain the first main semantic component vector, call the global semantic smoother to perform global semantic smoothing on the third text encoding vector to obtain the first secondary semantic component vector.

[0079] In step S1221, the computer system calls a local semantic enhancer to perform local semantic enhancement on the third text encoding vector to obtain a first main semantic component vector, and calls a global semantic smoother to perform global semantic smoothing on the third text encoding vector to obtain a first secondary semantic component vector.

[0080] The computer system uses the local semantic enhancer to perform local semantic enhancement on the third text encoding vector to obtain the first main semantic component vector. Taking a government public document on science and technology innovation policy as an example, the third text encoding vector contains the encoding representation of semantic information such as "scientific research project funding", "scientific and technological innovation platform construction", and "scientific and technological talent training". Assume that the local semantic enhancer is , the third text encoding vector is .

[0081] The local semantic enhancement operation can be achieved by element-wise multiplication. The first main semantic component vector obtained is Elements For example, if in the local semantic enhancer, the elements related to "scientific research project funding" The value of is 1.2, indicating that this local semantics needs to be enhanced, and the element corresponding to "Scientific Research Project Funding" in the third text encoding vector is 0.5, then after local semantic enhancement, the element corresponding to “scientific research project funding” in the first main semantic component vector , thus highlighting the importance of the local semantics of "scientific research project funding" in the entire semantic structure.

[0082] The computer system uses a global semantic smoother to perform global semantic smoothing on the third text encoding vector to obtain a first secondary semantic component vector. For example, for a government public document on social security policy, the third text encoding vector contains encoding representations of semantic information such as "pension insurance", "medical insurance", and "unemployment insurance". Assume that the global semantic smoother is , the third text encoding vector is .

[0083] A technical means of global semantic smoothing can be weighted averaging. The first secondary semantic component vector obtained Elements For example, if in the global semantic smoother, the elements related to "pension insurance" The value of is 0.8, which indicates the weight of the semantic part of "pension insurance" in global semantic smoothing, and the element v_j corresponding to "pension insurance" in the third text encoding vector is 0.6. Then after global semantic smoothing, the element corresponding to "pension insurance" in the first secondary semantic component vector is =0.8×0.6=0.48. This weighted average method makes the entire semantic structure smoother, reduces local abruptness, and better reflects the overall semantic trend.

[0084] In one implementation, the number of global semantic smoothers is A, and the feature dimension of each global semantic smoother is b, and the number of local semantic enhancers is A, and the feature dimension of each local semantic enhancer is b. On this basis, step S1221, calling the local semantic enhancer to perform local semantic enhancement on the third text encoding vector to obtain the first main semantic component vector, calling the global semantic smoother to perform global semantic smoothing on the third text encoding vector to obtain the first secondary semantic component vector, specifically includes:

[0085] Step S12211: decomposing the third text encoding vector into A third government affairs public text sub-vectors in terms of feature dimension, wherein the number of text units corresponding to the global semantic smoother and the number of text units corresponding to the local semantic enhancer are the same as the number of text units corresponding to the third government affairs public text sub-vectors;

[0086] Step S12212: call A local semantic enhancers, perform local semantic enhancement on the A third government affairs public text sub-vectors respectively, obtain A first main semantic component sub-vectors, and establish the first main semantic component vector from the A first main semantic component sub-vectors;

[0087] Step S12213: call A global semantic smoothers, perform global semantic smoothing on the A third government public text sub-vectors respectively, obtain A first minor semantic component molecular vectors, and establish the first minor semantic component vector from the A first minor semantic component molecular vectors.

[0088] In step S12211, the computer system decomposes the third text encoding vector into A third government public text sub-vectors in terms of feature dimension.

[0089] The third text encoding vector is obtained through a series of previous operations. It is a vector representation of the government public text after processing, and contains the semantic information in the government public text. For example, suppose the third text encoding vector is obtained based on a government public text about urban construction planning. This text contains semantic content such as urban infrastructure construction (such as roads, bridges, water and electricity facilities, etc.), urban functional zoning (such as commercial areas, residential areas, industrial areas, etc.) and urban environmental planning (such as greening, pollution control, etc.). These semantic contents are encoded to form the third text encoding vector.

[0090] The purpose of decomposing this vector in terms of feature dimension is to process the semantic information in it more carefully. The feature dimension here can be understood as the different dimensions of the vector representing semantic information. Taking a simple three-dimensional vector as an example, if the vector V=[v_1, v_2, v_3], it can be regarded as a representation in three different feature dimensions. For the actual third text encoding vector, its feature dimension may be a larger value, such as 100 dimensions or more.

[0091] The computer system decomposes it into A third government public text sub-vectors. Assuming A=5, the computer system will decompose according to certain rules or algorithms. One possible technical means is to group and decompose according to the relevance of semantic features. For example, for the text encoding vector of urban construction planning, the computer system can classify the semantic feature dimensions related to urban infrastructure construction into one sub-vector, and those related to urban functional zoning into another sub-vector, etc. If the third text encoding vector is represented as (where n is the feature dimension), the computer system can divide it into A parts according to the predetermined semantic categories or feature ranges, such as , here It is the index value determined according to the semantic division.

[0092] In addition, the number of text units corresponding to the global semantic smoother and the number of text units corresponding to the local semantic enhancer are the same as the number of text units corresponding to the third government affairs public text sub-vector. This means that in subsequent operations, these different components process government affairs public texts according to the same semantic unit division. For example, if the global semantic smoother is constructed based on the processing of specific semantic units, then the division of the local semantic enhancer and the third government affairs public text sub-vector also corresponds to these semantic units to ensure consistency and coordination in semantic processing.

[0093] In step S12212, the computer system calls A local semantic enhancers, performs local semantic enhancement on the A third government public text sub-vectors, and obtains A first main semantic component sub-vectors. The A first main semantic component sub-vectors establish a first main semantic component vector.

[0094] The local semantic enhancer is obtained in the previous step, and its purpose is to highlight local semantic information. Taking the previous example of urban construction planning, for the third government public text sub-vector related to urban infrastructure construction, the local semantic enhancer may enhance the local semantic content such as the use of new building materials or the application of high-end engineering technology.

[0095] Assume there are 5 local semantic enhancers , corresponding to the five third government affairs public text sub-vectors obtained by the previous decomposition For each sub-vector and the corresponding local semantic enhancer, the computer system performs a local semantic enhancement operation.

[0096] If we use element-wise multiplication to perform local semantic enhancement (which is a possible technical approach), for the sub-vector (in is a subvector dimensions) and local semantic enhancers , the sub-vector after local semantic enhancement (i.e., the first principal semantic component vector) For example, for the subvector related to urban infrastructure construction An element in (Assuming that this element is related to some technical indicator in road construction), if the corresponding local semantic enhancer Elements in =1.2 (indicates that this semantic part needs to be enhanced), = 0.5, then after local semantic enhancement =1.2×0.5=0.6.

[0097] The computer system performs this operation on all A third government affairs public text sub-vectors to obtain A first main semantic component sub-vectors These sub-vectors together establish the first main semantic component vector. For example, if these A first main semantic component sub-vectors are combined in order, the first main semantic component vector is obtained. , this vector can more prominently represent the main semantic information in government public texts, especially when local semantics are enhanced, which helps to grasp the key semantic content in the text more accurately.

[0098] In step S12213, the computer system calls A global semantic smoothers, performs global semantic smoothing on the A third government public text sub-vectors, and obtains A first secondary semantic component molecular vectors. The A first secondary semantic component molecular vectors establish a first secondary semantic component vector.

[0099] The role of the global semantic smoother is to smooth the semantic information as a whole to obtain a result that better reflects the overall semantic trend. For the example of the government public text of urban construction planning, when processing the third government public text sub-vector related to the urban functional zoning, the global semantic smoother may adjust the semantic information about the transition relationship between different functional areas or the overall layout to make it smoother and in line with the overall semantic logic.

[0100] Assume there are 5 global semantic smoothers , corresponding to the 5 third government affairs public text sub-vectors For each sub-vector and the corresponding global semantic smoother, the computer system performs a global semantic smoothing operation.

[0101] A global semantic smoothing technique is weighted averaging. and global semantic smoother , the sub-vector after global semantic smoothing (i.e., the first minor semantic component molecular vector) For example, for the subvector related to urban environmental planning An element in (Assuming that this element is related to the proportion of green area), if the corresponding global semantic smoother Elements in = 0.8 (indicating the weight in global semantic smoothing), = 0.6, then after global semantic smoothing =0.8×0.6=0.48.

[0102] The computer system performs this operation on all A third government affairs public text sub-vectors to obtain A first minor semantic component sub-vectors These sub-vectors together form the first minor semantic component vector. For example, if these A first minor semantic component sub-vectors are combined in order, the first minor semantic component vector is obtained. =[ ], this vector can more smoothly represent the secondary semantic information in government public texts, embodying the trend of the overall semantics, and helping to fully understand the semantic structure of the text when mining and analyzing government public data, including the primary and secondary semantic parts, thereby providing a more accurate semantic basis for subsequent operations.

[0103] In other implementations, step S120, performing semantic embedding decomposition on the first text encoding vector to obtain a first main semantic component vector and a first secondary semantic component vector, specifically includes:

[0104] Step S1201: performing semantic embedding decomposition on the first text encoding vector to obtain an intermediate main semantic component vector and an intermediate secondary semantic component vector, combining the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient, and merging the intermediate main semantic component vector and the intermediate secondary semantic component vector to obtain an intermediate text encoding vector;

[0105] Step S1202: Perform another semantic embedding decomposition on the intermediate text encoding vector to obtain a new intermediate main semantic component vector and a new intermediate secondary semantic component vector. Combine the new intermediate main semantic component vector and the new intermediate secondary semantic component vector in combination with the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient to obtain a new intermediate text encoding vector, until the number of semantic embedding decompositions currently equals the first agreed number, determine the intermediate main semantic component vector currently obtained as the first main semantic component vector, and determine the intermediate secondary semantic component vector currently obtained as the first secondary semantic component vector.

[0106] In step S1201, the computer system performs semantic embedding decomposition on the first text encoding vector to obtain an intermediate main semantic component vector and an intermediate secondary semantic component vector, and then combines the intermediate main semantic component vector and the intermediate secondary semantic component vector in combination with the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient to obtain an intermediate text encoding vector.

[0107] Semantic embedding decomposition is an operation that deeply mines the semantic information of a text vector. The first text encoding vector is the result of encoding the government public text before, which represents the semantic content of the government public text in the form of a vector. For example, if the government public text is a document about education policy, the first text encoding vector may contain encoding information about semantic concepts related to education resource allocation, education quality improvement, and teacher team building.

[0108] When a computer system performs semantic embedding decomposition, it can use a variety of technical means. One feasible technique is principal component analysis (PCA), which will not be described here.

[0109] According to the size of the eigenvalue, the computer system can decompose the first text encoding vector into an intermediate main semantic component vector and an intermediate secondary semantic component vector. Usually, the components represented by the eigenvectors corresponding to larger eigenvalues ​​are regarded as intermediate main semantic component vectors, because these components account for a larger proportion of the variance explanation of the vector, which means that they contain more important semantic information in the text. For example, in the example of education policy, if the semantics related to the allocation of educational resources account for a larger proportion of the variance explanation, then the part composed of the eigenvectors related to the allocation of educational resources may be the intermediate main semantic component vector; while the components represented by the eigenvectors corresponding to smaller eigenvalues ​​are regarded as intermediate secondary semantic component vectors, which may involve some auxiliary semantic content, such as the semantic parts related to the provisions of the details of the internal management process of a specific educational institution in the education policy.

[0110] Next, the computer system combines the intermediate main semantic component vector and the intermediate secondary semantic component vector with the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient to obtain the intermediate text encoding vector. The main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient are parameters previously determined in some way, which may be obtained through training based on a large amount of government text data, and are used to adjust the weights of the main and secondary semantic components in the merging process. Assume that the intermediate main semantic component vector is , the intermediate secondary semantic component vector is (Here we assume that the two vector dimensions are the same as k), the main eccentricity adjustment coefficient is , the secondary eccentricity adjustment coefficient is The computer system obtains the intermediate text encoding vector by weighted summation. , whose elements are calculated as This weighted merging method can adjust the coefficients so that the merged intermediate text encoding vector is more semantically consistent with the semantic structure characteristics of government public texts.

[0111] In step S1202, the computer system performs another semantic embedding decomposition on the intermediate text encoding vector to obtain a new intermediate main semantic component vector and a new intermediate secondary semantic component vector, and then combines the new intermediate main semantic component vector and the new intermediate secondary semantic component vector with the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient to obtain a new intermediate text encoding vector, until the number of semantic embedding decompositions currently is equal to the first agreed number, and the intermediate main semantic component vector currently obtained is determined as the first main semantic component vector, and the intermediate secondary semantic component vector currently obtained is determined as the first secondary semantic component vector.

[0112] The computer system performs another semantic embedding decomposition on the intermediate text encoding vector, and this process is similar to the semantic embedding decomposition in step S1201.

[0113] After each semantic embedding decomposition, the computer system performs a merging operation according to the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient. Assume that the new intermediate main semantic component vector obtained in this decomposition is , the new intermediate secondary semantic component vector is (Assuming that the dimensions of the two vectors are the same as l), the main eccentricity adjustment coefficient is still , the secondary eccentricity adjustment coefficient is still . The new intermediate text encoding vector is obtained by weighted summation , whose elements are calculated as . This process will be repeated until the number of semantic embedding decompositions for the current time is equal to the first agreed number. The first agreed number is a pre-set value that determines the number of iterations of the semantic embedding decomposition and merging operations. When this number is reached, the computer system determines the final intermediate main semantic component vector as the first main semantic component vector, and the final intermediate secondary semantic component vector as the first secondary semantic component vector. The first main semantic component vector and the first secondary semantic component vector determined in this way are the results of multiple refinements and adjustments, which can more accurately reflect the main and secondary semantic information in the government public text, and provide a more accurate semantic basis for subsequent operations in government public data mining and analysis.

[0114] In one implementation, step S1201 combines the primary eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient to merge the intermediate primary semantic component vector and the intermediate secondary semantic component vector to obtain an intermediate text encoding vector, specifically including:

[0115] Step S12011: when the number of semantic embedding decompositions at the current time is less than the second agreed number, the intermediate main semantic component vector and the intermediate secondary semantic component vector obtained at the current time are eccentrically integrated in combination with the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient to obtain a first benchmark text encoding vector, and the second agreed number is less than the first agreed number;

[0116] Step S12012: adjusting the text length of the first government affairs public text, and performing text vector encoding on the first government affairs public text after the text length adjustment to obtain a second reference text encoding vector;

[0117] Step S12013: call the significance mining mechanism to perform text vector encoding on the first benchmark text encoding vector and the second benchmark text encoding vector to obtain the current intermediate text encoding vector.

[0118] In step S12011, when the number of semantic embedding decompositions currently is less than the second agreed number, the computer system combines the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient to perform eccentric integration (i.e., weighted summation) on the intermediate main semantic component vector and the intermediate secondary semantic component vector obtained currently to obtain the first benchmark text encoding vector.

[0119] Semantic embedding decomposition is an operation to perform semantic level analysis on the first text encoding vector. In this process, intermediate main semantic component vectors and intermediate secondary semantic component vectors are generated. For example, suppose the first text encoding vector is obtained based on a government public text on urban planning, which contains semantic content in many aspects such as urban transportation planning, land use planning, and public facility layout. After semantic embedding decomposition, the intermediate main semantic component vector may be related to important semantic parts such as the layout of main roads in urban transportation planning and the location of large facilities (such as hospitals, schools, etc.) in public facility layout; while the intermediate secondary semantic component vector may involve relatively minor semantic parts such as branch road planning in transportation planning and small facilities (such as community parks, garbage recycling stations, etc.) in public facility layout.

[0120] The major eccentricity adjustment coefficient and the minor eccentricity adjustment coefficient are parameters of great significance in the entire government public data mining and analysis method. These coefficients may be obtained by analyzing and training a large amount of government text data. For example, when processing many government texts related to urban planning, these coefficients are determined through a complex calculation and optimization process by analyzing the differences between semantically complete standard texts and texts with semantic deficiencies.

[0121] When the computer system performs eccentric integration (weighted summation), it is assumed that the intermediate main semantic component vector is , the intermediate secondary semantic component vector is (Here we assume that the two vector dimensions are the same as n), the main eccentricity adjustment coefficient is , the secondary eccentricity adjustment coefficient is . Then the first reference text encoding vector The elements of are calculated as This weighted summation method can adjust the weights of the intermediate main semantic components and the intermediate secondary semantic components in the first reference text encoding vector according to the size of the coefficients. For example, if =0.7, =0.3, indicating that when constructing the first benchmark text encoding vector, the weight of the middle main semantic component vector is greater, which reflects the relative importance of the main semantic components in the overall semantic structure.

[0122] The second agreed number of times is a pre-set value that limits the execution range of a specific operation. When the number of semantic embedding decompositions is less than this value, the above-mentioned eccentric integration operation is performed. The setting of this number may be based on a comprehensive consideration of algorithm efficiency and semantic analysis accuracy. If the set second agreed number of times is small, for example 3, then in the first few semantic embedding decomposition processes, this eccentric integration operation will be performed quickly to obtain a preliminary first benchmark text encoding vector, which can integrate the information of the main and secondary semantic components at an early stage and provide a basis for subsequent operations.

[0123] In step S12012, the computer system adjusts the text length of the first government affairs public text, and then performs text vector encoding on the first government affairs public text after the text length adjustment to obtain a second reference text encoding vector.

[0124] In the analysis of government public data mining, the length of the text may have an impact on semantic analysis. For the first government public text, the original text may be too long or too short, which may be detrimental to subsequent operations. For example, a government public text on environmental protection policy may be too long, containing a large number of detailed regulations, specific implementation measures, historical background introductions, etc. This may lead to increased computational complexity in certain analysis operations or too complex semantic information to effectively extract key information; on the contrary, if the text is too short, some important semantic information may be missing.

[0125] When the computer system adjusts the text length, it can use a variety of technical means. One feasible way is truncation or padding operation. If it is a truncation operation, assuming that a maximum text length L is set, for the first government public text whose length exceeds L, the computer system will adjust the text length to L according to certain rules (such as deleting part of the content from the end of the text, or deleting relatively unimportant parts according to semantic units). For example, for an overly long environmental protection policy text, some overly detailed historical background introduction parts may be deleted, and parts that are more relevant to the core content of the current policy (such as pollution emission standards, environmental protection project funding allocation, etc.) are retained. If it is a padding operation, for texts that are too short, the computer system can add some supplementary information according to predefined rules. For example, for a short environmental protection policy text, some necessary semantic units may be added according to other relevant policy documents or general environmental protection concept templates, such as adding general descriptions of the governance of different types of pollution (such as air pollution, water pollution, and soil pollution) to make the text length reach an appropriate value.

[0126] When the first government public text after the text length is adjusted is encoded with a text vector, it is similar to the text vector encoding in step S110. Assume that the Bag-of-Words (BoW) model is used for encoding. First, the computer system constructs a vocabulary containing all possible words, which can be based on a large-scale government text corpus or a specific environmental protection field vocabulary. Then, the number of occurrences of each word in the vocabulary in the adjusted text is counted, and the word frequency information is converted into a vector. For example, for the words "pollution emissions", "environmental monitoring", "environmental protection funds" and so on in the adjusted environmental protection policy text, the number of occurrences in the text is counted, and the word frequency information is arranged in the order in the vocabulary to obtain a vector, which is the second benchmark text encoding vector. If TF-IDF (TermFrequency-Inverse Document Frequency) encoding is used, in addition to calculating the word frequency, the inverse document frequency of each word is also calculated, and then the word frequency and the inverse document frequency are multiplied to obtain the TF-IDF value of each word, and then the second benchmark text encoding vector is constructed.

[0127] In step S12013, the computer system calls a saliency mining mechanism (such as an attention mechanism) to perform text vector encoding on the first benchmark text encoding vector and the second benchmark text encoding vector to obtain the current intermediate text encoding vector.

[0128] The saliency mining mechanism aims to highlight the important information in the text vector. Take the attention mechanism as an example. It is a widely used technical means in natural language processing. The attention mechanism can automatically focus on the important parts of the input. In this scenario, it focuses on the important semantic information in the first benchmark text encoding vector and the second benchmark text encoding vector.

[0129] The first reference text encoding vector is obtained by eccentric integration in step S12011, which integrates the information of the intermediate main semantic component vector and the intermediate secondary semantic component vector; the second reference text encoding vector is obtained by encoding the first government affairs public text after the text length is adjusted in step S12012. These two vectors represent the semantics of the government affairs public text from different angles.

[0130] Assume that the first base text encoding vector is , the second benchmark text encoding vector is (Here we assume that both vectors have the same dimension m). When using the attention mechanism, it calculates the attention weight for each vector element. For example, for the element in the first base text encoding vector and the elements in the second base text encoding vector , the attention mechanism obtains the attention weight according to a certain calculation method (such as forward propagation calculation based on a neural network) and A simple formula for calculating attention weights can be based on the correlation between vector elements and other elements, such as (For the first base text encoding vector), we can similarly obtain .

[0131] Then, the two vectors are weighted and summed according to the attention weight to obtain the current intermediate text encoding vector The elements are calculated as In this way, the saliency mining mechanism can highlight the important semantic information in the two baseline text encoding vectors, and the obtained intermediate text encoding vector can more accurately reflect the semantic status of the government public text in the current semantic embedding decomposition level.

[0132] In other implementations, step S1201 combines the primary eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient to merge the intermediate primary semantic component vector and the intermediate secondary semantic component vector to obtain an intermediate text encoding vector, specifically including:

[0133] Step S1201A: When the number of semantic embedding decompositions at the current time is greater than the third agreed number, the intermediate main semantic component vector and the intermediate secondary semantic component vector obtained at the current time are eccentrically integrated in combination with the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient to obtain a third reference text encoding vector, and the third agreed number is not greater than the first agreed number;

[0134] Step S1201B: Merge at least one intermediate text encoding vector obtained in the number of times before the current time with the third benchmark text encoding vector to obtain the current intermediate text encoding vector.

[0135] In step S1201A, when the number of semantic embedding decompositions currently obtained is greater than the third agreed number, the computer system combines the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient to perform eccentric integration (such as weighted summation) on the intermediate main semantic component vector and the intermediate secondary semantic component vector obtained currently to obtain the third benchmark text encoding vector.

[0136] Semantic embedding decomposition is a key operation for mining text semantic information. Each decomposition will obtain the intermediate main semantic component vector and the intermediate secondary semantic component vector. For example, suppose that a government public text about medical and health policies is processed. After multiple semantic embedding decompositions, at a certain time (when the number of semantic embedding decompositions is greater than the third agreed number), the intermediate main semantic component vector may contain key semantic information such as "medical resource allocation (focusing on large hospital resources)" and "disease prevention and control system (such as infectious disease prevention and control mechanism)"; the intermediate secondary semantic component vector may contain relatively minor semantic information such as "management details of small medical institutions" and "auxiliary measures in specific disease prevention and control (such as local epidemic prevention propaganda in some areas)".

[0137] The main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient play a role in adjusting the weights of semantic components in this process. These coefficients may be obtained through pre-analysis and training of a large number of government public texts. Assume that the intermediate main semantic component vector is , the intermediate secondary semantic component vector is (Here we assume that the two vector dimensions are the same as n), the main eccentricity adjustment coefficient is , the secondary eccentricity adjustment coefficient is The third benchmark text encoding vector is obtained by weighted summation , whose elements are calculated as .

[0138] The third agreed number is a pre-set value that defines a specific stage in the semantic embedding decomposition process. When the number of semantic embedding decompositions exceeds this value, the above-mentioned eccentric integration operation is performed. The setting of this number may be based on a comprehensive consideration of the depth of semantic analysis of government public texts and computing resources. For example, if the third agreed number is set to 5, then when the semantic embedding decomposition is performed for the 6th time and beyond, this method is used to construct the third benchmark text encoding vector. In this way, after a certain depth of semantic decomposition, the semantic information can be reintegrated to represent the text semantics in a more comprehensive way.

[0139] In step S1201B, the computer system merges at least one intermediate text encoding vector obtained in the number of times before the current time with the third benchmark text encoding vector to obtain the current intermediate text encoding vector.

[0140] The intermediate text encoding vectors are obtained in the previous semantic embedding decomposition process, and each intermediate text encoding vector contains semantic information at different stages. Taking the government public text of medical and health policy as an example, the intermediate text encoding vectors obtained in the previous semantic embedding decomposition process may reflect the semantic content of medical and health policy from different angles.

[0141] When a computer system performs a merge operation, it can use a variety of technical means. A simple way is vector concatenation. Assume that m intermediate text encoding vectors are obtained before (Here we assume that these vectors have the same dimension p), the third benchmark text encoding vector is (Assuming the dimension is q, if , appropriate padding or truncation can be performed to make the dimensions consistent). The current intermediate text encoding vector is obtained by vector concatenation .

[0142] Another possible approach is weighted merging. Different weights are assigned to each intermediate text encoding vector and the third benchmark text encoding vector. Let the weights be , then the current intermediate text encoding vector The element calculation method of is: for i=1,2,…,p (assuming the dimension is uniformly p), . These weights can be determined based on the importance of semantics or the reliability in the previous analysis process. For example, a larger weight can be given to an intermediate text encoding vector that is closer to the final semantic representation or a vector that more accurately reflects the main semantics. Through this merging operation, the current intermediate text encoding vector can integrate the semantic information of the previous stages and the information of the third benchmark text encoding vector currently obtained through eccentric integration. In the example of medical and health policy, the intermediate text encoding vector obtained in this way can more comprehensively cover the semantic content from the overall framework to the specific implementation details, providing a richer and more accurate semantic representation for further semantic embedding decomposition or subsequent government public data mining and analysis operations.

[0143] In one implementation, the mining and analysis method for government public data is performed by a government public text mining and analysis agent, which includes a text vector encoding layer, a semantic embedding decomposition layer, a feature merging layer, and a government public text generation layer.

[0144] Among them, the text vector encoding layer is configured to perform text vector encoding on the first government public text to obtain a first text encoding vector; the semantic embedding decomposition layer is configured to perform semantic embedding decomposition on the first text encoding vector to obtain a first main semantic component vector and a first secondary semantic component vector; the feature merging layer is configured to combine the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient to merge the first main semantic component vector and the first secondary semantic component vector to obtain a second text encoding vector, and the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient are component parameters of the feature merging layer; the government public text generation layer is configured to call the first feature extractor to perform feature extraction on the second text encoding vector to obtain an error feature representation, merge the first government public text with the error feature representation to obtain a second government public text, and the first feature extractor is a component parameter of the government public text generation layer.

[0145] In the government sector, there are a large number of public texts, such as policy documents, work reports, and notices, which contain rich information. The government public text mining and analysis agent aims to mine valuable semantic information from these texts to provide support for government decision-making, policy evaluation, etc. For example, in government work related to urban planning, the agent can mine and analyze a large number of urban planning policy texts, construction reports, etc. to understand the trend of urban development, the implementation of policies, etc.

[0146] The computer system automatically processes government public documents by building this intelligent agent and using various algorithms and technical means. This intelligent agent is, for example, a neural network model that includes various network layers.

[0147] The main function of the text vector encoding layer is to convert the input first government public text into a vector form that can be processed more efficiently by the computer system, that is, the first text encoding vector. Since government public text exists in the form of natural language, it is difficult for the computer system to directly perform complex semantic analysis and data mining operations on it, so it is necessary to convert the text into a vector.

[0148] One technical means is the Bag-of-Words (BoW) model, another technical means is TF-IDF (TermFrequency-Inverse Document Frequency), or deep learning-based methods such as Word2Vec are also feasible technical means. Since the relevant implementation process has been described in the previous part of this application, it will not be repeated here.

[0149] The main task of the semantic embedding decomposition layer is to perform semantic embedding decomposition on the first text encoding vector output by the text vector encoding layer, thereby obtaining the first main semantic component vector and the first secondary semantic component vector. This step is to deeply explore the semantic information in the first text encoding vector and decompose it into different components according to semantic importance or semantic role.

[0150] Principal Component Analysis (PCA) is a technical means that can be used for semantic embedding decomposition. Singular Value Decomposition (SVD) can also be used for this purpose. Since the relevant implementation process has been described above in this application, it will not be repeated here.

[0151] The task of the feature merging layer is to combine the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient to merge the first main semantic component vector and the first secondary semantic component vector output by the semantic embedding decomposition layer to obtain the second text encoding vector. The main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient are the component parameters of the feature merging layer. These coefficients are obtained by debugging the semantically missing government training text and the corresponding semantically complete government training text.

[0152] For example, when processing a government public text about agricultural policy, the first main semantic component vector may be related to the main semantics such as "agricultural subsidy policy" and "cultivated land protection policy", and the first secondary semantic component vector may be related to the secondary semantics such as "agricultural product quality supervision rules" and "agricultural equipment maintenance management". The feature merging layer merges these two vectors according to the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient, so that the merged second text encoding vector can better reflect the semantic information of the government public text.

[0153] Assume that the first main semantic component vector is , the dimension of the first main semantic component vector is n, and the main eccentricity adjustment coefficient is ; Let the first minor semantic component vector be , the secondary eccentricity adjustment coefficient is The computer system combines these two vectors by weighted summation to obtain the second text encoding vector V, that is, .

[0154] The government affairs public text generation layer is responsible for calling the first feature extractor to extract features from the second text encoding vector output by the feature merging layer, obtaining an error feature representation, and then merging the first government affairs public text with the error feature representation to obtain a second government affairs public text. The first feature extractor is a component parameter of the government affairs public text generation layer, and is also obtained by debugging in combination with semantically missing government affairs training texts and semantically complete government affairs training texts. The semantic completeness of the second government affairs public text is greater than that of the first government affairs public text.

[0155] For example, for a first government public text on traffic policy, the second text encoding vector is obtained after being processed by the previous layers. The government public text generation layer extracts the error feature representation through the first feature extractor. This error feature representation characterizes the feature difference between the first government public text and the corresponding semantically complete government text. Then the first government public text is merged with the error feature representation, and the second government public text obtained is more semantically complete, which may supplement the semantic information missing in the first government public text, such as traffic flow prediction and connection between different transportation modes.

[0156] For the feature extraction part, if the first feature extractor is a convolution kernel (under the concept of convolutional neural network), assume that the second text encoding vector is represented as a two-dimensional matrix (for ease of understanding, the actual situation may be a high-dimensional vector), whose elements are , the size of the convolution kernel is k×k (k is an odd number, for example, k=3), and the elements of the convolution kernel are By sliding the convolution kernel across the entire second text encoding vector matrix, the computer system can obtain a series of eigenvalues ​​that constitute the error feature representation.

[0157] For merging the first government public text with the error feature representation, vector concatenation or weighted summation can be used. If vector concatenation is used, assuming that the first government public text is encoded in some way (such as bag-of-words model encoding or text encoding based on deep learning, etc.) to obtain vector A , the error characteristic is represented as a vector . Get a new vector by concatenating vectors Then, according to certain decoding rules, it is converted into the second government affairs public text. If weighted summation is adopted, weights are assigned to vector A and vector B respectively. and , then the elements of the merged vector D are calculated as (Assume i=1,2,…,max(n, m), the vector part with insufficient dimension can be padded with zeros), and then convert the vector D into the second government public text.

[0158] In one implementation, the process of calibrating the government public text mining and analysis agent includes the following steps:

[0159] Step S101: performing text vector encoding on the semantically missing government affairs training text based on the text vector encoding layer to obtain a first training text encoding vector;

[0160] Step S102: Based on the semantic embedding decomposition layer, the first training text encoding vector is semantically embedded and decomposed to obtain a first training main semantic component vector and a first training secondary semantic component vector;

[0161] Step S103: Based on the feature merging layer, the first training main semantic component vector and the first training secondary semantic component vector are merged in combination with the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient to obtain a second training text encoding vector;

[0162] Step S104: Based on the government affairs public text generation layer, call the first feature extractor to perform feature extraction on the second training text encoding vector to obtain a training error feature representation, merge the semantically missing government affairs training text with the training error feature representation to obtain an inferred government affairs public text;

[0163] Step S105: Based on the error between the inferred government public text and the semantically complete government training text, the government public text mining and analysis agent is debugged.

[0164] In step S101, the computer system performs text vector encoding on the semantically missing government affairs training text based on the text vector encoding layer to obtain a first training text encoding vector.

[0165] The government public text mining and analysis agent is designed to accurately process government public texts. In order for the agent to work well, it is necessary to use training texts to debug the parameters of each layer. Semantically missing government training texts are a special type of government texts, which are partially missing or incomplete in semantic expression. For example, a semantically missing government training text on urban traffic planning may only mention the planning of road construction, but not important aspects such as traffic flow management or public transportation facility layout.

[0166] The text vector encoding layer uses specific technical means to convert this semantically missing government training text into a vector form, namely the first training text encoding vector. The computer system can use technical means such as Bag-of-Words (BoW), TF-IDF (Term Frequency-Inverse Document Frequency), and deep learning-based methods such as Word2Vec, which will not be described here.

[0167] In step S102, the computer system performs semantic embedding decomposition on the first training text encoding vector based on the semantic embedding decomposition layer to obtain a first training main semantic component vector and a first training secondary semantic component vector.

[0168] The purpose of the semantic embedding decomposition layer is to deeply explore the semantic information in the first training text encoding vector and decompose it into different components according to the semantic importance or semantic role. Taking a semantically missing government training text on medical and health policy as an example, its first training text encoding vector contains the encoding of various semantic information related to medical and health.

[0169] The computer system can be implemented by principal component analysis (PCA), singular value decomposition (SVD), etc., which have been explained above and will not be repeated here.

[0170] In step S103, the computer system merges the first training main semantic component vector and the first training secondary semantic component vector based on the feature merging layer and in combination with the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient to obtain a second training text encoding vector.

[0171] The major eccentricity adjustment coefficient and the minor eccentricity adjustment coefficient are important component parameters of the feature merging layer. These coefficients are obtained by analyzing and debugging a large number of semantically missing government training texts and corresponding semantically complete government training texts.

[0172] In step S104, the computer system calls the first feature extractor to perform feature extraction on the second training text encoding vector based on the government public text generation layer to obtain a training error feature representation, and merges the semantically missing government training text with the training error feature representation to obtain an inferred government public text.

[0173] The first feature extractor is a component parameter of the government public text generation layer, which is obtained by debugging the combination of semantically missing government training text and semantically complete government training text. For example, in the debugging of government training text related to education policy, the first feature extractor can be trained to identify the feature differences between semantically missing government training text (which may lack content such as detailed rules for education resource allocation) and semantically complete government training text (including various aspects of education policy, such as education resource allocation, teacher team building, education goal setting, etc.).

[0174] If the first feature extractor is a convolution kernel (under the concept of convolutional neural network), assuming that the second training text encoding vector is represented as a two-dimensional matrix (for ease of understanding, the actual situation may be a high-dimensional vector), by sliding the convolution kernel on the entire second training text encoding vector matrix, the computer system can obtain a series of eigenvalues, which constitute the training error feature representation.

[0175] For merging the semantically missing government training text with the training error feature representation, vector concatenation or weighted summation may be used. The relevant implementation methods have been described above and will not be repeated here.

[0176] In step S105, the computer system debugs the government public text mining and analysis agent based on the error between the inferred government public text and the semantically complete government training text.

[0177] The inferred government public text is obtained by merging the semantically missing government training text with the training error feature representation in the previous step, while the semantically complete government training text is the government text that contains complete semantic information. For example, in the text related to agricultural policy, the semantically complete government training text contains all aspects of agricultural subsidy policy, farmland protection policy, agricultural product quality supervision policy, etc., while the inferred government public text may have some errors in the previous processing and has semantic differences with the semantically complete government training text.

[0178] The computer system adjusts the various layers of the agent by comparing the error between the inferred government public text and the semantically complete government training text. This error can be measured from multiple aspects, such as semantic similarity, the integrity of key information, etc. If semantic similarity is used to measure the error, methods such as cosine similarity can be used. Assume that the inferred government public text is encoded and then obtained as a vector , the semantically complete government training text is encoded to obtain the vector , the calculation formula of cosine similarity is If the cosine similarity is low, it means that there is a large semantic difference between the inferred government public text and the semantically complete government training text, and the government public text mining and analysis agent needs to be adjusted.

[0179] For adjusting each layer of the agent, targeted operations can be performed according to the source and manifestation of the error. If it is found that the large error is caused by the text vector encoding layer, it may be necessary to adjust the encoding method or parameters. For example, if the bag-of-words model is used, it may be necessary to adjust the vocabulary construction method or the statistical method of word frequency; if it is a problem with the semantic embedding decomposition layer, it may be necessary to adjust the parameters in the principal component analysis or singular value decomposition, or try other semantic embedding decomposition techniques; if it is a problem with the feature merging layer, it may be necessary to re-evaluate the values ​​of the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient; if it is a problem with the government public text generation layer, it may be necessary to retrain the first feature extractor or adjust the way to merge the semantically missing government training text and the training error feature representation. Through such a debugging process, the government public text mining and analysis agent is continuously optimized so that it can process government public text more accurately and improve the accuracy and effectiveness of mining and analysis.

[0180] In one implementation, the government public text mining and analysis agent includes B semantic embedding decomposition layers and B feature merging layers, B∈[1,+∞). On this basis, step S102, based on the semantic embedding decomposition layer, performs semantic embedding decomposition on the first training text encoding vector to obtain the first training main semantic component vector and the first training secondary semantic component vector, specifically including:

[0181] Step S1021: Based on the first semantic embedding decomposition layer, the first text encoding vector is semantically embedded and decomposed to obtain a training intermediate main semantic component vector and a training intermediate secondary semantic component vector; based on the first feature merging layer, the training intermediate main semantic component vector and the training intermediate secondary semantic component vector are merged in combination with the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient in the first feature merging layer to obtain a training intermediate text encoding vector;

[0182] Step S1022: Based on the new semantic embedding decomposition layer, the training intermediate text encoding vector is once again semantically embedded to obtain a new training intermediate main semantic component vector and a new training intermediate secondary semantic component vector; based on the new feature merging layer, the new training intermediate main semantic component vector and the new training intermediate secondary semantic component vector are merged in combination with the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient in the new feature merging layer to obtain a new training intermediate text encoding vector, and the process stops when the last semantic embedding decomposition layer outputs the training intermediate main semantic component vector and the training intermediate secondary semantic component vector, and the training intermediate main semantic component vector output by the last semantic embedding decomposition layer is used as the first training main semantic component vector, and the training intermediate secondary semantic component vector output by the last semantic embedding decomposition layer is used as the first training secondary semantic component vector.

[0183] In step S1021, the computer system performs semantic embedding decomposition on the first text encoding vector based on the first semantic embedding decomposition layer to obtain a training intermediate main semantic component vector and a training intermediate secondary semantic component vector; based on the first feature merging layer, the computer system combines the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient in the first feature merging layer to merge the training intermediate main semantic component vector and the training intermediate secondary semantic component vector to obtain a training intermediate text encoding vector.

[0184] The purpose of semantic embedding decomposition is to deeply mine the semantic information in the first text encoding vector. The first text encoding vector is the result obtained by encoding the semantically missing government training text in the previous step (such as step S101). For example, suppose that the first text encoding vector is obtained based on a semantically missing government training text about urban environmental governance. This text may contain relevant semantic information of words such as "pollution emission", "environmental monitoring", "greening project", etc., but this information is mixed in the vector.

[0185] The computer system performs a decomposition operation based on the first semantic embedding decomposition layer. Principal Component Analysis (PCA) can be used as a technical means here. For the first text encoding vector, the computer system first calculates its covariance matrix. Then, the computer system calculates the eigenvalues ​​and corresponding eigenvectors of the covariance matrix. The eigenvalues ​​are sorted from large to small, and the corresponding eigenvectors constitute a new orthogonal basis. According to the size of the eigenvalues, the computer system decomposes the first text encoding vector into a training intermediate main semantic component vector and a training intermediate secondary semantic component vector. Generally, the components represented by the eigenvectors corresponding to larger eigenvalues ​​are regarded as training intermediate main semantic component vectors, because these components account for a larger proportion of the variance explanation of the vector, which means that they contain more important semantic information in the text. For example, in the example of urban environmental governance, if the semantics related to "pollution emissions" accounts for a large proportion of the variance explained, then the part composed of the eigenvectors related to "pollution emissions" may be the main semantic component vector in the training process; and the component represented by the eigenvector corresponding to the smaller eigenvalue is regarded as the secondary semantic component vector in the training process, which may involve some auxiliary semantic content, such as the semantic part of the details about the selection of green plants in specific areas in urban environmental governance.

[0186] The major and minor eccentricity adjustment coefficients are important parameters of the first feature merging layer. These coefficients may be obtained by analyzing and debugging a large number of semantically missing government training texts and corresponding semantically complete government training texts. For example, when processing a large number of government training texts related to urban environmental governance, these coefficients were determined by comparing semantically complete texts (including comprehensive pollution emission control, environmental monitoring systems, greening project planning, etc.) with semantically missing texts (which may lack certain aspects, such as regulatory details of some pollution emission sources).

[0187] The computer system combines the two vectors by weighted summation to obtain the training intermediate text encoding vector. This weighted summation method can adjust the weights of the training intermediate main semantic components and the training intermediate secondary semantic components in the training intermediate text encoding vector according to the size of the coefficients.

[0188] In step S1022, the computer system performs another semantic embedding decomposition on the training intermediate text encoding vector based on the new semantic embedding decomposition layer to obtain a new training intermediate main semantic component vector and a new training intermediate secondary semantic component vector; based on the new feature merging layer, the new training intermediate main semantic component vector and the new training intermediate secondary semantic component vector are merged in combination with the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient in the new feature merging layer to obtain a new training intermediate text encoding vector, and stops when the last semantic embedding decomposition layer outputs the training intermediate main semantic component vector and the training intermediate secondary semantic component vector, and uses the training intermediate main semantic component vector output by the last semantic embedding decomposition layer as the first training main semantic component vector, and uses the training intermediate secondary semantic component vector output by the last semantic embedding decomposition layer as the first training secondary semantic component vector.

[0189] Although the training intermediate text encoding vector obtained in step S1021 has undergone a semantic embedding decomposition and merging, it may still need to further refine the semantic information. The computer system performs another semantic embedding decomposition on the training intermediate text encoding vector based on the new semantic embedding decomposition layer. Taking a semantically missing government training text on medical and health policies as an example, it is assumed that the training intermediate text encoding vector after the first semantic embedding decomposition and merging contains comprehensive semantic information such as "medical resource allocation" and "disease prevention and control system".

[0190] In this semantic embedding decomposition, the computer system can still use a method similar to principal component analysis (PCA). Recalculate the covariance matrix, eigenvalues, and eigenvectors of the training intermediate text encoding vector, and then divide the new training intermediate main semantic component vector and the new training intermediate secondary semantic component vector according to the size of the eigenvalue. For example, in the large semantic part of "medical resource allocation", the part related to "primary medical resource allocation" may be further subdivided as part of the new training intermediate main semantic component vector, while the part related to some auxiliary information in "primary medical resource allocation" (such as equipment allocation details of specific primary medical institutions) may become part of the new training intermediate secondary semantic component vector.

[0191] The new feature merging layer also has its own primary and secondary eccentricity adjustment coefficients. These coefficients may be adjusted based on the previous coefficients according to more training data or deeper semantic analysis. For example, as the analysis of medical and health policy-related texts deepens, it is found that there are new adjustments to the semantic weights for different types of medical resource allocation (such as public and private medical institution resource allocation), thereby adjusting the primary and secondary eccentricity adjustment coefficients.

[0192] This process is repeated, each time decomposing and merging semantics at a more refined level. When the last semantic embedding decomposition layer is reached, the output training intermediate main semantic component vector and training intermediate secondary semantic component vector are determined as the first training main semantic component vector and the first training secondary semantic component vector.

[0193] Step S103, based on the feature merging layer, combining the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient, merges the first training main semantic component vector and the first training secondary semantic component vector to obtain a second training text encoding vector, specifically including:

[0194] Step S1031: Based on the last feature merging layer, the first training main semantic component vector and the first training secondary semantic component vector are merged in combination with the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient in the last feature merging layer to obtain a second training text encoding vector.

[0195] In step S1031, the first training main semantic component vector and the first training secondary semantic component vector are relatively accurate semantic component vectors obtained through the previous steps (such as multiple semantic embedding decompositions and merging in step S102).

[0196] The main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient of the last feature merging layer are determined after debugging, which can accurately reflect the weight relationship between the main semantic components and the secondary semantic components in the merging under the current situation. Assume that the first training main semantic component vector is , the first training secondary semantic component vector is (Here we assume that the two vector dimensions are the same as n), the main eccentricity adjustment coefficient of the last feature merging layer is , the secondary eccentricity adjustment coefficient is .

[0197] The computer system obtains the second training text encoding vector by weighted summation , whose elements are calculated as For example, if , which indicates that when constructing the second training text encoding vector, the weight of the first training main semantic component vector is greater, and more emphasis is placed on the importance of main semantic parts such as "education resource allocation (focusing on compulsory education)" and "teacher team construction (the core is the teacher training system)" in the overall semantics. The second training text encoding vector obtained in this way can integrate the information of the main and secondary semantic components, providing an adjusted and optimized semantic representation basis for subsequent steps (such as operations in the government public text generation layer).

[0198] In one implementation, the government public text mining and analysis agent includes C government public text generation layers, where C is less than or equal to B. On this basis, step S104, based on the government public text generation layer, calls the first feature extractor to extract features from the second training text encoding vector to obtain a training error feature representation, merges the semantically missing government training text with the training error feature representation, and obtains the inferred government public text, specifically including:

[0199] Step S1041: Based on the E-th government affairs public text generation layer, call the first feature extractor to perform feature extraction on the training intermediate text encoding vector output by the F-th feature merging layer to obtain the E-th training error feature representation, merge the semantically missing government affairs training text with the E-th training error feature representation to obtain the E-th inferred government affairs public text; wherein, F=C-D+E, and E is less than or equal to D.

[0200] In step S1041, the government public text generation layer plays a key role in the entire government public text mining and analysis agent. Different government public text generation layers (here is the Eth) may have different parameters or functional focuses, but the overall goal is to generate more semantically complete government public texts. For example, when processing semantically missing government training texts about urban construction planning, each government public text generation layer is gradually repairing and improving the semantics of the text.

[0201] The first feature extractor is an important component obtained by debugging the semantically missing government training text and the semantically complete government training text. Its function is to extract features from a specific training intermediate text encoding vector. The training intermediate text encoding vector here is output by the C-D+Eth feature merging layer. The feature merging layer merges the semantic component vectors in the previous step, and the output training intermediate text encoding vector contains the adjusted semantic information. For example, in the example of urban construction planning, this vector may contain a comprehensive encoding representation of semantic information such as urban infrastructure construction (such as roads, bridges, water and electricity facilities, etc.), urban functional zoning (such as commercial areas, residential areas, industrial areas, etc.), etc.

[0202] The computer system uses the first feature extractor to extract features from the training intermediate text encoding vector. If the first feature extractor is a convolution kernel (under the concept of convolutional neural network), assuming that the training intermediate text encoding vector is represented as a two-dimensional matrix (for ease of understanding, the actual situation may be a high-dimensional vector), by sliding the convolution kernel on the entire training intermediate text encoding vector matrix, the computer system can obtain a series of eigenvalues, which constitute the Eth training error feature representation. This training error feature representation reflects the difference between the current training intermediate text encoding vector and the semantically complete government training text at the feature level.

[0203] Next, the computer system merges the semantically missing government training text with the Eth training error feature representation to obtain the Eth inferred government public text. For the merging operation, vector concatenation or weighted summation can be used. The Eth inferred government public text obtained in this way is more complete in semantics than the original semantically missing government training text. Under different values ​​of E (E is less than or equal to D), different inferred government public texts will be obtained, and these inferred government public texts are all constructed in the direction of being closer to the semantically complete government training text. This helps the computer system to debug the government public text mining and analysis intelligent agent in subsequent steps by comparing the errors between these inferred government public texts and the semantically complete government training texts, thereby continuously optimizing the intelligent agent's processing capabilities for government public texts and improving the accuracy and effectiveness of mining and analysis.

[0204] Figure 2 A hardware entity diagram of a computer system provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the hardware entity of the computer system 1000 includes: a processor 1001 and a memory 1002, wherein the memory 1002 stores a computer program that can be run on the processor 1001, and the processor 1001 implements the steps in the method of any of the above embodiments when executing the program.

Claims

1. A mining and analysis method for government public data, characterized in that: The method comprises: Performing text vector encoding on the first government affairs public text to obtain a first text encoding vector; Performing semantic embedding decomposition on the first text encoding vector to obtain a first main semantic component vector and a first secondary semantic component vector; Based on a main eccentricity adjustment coefficient and a secondary eccentricity adjustment coefficient, the first main semantic component vector and the first secondary semantic component vector are merged to obtain a second text encoding vector, wherein the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient are obtained by debugging a semantically missing government affairs training text and a corresponding semantically complete government affairs training text; The first feature extractor is called to perform feature extraction on the second text encoding vector to obtain an error feature representation, wherein the error feature representation is used to characterize the feature difference between the first government public text and the corresponding semantically complete government text, and the first feature extractor is debugged by combining the semantically missing government training text and the semantically complete government training text; wherein the first feature extractor is trained based on paired sample data using a convolutional neural network or a support vector machine, wherein the paired sample data includes the semantically missing government training text and the semantically complete government training text; The first government affairs public text is combined with the error feature representation to obtain a second government affairs public text, wherein the semantic completeness of the second government affairs public text is greater than the semantic completeness of the first government affairs public text.

2. The method according to claim 1, characterized in that The performing semantic embedding decomposition on the first text encoding vector to obtain a first main semantic component vector and a first secondary semantic component vector includes: Decomposing the first text encoding vector semantically based on word frequency to obtain a second main semantic component vector and a second secondary semantic component vector, and merging the second main semantic component vector and the second secondary semantic component vector to obtain a third text encoding vector; Local semantic enhancement is performed on the third text encoding vector to obtain the first main semantic component vector, and global semantic smoothing is performed on the third text encoding vector to obtain the first secondary semantic component vector.

3. The method according to claim 2, characterized in that The method further comprises: Calling a second feature extractor to perform feature extraction on the third text encoding vector to obtain a global semantic smoother, wherein the second feature extractor is obtained by debugging the semantically missing government affairs training text and the semantically complete government affairs training text; Determine the difference between the all-one vector and the global semantic smoother to obtain a local semantic enhancer, wherein the feature dimension of the all-one vector is consistent with the feature dimension of the global semantic smoother; The locally enhancing the third text encoding vector to obtain the first main semantic component vector, and globally smoothing the third text encoding vector to obtain the first secondary semantic component vector, comprises: The local semantic enhancer is called to perform local semantic enhancement on the third text encoding vector to obtain the first main semantic component vector, and the global semantic smoother is called to perform global semantic smoothing on the third text encoding vector to obtain the first secondary semantic component vector.

4. The method according to claim 3, characterized in that The number of the global semantic smoothers is A, and the feature dimension of each global semantic smoother is b; the number of the local semantic enhancers is A, and the feature dimension of each local semantic enhancer is b; the calling of the local semantic enhancer to perform local semantic enhancement on the third text encoding vector to obtain the first main semantic component vector, and the calling of the global semantic smoother to perform global semantic smoothing on the third text encoding vector to obtain the first secondary semantic component vector, include: Decomposing the third text encoding vector into A third government affairs public text sub-vectors in terms of feature dimension, wherein the number of text units corresponding to the global semantic smoother and the number of text units corresponding to the local semantic enhancer are the same as the number of text units corresponding to the third government affairs public text sub-vectors; Retrieve A local semantic enhancers, respectively perform local semantic enhancement on the A third government affairs public text sub-vectors, obtain A first main semantic component sub-vectors, and establish the first main semantic component vector from the A first main semantic component sub-vectors; Call A of the global semantic smoothers, perform global semantic smoothing on the A of the third government affairs public text sub-vectors respectively, obtain A first minor semantic component sub-vectors, and establish the first minor semantic component vector with the A of the first minor semantic component sub-vectors.

5. The method according to claim 1, characterized in that The performing semantic embedding decomposition on the first text encoding vector to obtain a first main semantic component vector and a first secondary semantic component vector includes: Performing semantic embedding decomposition on the first text encoding vector to obtain an intermediate main semantic component vector and an intermediate secondary semantic component vector, combining the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient, merging the intermediate main semantic component vector and the intermediate secondary semantic component vector to obtain an intermediate text encoding vector; The intermediate text encoding vector is subjected to another semantic embedding decomposition to obtain a new intermediate main semantic component vector and a new intermediate secondary semantic component vector. The new intermediate main semantic component vector and the new intermediate secondary semantic component vector are merged in combination with the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient to obtain a new intermediate text encoding vector, until the number of semantic embedding decompositions currently is equal to the first agreed number, the intermediate main semantic component vector obtained currently is determined as the first main semantic component vector, and the intermediate secondary semantic component vector obtained currently is determined as the first secondary semantic component vector.

6. The method according to claim 5, characterized in that The combining the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient, merging the intermediate main semantic component vector and the intermediate secondary semantic component vector to obtain an intermediate text encoding vector, includes: When the number of semantic embedding decompositions at the current time is less than the second agreed number, combining the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient, the intermediate main semantic component vector and the intermediate secondary semantic component vector obtained at the current time are eccentrically integrated to obtain a first benchmark text encoding vector, and the second agreed number is less than the first agreed number; Adjusting the text length of the first government affairs public text, and performing text vector encoding on the first government affairs public text after the text length adjustment to obtain a second reference text encoding vector; Invoking a saliency mining mechanism to perform text vector encoding on the first benchmark text encoding vector and the second benchmark text encoding vector to obtain the current intermediate text encoding vector; Alternatively, the combining of the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient, merging the intermediate main semantic component vector and the intermediate secondary semantic component vector to obtain an intermediate text encoding vector, comprises: In the case where the number of semantic embedding decompositions at the current time is greater than the third agreed number, combining the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient, the intermediate main semantic component vector and the intermediate secondary semantic component vector obtained at the current time are eccentrically integrated to obtain a third reference text encoding vector, and the third agreed number is not greater than the first agreed number; Merge at least one intermediate text encoding vector obtained in the number of times before the current time with the third benchmark text encoding vector to obtain the current intermediate text encoding vector.

7. The method according to any one of claims 1 to 6, characterized in that: The mining and analysis method for government public data is performed by a government public text mining and analysis agent, and the government public text mining and analysis agent includes a text vector encoding layer, a semantic embedding decomposition layer, a feature merging layer and a government public text generation layer; The text vector encoding layer is configured to perform text vector encoding on the first government affairs public text to obtain the first text encoding vector; The semantic embedding decomposition layer is configured to perform semantic embedding decomposition on the first text encoding vector to obtain the first main semantic component vector and the first secondary semantic component vector; The feature merging layer is configured to combine the first main semantic component vector and the first secondary semantic component vector in combination with the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient to obtain the second text encoding vector, wherein the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient are component parameters of the feature merging layer; The government affairs public text generation layer is configured to call the first feature extractor to perform feature extraction on the second text encoding vector to obtain the error feature representation, merge the first government affairs public text with the error feature representation to obtain the second government affairs public text, and the first feature extractor is a component parameter of the government affairs public text generation layer; The calibration process of the government public text mining and analysis agent includes: Based on the text vector encoding layer, the semantically missing government affairs training text is encoded with a text vector to obtain a first training text encoding vector; Based on the semantic embedding decomposition layer, the first training text encoding vector is semantically embedded and decomposed to obtain a first training main semantic component vector and a first training secondary semantic component vector; Based on the feature merging layer, the first training main semantic component vector and the first training secondary semantic component vector are merged in combination with the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient to obtain a second training text encoding vector; Based on the government affairs public text generation layer, calling the first feature extractor to perform feature extraction on the second training text encoding vector to obtain a training error feature representation, merging the semantically missing government affairs training text with the training error feature representation to obtain an inferred government affairs public text; Based on the error between the inferred government affairs public text and the semantically complete government affairs training text, the government affairs public text mining and analysis agent is debugged.

8. The method according to claim 7, characterized in that The government public text mining and analysis agent includes B semantic embedding decomposition layers and B feature merging layers, B∈[1,+∞); based on the semantic embedding decomposition layer, the first training text encoding vector is subjected to semantic embedding decomposition to obtain a first training main semantic component vector and a first training secondary semantic component vector, including: Based on the first semantic embedding decomposition layer, the first text encoding vector is semantically embedded and decomposed to obtain a training intermediate main semantic component vector and a training intermediate secondary semantic component vector; based on the first feature merging layer, the training intermediate main semantic component vector and the training intermediate secondary semantic component vector are merged in combination with the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient in the first feature merging layer to obtain a training intermediate text encoding vector; Based on the new semantic embedding decomposition layer, the training intermediate text encoding vector is once again semantically embedded to obtain a new training intermediate main semantic component vector and a new training intermediate secondary semantic component vector; based on the new feature merging layer, the new training intermediate main semantic component vector and the new training intermediate secondary semantic component vector are merged in combination with the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient in the new feature merging layer to obtain a new training intermediate text encoding vector, and the process stops when the last semantic embedding decomposition layer outputs the training intermediate main semantic component vector and the training intermediate secondary semantic component vector, and the training intermediate main semantic component vector output by the last semantic embedding decomposition layer is used as the first training main semantic component vector, and the training intermediate secondary semantic component vector output by the last semantic embedding decomposition layer is used as the first training secondary semantic component vector; The step of combining the first training main semantic component vector and the first training secondary semantic component vector based on the feature merging layer and combining the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient to obtain a second training text encoding vector includes: Based on the last feature merging layer, combined with the main eccentricity adjustment coefficient and the secondary eccentricity adjustment coefficient in the last feature merging layer, the first training main semantic component vector and the first training secondary semantic component vector are merged to obtain the second training text encoding vector.

9. The method according to claim 8, characterized in that The government public text mining and analysis agent includes C government public text generation layers, where C is less than or equal to B; based on the government public text generation layer, calling the first feature extractor to extract features from the second training text encoding vector to obtain a training error feature representation, merging the semantically missing government training text with the training error feature representation to obtain an inferred government public text, including: Based on the Eth government affairs public text generation layer, call the first feature extractor to perform feature extraction on the training intermediate text encoding vector output by the Fth feature merging layer to obtain the Eth training error feature representation, merge the semantically missing government affairs training text with the Eth training error feature representation to obtain the Eth inferred government affairs public text; wherein F=C-D+E, and E is less than or equal to D.

10. A computer system comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, wherein: When the processor executes the program, the steps in the method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Event Information Fusion Methods and Systems

    CN102298635A

  • Deep intelligent text matching method and device combining multi-angle features

    CN111339249A