Government affair policy question and answer method based on knowledge graph and related equipment

By constructing a multimodal knowledge graph and a dynamic graph neural network, and combining the Geo-BERT model and artificial intelligence model, the problems of data integration and timeliness in traditional government policy question-and-answer systems have been solved, realizing intelligent processing of government policy questions and answers, and improving the accuracy and timeliness of information.

CN120849569AActive Publication Date: 2025-10-28TIANJIN UNIV +1

Patent Information

Application Number
CN202511375816.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2025-10-28
Estimated Expiration
2045-09-25

AI Technical Summary

Technical Problem

Traditional government policy question-and-answer systems have difficulty integrating multiple data forms, cannot accurately locate policy information, have poor timeliness, and cannot meet users' needs for obtaining detailed information.

Method used

The knowledge graph-based question-answering method for government policies acquires multimodal government policy data, constructs a knowledge graph containing entities, relationships, attributes, time, and space, uses a dynamic graph neural network to capture changes in policy conditions, receives user query information, expands geographic location keywords using a Geo-BERT model, performs condition constraint verification, and finally generates answer results labeled with policy document number, regional level, and policy information.

Benefits of technology

It has enabled intelligent processing of government policy Q&A, improved the richness and accuracy of information, ensured that the information obtained meets user needs, is timely, and the answers are clear and easy to understand, thus enhancing the level of intelligence in government policy services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120849569A_ABST
    Figure CN120849569A_ABST
Patent Text Reader

Abstract

The invention provides a knowledge graph-based government policy question and answer method and related equipment, which realize intelligent processing of government policy question and answer, contribute to improving the intelligent level of government policy service and meet the actual question and answer requirements of actual government policies. The method comprises the steps of obtaining multi-modal government affair policy data, wherein the multi-modal government affair policy data comprises structured policy data, an unstructured policy text, an OCR text, layout features and a policy document; the multi-modal government affair policy data are fused through a Transform hybrid architecture, a knowledge graph is constructed, and the knowledge graph comprises five elements including entities, relationships, attributes, time and space; constructing a time sequence diagram structure of policy conditions based on the dynamic graph neural network; receiving user query information, and extracting a geographic position keyword based on the query information; and carrying out semantic extension on the keyword by utilizing a Geo-BERT model, and obtaining a target keyword.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a knowledge graph-based question-and-answer method for government policies and related equipment. Background Art

[0002] With the development of digital services, policy Q&A systems have become key to obtaining policy information. Policy data is multimodal and heterogeneous, with structured data, unstructured text, OCR text, and other forms of data stored in a scattered manner. Traditional methods are unable to integrate multiple types of data, resulting in one-sided and inaccurate information extraction.

[0003] Meanwhile, most policies are related to regions and time, but traditional question-and-answer systems rely solely on keyword matching or shallow semantic analysis, which cannot accurately locate policy information and cannot meet users' needs for detailed information on government policies. Furthermore, due to the rapid pace of policy updates, the results of traditional question-and-answer systems are delayed and have poor timeliness, failing to meet actual question-and-answer needs. Summary of the Invention

[0004] This application provides a knowledge graph-based question-and-answer method and related equipment for government policies to solve the aforementioned technical problems.

[0005] The first aspect of this application provides a knowledge graph-based question-and-answer method for government policies, the method comprising: 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 Geo-BERT model is used to semantically expand the keywords and obtain the target keywords; Based on the target keywords, knowledge subgraphs for corresponding regions are selected from the knowledge graph; 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.

[0006] Optionally, the multimodal government policy data can be fused using a Transformer hybrid architecture to construct a knowledge graph. This knowledge graph includes five elements: entities, relationships, attributes, time, and space, including: 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.

[0007] Optionally, the system receives user query information and extracts 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.

[0008] Optionally, the Geo-BERT model is used to semantically expand the keywords and obtain target keywords, including: 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 the target keywords.

[0009] Optionally, based on the target keyword, 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.

[0010] Optionally, 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.

[0011] Optionally, the target information is input into an artificial intelligence model to obtain a response, wherein the response 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.

[0012] A second aspect of this application provides a knowledge graph-based government policy question-answering device, the device comprising: 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 semantically expand the keywords using the Geo-BERT model and acquire 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.

[0013] A third aspect of this application provides a knowledge graph-based government policy question-answering device, the device comprising: 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 execute the first aspect and any optional method of the first aspect.

[0014] A fourth aspect of this application provides a computer-readable storage medium on which a program is stored, which, when executed on a computer, performs the first aspect and any optional method of the first aspect.

