A government affair policy question and answer method based on a knowledge graph and related equipment

By constructing a knowledge graph-based question-and-answer method for government policies, integrating multimodal data and utilizing dynamic graph neural networks and the Geo-BERT model, the data integration and timeliness issues of traditional question-and-answer systems are solved, thereby improving the intelligence and accuracy of government policy question-and-answer.

CN120849569BActive Publication Date: 2026-03-20TIANJIN UNIV +1
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Traditional government policy Q&A systems struggle to integrate multimodal data, fail to accurately locate policy information, have poor timeliness, and cannot meet users' needs for detailed government policy information.

Method used

By acquiring multimodal government policy data, a knowledge graph-based question-answering method for government policies is constructed. The Transformer hybrid architecture is used to integrate multimodal data and construct a knowledge graph of entities, relationships, attributes, time and space. Combined with dynamic graph neural networks and the Geo-BERT model, geographic location keywords are extracted, semantic expansion and condition constraint verification are performed, and answer results are generated.

Benefits of technology

It enables intelligent processing of government policy Q&A, improves the richness and accuracy of information, enhances timeliness and relevance, ensures clear and easy-to-understand answers, and meets users' actual Q&A needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120849569B_ABST
    Figure CN120849569B_ABST
Patent Text Reader

Abstract

The application provides a government policy question and answer method based on a knowledge graph and related equipment, realizes intelligent processing of government policy question and answer, helps to improve the intelligent level of government policy service, and meets the actual question and answer needs of actual government policy. The method of the application comprises: acquiring multi-modal government policy data, wherein the multi-modal government policy data comprises structured policy data, unstructured policy text, OCR text, format features and policy documents; fusing the multi-modal government policy data through a Transformer hybrid architecture and constructing a knowledge graph, wherein the knowledge graph comprises five elements of entity, relationship, attribute, time and space; constructing a time sequence graph structure of a policy condition based on a dynamic graph neural network; receiving user query information and extracting a geographic location keyword based on the query information; performing semantic expansion on the keyword by using a Geo-BERT model and acquiring a target keyword.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, and in particular to a government policy question and answer method based on a knowledge graph and related equipment. BACKGROUND

[0002] With the development of digital services, a policy question and answer system has become a key way to obtain policy information. Policy data is in a multi-modal and heterogeneous form, and is stored in a scattered manner in the form of structured data, unstructured text, and OCR text. Traditional methods are difficult to integrate multiple types of data, resulting in one-sided and inaccurate information extraction.

[0003] At the same time, most policies are associated with regions and time. Traditional question and answer systems rely only on keyword matching or shallow semantic analysis, and cannot accurately locate policy information, making it difficult to meet the needs of users to obtain details of government policies. In addition, due to the rapid updating speed of policies, the question and answer results of traditional question and answer systems are lagging and lack timeliness, and cannot meet the actual question and answer needs. SUMMARY

[0004] The present application provides a government policy question and answer method based on a knowledge graph and related equipment to solve the above technical problems.

[0005] The first aspect of the present application provides a government policy question and answer method based on a knowledge graph, which comprises:

[0006] Obtaining multi-modal government policy data, the multi-modal government policy data comprising structured policy data, unstructured policy text, OCR text, layout features, and policy documents;

[0007] Fusing the multi-modal government policy data through a Transformer hybrid architecture and constructing a knowledge graph, the knowledge graph comprising five elements of entities, relationships, attributes, time, and space;

[0008] Constructing a time series graph structure of policy conditions based on a dynamic graph neural network;

[0009] Receiving user query information and extracting geographic location keywords based on the query information;

[0010] Expanding the semantics of the keywords using a Geo-BERT model and obtaining target keywords;

[0011] Filtering a knowledge subgraph of a corresponding region from the knowledge graph based on the target keywords;

[0012] Conditionally verifying the knowledge subgraph to obtain target information that meets the conditions;

[0013] Input the target information into an artificial intelligence model to obtain an answer result, wherein the answer result is marked with a policy document number, a regional level, and policy information.

[0014] Optionally, the multi-modal government policy data is fused through a Transformer hybrid architecture, and a knowledge graph is constructed, the knowledge graph including five elements of entity, relationship, attribute, time, and space, and including:

[0015] The multi-modal government policy data is preprocessed to obtain preprocessed data.

[0016] Different types of modal data are extracted from the preprocessed data.

[0017] A Transformer hybrid architecture is constructed, and the different types of modal data are input into the Transformer hybrid architecture to obtain a fusion feature vector.

[0018] Based on the fusion feature vector, an entity, a relationship, an attribute, a time, and space information in the fusion feature vector are extracted by a sequence labeling model, and an associated relationship between the entity, the relationship, the attribute, the time, and the space is generated by reasoning through a common sense library.

[0019] The knowledge graph is constructed according to the associated relationship.

[0020] Optionally, user query information is received, and a geographic location keyword is extracted based on the query information, including:

[0021] User query information is received.

[0022] The query information is text cleaned and subjected to word segmentation processing to extract target text.

[0023] A keyword is extracted from the target text.

[0024] The keyword is compared and completed with a standard geographic entity library to obtain a comparison result.

[0025] A geographic location keyword is extracted from the comparison result.

[0026] Optionally, a Geo-BERT model is used to perform semantic expansion on the keyword, and a target keyword is obtained, including:

[0027] The extracted geographic location keyword is converted into target text in a target format, the target format being an input format of the Geo-BERT model.

[0028] The target text is input into the Geo-BERT model, and the Geo-BERT model expands the keyword in the target text to obtain a candidate keyword set.

[0029] deleting duplicate words and irrelevant words in the candidate keyword set to obtain a target keyword.

[0030] Optionally, based on the target keyword, a knowledge subgraph of a corresponding region is screened from the knowledge graph, including:

[0031] According to the target keyword, an entity node containing corresponding geographic location information is retrieved in the knowledge graph, and an associated relationship edge between the entity nodes is obtained;

[0032] Taking the entity node as the center, the associated nodes and relationship edges are recursively expanded according to the knowledge graph to determine the boundary range of the knowledge subgraph;

