Government affair intelligent question and answer method, government affair intelligent question and answer system, medium and product

By using a bidirectional cyclic government semantic extraction network and multi-level retrieval technology, the problems of incomplete semantic capture and low accuracy in government intelligent question-and-answer systems have been solved, enabling highly accurate answers to government questions and improving the accuracy and user experience of government intelligent question-and-answer systems.

CN121303150BActive Publication Date: 2026-06-05CETC NEW SMART CITY RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CETC NEW SMART CITY RES INST CO LTD
Filing Date
2025-12-10
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing intelligent question-and-answer systems for government affairs cannot accurately capture all the semantic information in government affairs questions, nor can they accurately find the answers to different government affairs questions in similar government affairs scenarios from the government affairs knowledge base. This results in irrelevant answers that seriously affect the user experience.

Method used

A pre-trained bidirectional cyclic government semantic extraction network is used to perform global semantic extraction on government inquiry information. By combining regional and time information, semantic features are enhanced through forward and reverse semantic extraction operations, and semantic fusion is performed. The system is then combined with a multi-level government knowledge base for retrieval to generate accurate government responses.

Benefits of technology

It improves the accuracy of intelligent Q&A in government affairs, reduces irrelevant answers, meets the strict requirements for information authority and regionality in government affairs scenarios, and achieves highly accurate intelligent Q&A in government affairs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121303150B_ABST
    Figure CN121303150B_ABST
Patent Text Reader

Abstract

The application is suitable for the technical field of artificial intelligence and government service intersection, and provides a government intelligent question answering method, a government intelligent question answering system, a medium and a product. Through a trained bidirectional circulation government semantic extraction network, semantic extraction operations are performed on government inquiry information in two directions, and at least regional information and / or time information involved in the government inquiry information are extracted, so that global government semantic features with complete and accurate semantic information are obtained. In the preset government knowledge base, the regional information and / or the time information are combined, the government basis of the government inquiry information under different levels is accurately determined through multi-level retrieval, and highly accurate government reply information is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of interdisciplinary technology of artificial intelligence and government services, and in particular relates to government intelligent question answering methods, government intelligent question answering systems, computer-readable storage media and computer program products. Background Technology

[0002] With the development of artificial intelligence technology, intelligent question-and-answer systems for government affairs have become a core tool for improving the efficiency of government services and reducing the pressure on manual consultations. This requires the system to accurately answer users' government affairs questions. However, current intelligent question-and-answer systems for government affairs still cannot capture all the semantic information in government affairs questions, nor can they accurately find answers to different government affairs questions in similar government affairs scenarios from the government affairs knowledge base. This often results in irrelevant answers, seriously affecting the user experience. Therefore, how to improve the accuracy of intelligent question-and-answer systems for government affairs has become an urgent technical problem to be solved. Summary of the Invention

[0003] This application provides a government affairs intelligent question-answering method, a government affairs intelligent question-answering system, a computer-readable storage medium, and a computer program product, which can solve the problem of how to improve the accuracy of government affairs intelligent question-answering.

[0004] Firstly, embodiments of this application provide a government affairs intelligent question-answering method, including:

[0005] Obtain government information;

[0006] The trained bidirectional recurrent government semantic extraction network is invoked to perform global semantic extraction on government inquiry information in the preset government knowledge base, thereby obtaining global government semantic features corresponding to the government inquiry information in the preset government knowledge base. The global semantic extraction operation of the preset government knowledge base includes forward semantic extraction, reverse semantic extraction, government semantic enhancement, and semantic fusion. The government semantic enhancement operation of the preset government knowledge base is at least used to indicate that the government enhancement factor corresponding to the government inquiry information in the preset government knowledge base is added to the extracted semantic features. The government enhancement factor in the preset government knowledge base is used to represent the regional information and / or time information related to government affairs involved in the government inquiry information in the preset government knowledge base.

[0007] Within the preset government knowledge base, in the reference government collections corresponding to multiple levels, retrieve the target government features corresponding to the global government semantic features of the preset government knowledge base at multiple levels. The reference government collections of the preset government knowledge base include multiple reference government features at the same level.

[0008] Based on the target government characteristics corresponding to the various levels of the preset government knowledge base, generate government response information corresponding to the government inquiry information in the preset government knowledge base.

[0009] In some embodiments, the preset bidirectional cyclic government semantic extraction network of the government knowledge base includes a forward network unit, a reverse network unit, and a government semantic fusion unit.

[0010] A pre-trained bidirectional recurrent government semantic extraction network is invoked from a pre-defined government knowledge base to perform global semantic extraction on government inquiry information in the pre-defined government knowledge base, resulting in global government semantic features corresponding to the government inquiry information in the pre-defined government knowledge base, including:

[0011] Obtain the sequence of government terms corresponding to government inquiry information in the preset government knowledge base. The preset government knowledge base government term sequence includes at least one government term vector arranged in a first order. The preset government knowledge base government term vector represents the government terms involved in the government inquiry information in the preset government knowledge base. The first order of the preset government knowledge base is used to indicate the arrangement order of government terms in the government inquiry information in the preset government knowledge base.

[0012] Call the preset government knowledge base positive network unit, extract the government semantic features of the government vocabulary vector in the government vocabulary sequence according to the first order of the preset government knowledge base, and extract the government enhancement factor corresponding to the government vocabulary vector in the process of extracting the government semantic features. Add the government enhancement factor to the extracted government semantic features to obtain positive government semantic features.

[0013] The system calls a preset government knowledge base reverse network unit to extract government semantic features from the government vocabulary vector in the government vocabulary sequence in the second order. In the process of extracting government semantic features, the system also extracts government enhancement factors from the government vocabulary vector and adds the government enhancement factors to the extracted government semantic features to obtain reverse government semantic features.

[0014] The preset government knowledge base's government semantic fusion unit is invoked to perform feature fusion processing on the positive and negative government semantic features of the preset government knowledge base, thereby obtaining the global government semantic features of the preset government knowledge base.

[0015] In some embodiments, the preset government knowledge base invokes the preset government knowledge base government semantic fusion unit to perform feature fusion processing on the positive government semantic features and the negative government semantic features of the preset government knowledge base, to obtain the global government semantic features of the preset government knowledge base, including:

[0016] The system invokes a preset government affairs knowledge base semantic fusion unit. Based on the mechanism that the first type of semantic features corresponds to the first fusion weight and the second type of semantic features corresponds to the second fusion weight, it fuses the positive and negative government affairs semantic features of the preset government affairs knowledge base to obtain the global government affairs semantic features of the preset government affairs knowledge base. The first fusion weight of the preset government affairs knowledge base is greater than the second fusion weight of the preset government affairs knowledge base. The first type of semantic features of the preset government affairs knowledge base indicates the semantic features related to government affairs in the government affairs inquiry information of the preset government affairs knowledge base, and the second type of semantic features of the preset government affairs knowledge base indicates the semantic features unrelated to government affairs in the government affairs inquiry information of the preset government affairs knowledge base.

[0017] In some embodiments, the preset government knowledge base includes a set of reference government affairs at level i under level i and a set of reference government affairs at level i+1 under level i+1. The level i of the preset government knowledge base is higher than the level i+1 of the preset government knowledge base, and i is a positive integer.

[0018] Within the pre-defined government affairs knowledge base, the system retrieves target government affairs features corresponding to the global government affairs semantic features at each of the multiple levels of the pre-defined government affairs knowledge base, including:

[0019] In the i-th level reference government affairs set of the preset government affairs knowledge base, retrieve the i-th level target government affairs feature corresponding to the global government affairs semantic feature of the preset government affairs knowledge base;

[0020] In the set of reference government affairs at level i+1 of the preset government affairs knowledge base, determine at least one feature of reference government affairs at level i+1 that is associated with the target reference government affairs at level i of the preset government affairs knowledge base;

[0021] Retrieve the target government feature at level i+1 corresponding to the global government semantic feature in the preset government knowledge base from at least one level i+1 reference government feature in the preset government knowledge base.

