A government affair appeal data query method and system

CN122964100APending Publication Date: 2026-10-23JILIN PROVINCE JILIN XIANGYUN INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202611275344.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-21
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0008]本发明缓解了现有政务诉求数据问数方法技术存在准确性差、实时计算慢、成本高和可解释性与安全性欠缺的问题

Benefits of technology

[0019]本发明所述的一种政务诉求数据问数方法和系统是预聚合数据简报实现的,有效缓解了现有政务诉求数据问数方法技术存在准确性差、实时计算慢、成本高和可解释性与安全性欠缺的问题。实现既能保持自然语言交互便利性,又能确保回答准确性、高性能和可解释性的智能问答技术方案,以满足政务场景的特殊需求。具体有益效果包括:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122964100A_ABST
    Figure CN122964100A_ABST
Patent Text Reader

Abstract

The application discloses a government affair appeal data query method and system, and relates to the field of natural language processing, and solves the problems of poor accuracy and slow real-time calculation in the prior art.A government affair appeal data query method comprises the following steps: collecting natural language query requests, original complaint records and appeal contents; performing semantic extraction on the natural language query requests by using a large language model to obtain query requests; obtaining TopN data based on the appeal contents; precomputing the original complaint records based on a theme dimension tree to generate a data briefing; matching the query requests with the data briefing based on the theme dimension tree and the data briefing to obtain a target data briefing; when the query request exceeds the precomputed range of the target data briefing, a refusal response is taken as a query result; otherwise, a query result or a general answer is generated according to a query type.The application is suitable for the field of government affair appeal analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing, and more specifically to the field of government big data. Background Technology

[0002] With the deepening of digital government construction, government service platforms at all levels have accumulated massive amounts of citizen complaint data. The daily volume of complaints received exceeds ten thousand, covering multiple areas such as urban and rural construction, market supervision, environmental protection, and people's livelihood. This data contains rich information on public opinion and serves as an important basis for government decision-making and governance optimization. However, traditional data query methods rely on professionals writing structured query language (SQL) statements. This method is characterized by high barriers to entry and low efficiency, making it difficult to meet the needs of business personnel to obtain statistical information in a timely manner and make practical decisions. Therefore, how to enable non-technical personnel to quickly and accurately extract statistical insights from massive amounts of complaint data through natural language interaction has become a key technical challenge for the application of government big data.

[0003] To address the challenge of converting natural language to database queries, the mainstream approach is Text-to-SQL (NL2SQL) technology based on Large Language Models (LLMs). This involves using LLMs to understand the user's natural language query intent, directly generating executable SQL statements to retrieve results from the database. For example, patent application CN121542295A discloses a "Data Query Method and Intelligent Query System," which improves accuracy through multi-level keyword matching and semantic SQL generation, combined with various semantic correction strategies. Patent application CN121455983A discloses a "Method, Device, and Medium for Converting Natural Language to SQL Statements," which employs vectorization processing, semantic element retrieval, and SQL-like intermediate representation conversion. Patent application CN121350069A discloses "A large-scale model method and system for generating natural language queries for large-scale database tables." This technical solution improves the accuracy of table structure through a retrieval module and provides database context information in the Prompt. Patent application CN119938690A discloses "A SQL statement generation system and method based on thought chain and few-sample enhancement." This technical solution introduces a professional terminology database, entity recognition, schema links, and thought chain technology to perform layer-by-layer reasoning on complex problems. In addition, some solutions combine knowledge graphs, Monte Carlo tree search, or retrieval enhancement generation (RAG) technology to try to improve the accuracy and robustness of SQL generation.

[0004] However, the above-mentioned solution of directly generating SQL based on LLM has shortcomings in government affairs scenarios: First, accuracy is uncontrollable. LLM can generate SQL statements with syntax errors, misunderstandings of field names, and logical errors, leading to query failures or the return of incorrect data. However, government decision-making has extremely high requirements for data accuracy and cannot tolerate such errors.

[0005] Second, the response performance is insufficient. The generation of complex SQL queries and the real-time calculation of large amounts of data are slow, and frequent calls to large model APIs are costly, making it difficult to meet the needs of immediate decision-making.