[0033] According to the entity node and the associated relationship edge, a knowledge subgraph of a corresponding region is screened from the knowledge graph.

[0034] Optionally, the knowledge subgraph is subjected to conditional constraint verification to obtain target information satisfying the conditions, including:

[0035] Extracting associated information in the knowledge subgraph;

[0036] Determining a verification rule;

[0037] Judging whether the associated information satisfies the verification rule;

[0038] If yes, target information satisfying the conditions is obtained.

[0039] Optionally, the target information is input into an artificial intelligence model to obtain an answer result, wherein the answer result is marked with a policy document number, a regional level and policy information, including:

[0040] The target information is preprocessed to obtain preprocessed information;

[0041] The preprocessed information is input into a knowledge-enhanced large language model, and an answer result is generated through a learnable graph attention mechanism.

[0042] The second aspect of the present application provides a government policy question and answer device based on a knowledge graph, including:

[0043] A first obtaining unit is configured to obtain multi-modal government policy data, wherein the multi-modal government policy data includes structured policy data, unstructured policy text, OCR text, layout features and policy documents;

[0044] A first constructing unit is configured to fuse the multi-modal government policy data through a Transformer hybrid architecture and construct a knowledge graph, wherein the knowledge graph includes five elements of entity, relationship, attribute, time and space.

[0045] a second construction unit configured to construct a time sequence graph structure of a policy condition based on a dynamic graph neural network;

[0046] an extraction unit configured to receive user query information and extract a geographic location keyword based on the query information;

[0047] a second acquisition unit configured to perform semantic expansion on the keyword by using a Geo-BERT model and acquire a target keyword;

[0048] a screening unit configured to screen a knowledge subgraph of a corresponding region from the knowledge graph based on the target keyword;

[0049] a verification unit configured to perform conditional constraint verification on the knowledge subgraph to acquire target information satisfying the condition;

[0050] a third acquisition unit configured to input the target information into an artificial intelligence model to acquire an answer result, wherein the answer result is marked with a policy document number, a region level, and policy information.

[0051] The third aspect of the present application provides a government policy question and answer device based on a knowledge graph, which comprises:

[0052] a processor, a storage, an input and output unit, and a bus;

[0053] The processor is connected with the storage, the input and output unit, and the bus;

[0054] The storage stores a program, and the processor invokes the program to execute the first aspect and any optional method in the first aspect.

[0055] The fourth aspect of the present application provides a computer readable storage medium, which stores a program, and the program executes the first aspect and any optional method in the first aspect when executed on a computer.

[0056] From the above technical solutions, the present application has the following advantages:

[0057] 1. The present application can construct a more comprehensive knowledge graph by acquiring and fusing multi-modal government policy data. The fusion of such multi-modal data enables the knowledge graph to cover multiple aspects of government policy, improving the richness and accuracy of information.

[0058] 2. The present application constructs a time sequence graph structure of a policy condition based on a dynamic graph neural network, which can capture the changes of policy conditions over time, helping to acquire policy trends and provide policy question and answer services based on time dimension, with high timeliness and accuracy.

[0059] 3、By receiving user query information and extracting geographic location keywords, the Geo-BERT model is used to perform semantic expansion on the keywords, which can more accurately understand the user's query intention and obtain target keywords related to geographic location, helping to improve the pertinence and accuracy of policy question answering.

[0060] 4、Based on the target keywords, the corresponding regional knowledge sub-graph is screened from the knowledge graph, and the knowledge sub-graph is subjected to conditional constraint verification, which can ensure that the target information obtained meets the user's query requirements and satisfies the requirements of policy conditions.

[0061] 5、The target information is input into an artificial intelligence model to obtain an answer result, and the answer result is marked with a policy document number, a regional level and policy information, so that the answer result is clearer and easier to understand. The marked answer result helps users quickly obtain the required information and improves the efficiency and user experience of policy question answering.

[0062] 6、The present application realizes the intelligent processing of government policy question answering by combining the technical means of knowledge graph, dynamic graph neural network, Geo-BERT model and artificial intelligence model, which helps to improve the intelligent level of government policy service and meets the actual question and answer requirements of actual government policy. BRIEF DESCRIPTION OF DRAWINGS

[0063] In order to more clearly illustrate the technical solutions in the present application, the following will briefly introduce the drawings needed in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0064] Figure 1 An embodiment flowchart of the government policy question answering method based on knowledge graph of the present application;

[0065] Figure 2 Another embodiment schematic diagram of the government policy question answering method based on knowledge graph of the present application;

[0066] Figure 3 Another embodiment schematic diagram of the government policy question answering method based on knowledge graph of the present application;

[0067] Figure 4 Another embodiment schematic diagram of the government policy question answering method based on knowledge graph of the present application;

[0068] Figure 5 Another embodiment schematic diagram of the government policy question answering method based on knowledge graph of the present application;

[0069] Figure 6Another embodiment schematic diagram of the government policy question answering method based on the knowledge graph of the present application;

[0070] Figure 7 Another embodiment schematic diagram of the government policy question answering method based on the knowledge graph of the present application;

[0071] Figure 8 Another embodiment schematic diagram of the government policy question answering method based on the knowledge graph of the present application. DETAILED DESCRIPTION

[0072] The present application provides a government policy question answering method based on a knowledge graph and related equipment, which realizes intelligent processing of government policy question answering by combining the technical means of knowledge graph, dynamic graph neural network, Geo-BERT model and artificial intelligence model, helps to improve the intelligent level of government policy service, and meets the actual question and answer needs of actual government policy.

[0073] Please refer to Figure 1 The first aspect of the present application provides an embodiment of a government policy question answering method based on a knowledge graph, which comprises:

[0074] 101. Obtain multi-modal government policy data, wherein the multi-modal government policy data comprises structured policy data, unstructured policy text, OCR text, layout features and policy documents;

[0075] 102. Fuse the multi-modal government policy data through a Transformer hybrid architecture, and construct a knowledge graph, wherein the knowledge graph comprises five elements of entity, relationship, attribute, time and space;