[0022] In some embodiments, a preset government knowledge base generates government response information corresponding to government inquiry information based on target government characteristics corresponding to multiple levels of the preset government knowledge base, including:

[0023] Based on the preset response structure, the target government features corresponding to multiple levels of the preset government knowledge base are combined to obtain the initial response information;

[0024] Filter out private data from the initial response information in the preset government knowledge base to obtain the government response information from the preset government knowledge base.

[0025] In some embodiments, the method for presetting a government knowledge base further includes:

[0026] Obtain real-time government information within the designated geographical area indicated by the preset government knowledge base;

[0027] Based on real-time government information from the preset government knowledge base, update the target government features corresponding to the global government semantic features of the preset government knowledge base at at least one level.

[0028] In some embodiments, the method for presetting a government knowledge base further includes:

[0029] Retrieve response feedback information corresponding to government response information from a preset government knowledge base. This feedback information indicates whether the government response information from the preset government knowledge base resolves the government inquiry information from the preset government knowledge base. Update the preset government knowledge base bidirectional cyclic government semantic extraction network based on the response feedback information. Alternatively...

[0030] If at least one reference government feature in the preset government knowledge base is updated, the updated reference government feature is obtained; the bidirectional cyclic government semantic extraction network of the preset government knowledge base is updated according to the updated reference government feature.

[0031] Secondly, embodiments of this application provide a government affairs intelligent question-and-answer system, including:

[0032] The government affairs input module is used to obtain government affairs inquiry information;

[0033] The government affairs semantic extraction module is used to call a trained bidirectional recurrent government affairs semantic extraction network to perform global semantic extraction operations on government affairs inquiry information in a preset government affairs knowledge base, thereby obtaining global government affairs semantic features corresponding to the government affairs inquiry information in the preset government affairs knowledge base. The global semantic extraction operations of the preset government affairs knowledge base include forward semantic extraction operations, reverse semantic extraction operations, government affairs semantic enhancement operations, and semantic fusion operations. The government affairs semantic enhancement operations of the preset government affairs knowledge base are at least used to indicate that the government affairs enhancement factors corresponding to the government affairs inquiry information in the preset government affairs knowledge base are added to the extracted semantic features. The government affairs enhancement factors of the preset government affairs knowledge base are used to represent the regional information and / or time information related to government affairs involved in the government affairs inquiry information in the preset government affairs knowledge base.

[0034] The hierarchical matching module is used to retrieve the target government features corresponding to the global government semantic features of the preset government knowledge base at multiple levels in the reference government sets corresponding to multiple levels of the preset government knowledge base. The reference government sets of the preset government knowledge base include multiple reference government features at the same level.

[0035] The government affairs response output module is used to generate government affairs response information corresponding to government affairs inquiry information in the preset government affairs knowledge base, based on the target government affairs characteristics corresponding to multiple levels of the preset government affairs knowledge base.

[0036] Thirdly, embodiments of this application provide an electronic device including a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it causes the electronic device to perform the method described in any of the embodiments of the first aspect.

[0037] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in any of the embodiments of the first aspect.

[0038] Fifthly, embodiments of this application provide a computer program product, including a computer program, which, when run, causes the method described in any embodiment of the first aspect to be executed.

[0039] The advantages of the embodiments in this application compared with related technologies are:

[0040] When performing intelligent question-and-answer processing on government inquiries, a trained bidirectional cyclic government semantic extraction network is used to perform semantic extraction operations in both directions. This extracts at least the relevant geographical and / or temporal information from the inquiries, endowing the network with stronger domain prior knowledge. This allows for more accurate identification and parsing of crucial time points and geographical scope from the inquiries. Furthermore, semantic fusion operations combine the extracted bidirectional semantics and key information, enabling the splicing of historical and future information within the inquiries, as well as the transmission and association of long-distance semantics. This results in complete and accurate global government semantic features. Furthermore, by combining the acquired regional and / or time information with the pre-set government knowledge base, the system retrieves government information corresponding to the global government semantic features at multiple levels. Through multi-level retrieval, the system accurately determines the government basis for government inquiries at different levels. Consequently, the government response information generated based on the retrieved government information at multiple levels can highly correspond to the government inquiries, resulting in accurate intelligent government Q&A results. This reduces instances of "irrelevant answers" and meets the stringent requirements for information authority and regionality in government scenarios, thereby improving the accuracy of intelligent Q&A in government scenarios. Attached Figure Description

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

[0042] Figure 1This is a flowchart illustrating a government affairs intelligent question-and-answer method provided in an embodiment of this application;

[0043] Figure 2 This is a flowchart illustrating yet another intelligent question-and-answer method for government affairs provided in an embodiment of this application;

[0044] Figure 3 This is a schematic diagram of the structure of a bidirectional cyclic government semantic extraction network provided in an embodiment of this application;

[0045] Figure 4 This is a flowchart illustrating another intelligent question-and-answer method for government affairs provided in an embodiment of this application;

[0046] Figure 5 This is a schematic diagram of a hierarchical retrieval process for target government affairs features provided in an embodiment of this application;

[0047] Figure 6 This is a schematic diagram of the structure of a government affairs intelligent question-and-answer system provided in an embodiment of this application;

[0048] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0049] The technical solutions in the embodiments of this application will be described below with reference to the accompanying drawings.

[0050] Current government intelligent question-answering systems mostly follow the question-answering technology framework of general domains, often using recurrent neural networks (RNNs) or rule matching algorithms to extract semantic features from the government questions input by users. However, this question-answering technology framework often suffers from the following problems: First, semantic capture is incomplete. One-way RNNs struggle to handle government-related questions containing complex modifiers (such as "How will the monthly pension be calculated for flexible employment personnel who have paid social security for 15 years in a certain city in 2025?"). They cannot utilize the "future" semantic information of "monthly pension after retirement" to define the "social security in a certain city in 2025," leading to omissions of information such as government conditions, geographical scope, or time. Second, their ability to handle long-distance government semantic dependencies is weak. When processing long sentences, one-way RNNs are prone to losing key information, causing misjudgments. Third, the matching accuracy of government knowledge bases is low. Existing systems often remain at the surface-level word matching level, failing to deeply understand the contextual semantics, resulting in "answers that do not address the question." Fourth, their adaptability to dynamic information is poor. When government policies are updated, existing systems often need to retrain the entire network model, resulting in long update cycles and an inability to guarantee the timeliness of information.

[0051] To address the aforementioned issues, this application provides a government affairs intelligent question-answering method, a government affairs intelligent question-answering system, a computer-readable storage medium, and a computer program product. Through a trained bidirectional cyclic government affairs semantic extraction network, semantic features are extracted from government affairs questions (i.e., government affairs inquiry information) from both positive and negative directions. Furthermore, government affairs enhancement factors such as region and time are introduced. This enables comprehensive semantic analysis of key information such as policy conditions, geographical scope, and time nodes within government affairs questions, utilizing historical and future information in the context of government affairs. Combining this with a dedicated government affairs knowledge base, multi-level retrieval of the extracted global government affairs semantic features improves the accuracy of government affairs information matching, thereby meeting the high-precision question-answering requirements of government affairs intelligent question answering in government affairs scenarios.

[0052] Figure 1 This is a flowchart illustrating a government affairs intelligent question-and-answer method provided in an embodiment of this application, such as... Figure 1 The method shown includes the following steps:

[0053] S101, Obtain government information inquiry.

[0054] The government intelligent question-answering method provided in this application embodiment can be applied to the government intelligent question-answering system (hereinafter referred to as the question-answering system). The question-answering system can be integrated into an electronic device, such as a mobile phone, tablet computer, in-vehicle device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), etc. This application embodiment does not impose any restrictions on the specific type of electronic device.

[0055] When users need to conduct government affairs intelligent Q&A, they can input the government affairs inquiry information they want to ask into the Q&A system, and the Q&A system can respond to the user's input operation and obtain the government affairs inquiry information.

[0056] It is understandable that users can input government inquiry information into the question-and-answer system in the form of text, images, and / or voice. The question-and-answer system can use the text entered by the user as government inquiry information, recognize the text in the image entered by the user, or convert the voice into text to obtain the final government inquiry information.