[0015] As can be seen from the above technical solutions, this application has the following advantages: 1. This application can construct a more comprehensive knowledge graph by acquiring and integrating multimodal government policy data. This integration of multimodal data enables the knowledge graph to cover multiple aspects of government policies, improving the richness and accuracy of information.

[0016] 2. This application constructs a time-series graph structure of policy conditions based on dynamic graph neural networks, which can capture the changes of policy conditions over time, help to obtain policy trends and provide policy Q&A services based on the time dimension, and has high timeliness and accuracy.

[0017] 3. By receiving user query information and extracting geolocation keywords, and using the Geo-BERT model to semantically expand the keywords, we can more accurately understand the user's query intent and obtain target keywords related to geolocation, which helps to improve the targeting and accuracy of policy Q&A.

[0018] 4. Based on the target keywords, knowledge subgraphs of corresponding regions are selected from the knowledge graph, and condition constraints are verified on the knowledge subgraphs to ensure that the obtained target information not only meets the user's query needs but also satisfies the requirements of policy conditions.

[0019] 5. Input the target information into the artificial intelligence model to obtain the answer results, and annotate the answer results with the policy document number, regional level and policy information, making the answer results clearer and easier to understand. The annotated answer results help users quickly obtain the information they need, improve the efficiency of policy Q&A and user experience.

[0020] 6. This application combines knowledge graphs, dynamic graph neural networks, Geo-BERT models, and artificial intelligence models to achieve intelligent processing of government policy questions and answers, which helps to improve the level of intelligence in government policy services and meet the actual question and answer needs of government policies. Attached Figure Description

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

[0022] Figure 1 This is a schematic flowchart of an embodiment of the knowledge graph-based government policy question-answering method of this application; Figure 2 This is a schematic diagram of another embodiment of the knowledge graph-based question-and-answer method for government policies in this application; Figure 3 This is a schematic diagram of another embodiment of the knowledge graph-based question-and-answer method for government policies in this application; Figure 4 This is a schematic diagram of another embodiment of the knowledge graph-based question-and-answer method for government policies in this application; Figure 5 This is a schematic diagram of another embodiment of the knowledge graph-based question-and-answer method for government policies in this application; Figure 6 This is a schematic diagram of another embodiment of the knowledge graph-based question-and-answer method for government policies in this application; Figure 7 This is a schematic diagram of one embodiment of the knowledge graph-based government policy question-and-answer device of this application; Figure 8 This is a schematic diagram of another embodiment of the knowledge graph-based government policy question-and-answer device of this application. Detailed Implementation

[0023] This application provides a knowledge graph-based question-and-answer method and related equipment for government policies. By combining knowledge graph, dynamic graph neural network, Geo-BERT model and artificial intelligence model, it realizes intelligent processing of government policy questions and answers, which helps to improve the intelligence level of government policy services and meet the actual question-and-answer needs of government policies.

[0024] Please see Figure 1 The first aspect of this application provides an embodiment of a knowledge graph-based question-answering method for government policies, which includes: 101. Obtain multimodal government policy data, which includes structured policy data, unstructured policy text, OCR text, layout features, and policy documents; 102. 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. 103. Constructing a time-series graph structure of policy conditions based on dynamic graph neural networks; 104. Receive user query information and extract geolocation keywords based on the query information; 105. Use the Geo-BERT model to semantically expand the keywords and obtain the target keywords; 106. Based on the target keywords, select knowledge subgraphs for corresponding regions from the knowledge graph; 107. Perform condition constraint verification on the knowledge subgraph to obtain target information that meets the conditions; 108. Input the target information into the artificial intelligence model to obtain the answer result, wherein the answer result is marked with the policy document number, regional level and policy information.

[0025] In this embodiment, multimodal government policy data is first acquired, including structured policy data, unstructured policy text, OCR text, layout features, and policy documents. Then, the multimodal government policy data is fused using a Transformer hybrid architecture to construct a knowledge graph. The knowledge graph includes five elements: entities, relationships, attributes, time, and space. A time-series graph structure of policy conditions is constructed based on a dynamic graph neural network. User query information is received, and geographic location keywords are extracted based on the query information. The Geo-BERT model is used to semantically expand the keywords and obtain target keywords. Based on the target keywords, knowledge subgraphs of corresponding regions are selected from the knowledge graph. Condition constraints are verified on the knowledge subgraphs 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.

[0026] In step 101, due to the wide range and diverse forms of government policy data, this application employs diversified data collection methods to obtain policy information comprehensively and accurately. Structured policy data is typically stored in relational databases and extracted directly through SQL queries. This data is presented in tabular form and contains core policy elements such as policy name, issuing department, and effective date, exhibiting a clear logical structure and uniform format. Unstructured policy texts encompass a large amount of document material, such as policy documents in PDF and Word formats. These documents contain rich policy content but lack fixed format specifications. Text mining techniques can be used to extract key information through regular expressions, keyword matching, and other methods.