[0006] Third, there is a lack of interpretability and security. The SQL generation process is a black box, and business personnel cannot understand the calculation logic and source of the data results. Dynamic SQL is also vulnerable to injection attacks. In addition, LLM is prone to generating uncontrollable hallucination responses, making it difficult to clearly define the boundaries of responses and to conduct fine-grained control over access to sensitive data.

[0007] In summary, existing technologies for querying government requests data suffer from poor accuracy, slow real-time calculation, high cost, and a lack of interpretability and security. Summary of the Invention

[0008] This invention alleviates the problems of poor accuracy, slow real-time calculation, high cost, and lack of interpretability and security in existing methods and technologies for querying government request data.

[0009] This invention provides the following solution: Option 1: A method for querying government service requests data, the method comprising the following stages: Data collection phase: Collect natural language query requests, original complaint records, and complaint content; perform semantic extraction on the natural language query requests using a large language model to obtain query requests; the query requests include topic classification, incident location, time range, and query type; the time range is a time range after time standardization; based on the complaint content, obtain Top N data; the Top N data includes Top N complaint targets and complaint issues; Query processing stage: Pre-calculate the original complaint records based on the topic dimension tree to generate a data summary; the data summary includes structured data and semantic summary; The query request is matched with the data summary based on the topic dimension tree and the data summary to obtain the target data summary; if the query request exceeds the pre-calculated range of the target data summary, the rejection response is taken as the query result; otherwise, the response generation stage is entered. Question and answer generation stage: If the query type is a standard query, the semantic summary is used as the query result; if the query type is a complex combined query, an answer is generated based on the structured data and the answer is used as the query result; otherwise, a summary answer is generated based on the TopN data.

[0010] Furthermore, in one embodiment of the present invention, the method for obtaining the TopN data is as follows: Extracting the name of the complainant from the content of the complaint using named entity recognition; A summary of the complaint is generated from the content of the complaint by extracting text summaries or keywords. The extracted results are normalized, and an alias mapping table is established. The data is sorted by quantity, and the top N data are retained, where N is a preset threshold.

[0011] Furthermore, in one embodiment of the present invention, in the query processing stage, the topic dimension tree includes a dimension structure and dependencies; The dimensional structure includes a root node, branch nodes, and leaf nodes; The topic dimension tree has topic classification as the root node, incident location and time as branch nodes, and complaint object and complaint issue as leaf nodes.

[0012] Furthermore, in one embodiment of the present invention, the query request exceeding the pre-calculation range of the target data summary means: When the query request is for a topic category, there is no corresponding briefing for that topic category; When the query request is for the location of the incident, the location of the incident is not within the pre-calculated range; When the query request is a time range, the time range exceeds the briefing time range; When the query request is a query type, it involves a specific complaint target or a specific complaint issue and has not been pre-calculated.

[0013] Furthermore, in one embodiment of the present invention, the standard query is a single point-in-time total query, a single regional trend query, or a TopN ranking query.

[0014] Furthermore, in one embodiment of the present invention, the complex combination query is a cross-time granularity comparison query or a multi-location parallel comparison query.

[0015] Furthermore, in one embodiment of the present invention, when the query result is a rejection response, the method further includes a feedback optimization phase; During the feedback optimization phase, when the query result is a rejection response, a completion priority is obtained based on the query request. When the completion priority exceeds the threshold and is manually reviewed, a new data summary is generated and added to the summary database. The formula for the completion priority is as follows: P = f×w×c Where f is the frequency of rejection; w is the weight of business importance; and c is the pre-calculated feasibility score.

[0016] Option 2: A data query system for government service requests, the system comprising the following modules: Data acquisition module: collects natural language query requests, original complaint records, and complaint content; performs semantic extraction on the natural language query requests using a large language model to obtain query requests; the query requests include topic classification, incident location, time range, and query type; the time range is a time-standardized time range; based on the complaint content, obtains Top N data; the Top N data includes Top N complaint targets and complaint issues; Query processing module: pre-calculates the original complaint records based on the topic dimension tree to generate a data summary; the data summary includes structured data and semantic summary; The query request is matched with the data summary based on the topic dimension tree and the data summary to obtain the target data summary; if the query request exceeds the pre-calculated range of the target data summary, the rejection response is taken as the query result; otherwise, the query is entered into the answer generation module. Question and answer generation module: If the query type is a standard query, the semantic summary is used as the query result; if the query type is a complex combined query, an answer is generated based on the structured data and the answer is used as the query result; otherwise, a summary answer is generated based on the TopN data.