[0057] S102, invoke the trained bidirectional recurrent government semantic extraction network to perform global semantic extraction on government inquiry information, and obtain the global government semantic features corresponding to the government inquiry information.

[0058] The global semantic extraction operation includes forward semantic extraction, reverse semantic extraction, government semantic enhancement, and semantic fusion.

[0059] Forward semantic extraction refers to the process by which a bidirectional cyclic government semantic extraction network processes information along the natural reading order of government inquiry information (and the first order in the following text, which can generally be from left to right, i.e. from the first word to the last word) in order to capture and accumulate historical context information.

[0060] Reverse semantic extraction refers to the process by which a bidirectional cyclic government semantic extraction network processes government inquiry information in reverse order of its natural reading sequence (and the second order mentioned later, which can generally be from right to left, i.e. from the last word to the first word) in order to capture and utilize future context.

[0061] The semantic enhancement operation for government affairs is at least used to instruct the addition of the government affairs enhancement factors corresponding to the government affairs inquiry information to the extracted semantic features.

[0062] The government affairs enhancement factor is used to represent the geographical and / or temporal information related to government affairs involved in government affairs inquiries.

[0063] The RNN network in the bidirectional cyclic government semantic extraction network, namely the forward network unit and the reverse network unit mentioned below, can be a network based on Long Short-Term Memory Network (LSTM) and / or a network based on Gated Recurrent Unit (GRU). This application does not impose any restrictions, but for convenience, an LSTM network is used as an example.

[0064] The question-and-answer system can input government inquiry information into a trained bidirectional cyclic government semantic extraction network. The bidirectional cyclic government semantic extraction network will automatically perform forward and reverse semantic extraction operations on the government inquiry information. During the semantic extraction in both directions, government semantic enhancement operations will be performed simultaneously. After that, a semantic fusion operation will be performed to output the global government semantic features corresponding to the government inquiry information that includes complete semantic information.

[0065] In one implementation, such as Figure 2 As shown, the bidirectional cyclic government semantic extraction network includes forward network units, reverse network units, and government semantic fusion units. The question-answering system calls the bidirectional cyclic government semantic extraction network to execute the following steps S201 to S204 to obtain the global government semantic features corresponding to the government inquiry information.

[0066] S201, Obtain the sequence of government terminology corresponding to government inquiry information.

[0067] The sequence of government terminology includes at least one government terminology vector arranged in the first order.

[0068] The government term vector represents government terms involved in government inquiry information. Examples include medical insurance contribution base, self-employed individuals, social security or business license applications, etc.

[0069] The first order is used to indicate the order in which government-related terms are arranged in government inquiry information. For example, in the government inquiry information "I am a self-employed person in a certain city. How much do I need to pay for medical insurance each month in 2024?", the first order is from "I" to "how much".

[0070] The question-and-answer system performs data preprocessing on government inquiry information to obtain processed government inquiry information; it then segments the processed government inquiry information into words to obtain an initial word sequence; and finally, it encodes each government word in the initial word sequence to obtain a government word sequence.

[0071] The data preprocessing operations include at least typo correction, removal of special symbols, and removal of redundant information. This application does not impose specific limitations on the embodiments. For example, "payment" in a government inquiry information is corrected to "payment".

[0072] The question-answering system can segment government inquiry texts into multiple government terms (i.e., initial word sequence) arranged in the natural reading order (i.e., first order) using a word segmentation tool that integrates a government dictionary. Then, through a trained government domain word embedding model, each government term is sequentially encoded into a 300-dimensional government term vector, forming a government term sequence X=[x1,x2,...,x...]. n ], where x n This includes the semantic attributes of the nth government term, for example, "a certain city" is associated with "region = a certain province" and "government jurisdiction = a certain city's government service data management bureau". This application embodiment does not limit the word segmentation tool and the government domain word embedding model. For example, the word segmentation tool can be the jieba word segmentation tool loaded with government-specific vocabulary (such as social security, residence permit, business license, etc.). The government domain word embedding model can be a static word embedding model or a dynamic word embedding model trained on corpora such as government policy texts and service guides.

[0073] In one implementation, the method further includes: determining whether regional and / or time information exists in the government inquiry information; if regional and / or time information exists, proceeding to the step of obtaining the government vocabulary sequence corresponding to the government inquiry information; if regional and time information does not exist in the government inquiry information, obtaining the regional and time information at the current time, adding the regional and time information to the government inquiry information, and then proceeding to the step of obtaining the government vocabulary sequence corresponding to the government inquiry information. The question-and-answer system can identify whether time and regional information exist in the government inquiry information. If not, it can obtain the administrative region corresponding to the user's current location and the current time, adding the administrative region as regional information and the current time as time information to the government inquiry information. Thus, in local government intelligent question-and-answer scenarios, when key information is habitually missing in the user's government inquiry information, the system can proactively supplement the key contextual information of the government service's region and time required for government intelligent question-and-answer, understand the user's true intent, and thus provide the user with accurate government response content that conforms to the characteristics of the government affairs in the user's administrative region.

[0074] It's understandable that when a question-and-answer system is integrated into a user's current electronic device, it can read the device's location information, use this information as the user's location, and query the corresponding administrative region from a pre-stored geographic mapping table to obtain geographic information. When the question-and-answer system is integrated into other electronic devices, it can request location information from the user's current electronic device.

[0075] S202, invoke the forward network unit to extract the political semantic features of the political word vectors in the political word sequence in the first order, and extract the political enhancement factors corresponding to the political word vectors in the process of extracting the political semantic features, and add the political enhancement factors to the extracted political semantic features to obtain the forward political semantic features.

[0076] Among them, the government affairs enhancement factor is used to represent geographic information and / or time information.

[0077] First, it should be noted that the bidirectional recurrent government affairs semantic extraction network involves processing government affairs word vectors in the government affairs word sequence during the extraction of global semantic features. Generally, a time step represents the position or moment of the government affairs word vector currently being processed by the forward and reverse network units in the bidirectional recurrent government affairs semantic extraction network. Furthermore, processing the same government affairs word vector by the forward and reverse network units at the same time step can also be understood as follows: the current time step t indicates the t-th government affairs word vector in the government affairs word sequence ordered in the first order. When the forward network unit processes the t-th government affairs word vector in the first order, the reverse network unit also processes the t-th government affairs word vector in the second order.

[0078] Combination Figure 3 The question-answering system inputs a sequence of government terminology into a bidirectional recurrent government semantic extraction network. The forward network units (also known as forward government RNN units) in this network will extract the terminology in the first order (forward, i.e., x1→x2→...→x...). n The forward network unit processes each government term vector in the government term sequence in the direction of processing. When processing the t-th government term vector (i.e., at the t-th time step), the forward network unit will, in the first order, obtain the hidden state of the (t-1)-th government term vector in the government term sequence (i.e., the hidden state determined at the previous time step), identify the government enhancement factor in the t-th government term vector, and determine the t-th hidden state corresponding to the t-th government term vector (the hidden state at the current time step t) based on the hidden state of the (t-1)-th government term vector, the t-th government term vector, and the government enhancement factor in the t-th government term vector. Then, it will enter the process of processing the (t+1)-th government term vector until the last government term vector in the government term sequence is processed. The hidden state corresponding to each government term vector in the government term sequence is used as the forward government semantic feature corresponding to that government term vector.

[0079] In one implementation, the government affairs enhancement factor includes a geographic factor to represent geographic information and a temporal factor to represent temporal information. The question-answering system can determine the t-th hidden state by calling the forward network unit according to Formula 1, where Formula 1 is h... t ^f=σ(W_f·[x t h t-1 W_f, f_t^time, f_t^area]+b_f), where t represents the t-th time step, t is a positive integer, W_f is the forward weight matrix, b_f is the bias vector, and σ is the tanh activation function; f_t^time is the government term vector x at the current time step t. t The corresponding time factors (e.g., "2025" corresponds to [1,0,0], "last year" corresponds to [0,1,0]), and f_t^area is the government affairs vocabulary vector x at the t-th time step. t Corresponding regional factors (e.g., "a certain city" corresponds to [1,0,0], "a certain province" corresponds to [0,1,0]); h t-1 ^f represents the hidden state obtained at time step t-1, h t ^f represents the hidden state at the current time step t, which can be understood as h t ^f includes the historical political semantics of the first t (time steps) political term vectors (e.g., the temporal association of "2024", "a certain city" and "flexible employment personnel" is 2024 → a certain city → flexible employment personnel).