[0027] OCR text processing uses OCR technology to process text information in scanned documents or images, converting text in images into editable text for subsequent processing. Layout feature extraction focuses on document formatting information such as layout, font, and font size, which helps in understanding the structure and key points of policy documents.

[0028] By using web crawlers, API calls, and other methods, complete policy documents can be obtained from official government websites, government service platforms, and other channels. This allows for the comprehensive acquisition of multimodal government policy data, including structured, unstructured, OCR text, layout features, and complete policy documents, facilitating subsequent analysis and processing.

[0029] In step 102, after acquiring multimodal government policy data, since the data of different modalities have different characteristics and structures, they need to be fused through the Transformer hybrid architecture. The Transformer model can effectively handle the long-distance dependencies between different modal data through the self-attention mechanism, and extract and fuse the data from different angles through the multi-head attention mechanism.

[0030] During the fusion process, attribute information from structured policy data is combined with semantic information from unstructured policy text. The accuracy of OCR text and the indicative role of layout features in highlighting policy key points are also considered, transforming multimodal data into a unified feature representation. Based on the fused multimodal data, a knowledge graph is constructed. This knowledge graph graphically displays five elements from the policy data: entities (e.g., policy name, relevant departments, enterprises, individuals), relationships (e.g., formulation, application, regulatory relationships), attributes (e.g., policy type, validity period, scope of application), time (policy release time, effective time, expiration time), and space (the geographical scope of policy application). Through nodes and edges, scattered policy information is organized into a structured, semantic knowledge network, facilitating subsequent policy knowledge retrieval and analysis.

[0031] In step 103, since government policies often change and are adjusted over time, policy conditions also change accordingly. In order to accurately reflect the dynamic changes of policy conditions in the time dimension, this application constructs a time-series graph structure of policy conditions based on a dynamic graph neural network. The dynamic graph neural network can capture the changing patterns of graph structure data in the time series. Based on the policy knowledge graph, a timestamp is assigned to each entity and relationship to record the state of policy conditions at different points in time.

[0032] By analyzing the dynamic changes of nodes and edges in the time sequence graph structure, we can discover the evolution trend of policy conditions, such as the expansion or contraction of the scope of policy application and the adjustment of policy incentives. The time sequence graph structure can not only show the historical changes of policy conditions, but also predict future policy trends based on historical data, providing strong support for subsequent Q&A.

[0033] In step 104, when a user submits a query, the system first receives the text input by the user. To accurately understand the user's query intent, the system analyzes the query information using natural language processing (NLP) technology. Through methods such as word segmentation, part-of-speech tagging, and named entity recognition, it extracts geographic location keywords from the query text. For example, if a user queries "XX City's XXXX Year Car Subsidy Policy," the system uses named entity recognition technology to identify "XX City" as a geographic location keyword. These geographic location keywords are key information for locating the user's query area, helping the system quickly filter out policy information related to the user's query area, thus improving query efficiency and accuracy.

[0034] In step 105, after obtaining the geographic location keywords, since the keywords entered by the user may be relatively general or singular, in order to more comprehensively cover the policy information of the relevant areas, the Geo-BERT model is used to semantically expand the keywords. The Geo-BERT model is a pre-trained language model based on geographic information, which can understand the semantic relationships and geographic features between geographic locations. By inputting the geographic location keywords into the Geo-BERT model, the model generates a series of extended words related to the keywords based on geographic semantic knowledge. For example, for "XX City", it may expand to include the names of subordinate areas such as "AA" District and "BB" District. These expanded keywords serve as target keywords, which can more comprehensively cover the user's query area and its related areas, ensuring that no important policy information is missed.

[0035] In step 106, based on the acquired target keywords, a knowledge subgraph for the corresponding region is selected from the constructed knowledge graph. The knowledge graph contains a large amount of policy and geographical information. By matching the target keywords with geographical location nodes in the knowledge graph, entities, relationships, and attributes related to the target keywords are selected, forming a local knowledge subgraph. For example, when the target keywords include "XX City" and its extended areas, the knowledge subgraph will contain policy entities related to XX City and its subordinate areas, the relationships between policies, and the attribute information of these policies. This knowledge subgraph focuses on policy knowledge for the user's query area, reducing the amount of data processed subsequently, improving query efficiency, and providing a foundation for accurately obtaining the policy information needed by the user.