[0076] 103. Construct a time sequence graph structure of policy conditions based on a dynamic graph neural network;

[0077] 104. Receive user query information, and extract geographic location keywords based on the query information;

[0078] 105. Use a Geo-BERT model to perform semantic expansion on the keywords, and obtain target keywords;

[0079] 106. Filter a knowledge subgraph of the corresponding area from the knowledge graph based on the target keywords;

[0080] 107. Perform conditional constraint verification on the knowledge subgraph to obtain target information that meets the conditions;

[0081] 108. Input the target information into an artificial intelligence model to obtain an answer result, wherein the answer result is marked with a policy document number, a regional level and policy information.

[0082] In the embodiment of the present application, first, multi-modal government policy data is acquired, the multi-modal government policy data including structured policy data, unstructured policy text, OCR text, layout features and policy documents; then the multi-modal government policy data is fused through a Transformer hybrid architecture, and a knowledge graph is constructed, the knowledge graph including five elements of entity, relationship, attribute, time and space, a time sequence graph structure of policy conditions is constructed based on a dynamic graph neural network, user query information is received, and based on the query information, geographic location keywords are extracted, the keywords are subjected to semantic expansion using a Geo-BERT model, and target keywords are acquired, a knowledge subgraph of a corresponding area is screened from the knowledge graph based on the target keywords, the knowledge subgraph is subjected to conditional constraint verification to acquire target information satisfying the conditions, and the target information is input into an artificial intelligence model to acquire an answer result, the answer result being marked with a policy document number, an area level and policy information.

[0083] In step 101, due to the wide range of sources and various forms of government policy data, in order to comprehensively and accurately acquire policy information, the present application adopts diversified data collection methods. Structured policy data is usually stored in a relational database and is directly extracted by a SQL query statement. These data are presented in the form of a table and contain core elements of the policy, such as the policy name, the issuing department, the effective date, etc., and have a clear logical structure and a unified format. Unstructured policy text covers a large amount of document materials, such as PDF and Word formats of policy files. These documents contain rich policy content but lack fixed format specifications. Text mining techniques can be used to extract key information through regular expressions and keyword matching.

[0084] OCR text is the text information in scanned documents or images processed by OCR technology, which converts the text in images into editable text for subsequent processing. Layout feature extraction focuses on the formatting information of documents, such as font, font size, etc., which helps to understand the structure and emphasis of policy documents.

[0085] Through network crawlers, API interface calls, etc., complete policy documents can be acquired from official websites of government systems, government service platforms, etc., so as to comprehensively acquire multi-modal government policy data covering structured, unstructured, OCR text, layout features and complete policy documents, which is convenient for subsequent analysis and processing.

[0086] In step 102, after acquiring the multi-modal government policy data, different modal data has different characteristics and structures, and is fused through a Transformer hybrid architecture. The Transformer model can effectively handle long-distance dependency relationships between different modal data through a self-attention mechanism, and can extract and fuse features from different angles through a multi-head attention mechanism.

[0087] In the fusion process, the attribute information in the structured policy data is combined with the semantic information in the unstructured policy text, while considering the accuracy of the OCR text and the indication of the policy focus by the layout features, to convert the multi-modal data into a unified feature representation. Based on the fused multi-modal data, a knowledge graph is constructed, which displays the entities (such as policy name, relevant departments, enterprises, individuals, etc.), relationships (such as formulation relationship, application relationship, supervision relationship, etc.), attributes (such as policy type, effective period, applicable scope, etc.), time (policy release time, effective time, invalid time, etc.), and space (policy applicable regional scope) five elements in the policy data in a graphical manner. Through the form of nodes and edges, the dispersed policy information is organized into a structured and semantic knowledge network, which is convenient for subsequent query and analysis of policy knowledge.

[0088] In step 103, since government policies often change and adjust over time, policy conditions will also change accordingly. In order to accurately reflect the dynamic changes of policy conditions in the time dimension, the present application constructs a time sequence graph structure of policy conditions based on a dynamic graph neural network, which can capture the change rule of graph structure data in time sequence. Based on the policy knowledge graph, a timestamp is assigned to each entity and relationship to record the state of policy conditions at different time points.

[0089] By analyzing the dynamic changes of nodes and edges in the time sequence graph structure, the evolution trend of policy conditions can be found, such as the expansion or narrowing of the policy application scope, the adjustment of the policy preferential strength, etc. Through the time sequence graph structure, not only the historical changes of policy conditions can be displayed, but also the future policy trend can be predicted based on historical data, providing strong support for subsequent question answering.

[0090] In step 104, when the user presents the query information, the system first receives the text content input by the user. In order to accurately understand the user's query intention, the query information is analyzed based on natural language processing technology, and the geographic location keywords are extracted from the query text through methods such as word segmentation, part-of-speech tagging, and named entity recognition. For example, the user queries "XX City XXX Year Automobile Subsidy Policy", and the system identifies "XX City" as a geographic location keyword through named entity recognition technology. These geographic location keywords are key information for positioning the user's query area, which can help the system quickly filter out policy information related to the user's query area, improving query efficiency and accuracy.

[0091] In step 105, after obtaining the geographic location keywords, since the keywords input by the user may be general or single, in order to more comprehensively cover the policy information of the related area, the keywords are expanded in semantics by using a Geo-BERT model, which is a pre-trained language model based on geographic information and can understand the semantic relationship and geographic features between geographic locations. By inputting the geographic location keywords into the Geo-BERT model, the model generates a series of expanded keywords related to the keywords based on geographic semantic knowledge. For example, for "XX City", it may expand to "AA" district, "BB" district and other subordinate area names. These expanded keywords serve as target keywords and can more comprehensively cover the user query area and its related areas, ensuring that important policy information is not missed.