[0080] S203, invoke the reverse network unit to extract the government semantic features of the government word vectors in the government word sequence according to the second order, and extract the government enhancement factor of the government word vectors in the process of extracting government semantic features, and add the government enhancement factor to the extracted government semantic features to obtain the reverse government semantic features.

[0081] For convenience, in this embodiment of the application, the nth government term vector in the government term sequence is described in the first order.

[0082] When the question-answering system processes the t-th government term vector through the forward network units in the first order, the backward network units (also known as the backward government RNN units) will process it in the second order (in reverse, i.e., x). n (In the direction →...→x2→x1), when processing the same t-th government term vector, the inverse network unit will obtain the hidden state of the (t+1)-th government term vector (i.e., the hidden state determined at the next time step t+1). It should be noted that the "next" here is based on the first order. In fact, for the inverse network unit based on the second order, it obtains the hidden state of the government term vector preceding the t-th government term vector. This preceding government term vector corresponds to the (t+1)-th government term vector in the first order. The inverse network unit will also identify the government enhancement factor in the t-th government term vector. Based on the hidden state determined at the next time step t+1, the current government term vector, and the government enhancement factor in the current government term vector, it determines the hidden state corresponding to the current government term vector and enters the next processing flow until it processes the first government term vector in the government term sequence. The hidden state corresponding to each government term vector in the government term sequence is used as the inverse government semantic feature.

[0083] In one implementation, the question-answering system calls the back-end network unit to determine the hidden state corresponding to the current government term vector according to Formula 2, where Formula 2 is h. t ^b=σ(W_b·[x t ,h t+1 ^b,f_t^time,f_t^area]+b_b), where W_b is the backward weight matrix, b_b is the bias vector, and h t+1 ^b represents the hidden state determined at time step t+1, and h t The hidden state determined at time step t can be understood as h. t ^b contains the future government semantics of the last n-t+1 words, for example, the limiting effect of "medical insurance contribution base" on "flexible employment personnel", where n represents the total number of government word vectors in the government word sequence.

[0084] S204, invoke the government semantic fusion unit to perform feature fusion processing on the positive and negative government semantic features to obtain the global government semantic features.

[0085] When the question-answering system inputs a sequence of government terminology into a bidirectional recurrent government semantic extraction network, the government semantic fusion unit within it acquires the positive government semantic features corresponding to each government terminology vector output by the forward network unit, and the reverse government semantic features corresponding to each government terminology vector output by the reverse network unit. The government semantic fusion unit then fuses the positive and reverse government semantic features corresponding to each government terminology vector according to a predetermined fusion weight to obtain the fused semantic features corresponding to that government terminology vector. The fused semantic features corresponding to each government terminology vector constitute the global government semantic features.

[0086] In one implementation, a government semantic fusion unit is invoked to perform feature fusion processing on positive and negative government semantic features to obtain global government semantic features. This includes: invoking the government semantic fusion unit and fusing positive and negative government semantic features according to the mechanism that the first type of semantic features corresponds to the first fusion weight and the second type of semantic features corresponds to the second fusion weight to obtain global government semantic features. The first fusion weight is greater than the second fusion weight. The first type of semantic features indicates semantic features related to government affairs in government inquiry information, and the second type of semantic features indicates semantic features unrelated to government affairs in government inquiry information.

[0087] The sum of the first fusion weight and the second fusion weight is 1.

[0088] For each government term vector, the question-answering system uses a government semantic fusion unit to identify the first and second types of semantic features in the positive government semantic features corresponding to the government term vector, as well as the first and second types of semantic features in the negative government semantic features corresponding to the government term vector. Then, according to an attention mechanism where the first type of semantic features corresponds to the first fusion weight and the second type of semantic features corresponds to the second fusion weight, the positive and negative government semantic features corresponding to the government term vector are weighted and fused to obtain the fused semantic features corresponding to the government term vector. Finally, the fused semantic features corresponding to each government term vector are used as the global government semantic features. In this way, by assigning higher weights to semantic features related to government affairs and lower weights to semantic features unrelated to government affairs, and by fusing the positive and negative government affairs semantic features corresponding to government affairs lexical vectors based on the differentiated weight settings, not only can the historical information in the positive government affairs semantic features be spliced ​​together with the future information in the negative government affairs semantic features, preserving the long-distance dependencies between government affairs lexical terms, but it can also ensure that the bidirectional cyclic government affairs semantic extraction network focuses on semantic features related to government affairs, improving the network's ability to perceive government affairs semantics. This results in global government affairs semantic features that are semantically complete and not diluted by non-government affairs semantic features, achieving accurate semantic recognition of government affairs inquiry information and thus improving the accuracy of intelligent government affairs question answering.

[0089] Continue to combine Figure 3 The government semantic fusion unit performs the same processing steps at each time step. Taking the t-th time step as an example, it concatenates h... t ^f and h t ^b, and introduces a government affairs attention mechanism. For example, higher attention weights are assigned to key government affairs information such as policy document numbers, time, region, or application materials (an example of information corresponding to the first type of semantic features). For instance, the weight of a certain document from a certain city's human resources and social security department is set to 0.8 (an example of the first fusion weight). Lower attention weights are assigned to other non-key information (an example of information corresponding to the second type of semantic features). For instance, the weight of ordinary conjunctions is set to 0.2 (an example of the second fusion weight). The resulting fused government affairs semantic features h t The government semantic features contain government semantic information from both historical and future perspectives (such as the complete logic of "2024", "a certain city", "flexible employment personnel" and "medical insurance contribution base"). After fusing the vectors at each time step, the government semantic features are recorded in matrix H to obtain the global government semantic features H.

[0090] In the technical solutions S201 to S204, forward and reverse network units process government terminology sequences from two directions: "past → future" (forward) and "future → past" (reverse), respectively. This fully utilizes the contextual information of the entire government inquiry, enabling long-distance semantic association recognition and improving the accuracy of semantic recognition in intelligent government question answering. Furthermore, government enhancement factors, including geographical and / or temporal elements, are added in real-time during semantic feature extraction. This allows the network to not only understand the general semantics of words but also directly perceive their government attributes (e.g., "a certain city" is not just a place name but represents a specific government jurisdiction), greatly improving the relevance and accuracy of semantic understanding in the government domain. Finally, the government semantic fusion unit integrates the semantic features extracted from both forward and reverse directions, ensuring that the final global government semantic features accurately and completely reflect the user's intent in the government inquiry, thereby improving the accuracy of intelligent government question answering.

[0091] S103, in the reference government affairs sets corresponding to multiple levels in the preset government affairs knowledge base, retrieve the target government affairs features corresponding to the global government affairs semantic features at multiple levels.

[0092] The reference government affairs set includes multiple reference government affairs features at the same level.

[0093] The dimensions of the reference government affairs features are the same as the dimensions of the global government affairs semantic features.

[0094] Referencing government characteristics is used to represent government policies.

[0095] It is understandable that reference government features can be obtained in advance by preprocessing, segmenting and encoding government policy implementation data, and the encoding method for reference government features is the same as the encoding method for government inquiry information.

[0096] For each level of the preset government knowledge base, the question-answering system calculates the similarity between each reference government feature in the reference government set and the global government semantic feature, and takes the reference government feature with the highest similarity as the target government feature corresponding to the global government semantic feature at that level. The similarity can be cosine similarity, Euclidean distance, or Manhattan distance, etc., and this embodiment does not impose any limitations; for convenience, cosine similarity is used as an example.