[0036] In step 107, after filtering out the knowledge subgraph, to ensure that the obtained policy information meets the user's actual needs, the knowledge subgraph needs to be validated for conditional constraints. These constraints include the policy's time frame, applicable subjects, and specific clauses. For example, if a user queries "New Energy Vehicle Subsidy Policy in XXXX," it is necessary to verify whether the policy in the knowledge subgraph took effect in XXXX and whether it applies to the new energy vehicle sector. By matching and validating the conditions for each policy information in the knowledge subgraph, information that does not meet the conditions is filtered out, ultimately obtaining the target information that meets the conditions. This target information consists of policy content that is highly relevant to the user's query and meets specific conditions, accurately answering the user's question.

[0037] In step 108, the target information is preprocessed to obtain preprocessed information. This preprocessed information is then input into a knowledge-enhanced large language model, and a learnable graph attention mechanism is used to generate response results. The knowledge-enhanced large language model, based on deep learning algorithms and natural language processing technology, analyzes and understands the target information. The model automatically extracts policy document numbers, regional levels, and detailed policy information from the policy content in the target information and generates response results in a structured manner. The response results clearly indicate the policy document number for easy access to the original text; indicate the regional level to clarify the policy's scope of application; and provide detailed explanations of the policy information to ensure users can comprehensively and accurately understand the relevant policy content.

[0038] For example, the answer might be presented as "Policy document number: XXX; Regional level: XX city; Policy information: In XXXX, XX city provides a certain amount of subsidy to individuals and enterprises that purchase new energy vehicles, and the specific subsidy standard is...", thus providing users with a clear, accurate and complete policy answer.

[0039] Therefore, this application achieves intelligent processing of government policy questions and answers by combining knowledge graphs, dynamic graph neural networks, Geo-BERT models, and artificial intelligence models, which helps to improve the intelligence level of government policy services and meet the actual question and answer needs of government policies.

[0040] Please refer to Figure 2 According to some embodiments of the present invention, in step 102, the multimodal government policy data is fused using a Transformer hybrid architecture, and a knowledge graph is constructed. The knowledge graph includes five elements: entities, relationships, attributes, time, and space. Specifically, it may include, but is not limited to, the following: 201. Preprocess the multimodal government policy data to obtain preprocessed data; 202. Extract different types of modal data from the preprocessed data; 203. Construct a Transformer hybrid architecture and input the different types of modal data into the Transformer hybrid architecture to obtain fused feature vectors; 204. Based on the fused feature vector, extract entity, relation, attribute, time and space information from the fused feature vector using a sequence labeling model, and generate the association relationship between entities, relations, attributes, time and space through common sense base reasoning; 205. Construct a knowledge graph based on the aforementioned relationships.

[0041] In this embodiment, the multimodal government policy data comes from a wide range of sources, including structured data, unstructured text, OCR recognition results, and layout features, with varying data formats and quality. Therefore, preprocessing of the multimodal government policy data is necessary. The preprocessing stage begins with data cleaning. For structured data, missing values ​​are checked and addressed, for example, by filling in values ​​using the mean, median, or based on business rules; erroneous data is detected and corrected, such as abnormal date formats or values ​​exceeding reasonable ranges. For unstructured text, useless characters and stop words are removed, and spelling is checked and corrected. OCR text needs to be corrected, and dictionary matching is used to improve recognition accuracy. Next, data standardization is performed, unifying time formats (e.g., converting "January 2025" to "2025-01-01") and units (e.g., unifying "ten thousand yuan" to "yuan"). The text is then segmented and part-of-speech tagged, breaking long texts down into word sequences to provide a data foundation for subsequent processing.

[0042] Different types of modal data are separated from the preprocessed data. For structured policy data, data is directly extracted through table structure and field definitions, such as obtaining policy name, document number, and issuing department attributes from the policy registration table. Unstructured text data is processed using text classification technology, distinguishing different parts of the policy such as the main text, attachments, and interpretations based on keyword matching or machine learning models. OCR text is identified by source identifiers or document type, such as OCR text corresponding to scanned PDFs. Layout features are extracted by parsing the document format to obtain layout information such as font size, bolding, and indentation. Policy documents are extracted as complete document units, preserving their original structure and multimodal information combination, laying the foundation for subsequent separate processing and fusion of different modalities.

[0043] After processing the above information, a Transformer hybrid architecture is constructed to process multimodal data. Specifically, a specific encoder is designed for different modalities. For text modalities, a BERT-like model is used to capture semantic relationships. For structured data, a table encoder is designed to convert row and column relationships into embedded representations. OCR text is combined with location information to enhance encoding. Layout features are extracted using CNN to extract visual features.

[0044] The outputs of each modal encoder interact through a cross-modal attention mechanism, such as establishing bidirectional attention between text and tables, so that the "subsidy amount" in the text can be associated with the specific value in the table, and a unified fusion feature vector is generated using a shared decoder.