[0092] In step 106, based on the obtained target keywords, the corresponding area knowledge subgraph is screened from the constructed knowledge graph. The knowledge graph contains a large amount of policy information and geographic information. By matching the target keywords with the geographic location nodes in the knowledge graph, the entities, relationships and attributes related to the target keywords are screened to form a local knowledge subgraph. For example, when the target keywords include "XX City" and its expanded areas, the knowledge subgraph will include policy entities related to XX City and its subordinate areas, relationships between policies, and attribute information of these policies. This knowledge subgraph focuses on the policy knowledge of the user query area, reducing the data volume for subsequent processing, improving query efficiency, and providing a basis for accurately obtaining the policy information required by the user.

[0093] In step 107, after screening the knowledge subgraph, in order to ensure that the obtained policy information meets the actual needs of the user, the knowledge subgraph needs to be checked for conditional constraints, including the time range of the policy, the applicable object, and the specific provisions. For example, the user queries the "XXXX year new energy vehicle subsidy policy", which needs to check whether the policy in the knowledge subgraph is effective in XXXX year and whether it is applicable to the field of new energy vehicles. By matching and verifying each piece of policy information in the knowledge subgraph, the information that does not meet the conditions is filtered out, and the target information that meets the conditions is finally obtained. These target information is highly related to the user query and meets the specific conditions of the policy content, which can accurately answer the user's questions.

[0094] In step 108, after preprocessing the target information, the preprocessed information is obtained, the preprocessed information is input into the knowledge enhanced large language model, and the answer result is generated through the learnable graph attention mechanism. The knowledge enhanced large language model is based on a deep learning algorithm and a natural language processing technology, analyzes and understands the target information, and automatically extracts the policy document number, regional level and detailed policy information according to the policy content in the target information, and generates an answer result in a structured manner. In the answer result, the policy document number is clearly marked to facilitate users to further check the original text; the regional level is marked to make the user clear about the scope of the policy; and the policy information is elaborated in detail to ensure that the user can fully and accurately understand the relevant policy content.

[0095] For example, the answer result can be presented as "policy document number: XXX; regional level: XX city; policy information: in XXXX, XX city gives a certain amount of subsidy to individuals and enterprises purchasing new energy vehicles, and the specific subsidy standard is …", thereby providing the user with clear, accurate and complete policy answers.

[0096] Therefore, by combining the technical means of knowledge graph, dynamic graph neural network, Geo-BERT model and artificial intelligence model, the application realizes the intelligent processing of government policy question and answer, which helps to improve the intelligent level of government policy service and meets the actual question and answer needs of actual government policy.

[0097] Please refer to Figure 2 According to some embodiments of the application, the multi-modal government policy data is fused by the Transformer hybrid architecture in step 102, and a knowledge graph is constructed, which includes five elements of entity, relationship, attribute, time and space, and can include, but is not limited to, the following:

[0098] 201, preprocessing the multi-modal government policy data to obtain preprocessed data;

[0099] 202, extracting different types of modal data from the preprocessed data;

[0100] 203, constructing a Transformer hybrid architecture and inputting the different types of modal data into the Transformer hybrid architecture to obtain a fusion feature vector;

[0101] 204, based on the fusion feature vector, extracting entity, relationship, attribute, time and space information in the fusion feature vector with a sequence labeling model, and generating the association relationship between entity, relationship, attribute, time and space through common sense database reasoning;

[0102] 205, constructing a knowledge graph according to the association relationship.

[0103] In the embodiments of the present application, the multi-modal government policy data sources are extensive, including structured data, unstructured text, OCR recognition results, layout features, and various types, and the data formats and qualities are uneven. Therefore, the multi-modal government policy data needs to be preprocessed. In the preprocessing stage, data cleaning is performed first. For structured data, missing values are checked and processed, for example, filled by mean, median or based on business rules; incorrect data is detected and corrected, such as abnormal date format, numerical value exceeding reasonable range, etc. For unstructured text, remove useless characters, stop words, and perform spelling check and correction. OCR text needs to be corrected, and the recognition accuracy is improved by using dictionary matching. Then data standardization is performed, such as unifying time format (e.g. converting "2025 year 1 month" to "2025-01-01") and unit (e.g. converting "ten thousand yuan" to "yuan"). Text is segmented, and word segmentation and part-of-speech tagging are performed, and long text is split into word sequences to provide data basis for subsequent processing.

[0104] Different types of modal data are separated from the preprocessed data. For structured policy data, it is directly extracted through table structure and field definition, such as policy name, document number, issuing department and other attributes from policy registration table. Unstructured text data uses text classification technology to distinguish different parts of policy text, such as attachments and interpretation, based on keyword matching or machine learning model; OCR text is identified by source identification or file type, such as PDF generated by scanning, layout features are extracted by analyzing document format, such as font size, bold, indentation, etc. Policy documents are extracted as complete file units, preserving their original structure and multi-modal information combination, laying a foundation for subsequent processing and fusion of different modalities.

[0105] After the above information is processed, a Transformer hybrid architecture is constructed to process multi-modal data, in which specific encoders are designed for different modalities. Text modalities use BERT-like models to capture semantic relationships; structured data designs a table encoder to convert row and column relationships into embedding representations; OCR text combines position information to enhance encoding; layout features extract visual features through CNN.

[0106] The outputs of each modality encoder are interacted through cross-modal attention mechanisms, such as establishing bidirectional attention between text and table, so that "subsidy amount" in text can be associated with specific numerical value in table, and a shared decoder is used to generate unified fusion feature vector.

[0107] Based on the fusion feature vector, information extraction is performed using a sequence labeling model. The fusion vector is input into the model, and the entities in the text sequence are labeled by a pre-trained entity recognition label system. The relationship extraction adopts a joint modeling method. Based on entity recognition, the semantic association between entities is captured by a graph attention network, such as identifying the formulation relationship between the “publishing department” and the “policy name”. The attribute extraction focuses on the specific description of the entity, such as the applicable object of the policy, the subsidy standard, etc. The time and space information are processed by a special identifier, which identifies the time phrase and normalizes it to a standard time format, extracts the geographic location and associates it to the administrative division level. Through the policy domain ontology library and the geographic knowledge base, implicit relationships are inferred and completed.

[0108] Then, according to the association relationship obtained by extraction and reasoning, a knowledge graph is constructed. Specifically, a graph database is used to store the knowledge graph, the entity is mapped to a node, the association relationship is mapped to an edge, and the attribute is used as a parameter of the node or edge.