[0017] Option 3: An electronic device, comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; Memory, used to store computer programs; When a processor executes a computer program stored in memory, it implements the method described in Scheme 1.

[0018] Option 4: A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method described in Option 1.

[0019] The present invention provides a method and system for querying government request data, implemented using pre-aggregated data briefings. This effectively alleviates the problems of poor accuracy, slow real-time calculation, high cost, and lack of interpretability and security inherent in existing government request data querying methods. It achieves an intelligent question-answering technology solution that maintains the convenience of natural language interaction while ensuring accurate, high-performance, and interpretable responses, thus meeting the specific needs of government scenarios. Specific beneficial effects include: 1. The government complaint data questioning method described in this invention adopts an architecture that combines offline pre-aggregation with online intelligent question answering. It defines the pre-computation scope through a topic dimension tree and generates a data summary containing structured data objects and semantic summary objects, thereby achieving efficient, accurate and controllable government complaint data question answering service.

[0020] 2. The government affairs data query method described in this invention replaces LLM-generated SQL statements with pre-calculated data summaries, avoiding syntax errors and misunderstandings of fields. Furthermore, this offline calculation ensures data accuracy and query performance, reduces online response time, and saves computing resources. It avoids the uncontrollable risks of dynamic queries, balancing query performance and data accuracy.

[0021] This invention further provides answers based on the content of data briefings, while clearly defining the boundaries of the answers to avoid the generation of uncontrollable hallucinations.

[0022] This invention is applicable to the field of government affairs appeal analysis. Attached Figure Description

[0023] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart of the data collection method for government requests described in Implementation Method 1; Figure 2 It is the topic dimension tree structure diagram described in Implementation Method 2. Detailed Implementation

[0024] Various embodiments of the present invention will now be clearly and completely described with reference to the accompanying drawings. The embodiments described with reference to the drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0025] Implementation Method 1: A method for querying government service request data as described in this implementation method, such as... Figure 1 As shown, the method includes the following stages: Data collection phase: Collect natural language query requests, original complaint records, and complaint content; perform semantic extraction on the natural language query requests using a large language model to obtain query requests; the query requests include topic classification, incident location, time range, and query type; the time range is a time range after time standardization; based on the complaint content, obtain Top N data; the Top N data includes Top N complaint targets and complaint issues; Query processing stage: Pre-calculate the original complaint records based on the topic dimension tree to generate a data summary; the data summary includes structured data and semantic summary; The query request is matched with the data summary based on the topic dimension tree and the data summary to obtain the target data summary; if the query request exceeds the pre-calculated range of the target data summary, the rejection response is taken as the query result; otherwise, the response generation stage is entered. Question and answer generation stage: If the query type is a standard query, the semantic summary is used as the query result; if the query type is a complex combined query, an answer is generated based on the structured data and the answer is used as the query result; otherwise, a summary answer is generated based on the TopN data.

[0026] In this embodiment, the semantic extraction of the large language model includes: A predefined prompt template is used, which includes a candidate list of topic categories, a candidate list of locations, and an example of a time expression. The large language model outputs structured JSON, and the field validity is verified by a rule validator.

[0027] In this embodiment, the time range is standardized to absolute dates, and the timeliness of the time range and the validity of the location of the incident are detected.

[0028] The time standardization includes: Establish a regular expression library for time expressions, covering commonly used expressions in government affairs scenarios such as "this month", "last quarter", "last 7 days", and "last year's time". Based on the current system date, a standardized conversion is performed using the government work calendar. When the query time exceeds the data summary time range, a time out-of-bounds rejection is triggered.

[0029] For example, the standardized conversion of "this month" in user questions: The current system date is November 30, 2024, and the absolute dates output by combining the government work calendar are from November 1, 2024 to November 30, 2024.