[0045] Information extraction is performed using a sequence labeling model based on fused feature vectors. The fused vectors are input into the model, and entities in the text sequence are labeled using a pre-trained entity recognition labeling system. Relationship extraction employs a joint modeling approach; building upon entity recognition, a graph attention network captures semantic associations between entities, such as identifying the "issuing department - policy name" relationship. Attribute extraction focuses on the specific descriptions of entities, such as the policy's applicable targets and subsidy standards. Temporal and spatial information is processed by a dedicated recognizer, combining regular expressions and a semantic model to identify time phrases and normalize them into a standard time format, extracting geographical locations and associating them with administrative division levels. Implicit relationships are completed through reasoning using a policy domain ontology and a geographic knowledge base.

[0046] Then, a knowledge graph is constructed based on the relationships obtained from extraction and reasoning. Specifically, a graph database is used to store the knowledge graph, mapping entities to nodes, relationships to edges, and attributes as parameters of nodes or edges.

[0047] The hierarchical graph structure is set as follows: the top layer is the general concept layer, which defines abstract categories such as policies, departments, and enterprises; the middle layer is the relationship layer, which stores the semantic relationships between various entities; the bottom layer is the instance layer, which stores specific policy provisions and related entities; for the time dimension, timestamp attributes are added to nodes and edges to support querying policy knowledge within a specific time period; in the spatial dimension, a geographic location hierarchy is established to support regional range queries.

[0048] The TransE algorithm is used to convert the knowledge graph into a vector representation, which provides a foundation for subsequent graph neural network analysis and reasoning, and ultimately forms a structured, semantic knowledge graph that supports spatiotemporal dimension queries.

[0049] Please refer to Figure 3 According to some embodiments of the present invention, receiving user query information and extracting geographic location keywords based on the query information in step 104 may specifically include, but is not limited to, the following: 301. Receive user query information; 302. Perform text cleaning and word segmentation on the query information to extract the target text; 303. Extract keywords from the target text; 304. Compare and complete the keywords with the standard geographic entity database to obtain the comparison results; 305. Extract geolocation keywords from the comparison results.

[0050] In this embodiment, users input query information through web pages, mobile applications, or other interactive channels. This query information is presented in the form of natural language text, and the content is diverse and may contain non-standard expressions and inconsistent formats. For example, users may express their needs in different sentence structures such as questions and statements, such as inputting "What is the car subsidy policy of XX City in XXXX?" The system needs to accurately receive these raw query texts to provide basic data for subsequent analysis and processing.

[0051] Upon receiving the original query information, the text input by the user may contain invalid characters, special symbols, duplicate content, or misspellings, so it is first cleaned. Regular expressions are used to remove HTML tags, punctuation marks, special characters, etc., while also handling duplicate content and garbled characters, resulting in a more standardized text format. For example, "@XX City XXXX Year #Car Subsidy Policy" is cleaned to "XX City XXXX Year Car Subsidy Policy".

[0052] After text cleaning, a word segmentation algorithm is used to process the text, dividing the continuous text sequence into individual words or phrases. A dictionary-based word segmentation method is employed, using a professional government affairs dictionary to match the text with words in the dictionary for accurate word segmentation. For example, "XX City XXXX Year Car Subsidy Policy" is segmented into "XX City," "XXXX Year," "Car," "Subsidy," and "Policy," thus extracting the target text and preparing for subsequent keyword extraction.

[0053] Keywords are extracted from the segmented target text. Using part-of-speech tagging, word frequency statistics, and semantic analysis, words that are important in expressing the query intent are identified. Part-of-speech tagging can distinguish different parts of speech such as nouns, verbs, and adjectives. Key information in policy queries is usually nouns, such as policy objects, regions, and themes. By statistically analyzing the frequency of each word in the text, high-frequency words often better reflect the core content of the text. Combined with semantic analysis, the semantic importance of words in the field of government affairs is considered to select the keywords that best represent the user's query intent.

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

[0055] During the comparison process, string matching and semantic similarity calculation methods are used to compare the extracted keywords with entries in the geographic entity database one by one. If a keyword completely matches an entry in the database, it is directly confirmed. If there is a partial match or semantic similarity, a similarity score is calculated using a semantic similarity algorithm. When the score exceeds a certain threshold, it is identified as a relevant geographic entity, and information is completed. For example, if a user enters "XX City XXXX Year Car Subsidy Policy", "XX" is compared with "XX City" in the standard geographic entity database. Semantic analysis confirms that they both point to the same geographic area, and the database is completed with the full and standardized "XX City", thus obtaining a more accurate comparison result.