[0109] The hierarchical graph structure is set as follows: the top layer is a general concept layer, which defines abstract categories such as policies, departments, and enterprises; the middle layer is a relationship layer, which stores semantic relationships between entities; the bottom layer is an instance layer, which stores specific policy provisions and related entities; for the time dimension, a timestamp attribute is added to the node and edge to support querying policy knowledge within a specific time period; for the spatial dimension, a hierarchical relationship of geographic locations is established to support regional range queries.

[0110] The knowledge graph is converted into a vector representation by the TransE algorithm, providing a basis for subsequent graph neural network analysis and reasoning, and finally forming a structured, semantic, and time and space dimension query supported knowledge graph.

[0111] Please refer to Figure 3 According to some embodiments of the present application, the step 104 of receiving user query information and extracting geographic location keywords based on the query information can include, but is not limited to, the following:

[0112] 301. Receive user query information;

[0113] 302. Perform text cleaning and word segmentation processing on the query information to extract target text;

[0114] 303. Extract keywords from the target text;

[0115] 304. Compare the keywords with the standard geographic entity library to complete the comparison to obtain a comparison result;

[0116] 305. Extract geographic location keywords from the comparison result.

[0117] In the embodiments of the present application, the user inputs query information through a web interface, a mobile application or other interactive channels. These query information is in the form of natural language text, with diverse content and possible non-standard expressions and inconsistent formats. For example, the user may express the demand in different sentence patterns such as questions and statements, for example, inputting “XX City XXX Year Car Subsidy Policy What is it”, the system needs to accurately receive these original query texts to provide basic data for subsequent analysis and processing.

[0118] After receiving the original query information, the text needs to be cleaned first because the user input text may contain invalid characters, special symbols, repeated content or misspelled words and other interference factors. Regular expressions are used to remove HTML tags, punctuation marks, special characters and other text in the text, and to handle repeated content and garbled code problems, so that the text format is more standardized. For example, “@XX City XXX Year # Car Subsidy Policy” is cleaned to “XX City XXX Year Car Subsidy Policy”.

[0119] After cleaning, the text is processed using a segmentation algorithm to divide the continuous text sequence into individual words or phrases. Based on the dictionary segmentation method, the text is matched with the words in the dictionary to achieve accurate segmentation by constructing a professional government field dictionary. For example, “XX City XXX Year Car Subsidy Policy” is segmented into “XX City” “XXX Year” “Car” “Subsidy” “Policy”, so as to extract the target text and prepare for subsequent keyword extraction.

[0120] From the segmented target text, keywords are extracted, and technologies such as part-of-speech tagging, word frequency statistics and semantic analysis are used to identify words that are important to express query intent. Part-of-speech tagging can distinguish between different parts of speech such as nouns, verbs and adjectives. The key information in policy queries is usually nouns such as policy objects, regions and themes. By counting the frequency of each word in the text, high-frequency words are more likely to reflect the core content of the text. Combined with semantic analysis, the semantic importance of the word in the government field is considered to filter out the keywords that best represent the user's query intent.

[0121] After extracting the keywords, they are compared and completed with the standard geographic entity library. The standard geographic entity library is a collection of geographic information that has been professionally organized and standardized, containing accurate and comprehensive geographic entity information such as administrative region names at all levels, important geographic regions and landmark buildings.

[0122] In the comparison process, string matching and semantic similarity calculation methods are used to compare the extracted keywords with the entries in the geographic entity library one by one. If the keywords completely match the entries in the library, they are directly confirmed. If there is partial matching or semantic similarity, the similarity score is calculated by a semantic similarity algorithm. When the score exceeds a certain threshold, it is determined as a related geographic entity, and information is completed. For example, the user inputs "XX City XXX Year Car Subsidy Policy", "XX" is compared with "XX City" in the standard geographic entity library, and it is confirmed by semantic analysis that they point to the same geographic area, and is completed as a complete and standard "XX City", so as to obtain more accurate comparison results.

[0123] From the comparison results after comparison and completion, the keywords that explicitly indicate geographic locations are selected, and the keywords in the comparison results are classified and identified by pre-defined geographic entity category labels such as "province", "city", "district", and "county". Only the keywords that meet the geographic entity category labels are extracted as geographic location keywords, which will be used to screen the policy information of the corresponding area from the knowledge graph in the future. For example, in the comparison result "XX City" "Car Subsidy Policy", "XX City" is extracted as a geographic location keyword to accurately locate the relevant government policy content in the future.

[0124] Please refer to Figure 4 According to some embodiments of the present application, the semantic expansion of the keywords in step 105 using the Geo-BERT model can specifically include, but is not limited to, the following:

[0125] 401. Convert the extracted geographic location keywords into target text in a target format, and the target format is the input format of the Geo-BERT model;

[0126] 402. Input the target text into the Geo-BERT model, and the Geo-BERT model expands the keywords in the target text to obtain a candidate keyword set;

[0127] 403. Delete repeated words and irrelevant words in the candidate keyword set to obtain target keywords.

[0128] In the embodiments of the present application, the extracted geographic location keywords are converted into target text in a target format, which is the input format of the Geo-BERT model. Specifically, in the government policy query system, the extracted geographic location keywords such as "XX city" need to be converted in format to adapt to the input requirements of the Geo-BERT model. As a pre-trained language model, the Geo-BERT model has specific requirements for the format of the input text, usually requiring the addition of special markers, tokenization processing and conversion to digital representation.

[0129] First, the geographic location keywords are preprocessed. The extracted geographic location keywords are spliced to form a text segment conforming to natural language expression. For example, the extracted keywords are "XX city" and "BB district", which can be spliced into "XX city BB district". Then, special markers are added. The Geo-BERT model usually requires adding [CLS] and [SEP] markers at the beginning and end of the input text, respectively, to identify the beginning and end of the text. For the spliced geographic location text "XX city BB district", after adding the markers, it becomes "[CLS] XX city BB district [SEP]".