[0097] In one implementation, the pre-defined government affairs knowledge base includes a set of reference government affairs at level i under level i and a set of reference government affairs at level (i+1) under level i, where level i is higher than level i+1, and i is a positive integer; for example Figure 4As shown, in the reference government affairs sets corresponding to multiple levels in the preset government affairs knowledge base, the target government affairs features corresponding to the global government affairs semantic features at multiple levels are retrieved, including the following S301 to S303.

[0098] S301, in the i-th level reference government affairs set, retrieve the i-th level target government affairs feature corresponding to the global government affairs semantic feature.

[0099] The question-answering system calculates the similarity between each i-th level reference government feature in the reference government affairs set and the global government affairs semantic feature, and takes the reference government affairs feature with the highest similarity as the i-th level target government affairs feature corresponding to the global government affairs semantic feature.

[0100] S302, in the set of reference government affairs at level i+1, determine at least one feature of reference government affairs at level i+1 that is associated with the target reference government affairs at level i.

[0101] Each level of reference policy collection also includes multiple policy categories corresponding to different reference policy features.

[0102] The question-answering system can determine the target policy category corresponding to the target policy feature at level i in the i-th level reference policy set, and filter out all reference policy features whose corresponding policy category is the target policy category in the (i+1)-th level reference policy set. Each filtered reference policy feature is a (i+1)-th level reference policy feature.

[0103] S303, in at least one (i+1)th level reference government affairs feature, retrieve the (i+1)th level target government affairs feature corresponding to the global government affairs semantic feature.

[0104] The question-answering system calculates the similarity between each (i+1)th level reference government feature and the global government semantic feature, and uses the (i+1)th level reference government feature with the highest similarity as the (i+1)th level target government feature corresponding to the global government semantic feature.

[0105] In the above technical solution, by retrieving the target government affairs feature at level i from the level i reference government affairs set, at least one level i+1 reference government affairs feature corresponding to the target government affairs feature at level i+1 is determined in the level i+1 reference government affairs set. Then, among the retrieved at least one level i+1 reference government affairs feature, the level i+1 target government affairs feature corresponding to the global government affairs semantic feature at level i+1 is determined. By constraining the search scope of the next level through high-level search results, the search scope can be quickly narrowed, avoiding a full search of the preset government affairs knowledge base and improving search efficiency. Furthermore, through chained retrieval from level i to level i+1, it ensures that the reference government affairs features within the search scope of the next level are associated with the reference government affairs features retrieved from the previous level, reducing interference from irrelevant reference government affairs features and thus improving the accuracy of search results. Moreover, compared to traditional flat search based on surface-level vocabulary, this hierarchical retrieval method can accurately locate target government affairs features at multiple levels that are strongly related to the global government affairs semantic feature, reducing the "relevant answer" problem caused by flat search. In addition, the global government semantic features include government enhancement factors corresponding to government inquiry information. These government enhancement factors are used to represent the regional and / or time information related to government affairs involved in the government inquiry information. In this way, during hierarchical retrieval, the target government features under the region and / or time involved in the government inquiry information can be accurately retrieved, thereby improving the accuracy of intelligent government question answering.

[0106] Generally, government policies are often categorized into national, provincial, and municipal levels. The reference government features in the pre-defined government knowledge base can also be categorized into national, provincial, and municipal levels. Therefore, in one implementation, the pre-defined government knowledge base includes a first-level set of reference government policies, a second-level set of reference government policies, and a third-level set of reference government policies. The first level is higher than the second level, and the second level is higher than the third level. The first-level set of reference government policies includes multiple national-level reference government features corresponding to national-level government policies; the second-level set includes multiple provincial-level reference government features corresponding to provincial-level government policies; and the third-level set includes multiple municipal-level reference government features corresponding to municipal-level government policies.

[0107] The government affairs enhancement factor in the global government affairs semantic features includes a regional factor. The method further includes: in the first-level reference government affairs set, identifying the national-level reference government affairs feature with the highest cosine similarity to the global government affairs semantic features, and using this national-level reference government affairs feature as the national-level target government affairs feature; based on the policy category of the national-level target government affairs feature, selecting all provincial-level reference government affairs features under that policy category from the second-level reference government affairs set, and using the selected provincial-level reference government affairs features as the first detection range; in the first retrieval range, identifying the provincial-level reference government affairs feature with the highest cosine similarity to the global government affairs semantic features, and using this provincial-level reference government affairs feature as the provincial-level target government affairs feature; based on the policy category of the provincial-level reference government affairs feature, selecting all municipal-level reference government affairs features under that policy category from the third-level reference government affairs set, and using the selected municipal-level reference government affairs features as the second detection range; based on the regional information corresponding to each municipal-level reference government affairs feature in the second detection range, selecting all municipal-level reference government affairs features corresponding to the regional information and regional factors to obtain the third detection range; and determining the municipal-level target government affairs feature corresponding to the global government affairs semantic features within the third detection range.

[0108] In one implementation, the method further includes: filtering provincial and municipal reference government affairs features corresponding to the regional information and regional factors based on the regional information in the first search scope; updating the first search scope based on the filtered provincial and municipal reference government affairs features; and proceeding to the step of determining the provincial reference government affairs feature with the highest cosine similarity to the global government affairs semantic features. In this implementation, the search scope is limited based on regional factors starting from the provincial level, which can enhance search efficiency and the regionality of government affairs search results, thereby improving search accuracy.

[0109] In one implementation, the method further includes: determining a weighted result among the cosine similarity corresponding to national-level target government affairs features, provincial-level target government affairs features, and municipal-level reference government affairs features, based on preset scoring weights, to obtain a search result score; when the search result score is greater than or equal to a preset threshold, proceeding to the step of generating government affairs response information corresponding to the government affairs inquiry information based on the target government affairs features corresponding to each of the multiple levels; when the weighted result is less than the preset threshold, generating government affairs response information based on national-level target government affairs features and / or provincial-level target government affairs features, and outputting prompt information, which is used to prompt the government service department corresponding to the consultation location information.

[0110] The preset scoring weights include national-level, provincial-level, and municipal-level scoring weights. For convenience, the national-level, provincial-level, and municipal-level scoring weights can be 0.2, 0.3, and 0.5, respectively, with a preset threshold of 0.5. For example, if the cosine similarity of the national-level target government affairs features, the provincial-level target government affairs features, and the municipal-level reference government affairs features are 0.85, 0.9, and 0.95, respectively, then the search result score = 0.85 × 0.2 + 0.9 × 0.3 + 0.95 × 0.5 = 0.915.

[0111] In the above technical solution, after determining the target government features corresponding to the global government semantic features at multiple levels, a search result score is determined, and the reliability of the search results is judged based on the search result score. If the results are unreliable (less than a preset threshold), the municipal-level target government features are discarded, and the user is provided with principled government policy content based on the national-level or municipal-level target government features, along with prompts. This can improve the user experience of the government intelligent question and answer system.

[0112] S104. Based on the target government affairs characteristics corresponding to multiple levels, generate government affairs response information corresponding to the government affairs inquiry information.

[0113] The question-and-answer system can convert the target government features corresponding to the global government semantic features at multiple levels into text, combine the texts to obtain government response information, and output the government response information.

[0114] In one implementation, government response information corresponding to government inquiry information is generated based on the target government features corresponding to multiple levels. This includes: combining the target government features corresponding to multiple levels according to a preset response structure to obtain initial response information; and filtering private data in the initial response information to obtain government response information.

[0115] Private data may include user identity information, account information, or information that is not publicly available government policies, which may affect user information security or the credibility of government services. This application does not impose specific limitations on this.

[0116] The question-and-answer system can combine government policies indicated by target government characteristics at multiple levels according to a preset answer structure to obtain initial response information. It then identifies private data within the initial response information; if private data exists, it is removed from the initial response information to obtain the final government response; otherwise, the initial response information is used as the final government response. In this way, through preset answer structure combination and private data filtering, clear and secure government response information can be obtained, ensuring that the government response information is both authoritative and easy to understand. This improves the reliability of intelligent government question-and-answer systems, reduces consultation costs for government users, and decreases the amount of manual transfer required.