[0056] From the compared and completed results, keywords that clearly indicate geographical location are selected. These keywords are then categorized and identified using predefined geographical entity category tags, such as "province," "city," "district," and "county." Only keywords matching the geographical entity category tags are extracted as geographical location keywords. These keywords will be used to subsequently filter policy information for the corresponding region from the knowledge graph. For example, in the comparison results "XX City" and "car subsidy policy," "XX City" is extracted as a geographical location keyword to accurately locate relevant government policy content.

[0057] Please refer to Figure 4 According to some embodiments of the present invention, step 105, which uses the Geo-BERT model to semantically expand the keywords and obtain the target keywords, may specifically include, but is not limited to, the following: 401. 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; 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 set of candidate keywords; 403. Delete duplicate and irrelevant words in the candidate keyword set to obtain the target keywords.

[0058] In this embodiment, 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 geographic location keywords extracted after preprocessing, such as "XX city," need to be formatted to meet 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, typically requiring the addition of special markers, word segmentation, and conversion into numerical representation.

[0059] First, the geographic location keywords are preprocessed. The extracted geographic location keywords are concatenated to form text fragments that conform to natural language expression. For example, the extracted keywords "XX City" and "BB District" can be concatenated into "XX City BB District". Then, special markers are added. The Geo-BERT model usually requires adding [CLS] and [SEP] markers to the beginning and end of the input text to identify the start and end of the text. For the concatenated geographic location text "XX City BB District", after adding the markers, it becomes "[CLS]XX City BB District[SEP]".

[0060] Next, word segmentation is performed. The Geo-BERT model uses a specific word segmenter to divide the text into sub-words. For Chinese text, it breaks down Chinese characters or words into smaller semantic units. For example, "XX City BB District" might be segmented into the sub-words "XX", "City", "BB", and "District". Finally, the segmented text is converted into a numerical representation acceptable to the model. Each sub-word corresponds to a unique vocabulary index, and the sequence of segmented sub-words is converted into the corresponding index sequence to form the model's input vector.

[0061] 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. It can understand the semantic relationships and geographic features between geographic locations. After the target text is converted into its format and input into the Geo-BERT model, the model will semantically expand the geographic location keywords in the text.

[0062] The model first encodes the input target text, extracting its semantic representation through a multi-layer Transformer network. During the encoding process, the model learns the semantic relationships and geographic context information between geographic keywords. 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 it with other geographic areas and policy information related to XX City.

[0063] Based on this semantic understanding, the Geo-BERT model generates a set of candidate keywords related to the input keywords. Expansion methods include geographic hierarchical expansion, semantic relevance expansion, and policy domain expansion. Geographic hierarchical expansion generates higher or lower-level geographic regions of the input keywords; semantic relevance expansion generates geographic entities semantically similar to the input keywords; and policy domain expansion combines knowledge of government policies to generate policy application areas related to the input keywords. For example, policies related to "small and micro enterprises" might expand to specific policy areas such as "economic development zones" and "free trade zones." In this way, the Geo-BERT model comprehensively expands the input geographic location keywords, generating a set containing multiple candidate keywords.

[0064] The candidate keyword set obtained after expanding the Geo-BERT model may contain duplicate words and words that are irrelevant to the user's query. It needs to be filtered and cleaned to obtain accurate and effective target keywords.

[0065] First, duplicate words are removed. 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 considered duplicate information. Through string matching and semantic similarity calculation, duplicate words are identified, and one representative word is retained. For example, "BB area" is retained while "XX city BB area" is deleted.

[0066] Next, irrelevant keywords are filtered out. Based on the user's original query intent and knowledge of government policies, it is determined whether the candidate keywords are relevant to the query. At the same time, words unrelated to the policy field, such as some common nouns or adjectives, are also filtered out. Candidate keywords are screened one by one, retaining words that are highly relevant to the user's query.

[0067] Finally, the selected keywords are standardized to unify the word expression, resulting in the final set of target keywords. These target keywords not only include the geographical location information originally input by the user, but also supplement relevant geographical entities through the extension of the Geo-BERT model, enabling a more comprehensive and accurate location of the policy information queried by the user.

[0068] Please refer to Figure 5 According to some embodiments of the present invention, step 106, which involves filtering knowledge subgraphs of corresponding regions from the knowledge graph based on the target keywords, may specifically include, but is not limited to, the following: 501. 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; 502. Taking the entity node as the center, and based on the knowledge graph, recursively expand the associated nodes and relation edges to determine the boundary range of the knowledge subgraph; 503. Select the knowledge subgraph of the corresponding region from the knowledge graph based on the entity node and the associated edge.