[0030] In this embodiment, if the query request exceeds the pre-calculated range of the target data summary, a rejection response will be given. The rejection response specifically includes: Topic Missing: No data briefing with a corresponding topic; Location outside boundaries: The incident occurred outside the pre-calculated area; Time out of bounds: The time range exceeds the briefing time range; Missing details: This involves a specific complaint target or issue that is not in the Top N of the pre-computed insights; Complex conditions: The original records need to be traversed and filtered or complex conditions need to be calculated; Semantic reasoning: Subjective evaluation criteria need to be defined for reasoning and judgment. Rejection response generation: Select response content from a preset template library based on the judgment result type. The template library is associated with the topic-dimension tree node.

[0031] In this embodiment, if the query type involves the main complaint target or issue, the TopN data in the pre-calculated insight is read.

[0032] In this embodiment, using semantic summaries as query results can be achieved by adjusting only the order of expression or connecting words while keeping the data facts unchanged.

[0033] In this embodiment, generating an answer based on structured data involves sending the structured data as context, along with the question content, to a large model, which then provides an answer based on the context information.

[0034] In this embodiment, the method for obtaining the semantic summary and the structured data is as follows: pre-calculate the original complaint records based on the topic dimension tree to generate a data summary; the data summary includes structured data and a semantic summary.

[0035] The key fields of the original complaint record include: subject category, complaint title, location of incident, time, complaint content, processing status, and processing department.

[0036] Extracting pre-calculated insights from the content of the complaint: (1) Extraction of the complaint object: Extract "XX Property" and "YY Heating Company" through named entity recognition, and establish an alias mapping table after normalization; (2) Extraction of the complaint problem: Generate problem summaries such as "poor environmental sanitation" and "untimely response" through TextRank keyword extraction.

[0037] The structured data objects include core indicators, time-series features, and raw values ​​for pre-calculated insights. The core indicators include total number of complaints, number of resolved complaints, resolution rate, average processing time, satisfaction rate, month-on-month change rate, and year-on-year change rate. The time-series features include the quantity sequence for the past 12 months, trend analysis, peak months, and seasonal characteristics. The pre-calculated insights include the Top N complaint subjects and their percentage of number extracted from the complaint content, and the Top N complaint issues and their percentage of number.

[0038] The process of extracting the Top N complaint objects and complaint issues from the complaint content includes: extracting the names of the complaint objects from the complaint content through named entity recognition; generating a summary of the complaint issues from the complaint content through text summarization or keyword extraction; normalizing the extraction results and establishing an alias mapping table; and retaining the Top N by quantity, where N is a preset threshold.

[0039] The semantic summary object contains natural language descriptive text pre-generated based on the structured data object.

[0040] Taking a brief report on property management complaints in District A of a certain city in November 2024 as an example: (1) Structured data objects are shown in Table 1. Table 1

[0041] (2) Semantic Summary Target: In November 2024, there were 2006 property management-related complaints in District A of a certain city, representing an 8% increase month-on-month and a 12% increase year-on-year. The completion rate was 94.3%, and the average processing time was 4.8 days. The complaint trend was on the rise, with the main issues including: poor environmental sanitation (504 cases, accounting for 25.1%), untimely response (213 cases, accounting for 10.6%), and illegal construction (200 cases, accounting for 10.0%). The main complaint types were: living environment problems (866 cases, 43.2%), facility maintenance problems (440 cases, 21.9%), and service quality problems (279 cases, 13.9%). Property management companies with a large number of complaints included XX Property Management (342 cases) and YY Property Management (256 cases).

[0042] Indexes are created as (1) Inverted index: Subject category "Property Management" → [PROP_ZH_AQ_202411, PROP_ZH_BQ_202411, ...] (2) (Area A of a certain city, 2024-11) → PROP_ZH_AQ_202411 (3) (Property Management, District A of a certain city, 2024-11) → PROP_ZH_AQ_202411 In this embodiment, examples of semantic summarization, structured data, and generalized responses are provided: Example of a semantic summary of a standard query answer: A user asked, "What is the situation regarding property management complaints in District A of a certain city this month?" The analysis determined it to be a standard query, and the execution method was to directly output a semantic summary object.