[0130] Next, tokenization processing is performed. The Geo-BERT model uses a specific tokenizer to segment the text into subwords. For Chinese text, Chinese characters or words are split into smaller semantic units. For example, "XX city BB district" may be tokenized into "XX", "city", "BB", and "district". Finally, the tokenized text is converted into a digital representation acceptable to the model. Each subword corresponds to a unique word table index. The sequence of tokenized subwords is converted into a corresponding index sequence to form the input vector of the model.

[0131] The target text is then input into the Geo-BERT model. The Geo-BERT model expands the keywords in the target text to obtain a set of candidate keywords. Specifically, the Geo-BERT model is a pre-trained language model based on the BERT architecture and incorporating geographic semantic information, which can understand the semantic relationships between geographic locations and geographic features. After inputting the format-converted target text into the Geo-BERT model, the model will perform semantic expansion on the geographic location keywords in the text.

[0132] The model first encodes the input target text and extracts the semantic representation of the text through a multi-layer Transformer network. During the encoding process, the model learns the semantic associations between geographic location keywords and geographic context information. For example, for the input "[CLS] XX city BB district [SEP]", the model not only understands that "BB district" belongs to "XX city", but also associates with other geographic areas and policy information related to XX city.

[0133] Based on this semantic understanding, the Geo-BERT model generates a set of candidate keywords related to the input keyword, and the expansion methods include geographical level expansion, semantic related expansion, and policy field expansion. The geographical level expansion generates the upper or lower geographical area of the input keyword; the semantic related expansion generates geographical entities that are semantically similar to the input keyword; and the policy field expansion generates policy applicable areas related to the input keyword by combining the knowledge of government policy fields, such as "small and micro enterprises" related policies that may expand to "economic development zones" and "free trade zones". In this way, the Geo-BERT model expands the input geographical location keyword comprehensively and generates a set of candidate keywords.

[0134] The set of candidate keywords expanded by the Geo-BERT model may contain repeated words and words unrelated to the user query, which need to be filtered and cleaned to obtain accurate and effective target keywords.

[0135] First, repeated words are deleted. Since the Geo-BERT model may generate semantically similar but differently expressed words during expansion, these words actually refer to the same geographical area and are redundant information. By string matching and semantic similarity calculation, repeated words are identified and one representative word is retained. For example, "BB District" is retained and "XX City BB District" is deleted.

[0136] Next, unrelated words are filtered. Based on the user's original query intent and the knowledge of government policy fields, it is determined whether the candidate keywords are related to the query. At the same time, words unrelated to the policy field, such as some common nouns or adjectives, are filtered out. The candidate keywords are screened one by one, and highly relevant words to the user query are retained.

[0137] Finally, the filtered keywords are standardized to unify the expression form of the words, and the final set of target keywords is obtained. These target keywords not only contain the user's original input geographical location information, but also supplement related geographical entities through the expansion of the Geo-BERT model, which can more comprehensively and accurately locate the area of the user's query policy information.

[0138] Please refer to Figure 5 According to some embodiments of the present application, the step 106 of filtering the knowledge subgraph of the corresponding area from the knowledge graph based on the target keyword can specifically include, but is not limited to, the following:

[0139] 501. According to the target keyword, retrieve entity nodes containing corresponding geographical location information in the knowledge graph, and obtain the association relationship between the entity nodes;

[0140] 502. recursively expanding associated nodes and relationship edges according to the knowledge graph, with the entity node as the center, to determine the boundary range of the knowledge subgraph;

[0141] 503. filtering out the knowledge subgraph of the corresponding area from the knowledge graph according to the entity node and the associated relationship edge.

[0142] In the embodiments of the present application, when the target keyword is obtained, the knowledge graph, as a huge semantic network, stores rich policy information and the association relationship between entities. The system will perform deep retrieval in the knowledge graph, and accurately match the target keyword with the entity nodes in the knowledge graph through natural language processing technology.

[0143] Since the entity nodes in the knowledge graph contain various geographic location information, such as specific cities, counties, towns, and even specific economic regions, during the retrieval process, once the geographic location information in the entity nodes matches the target keyword, these entity nodes will be locked. At the same time, the entity nodes in the knowledge graph are connected to each other through relationship edges, which represent various relationships between entities, such as policy formulation relationship, application relationship, supervision relationship, etc.

[0144] At the same time of determining the entity nodes, the system will also obtain the association relationship edges between these entity nodes. By recording the association relationship edges, the logical relationship between different entities can be clearly presented, laying a foundation for more comprehensive screening of policy information in the future. For example, when the target keyword is "XX City BB District", the system will retrieve all entity nodes containing the geographic location information of "XX City BB District" in the knowledge graph, such as a certain industry support policy entity issued by BB District, an enterprise entity involved, etc., and obtain the policy application, enterprise benefit, etc. association relationship edges between these entity nodes.

[0145] With the successfully retrieved entity node as the core starting point, the system begins to recursively expand the associated nodes and relationship edges according to the rich semantic relationships and logical structures already constructed in the knowledge graph. The recursive expansion process is like a ripple spreading outward from the entity node as the center. Starting from the initial entity node, other nodes connected to it are found along the associated relationship edges, and these newly discovered nodes are considered in the scope. Then, taking these new nodes as the starting point, the associated nodes and relationship edges of these new nodes are continuously searched, and so on. In this process, the boundary range of the knowledge subgraph needs to be determined to avoid excessive expansion leading to excessive irrelevant information. The determination of the boundary range can be based on various factors, such as the hierarchical relationship of policies. If only the policy-related information of a certain administrative level is concerned, the expansion will stop when nodes beyond that level are encountered. Or according to the thematic relevance of policies, when nodes unrelated to the core policy theme are encountered, it is also considered as reaching the boundary. For example, taking the "XX City BB District Automobile Subsidy Policy" entity node as the center, it will expand to the related entities of the automobile industry and the related financial subsidy entities along the relationship edges. In the expansion process, if a policy-related node unrelated to the automobile theme is encountered, the expansion in that direction will be stopped, thereby determining the boundary range of the knowledge subgraph, so that the selected knowledge subgraph comprehensively and accurately contains the policy information related to the target.