[0069] In this embodiment of the application, after obtaining the target keyword, the knowledge graph, as a huge semantic network, stores rich policy information and relationships between entities. The system will conduct a deep search in the knowledge graph and use natural language processing technology to accurately match the target keyword with the entity nodes in the knowledge graph.

[0070] Because entity nodes in a knowledge graph contain various types of geographical location information, such as specific cities, districts, counties, towns, and even specific economic regions, during the retrieval process, once the geographical location information of an entity node matches the target keywords, these entity nodes will be locked. Furthermore, entity nodes in a knowledge graph are interconnected through relational edges, which represent various relationships between entities, such as policy-making relationships, application relationships, and regulatory relationships.

[0071] While identifying entity nodes, the system also obtains the relationship edges between these entity nodes. By recording these relationship edges, the logical connections between different entities can be clearly displayed, laying the foundation for more comprehensive screening of policy information later. For example, when the target keyword is "XX City BB District", the system will retrieve all entity nodes containing the geographical location information of "XX City BB District" in the knowledge graph, such as entities related to a certain industry support policy issued by BB District, and related enterprise entities, and obtain the relationship edges between these entity nodes regarding policy applicability and enterprise benefits.

[0072] Starting with successfully retrieved entity nodes, the system recursively expands associated nodes and edges based on the rich semantic relationships and logical structures already constructed in the knowledge graph. This recursive expansion process resembles ripples spreading outward from the initial entity node. Starting from the initial entity node, it finds other connected nodes along the associated edges, incorporating these newly discovered nodes into the consideration. Then, starting from these new nodes again, it continues searching for their associated nodes and edges, repeating this process. During this process, it is necessary to determine the boundary range of the knowledge subgraph to avoid over-expansion leading to the acquisition of too much irrelevant information. The boundary range can be determined based on various factors, such as the hierarchical relationship of policies. If only policy-related information at a specific administrative level is considered, expansion can stop when encountering nodes beyond that level. Alternatively, based on the thematic relevance of policies, expanding to nodes unrelated to the core policy theme is also considered reaching the boundary. For example, taking the entity node "XX City BB District Automobile Subsidy Policy" as the center, the extension along the relationship edge will expand to the relevant automobile industry entities and related financial subsidy entities. During the expansion process, if a policy-related node unrelated to the automobile theme is encountered, the expansion in that direction will stop, thereby determining the boundary range of the knowledge subgraph, so that the selected knowledge subgraph comprehensively and accurately contains policy information related to the target.

[0073] After determining the entity nodes, relational edges, and the boundaries of the knowledge subgraph, the system can filter out the corresponding knowledge subgraph from the vast knowledge graph based on this information. The knowledge subgraph is a local subset of the knowledge graph, focusing on policy knowledge in areas related to the target keywords. It contains important entity nodes in the area and the key relational edges between them. By filtering the knowledge subgraph, a large amount of policy information that was originally scattered in the knowledge graph is integrated and refined, and irrelevant information interference is removed.

[0074] The selected knowledge subgraphs clearly display the specific content of policies within the corresponding region, the relevant entities involved, and the relationships between them. This provides a highly focused and structured data foundation for subsequent in-depth analysis and processing of policy information. For example, the knowledge subgraph related to "XX City BB District" will include various policy entities, related enterprises and institutions in XX City BB District, as well as edges representing the relationships between policy formulation, implementation, and beneficiaries. This allows users to intuitively understand the policy ecosystem and related information of XX City BB District, facilitating further querying and use.

[0075] Please refer to Figure 6 According to some embodiments of the present invention, the condition constraint verification of the knowledge subgraph in step 107 to obtain target information that meets the conditions may specifically include, but is not limited to, the following: 601. Extract the association information from the knowledge subgraph; 602. Determine the verification rules; 603. Determine whether the associated information meets the verification rules; 604. If so, then obtain the target information that meets the conditions.

[0076] In this embodiment, after obtaining the knowledge subgraph of the corresponding region, which contains rich related information, the system first extracts the entity node information from the knowledge subgraph, including the entity's name, type, attributes, etc. For example, in the knowledge subgraph of "XX City BB District", the system extracts the policy name, issuing department, effective date, and other attributes of the entity "XX City BB District Automobile Subsidy Policy".

[0077] Meanwhile, the relationship edge information between entities in the knowledge subgraph is also crucial. The system will extract the relationship type represented by the relationship edge, as well as related weights or strengths. In addition, the knowledge subgraph may also contain information in the time and space dimensions, which the system will also extract, such as the effective time range of the policy and the specific geographical scope of application. By fully extracting these multi-dimensional related information, the system can provide comprehensive data support for subsequent verification work.