[0043] The system responded: "In November 2024, there were 2,006 property management-related complaints in District A of a certain city, representing an 8% increase month-on-month and a 12% increase year-on-year. The completion rate was 94.3%, with an average processing time of 4.8 days. The complaint trend is on the rise, with the main issues including: poor environmental sanitation (504 cases, accounting for 25.1%), untimely response (213 cases, accounting for 10.6%), and illegal construction (200 cases, accounting for 10.0%). The main complaint types were: living environment issues (866 cases, 43.2%), facility maintenance issues (440 cases, 21.9%), and service quality issues (279 cases, 13.9%). Property management companies with a high number of complaints included XX Property Management (342 cases) and YY Property Management (256 cases)." Examples of structured data objects used to answer complex combined queries: A user asked, "Comparing the number of complaints in Area A and Area B this month, which area is growing faster?" The analysis determined that this was a complex combined query, requiring cross-regional comparison and trend analysis. The execution method was to read the structured data objects from the two reports and reorganize them into a larger model to provide the answer.

[0044] The system replied: "In November 2024, the number of property management complaints in District A of a certain city was 2,006, an increase of 8% month-on-month and 12% year-on-year; the number of complaints in District B of the same city was 1,784, an increase of 5% month-on-month and 9% year-on-year. District A saw faster growth, with a month-on-month growth rate 3 percentage points higher than District B, and a year-on-year growth rate 3 percentage points higher than District B. In terms of the main issues, environmental sanitation problems were prominent in District A (504 cases, accounting for 25.1%), while facility maintenance problems accounted for a relatively high proportion in District B (512 cases, accounting for 28.7%)." Create inverted and dimensional indexes for data briefings, supporting combined queries based on topic category, event location, and time.

[0045] Examples of comprehensive answers based on TopN The user continued to ask: "Besides the poor environmental sanitation, what other major problems are there in Area A?" The analysis determined that the top 3 problems were already included in the pre-computed insights, which could be answered directly. The execution method was to read the pre-computed insights fields in the structured data object to answer the question.

[0046] The system replied: "In November 2024, among the property management complaints in District A of a certain city, in addition to poor environmental sanitation (504 cases, ranking first), the main problems also included: untimely response (213 cases, accounting for 10.6%, ranking second) and illegal construction (200 cases, accounting for 10.0%, ranking third)." In this embodiment, three examples are provided for the data acquisition phase: Data Acquisition Phase, Example 1: Standard Query A user asked, "What is the situation regarding property management complaints in District A of a certain city this month?" The big data model extracted the following information from the question: Extracted subject category: Urban and rural construction / Property management; Location of the incident: District A, a certain city; Extraction time range: November 2024 (standardized "this month"); Query type determination: Single briefing match (exact match PROP_ZH_AQ_202411).

[0047] Example 2 of the data collection phase: Multi-briefing combination query: A user asked: "How many property management complaints were received in total for Area A and Area B this month?" Extracted subject category: Urban and rural construction / Property management; Locations of the incident: District A and District B of a certain city (multiple locations); Extraction time range: 2024-11; Query type determination: Multiple briefing combination (PROP_ZH_AQ_202411 and PROP_ZH_BQ_202411 need to be summarized).

[0048] Example 3 of the data collection phase: Querying outside the range: A user asked: "How many complaints has XX Property Management received this month?" Extracted subject category: Urban and rural construction / Property management; Location of incident: Not specified (default is all areas); Extraction time range: 2024-11; Target of complaint: XX Property Management (specific entity); Query type determination: Out of range (Although XX Property is in the Top 5 of Area A, "Specific Object Query" was not pre-calculated as an independent dimension).

[0049] Refusal to answer triggered: "Inquiries about specific property management companies are not currently supported. You can inquire about: 1) the overall property management situation in District A of a certain city; 2) the ranking of property management companies with the most complaints; 3) the overall property management situation in District B of a certain city." Collect natural language query requests; perform semantic extraction on the natural language query requests using a large language model to obtain query requests; the query requests include topic classification, event location, time range, and query type; Implementation Method 2: This implementation method further defines the government affairs request data query method described in Implementation Method 1. In this implementation method, the topic dimension tree in the query processing stage includes dimension structure and dependency relationships. The dimensional structure includes a root node, branch nodes, and leaf nodes; The topic dimension tree has topic classification as the root node, incident location and time as branch nodes, and complaint object and complaint issue as leaf nodes.

[0050] In this embodiment, the leaf nodes are used to pre-calculate insight attributes.

[0051] In this embodiment, the dependency relationship is implemented through hard coding to ensure that the query boundary is controllable.