[0117] For example, the preset response structure includes "Policy Basis → Core Clauses → Procedures → Required Materials → Consultation Channels". The question-and-answer system can organize the government policies indicated by the target government features at multiple levels into a coherent text according to the structure of "Policy Basis → Core Clauses → Procedures → Required Materials → Consultation Channels", and use this text as the initial response content to improve user readability.

[0118] In one implementation, the method further includes: obtaining real-time government information within the geographic information indication area; and updating government response information based on the real-time government information.

[0119] The question-and-answer system identifies time-sensitive government information in government response information. When it determines that the government response information includes time-sensitive government information, the system searches for the corresponding government service platform from multiple regional government service platforms it connects to, based on the regional information involved in the government inquiry. It then calls the real-time data interface of that platform to obtain the real-time government information corresponding to the time-sensitive government information and verifies the time-sensitive government content against this real-time information. If the time-sensitive government content does not match the real-time government information, the system updates the time-sensitive government information in the government response information and outputs the updated government response information. Time-sensitive government information refers to government policies that are valid for a certain period, such as the 2024 medical insurance contribution base or the 2025 social security contribution base.

[0120] In this implementation method, government response information can be dynamically verified and automatically corrected based on real-time government information, providing users with reliable government response information.

[0121] Combination Figure 4 and Figure 5 In one application scenario, a question-and-answer system is deployed on a municipal government cloud server to handle inquiries from users in the city regarding medical insurance for flexible employment personnel. The system is required to accurately identify the user's city and the time of inquiry, match the corresponding level of medical insurance policies, and output a structured service guide.

[0122] The question-and-answer system preloads a word segmentation dictionary containing 2,000 government terms, including those related to flexible employment personnel, medical insurance contribution base, and a provincial inquiry app. It uses a dynamic word embedding model pre-trained based on "government policy texts of the corresponding province from 2020 to 2024" to generate a 300-dimensional government term vector. The time factor in the government enhancement factor includes the past year, the past three years, and more than three years, while the geographical factor includes the ten districts of the city and the city proper.

[0123] In the bidirectional recurrent government affairs semantic extraction network, the forward government affairs RNN unit and the backward government affairs RNN unit adopt LSTM network (to alleviate gradient vanishing). The hidden layer dimension is set to 512. In the government affairs attention mechanism, the weights of policy document number, region name and time node (an example of the first type of semantic features) are set to 0.8 (an example of the first fusion weight), and the weights of other words are set to 0.2 (an example of the second fusion weight). The random deactivation (Dropout) probability of the bidirectional recurrent government affairs semantic extraction network is set to 0.2 to avoid overfitting.

[0124] The pre-set government knowledge base includes a first-level database to a third-level database (one example of the first-level database referencing the government collection to the third-level database). The first-level database contains feature vectors of national-level government policies such as the Social Insurance Law and national-level guidelines on flexible employment personnel participating in basic medical insurance for employees (one example of national-level reference government features). The second-level database contains feature vectors of provincial-level government policies such as the regulations on flexible employment personnel participating in basic medical insurance for employees (one example of provincial-level reference government features). The third-level database contains feature vectors of municipal-level government policies such as the 2024 medical insurance payment guidelines for flexible employment personnel in the ten districts of the city and the city itself (one example of municipal-level reference government features). This third-level database includes information such as the payment base (lower limit B1 yuan, upper limit A1 yuan, A1 > B1), payment ratio (q1%), and payment channels (a provincial inquiry APP, a municipal social security WeChat official account).

[0125] Users can enter the question "I am a self-employed person in a certain city. How much do I need to pay for medical insurance each month in 2024?" into the government affairs platform. The question can be retrieved through the platform's question and answer system.

[0126] The question-answering system cleans the text of the question, retaining the city, self-employed individuals, 2024, medical insurance, and the monthly payment amount, removing redundant spaces (an example of data preprocessing). The system then segments the question into words, resulting in: "I / am / a / self-employed / in / a / city / , / 2024 / of / medical insurance / how / how / money / I / must / pay / every / month?". Based on the segmentation, a dynamic word embedding model is used to encode the retained content, specifically generating a 300-dimensional word embedding sequence X (an example of a government terminology sequence). The geographic factor for "a / city" is set to [1,0,...,0] (the corresponding bit for "a / city" is 1), and the time factor for "2024" is set to [1,0,0] (the past year). Sequence X is then input into a bidirectional recurrent neural network for government semantic extraction.

[0127] The forward government affairs RNN unit in the network extracts historical semantics (an example of forward semantic features) along the path "I → am → a certain city → ... → money", identifying the associations of a certain city, flexible employment personnel, 2024, etc.; the backward government affairs RNN unit extracts future semantics (an example of reverse semantic features) along the path "money → how much → pay → ... → me", using "how much to pay each month" to reversely limit the consultation direction of "medical insurance" to "payment amount"; the government affairs semantic fusion unit introduces a government affairs attention mechanism, assigning high weights to "a certain city", "2024" and "medical insurance", generating global government affairs semantic features H.

[0128] The question-and-answer system performs three levels of matching within a pre-set government knowledge base. Specifically, Level 1 matching: Matches H with the Level 1 database to filter out national-level guidelines on flexible employment personnel participating in basic medical insurance for employees (cosine similarity 0.75); Level 2 matching: Based on the policy category of medical insurance payment, limits the range of feature vectors related to "medical insurance payment for flexible employment personnel in a certain province" in the Level 2 database (an example of S302), calculates the cosine similarity between H and the feature vectors within this range, and filters out the methods for flexible employment personnel to participate in basic medical insurance for employees in a certain province (cosine similarity 0.82); Level 3 matching: Combining the regional factor of "a certain city" in H, limits the range of medical insurance information for "a certain city" in the Level 3 database, calculates the cosine similarity between H and the feature vector corresponding to the 2024 medical insurance payment guidelines of a certain city (0.91), which is higher than the feature vectors corresponding to the medical insurance payment guidelines of other districts in the province (such as 0.78, 0.75), determining that the feature vector corresponding to the 2024 medical insurance payment guidelines of a certain city is the optimal match in the Level 3 database. Calculate the scores of the feature vectors selected from the three databases. The first-level score is 0.75 × 0.2 = 0.15, the second-level score is 0.82 × 0.3 = 0.246, and the third-level score is 0.91 × 0.5 = 0.455. The total score is 0.15 + 0.246 + 0.455 = 0.851 (an example of retrieval scoring). The feature vectors selected from the three databases are determined to be the optimal selection results.

[0129] The Q&A system will call the real-time data interface of the municipal government service data management bureau to confirm that the lower limit of the medical insurance contribution base for flexible employment personnel in a certain city in 2024 is still B1 yuan (no update, obtaining real-time government information within the indicated area; an example of updating government response information based on real-time government information). The government affairs corresponding to the feature vectors selected from the three databases will be organized according to the structure of "policy basis → core clauses → procedures → required materials → consultation channels" as follows: "Policy basis: 1. National-level guiding opinions on flexible employment personnel participating in basic medical insurance for employees; 2. Measures for flexible employment personnel participating in basic medical insurance for employees in a certain province; 3. Medical insurance contribution guidelines for a certain city in 2024; Core clauses: The range of the medical insurance contribution base for flexible employment personnel in a certain city in 2024 is B1 yuan - A1 yuan, and the contribution rate is q1%; Monthly contribution amount calculation: base × q1% (e.g., Calculated at the lower limit, the monthly payment is B1×q1%≈C yuan); Procedure: 1. Log in to the provincial inquiry APP → Enter the social security module → Select flexible employment personnel medical insurance payment; 2. Confirm the payment base → Submit the payment order → Complete the payment; Required materials: No offline materials are required, online verification of identity information is sufficient; Consultation channels: The social security service hotline of a certain city is XXXX-XXXXX, or online consultation through the "Social Security of a Certain City" WeChat official account; Sensitive information filtering: No privacy data is involved, no additional filtering is required (an example of filtering private data in the initial response information to obtain government response information).