[0078] Determining the verification rules is an important step in ensuring that the policy information obtained meets the actual needs of users. The determination of the verification rules needs to take into account many factors and should be set according to the user's query intent and needs.

[0079] When setting verification rules for subsidy policies, it is essential to comply with relevant subsidy regulations, including application conditions and disbursement procedures. Furthermore, verification rules can be flexibly adjusted based on different application scenarios and business needs. For policy inquiries, timeliness verification is emphasized; while for long-term policy research, the completeness and continuity of the policy are more important. By comprehensively considering these factors, an accurate, comprehensive, and targeted set of verification rules can be developed, providing clear standards for subsequent condition judgments.

[0080] After extracting the association information from the knowledge subgraph and determining the verification rules, the system compares the extracted association information with the verification rules one by one to determine whether the association information meets the verification rules. For time-dimensional verification, the system checks whether the policy's effective date, expiration date, and other information are within the user-specified time range, such as determining whether the policy is effective or valid within the specified period. In terms of policy object dimension, it verifies whether the policy's applicable objects are consistent with the user's focus, such as confirming whether the policy explicitly applies to high-tech enterprises. For policy type verification, it determines whether the policy falls under the category of subsidy policies. During the judgment process, the system uses a combination of exact matching and fuzzy matching. For explicit attribute information, such as policy document number and policy name, exact matching is used; for descriptive information, such as policy scope and policy content, fuzzy matching is used. Natural language processing technology is used to analyze the text semantics to determine whether it meets the requirements of the verification rules. Through this meticulous comparison and judgment process, it can accurately determine whether the association information in the knowledge subgraph meets the user-defined verification rules.

[0081] Once the system determines that the related information in the knowledge subgraph meets the set verification rules, it will integrate these matching related information as target information that meets the conditions. This target information is policy knowledge that has been rigorously screened and verified, and can accurately match the user's query needs.

[0082] For example, when querying "XX City's XXXX Year Car Subsidy Policy", the target information obtained after verification will include detailed information such as the specific subsidy policy content, application process, subsidy amount standards, as well as relevant identification information such as policy document number and issuing department. This target information can be presented to users in a structured form, such as tables or lists, or it can be summarized and described in natural language according to user needs, making it convenient for users to quickly and accurately obtain the policy information they need.

[0083] Please see Figure 7 The second aspect of this application provides a knowledge graph-based government policy question-answering device, comprising: The first acquisition unit 701 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 702 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 703 is used to construct a time-series graph structure of policy conditions based on a dynamic graph neural network; Extraction unit 704 is used to receive user query information and extract geographic location keywords based on the query information; The second acquisition unit 705 is used to semantically expand the keywords using the Geo-BERT model and acquire the target keywords; The filtering unit 706 is used to filter knowledge subgraphs of corresponding regions from the knowledge graph based on the target keywords; The verification unit 707 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 708 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.

[0084] Please see Figure 8 This application also provides a knowledge graph-based government policy question-answering device, including: Processor 801, memory 802, input / output unit 803, bus 804; The processor 801 is connected to the memory 802, the input / output unit 803, and the bus 804; The memory 802 stores a program, and the processor 801 calls the program to execute any of the methods described above.

[0085] This application also relates to a computer-readable storage medium on which a program is stored, which, when run on a computer, causes the computer to perform any of the methods described above.

[0086] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0087] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0088] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0089] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0090] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

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 Geo-BERT model is used to semantically expand the keywords and obtain the target keywords; Based on the target keywords, knowledge subgraphs for corresponding regions are selected from the knowledge graph; 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, The Geo-BERT model is used to semantically expand the keywords and obtain the target keywords, including: 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 the target keywords.

5. 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.

6. 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.

7. 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.

8. 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 semantically expand the keywords using the Geo-BERT model and acquire 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.

9. 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 7.

10. 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 7.

Citation Information

Patent Citations

  • Commodity recommendation method based on time sequence diagram neural network

    CN117010995A

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

    CN118170929A

  • Granary risk event intelligent early warning and processing method based on ensemble learning and time sequence diagram neural network

    CN118569634A

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

    CN118939761A

  • Advertisement compliance knowledge question and answer method, device and equipment for foreign enterprises

    CN119441422A

Cited By

  • Policy analysis method, device, equipment, medium and program product

    CN121032342A

  • A policy analysis method, apparatus, device, medium, and program product

    CN121032342B

  • Dynamic hierarchical knowledge graph construction method and system for public operator examination

    CN121436135A

  • Question and answer method, device and equipment based on urban mapping knowledge domain, medium and product

    CN121579649A

  • Government affair information intelligent processing system and method based on voice recognition

    CN121807874A