[0052] In this embodiment, the dependency relationship includes: The topic classification adopts the 12345 official hierarchical classification system, which directly maps to the topic classification field of the original record table; The location of the incident corresponds to the administrative division coding system, with the district level being mandatory and the street level being optional; The time dimension supports the standardized conversion of fuzzy expressions in natural language and is linked to the government work calendar; The subject of the complaint and the issue of the complaint are explicitly excluded from the dimension tree branches and are only pre-computed insight attributes of the leaf nodes. This exclusion rule is implemented through hard-coded dimension dependencies rather than dynamic configuration.

[0053] In this implementation, taking the theme "Urban and Rural Construction / Property Management" as an example, a theme-dimensional tree is constructed, such as... Figure 2 As shown, a topic-dimensional tree structure is presented. Implementation Method 3: This implementation method further defines the data query method for government affairs requests described in Implementation Method 1. In this implementation method, "the query request exceeding the pre-calculation range of the target data report" means: When the query request is for a topic category, there is no corresponding briefing for that topic category; When the query request is for the location of the incident, the location of the incident is not within the pre-calculated range; When the query request is a time range, the time range exceeds the briefing time range; When the query request is a query type, it involves a specific complaint target or a specific complaint issue and has not been pre-calculated.

[0054] In this embodiment, the pre-calculation scope includes the topic classification pre-calculation scope, the event location pre-calculation scope, the time range pre-calculation scope, the query type pre-calculation scope, and the dependency relationship pre-calculation scope; In this embodiment, a violation of dimensional dependency is defined as a dependency relationship exceeding the pre-calculated range of the dependency relationship.

[0055] Implementation Method Four: This implementation method further defines the data query method for government requests described in Implementation Method One. In this implementation method, the standard query is a single point-in-time total query, a single regional trend query, or a TopN ranking query.

[0056] Implementation Method 5: This implementation method further defines the data query method for government affairs requests described in Implementation Method 1. In this implementation method, the complex combination query is a cross-time granularity comparison query or a multi-location parallel comparison query.

[0057] Implementation Method Six: This implementation method is a further limitation of the government affairs request data query method described in Implementation Method One. In this implementation method, when the query result is a rejection response, the method further includes a feedback optimization stage. During the feedback optimization phase, when the query result is a rejection response, a completion priority is obtained based on the query request. When the completion priority exceeds the threshold and is manually reviewed, a new data summary is generated and added to the summary database.

[0058] In this embodiment, the formula for the completion priority is: P = f×w×c Where f is the frequency of rejections, counted on a weekly basis; w is the business importance weight, preset manually by topic classification, with a value range of 0.5 to 2.0; and c is the pre-calculated feasibility score, estimated based on historical data, with a value range of 0 to 1.

[0059] In this embodiment, the completion threshold is preferably 1.

[0060] This embodiment also includes vectorizing the rejected query text and performing vectorized clustering based on cosine similarity to identify high-frequency rejected response patterns. The vectorized clustering is defined as follows: missing details are clustered into one class, and the vector similarity is >0.85. Table 1 shows the rejected response records and clustering.

[0061] Table 2

[0062] In this embodiment, the method also includes recording rejected queries and performing pattern mining, automatically generating data summary completion suggestions for manual review. The completion suggestions do not include upgrading the complaint object or complaint issue to a query dimension. By limiting the dimension type of the completion suggestions, it is ensured that the query boundary is always controlled within the pre-calculated range.

[0063] In this implementation, an example is provided: For specific property management companies, f (frequency of refusal to answer this week) is 12, w (preset business importance weight) is 1.5, c (pre-calculated feasibility score estimated based on historical average data volume) is 0.6, P=10.8, which is greater than the set threshold of 1.0, generating a suggestion to complete the calculation. It is suggested to add a secondary pre-calculation for the "complaint" object dimension in a certain city. After manual review, the optimization method is to expand the pre-calculated insight attributes in the structured data objects.

[0064] This implementation method further defines the data collection method for government requests and explains the feedback optimization phase. This implementation method achieves continuous optimization by establishing a closed loop for recording, clustering, analyzing, and completing unanswered queries; assisting human decision-making through priority calculation; and continuously expanding the coverage based on actual needs.

Claims