[0130] In this embodiment, when performing intelligent question-and-answer processing on government inquiries, a trained bidirectional recurrent government semantic extraction network is used to perform semantic extraction operations in both directions on the government inquiry information. This extracts at least the geographical and / or temporal information involved in the government inquiry, endowing the network with stronger domain prior knowledge. This allows for more accurate identification and parsing of crucial time points and geographical scope from the government inquiry information. This solves the problem of incomplete semantic understanding of policy conditions, geographical scope, and / or time points caused by the time-series processing of traditional unidirectional RNN networks, improving the accuracy of government semantics, especially in cross-regional and long-text government consultation scenarios. By using a hierarchical preset government knowledge base and a multi-level retrieval mechanism, the target government features are accurately located (e.g., achieving accurate positioning of "national policy → provincial detailed rules → municipal guidelines"), reducing the problem of "answering the wrong question" and meeting the strict requirements of information authority and regionality in government scenarios. Overall, accurate intelligent question-and-answer processing in government scenarios is achieved.

[0131] In one implementation, the method further includes: obtaining response feedback information corresponding to the government response information, wherein the response feedback information is used to indicate whether the government response information resolves the government inquiry information; updating the bidirectional cyclic government semantic extraction network based on the response feedback information; or, in the case that at least one reference government feature in the preset government knowledge base is updated, obtaining the updated reference government feature; and updating the bidirectional cyclic government semantic extraction network based on the updated reference government feature.

[0132] When outputting government response information, the question-and-answer system also outputs response inquiry information. This response inquiry prompts the user to provide feedback on whether the government response information resolved their inquiry. Responding to the user's input regarding the response inquiry, the system retrieves the response feedback information. If the response feedback indicates that the government response information resolved the inquiry, the system determines that the government response information resolved the inquiry and labels the inquiry accordingly; otherwise, it determines that the inquiry was unresolved. The system also feeds back frequently unresolved government inquiries to preset user terminals, retrieves the responses and relevant government policies from these terminals, and updates the preset government knowledge base. Based on the recorded government response information and its labeled tags, the system can incrementally update the bidirectional cyclic government semantic extraction network. Alternatively, the question-and-answer system can detect updates to government policies in the government service platforms it connects to, either within a preset time period or in real time. It can then add and / or modify the reference government features corresponding to the updated information in a preset government knowledge base. Furthermore, it can perform a bidirectional loop to extract the weight parameters associated with the updated information in the government semantic extraction network. For example, it can extract the government vocabulary vector and semantic weights corresponding to "new medical insurance base in 2024". This eliminates the need to retrain the entire network model, shortens the update cycle to within 24 hours, and ensures the timeliness of government question-and-answer.

[0133] Continue to combine Figure 4 and Figure 5 The question-and-answer system records "question-answer" data and marks it with "user satisfaction feedback pending". If the user marks "problem solved" in the future, it will be included in the positive samples for model optimization, so as to make incremental updates to the bidirectional loop government semantic extraction network in the future.

[0134] If, on a certain day, the official website of a city's social security department publishes that "starting from July 2024, the lower limit of the medical insurance contribution base will be adjusted to B2 yuan (B2 > B1, and B2 < A1)," the question-and-answer system will automatically capture the new guidance text when it detects the update in the early morning of the next day, convert it into a government affairs answer vector (refer to an example of government affairs features), update it to the city's three-level database, and lightly update the word embedding vectors (an example of government affairs vocabulary vectors) and semantic weights of related words in the bidirectional cyclic government affairs semantic extraction network for "lower limit of contribution base." The entire process does not require retraining the network model.

[0135] The following details the initial training process of the bidirectional recurrent government semantic extraction network.

[0136] Before training begins, the question-answering system stores a government affairs dataset, including publicly available government affairs question-answering corpora (such as historical consultation records from government hotlines or publicly available question-answering databases on government platforms) and manually annotated government affairs questions (covering 10 categories of government affairs scenarios, including policy consultation, procedures, and public services, totaling 100,000 entries, each labeled with tags such as "policy category," "region," "time," and "core needs"). The question-answering system can divide the dataset into training, validation, and test sets in a 7:2:1 ratio. The government affairs loss function of the bidirectional recurrent network is defined as Loss = -Σ(y_true·log(y_pred)) + α·Loss_gov, where Loss_gov is the government affairs semantic loss (calculating the difference between the tags "policy category," "region," and "time" extracted by the bidirectional recurrent network and the true tags), α is the weight coefficient (generally set to 0.3), which ensures that the bidirectional recurrent network prioritizes learning key government affairs semantics, y_true is the sample pair's true tag, and y_pred is the tag predicted by the bidirectional recurrent network. The government affairs loss function adds a government affairs semantic loss term Loss_gov to the cross-entropy loss function, and guides the iterative optimization of the bidirectional recurrent network through the "difference quantization" of y_true and y_pred.

[0137] The question-answering system can train a bidirectional recurrent network using the Adam optimization algorithm with a learning rate of 0.001. During training, government domain regularization is introduced (e.g., limiting the fluctuation range of semantic vectors for "policy document number" and "regional name"). The "government semantic accuracy" (the percentage of questions correctly extracting policy categories, regions, and time tags) is tested using a validation set. If this accuracy does not improve for five consecutive rounds, an early stopping strategy is triggered. The performance of the bidirectional recurrent network is evaluated using a test machine. If the evaluation passes, the bidirectional recurrent network is considered successfully trained, resulting in a bidirectional recurrent government semantic extraction network. It can be understood that the processing of sample questions (i.e., labeled query information samples) in the input network by the bidirectional recurrent network during training is consistent with the process of processing government query information by the bidirectional recurrent government semantic extraction network, and will not be elaborated further.

[0138] In the above implementation, the bidirectional loop government semantic extraction network is updated using feedback information indicating whether a government response has been resolved. This enables closed-loop updates to the network, continuously improving its semantic understanding accuracy and question-answering resolution rate, forming a virtuous learning loop. When reference government features (i.e., government policies) in the preset government knowledge base are updated, the network can proactively acquire these updated features and update the bidirectional loop government semantic extraction network accordingly. This mechanism ensures that the model remains synchronized with the latest government knowledge, reducing the possibility of outdated or erroneous government response information due to policy changes. Furthermore, by decoupling the updates to the preset government knowledge base from the bidirectional loop government semantic extraction network, dynamic adaptation between the knowledge base and the model is achieved without retraining the network, ensuring the long-term authority and timeliness of the government intelligent question-answering service.

[0139] Figure 6 This is a schematic diagram of the structure of a government intelligent question-answering system to which the government intelligent question-answering method of the embodiments of this application is applicable, such as... Figure 6 As shown, the system includes:

[0140] The government affairs input module 610 is used to obtain government affairs inquiry information.

[0141] The government affairs semantic extraction module 620 is used to call the trained bidirectional recurrent government affairs semantic extraction network to perform global semantic extraction operations on government affairs inquiry information to obtain global government affairs semantic features corresponding to the government affairs inquiry information. The global semantic extraction operations include forward semantic extraction operations, reverse semantic extraction operations, government affairs semantic enhancement operations, and semantic fusion operations. The government affairs semantic enhancement operations are at least used to instruct the addition of government affairs enhancement factors corresponding to the government affairs inquiry information to the extracted semantic features. The government affairs enhancement factors are used to represent the regional information and / or time information related to government affairs involved in the government affairs inquiry information.

[0142] The hierarchical matching module 630 is used to retrieve the target government features corresponding to the global government semantic features at multiple levels in the reference government sets corresponding to multiple levels in the preset government knowledge base. The reference government sets include multiple reference government features at the same level.

[0143] The government affairs response output module 640 is used to generate government affairs response information corresponding to government affairs inquiry information based on the target government affairs characteristics corresponding to multiple levels.

[0144] In some embodiments, the government affairs update module is used to obtain response feedback information corresponding to government affairs response information, the response feedback information being used to indicate whether the government affairs response information resolves the government affairs inquiry information; update the bidirectional cyclic government affairs semantic extraction network according to the response feedback information; or, in the case that at least one reference government affairs feature in a preset government affairs knowledge base is updated, obtain the updated reference government affairs feature; update the bidirectional cyclic government affairs semantic extraction network according to the updated reference government affairs feature.