[0146] After determining the entity node, the associated relationship edge, and the boundary range of the knowledge subgraph, the system can select the corresponding regional knowledge subgraph from the vast knowledge graph according to these information. The knowledge subgraph is a local subset of the knowledge graph, focusing on the policy knowledge related to the target keyword in the region, containing important entity nodes and key associated relationship edges in the region. Through the selection of the knowledge subgraph, a large amount of policy information originally scattered in the knowledge graph is integrated and refined, and irrelevant information interference is removed.

[0147] The selected knowledge subgraph can clearly show the specific content of the policies in the corresponding region, the related subjects involved, and their mutual relationships, providing a highly focused and structured data foundation for subsequent in-depth analysis and processing of policy information. For example, for the knowledge subgraph related to "XX City BB District", it will contain various policy entities, related enterprise and institution entities, and policy-making, implementation, and beneficiary associated relationship edges in XX City BB District, so that users can intuitively understand the policy ecology and related information in XX City BB District, facilitating further query and use.

[0148] Please refer to Figure 6 According to some embodiments of the present application, the conditional constraint verification on the knowledge subgraph in step 107 to obtain the target information satisfying the conditions can include, but is not limited to, the following:

[0149] 601、extracting the associated information in the knowledge subgraph;

[0150] 602、determining a verification rule;

[0151] 603、judging whether the associated information meets the verification rule;

[0152] 604、if yes, obtaining target information meeting the condition.

[0153] In the embodiments of the present application, after obtaining the knowledge subgraph of the corresponding area, rich associated information is contained, which is a specific form of embodiment of policy knowledge. The system first extracts the entity node information in the knowledge subgraph, including the name, type, attribute, etc. of the entity. For example, in the knowledge subgraph of "XX City BB District", the policy name, issuing department, effective date, etc. of the "XX City BB District automobile subsidy policy" entity are extracted.

[0154] At the same time, the relationship edge information between entities in the knowledge subgraph is also crucial. The system extracts the relationship type represented by the relationship edge and related weight or strength information. In addition, there may be information of time, space, etc. in the knowledge subgraph, which will also be extracted by the system, such as the effective time range of the policy and the specific area range applicable, etc. These multi-dimensional associated information are extracted completely, providing comprehensive data support for subsequent verification work.

[0155] Determining the verification rule is an important step to ensure that the obtained policy information meets the actual needs of the user. The determination of the verification rule needs to consider many factors and is based on the user's query intention and demand.

[0156] When setting the verification rule of the subsidy policy, it should comply with the relevant regulations of the subsidy, including the application conditions, issuance process, etc. In addition, the verification rule can be flexibly adjusted according to different application scenarios and business needs. For some policy queries, more attention is paid to the timeliness verification; while for long-term policy research, more attention is paid to the completeness and continuity of the policy, etc. By considering these factors, an accurate, comprehensive and targeted verification rule is developed, providing clear standards for subsequent condition judgment.

[0157] After the associated information in the knowledge subgraph is extracted and the verification rules are determined, the system will compare the extracted associated information with the verification rules one by one to determine whether the associated information meets the verification rules. For time dimension verification, the system will check whether the effective time and invalid time of the policy is within the time range specified by the user, such as determining whether the policy is effective or valid within the specified period. In the policy object dimension, it will verify whether the objects applicable to the policy are consistent with the objects of interest of the user, such as confirming whether the policy is explicitly applicable to high-tech enterprises. For policy type verification, it will determine whether the policy belongs to the category of subsidy policies. When making judgments, the system will use a combination of precise matching and fuzzy matching. For some explicit attribute information such as policy number and policy name, precise matching is used. For some descriptive information such as policy scope and policy content, fuzzy matching is used to analyze the text semantics through natural language processing technology to determine whether it meets the requirements of the verification rules. Through this detailed comparison and judgment process, it can accurately determine whether the associated information in the knowledge subgraph meets the verification rules set by the user.

[0158] When the associated information in the knowledge subgraph meets the set verification rules after judgment, the system will integrate these associated information that meet the conditions as target information that meets the conditions. These target information is policy knowledge that has been strictly screened and verified, and can accurately match the user's query requirements.

[0159] For example, for the query of "XX City XXXX Year Automobile Subsidy Policy", the target information obtained after verification will include detailed information such as subsidy policy content, application process, and subsidy amount standard, as well as related identification information such as policy number and issuing department. These target information can be presented to the user in a structured form such as tables and lists, or can be summarized and described in natural language form according to the user's needs, making it easy for users to quickly and accurately obtain the required policy information.

[0160] Referring to Figure 7 The second aspect of the present application provides a government policy question and answer device based on a knowledge graph, comprising:

[0161] A first acquisition unit 701 is configured to acquire multi-modal government policy data, wherein the multi-modal government policy data includes structured policy data, unstructured policy text, OCR text, format features, and policy documents.

[0162] A first construction unit 702 is configured to fuse the multi-modal government policy data through a Transformer hybrid architecture and construct a knowledge graph, wherein the knowledge graph includes five elements of entity, relationship, attribute, time, and space.

[0163] The second construction unit 703 is configured to construct a time sequence graph structure of a policy condition based on a dynamic graph neural network.

[0164] The extraction unit 704 is configured to receive user query information, and extract a geographic location keyword based on the query information.

[0165] The second acquisition unit 705 is configured to perform semantic expansion on the keyword by using a Geo-BERT model, and acquire a target keyword.

[0166] The screening unit 706 is configured to screen a knowledge subgraph of a corresponding region from the knowledge graph based on the target keyword.

[0167] The verification unit 707 is configured to perform conditional constraint verification on the knowledge subgraph to acquire target information satisfying the condition.

[0168] The third acquisition unit 708 is configured to input the target information into an artificial intelligence model to acquire an answer result, wherein the answer result is marked with a policy document number, a region level and policy information.

[0169] Please refer to Figure 8 The application further provides a government policy question and answer device based on a knowledge graph, which comprises:

[0170] The processor 801, the storage 802, the input and output unit 803 and the bus 804 are connected.

[0171] The processor 801 is connected with the storage 802, the input and output unit 803 and the bus 804.

[0172] The storage 802 stores a program, and the processor 801 calls the program to execute any of the above methods.

[0173] The application further relates to a computer readable storage medium, which stores a program, and when the program runs on a computer, the computer executes any of the above methods.

[0174] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device and unit can refer to the corresponding process in the foregoing method embodiments, and will not be described here.

[0175] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other manners. For example, the apparatus embodiments described above are merely illustrative, for example, the division of units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another apparatus, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, apparatuses or units, and can be electrical, mechanical or other forms.

[0176] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, can be located in one place, or can be distributed to a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0177] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0178] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part of the prior art that makes a contribution or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.

Claims

1. A knowledge graph-based question-and-answer method for government policies, characterized in that, The method includes: Acquire multimodal government policy data, which includes structured policy data, unstructured policy text, OCR text, layout features, and policy documents; The multimodal government policy data is integrated through the Transformer hybrid architecture, and a knowledge graph is constructed, which includes five elements: entity, relationship, attribute, time and space. Constructing a time-series graph structure of policy conditions based on dynamic graph neural networks; Receive user query information and extract geolocation keywords based on the query information; The extracted geographic location keywords are converted into target text in a target format, which is the input format of the Geo-BERT model; The target text is input into the Geo-BERT model, which expands the keywords in the target text to obtain a set of candidate keywords; Duplicate and irrelevant words are removed from the candidate keyword set to obtain target keywords; knowledge subgraphs for corresponding regions are selected from the knowledge graph based on the target keywords. The knowledge subgraph is subjected to condition constraint verification to obtain target information that meets the conditions; The target information is input into an artificial intelligence model to obtain the answer result, which includes the policy document number, regional level, and policy information.

2. The knowledge graph-based question-and-answer method for government policies according to claim 1, characterized in that, The multimodal government policy data is integrated using a Transformer hybrid architecture, and a knowledge graph is constructed. This knowledge graph includes five elements: entities, relationships, attributes, time, and space. The multimodal government policy data is preprocessed to obtain preprocessed data; Extract different types of modal data from the preprocessed data; Construct a Transformer hybrid architecture and input the different types of modal data into the Transformer hybrid architecture to obtain a fused feature vector; Based on the fused feature vector, the entity, relation, attribute, time and space information in the fused feature vector is extracted using a sequence labeling model, and the association relationship between the entity, relation, attribute, time and space is generated through common sense base reasoning. A knowledge graph is constructed based on the aforementioned relationships.

3. The knowledge graph-based question-and-answer method for government policies according to claim 1, characterized in that, Receive user query information and extract geographic location keywords based on the query information, including: Receive user query information; The query information is cleaned and segmented into words to extract the target text; Extract keywords from the target text; The keywords are compared and completed with the standard geographic entity database to obtain the comparison results; Extract geographic location keywords from the comparison results.

4. The knowledge graph-based question-and-answer method for government policies according to claim 1, characterized in that, Based on the target keywords, knowledge subgraphs for corresponding regions are selected from the knowledge graph, including: Based on the target keywords, retrieve entity nodes containing corresponding geographical location information in the knowledge graph and obtain the relationship edges between entity nodes; Centered on the entity node, and based on the knowledge graph, recursively expand the associated nodes and relation edges to determine the boundary range of the knowledge subgraph; Based on the entity nodes and the associated edges, knowledge subgraphs for the corresponding regions are selected from the knowledge graph.

5. The knowledge graph-based question-and-answer method for government policies according to claim 1, characterized in that, The knowledge subgraph is subjected to condition constraint verification to obtain target information that meets the conditions, including: Extract the association information from the knowledge subgraph; Determine the verification rules; Determine whether the associated information meets the verification rules; If so, then obtain the target information that meets the conditions.

6. The knowledge graph-based question-and-answer method for government policies according to claim 1, characterized in that, The target information is input into an artificial intelligence model to obtain a response, which includes the policy document number, regional level, and policy information, including: The target information is preprocessed to obtain preprocessed information; The preprocessed information is input into a knowledge-enhanced large language model, and the answer is generated through a learnable graph attention mechanism.

7. A knowledge graph-based question-and-answer device for government policies, characterized in that, The device includes: The first acquisition unit is used to acquire multimodal government policy data, which includes structured policy data, unstructured policy text, OCR text, layout features, and policy documents. The first building unit is used to integrate the multimodal government policy data through the Transformer hybrid architecture and build a knowledge graph, which includes five elements: entity, relationship, attribute, time and space. The second building unit is used to construct a time-series graph structure of policy conditions based on a dynamic graph neural network; The extraction unit is used to receive user query information and extract geographic location keywords based on the query information; The second acquisition unit is used to convert the extracted geographic location keywords into target text in a target format, wherein the target format is the input format of the Geo-BERT model; input the target text into the Geo-BERT model, wherein the Geo-BERT model expands the keywords in the target text to obtain a candidate keyword set; and delete duplicate and irrelevant words in the candidate keyword set to obtain the target keywords. A filtering unit is used to filter knowledge subgraphs of corresponding regions from the knowledge graph based on the target keywords; A verification unit is used to perform condition constraint verification on the knowledge subgraph in order to obtain target information that meets the conditions. The third acquisition unit is used to input the target information into an artificial intelligence model to obtain the answer result, wherein the answer result is marked with the policy document number, regional level and policy information.

8. A knowledge graph-based question-and-answer device for government policies, characterized in that, The device includes: Processor, memory, input / output units, and bus; The processor is connected to the memory, the input / output unit, and the bus; The storage device contains a program that the processor invokes to perform the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains a program that, when executed on a computer, performs the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Address standardization method and device, storage medium and electronic equipment

    CN118170929A

  • Government affair question and answer method based on knowledge graph and large language model

    CN118939761A

  • Product public opinion analysis method and device, storage medium and computer equipment

    CN120470440A

  • Integrated media topic selection planning method based on AI technology and media industry data elements

    CN120541401A