1. A method for querying government service requests data, characterized in that, The method Includes the following stages: Data collection phase: Collect natural language query requests, original complaint records, and the content of the requests; The natural language query request is semantically extracted using a large language model to obtain the query request; the query request includes topic classification, location of the incident, time range, and query type; the time range is a time range after time standardization; based on the content of the complaint, TopN data is obtained; the TopN data includes TopN complaint targets and complaint issues; Query processing stage: Pre-calculate the original complaint records based on the topic dimension tree to generate a data summary; the data summary includes structured data and semantic summary; The query request is matched with the data summary based on the topic dimension tree and the data summary to obtain the target data summary; if the query request exceeds the pre-calculated range of the target data summary, the rejection response is taken as the query result; otherwise, the response generation stage is entered. Question and answer generation stage: If the query type belongs to a standard query, the semantic summary is used as the query result; If the query type is a complex combined query, then an answer is generated based on the structured data, and the answer is used as the query result; Otherwise, a generalized answer is generated based on the TopN data.

2. The method for querying government service request data according to claim 1, characterized in that, The method for obtaining the TopN data is as follows: Extracting the name of the complainant from the content of the complaint using named entity recognition; A summary of the complaint is generated from the content of the complaint by extracting text summaries or keywords. The extracted results are normalized, and an alias mapping table is established. The data is sorted by quantity, and the top N data are retained, where N is a preset threshold.

3. The method for querying government service request data according to claim 1, characterized in that, In the query processing phase, the topic dimension tree includes dimensional structure and dependencies; The dimensional structure includes a root node, branch nodes, and leaf nodes; The topic dimension tree has topic classification as the root node, incident location and time as branch nodes, and complaint object and complaint issue as leaf nodes.

4. The method for querying government service request data according to claim 1, characterized in that, The query request exceeding the pre-calculation range of the target data summary means: When the query request is for a topic category, there is no corresponding briefing for that topic category; When the query request is for the location of the incident, the location of the incident is not within the pre-calculated range; When the query request is a time range, the time range exceeds the briefing time range; When the query request is a query type, it involves a specific complaint target or a specific complaint issue and has not been pre-calculated.

5. The method for querying government service request data according to claim 1, characterized in that, The standard queries are total volume queries at a single point in time, trend queries for a single region, or TopN ranking queries.

6. The method for querying government request data according to claim 1, characterized in that, The complex combined query is a cross-time granularity comparison query or a multi-location parallel comparison query.

7. The method for querying government affairs request data according to claim 1, characterized in that, When the query result is a rejection response, the method further includes a feedback optimization phase; During the feedback optimization phase, when the query result is a rejection response, a completion priority is obtained based on the query request. When the completion priority exceeds the threshold and is manually reviewed, a new data summary is generated and added to the summary database. The formula for the completion priority is as follows: P = f×w×c Where f is the frequency of rejection; w is the weight of business importance; and c is the pre-calculated feasibility score.

8. A data query system for government service requests, characterized in that, The system includes the following modules: Data acquisition module: collects natural language query requests, original complaint records, and complaint content; performs semantic extraction on the natural language query requests using a large language model to obtain query requests; the query requests include topic classification, incident location, time range, and query type; the time range is a time-standardized time range; based on the complaint content, obtains Top N data; the Top N data includes Top N complaint targets and complaint issues; Query processing module: pre-calculates the original complaint records based on the topic dimension tree to generate a data summary; the data summary includes structured data and semantic summary; The query request is matched with the data summary based on the topic dimension tree and the data summary to obtain the target data summary; if the query request exceeds the pre-calculated range of the target data summary, the rejection response is taken as the query result; otherwise, the query is entered into the answer generation module. Question and answer generation module: If the query type is a standard query, then the semantic summary is used as the query result; If the query type is a complex combined query, then an answer is generated based on the structured data, and the answer is used as the query result; Otherwise, a generalized answer is generated based on the TopN data.

9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a computer program stored in memory, implements the method of any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1-7.

Citation Information

Patent Citations

  • SQL statement generation system and method based on thinking chain and small sample enhancement

    CN119938690A

  • Large model method and system suitable for natural language query generation of large-scale database table

    CN121350069A

  • Method and equipment for converting natural language into SQL (Structured Query Language) statement and medium

    CN121455983A

  • Data query method and intelligent question system

    CN121542295A