[0145] The aforementioned question-and-answer system utilizes a bidirectional loop government semantic extraction network to simultaneously extract historical and future information from government inquiries, enabling comprehensive semantic analysis of policy conditions, geographical scope, and time points within these inquiries. Combined with a government-specific knowledge base, it enhances the accuracy of matching government semantic features. Furthermore, a dynamic update mechanism adapts to changes in government information, meeting the high-precision question-and-answer requirements of government scenarios.

[0146] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 7 As shown, the electronic device 6 of this embodiment includes: at least one processor 60 ( Figure 7 (Only one is shown in the diagram) a processor, a memory 61, and a computer program 62 stored in the memory 61 and executable on the at least one processor 60, wherein the processor 60 executes the computer program 62 to implement the steps in any of the above method embodiments.

[0147] The electronic device 6 can be a desktop computer, laptop, handheld computer, cloud server, or other computing device. This electronic device may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will understand that... Figure 7 This is merely an example of electronic device 6 and does not constitute a limitation on electronic device 6. It may include more or fewer components than shown, or combine certain components, or different components, such as input / output devices, network access devices, etc.

[0148] The processor 60 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0149] In some embodiments, the memory 61 may be an internal storage unit of the electronic device 6, such as a hard disk or memory of the electronic device 6. In other embodiments, the memory 61 may be an external storage device of the electronic device 6, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 6. Furthermore, the memory 61 may include both internal and external storage units of the electronic device 6. The memory 61 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory 61 can also be used to temporarily store data that has been output or will be output.

[0150] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, which will not be repeated here.

[0151] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0152] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.

[0153] This application provides a computer program product that, when run on a mobile terminal, enables the mobile terminal to implement the steps described in the above-described method embodiments.

[0154] 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, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0155] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0156] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0157] Furthermore, in the description of this application and the appended claims, the terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0158] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0159] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0160] In the embodiments provided in this application, it should be understood that the disclosed apparatus, computer equipment, and methods can be implemented in other ways. For example, the apparatus and computer equipment 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 system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0161] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A government affairs intelligent question-answering method, characterized in that, include: Obtain government information; Obtain the sequence of government terms corresponding to the government inquiry information. The sequence of government terms includes at least one government term vector arranged in a first order. The government term vector represents the government terms involved in the government inquiry information. The first order is used to indicate the arrangement order of the government terms in the government inquiry information. The forward network unit in the trained bidirectional recurrent government semantic extraction network is invoked to extract government semantic features of government word vectors in the government word sequence according to the first order. In the process of extracting government semantic features, government enhancement factors corresponding to government word vectors are extracted and added to the extracted government semantic features to obtain positive government semantic features. The government enhancement factors are used to represent the regional information and / or time information related to government affairs involved in the government inquiry information. The reverse network unit in the bidirectional cyclic government semantic extraction network is invoked to extract government semantic features of government word vectors in the government word sequence in the second order. In the process of extracting government semantic features, government enhancement factors of government word vectors are extracted and added to the extracted government semantic features to obtain reverse government semantic features. The government semantic fusion unit in the bidirectional cyclic government semantic extraction network is invoked to perform feature fusion processing on the positive government semantic features and the negative government semantic features to obtain the global government semantic features corresponding to the government inquiry information. In a preset government knowledge base, the target government features corresponding to the global government semantic features at the various levels are retrieved from multiple reference government sets. The reference government sets include multiple reference government features at the same level. Based on the target government affairs characteristics corresponding to the various levels, government affairs response information corresponding to the government affairs inquiry information is generated.

2. The method as described in claim 1, characterized in that, The step of invoking the government affairs semantic fusion unit to perform feature fusion processing on the positive government affairs semantic features and the negative government affairs semantic features to obtain the global government affairs semantic features includes: The government affairs semantic fusion unit is invoked, and the positive government affairs semantic features and the negative government affairs semantic features are fused according to the mechanism that the first type of semantic features corresponds to the first fusion weight and the second type of semantic features corresponds to the second fusion weight to obtain the global government affairs semantic features. The first fusion weight is greater than the second fusion weight. The first type of semantic features indicates the semantic features related to government affairs in the government affairs inquiry information, and the second type of semantic features indicates the semantic features unrelated to government affairs in the government affairs inquiry information.

3. The method as described in claim 1 or 2, characterized in that, The preset government knowledge base includes a set of reference government affairs at level i under level i and a set of reference government affairs at level i+1 under level i+1, where level i is higher than level i+1, and i is a positive integer. The step of retrieving the target government features corresponding to the global government semantic features at each of the multiple levels in the preset government knowledge base includes: In the i-th level reference government affairs set, retrieve the i-th level target government affairs feature corresponding to the global government affairs semantic feature; In the (i+1)th level reference government affairs set, at least one (i+1)th level reference government affairs feature associated with the i-th level target reference government affairs is determined; Among the at least one (i+1)th level reference government affairs features, retrieve the (i+1)th level target government affairs feature corresponding to the global government affairs semantic feature.

4. The method as described in claim 3, characterized in that, The step of generating government response information corresponding to the government inquiry information based on the target government characteristics corresponding to the multiple levels includes: Based on the preset response structure, the target government affairs features corresponding to the multiple levels are combined to obtain the initial response information; The private data in the initial response information is filtered out to obtain the government response information.

5. The method as described in claim 4, characterized in that, The method further includes: Obtain real-time government information within the indicated geographical area; Based on the real-time government information, update the target government features corresponding to the global government semantic features at at least one level.

6. The method as described in claim 1 or 2, characterized in that, The method further includes: Obtain the response feedback information corresponding to the government response information, wherein the response feedback information indicates whether the government response information resolves the government inquiry; update the bidirectional cyclic government semantic extraction network based on the response feedback information; or... If at least one reference government feature in the preset government knowledge base is updated, the updated reference government feature is obtained; the bidirectional cyclic government semantic extraction network is updated according to the updated reference government feature.

7. A government affairs intelligent question-and-answer system, characterized in that, include: The government affairs input module is used to obtain government affairs inquiry information; A government affairs semantic extraction module is used to obtain a government affairs vocabulary sequence corresponding to the government affairs inquiry information. The government affairs vocabulary sequence includes at least one government affairs vocabulary vector arranged in a first order, and the government affairs vocabulary vector represents the government affairs vocabulary involved in the government affairs inquiry information. The first order is used to indicate the arrangement order of the government affairs vocabulary in the government affairs inquiry information. The module calls the forward network unit in the trained bidirectional recurrent government affairs semantic extraction network to extract government affairs semantic features of the government affairs vocabulary vector in the government affairs vocabulary sequence according to the first order. In the process of extracting government affairs semantic features, the module also extracts government affairs enhancement factors corresponding to the government affairs vocabulary vector and adds the government affairs enhancement factors to the extracted government affairs semantic features to obtain forward government affairs semantic features. The government affairs enhancement factors are used to represent the regional information and / or time information related to government affairs involved in the government affairs inquiry information. The module also calls the reverse network unit in the bidirectional recurrent government affairs semantic extraction network to extract government affairs semantic features of the government affairs vocabulary vector in the government affairs vocabulary sequence according to a second order. In the process of extracting government affairs semantic features, the module also extracts government affairs enhancement factors of the government affairs vocabulary vector and adds the government affairs enhancement factors to the extracted government affairs semantic features to obtain reverse government affairs semantic features. The government semantic fusion unit in the bidirectional cyclic government semantic extraction network is invoked to perform feature fusion processing on the positive government semantic features and the negative government semantic features to obtain the global government semantic features corresponding to the government inquiry information. The hierarchical matching module is used to retrieve the target government features corresponding to the global government semantic features at the multiple levels in the reference government sets corresponding to multiple levels in the preset government knowledge base. The reference government sets include multiple reference government features at the same level. The government affairs response output module is used to generate government affairs response information corresponding to the government affairs inquiry information based on the target government affairs characteristics corresponding to the multiple levels.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 6.

9. A computer program product, characterized in that, Includes a computer program, which, when run, causes the method as described in any one of claims 1-6 to be performed.