A multi-expert architecture AI intelligent question and answer method and system in the government field

CN122262274BActive Publication Date: 2026-10-23CLOUD GUANGXI NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610291570.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-03-11
Publication Date
2026-10-23
Estimated Expiration
2046-03-11

AI Technical Summary

Technical Problem

[0007]有鉴于此,本发明旨在提供一种政务领域的多专家架构AI智能问答方法与系统,以解决传统方法在政策更新后,历史案例经验无法快速适配导致的AI问答效果不佳的问题

Benefits of technology

(1)本发明有效解决了传统方法中政策更新后历史案例经验难以快速适配新政策、问答精准度不足的问题;首先采集并预处理新政策、企业咨询问题及历史问答案例相关数据,先提取新政策的初步语义特征与显性规则,再关联挖掘对应的隐性约束并整合为结构化政策规则,随后将历史案例经验特征与政策规则进行语义对齐,通过动态调节历史经验贡献度优化特征质量,最终融合政策规则与优化后的历史经验特征完成问答推理;整体方案避免了传统基于规则系统的滞后性与单一模型的建模缺陷,打通了新政策规则与历史落地经验的语义关联,实现了两者的深度融合,确保问答结果契合最新政策要求,又融入历史经验支撑,提升了政务问答的精准度与响应时效,能够灵活应对政策高频更新场景,满足企业群众对政务服务即问即准的需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122262274B_ABST
    Figure CN122262274B_ABST
Patent Text Reader

Abstract

The application discloses a kind of multi-expert architecture AI intelligent question and answer method and system in government field, comprising: A1: new policy text data, enterprise policy consultation question text data, historical policy answer example text data are collected and respectively preprocessed;A2: extracting new policy preliminary semantic features, then extracting explicit rule text segment set;A3: extracting the implicit constraint text corresponding to explicit rule text segment, then carrying out associated integration operation, obtain structured policy explicit and implicit rule text set;A4: extract historical case experience initial feature;Again, through government semantic bridging mechanism, complete semantic dimension alignment;A5: extract policy-case fusion feature;A6: calculate expert fusion weight vector, then decode, obtain policy question and answer reasoning result.The application can solve the problem that the AI question and answer effect is poor caused by the fact that the historical case experience cannot be quickly adapted after the traditional method is updated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of government affairs question-answering technology, and in particular to a multi-expert architecture AI intelligent question-answering method and system in the field of government affairs. Background Technology

[0002] Consulting on preferential policies for enterprises is a typical scenario in the policy matching Q&A field. Its core requirement is to match policy rules with historical cases and perform Q&A reasoning based on the correlation data between government policy texts and historical cases. This ensures that the Q&A results not only meet the latest policy requirements but also incorporate historical implementation experience to improve practicality. The quality of this service directly affects the timeliness of government service response, the accuracy of policy matching, and the satisfaction of the public.

[0003] However, after the policy is updated, the implicit conditions and other practical experience from historical cases cannot be quickly adapted to the new policy, resulting in lag and insufficient accuracy in AI matching and reasoning. Specifically, there is a semantic gap between the rules of the new policy text and the implicit experience of historical cases. The adaptation logic between the supplementary information of enterprises and the interpretation of implicit conditions in historical cases and the rules of the new policy is complex. Traditional methods are unable to quickly establish a dynamic relationship between the two, making it impossible for AI to reuse historical practical experience in the policy matching and reasoning process. Ultimately, the reasoning results deviate from the requirements of the new policy.

[0004] Existing technologies address this pain point primarily through rule-based government Q&A systems and policy matching methods using single machine learning models. However, these approaches have several drawbacks: rule-based systems rely on manually pre-set policy rule bases, requiring manual rule updates to adapt to new policies. They cannot automatically mine implicit experiences from historical cases, and the rule base update cycle is long, making it difficult to handle scenarios with frequent policy updates. Single machine learning models lack the ability to model the structured rules of policy texts and the unstructured experience data of historical cases, making them susceptible to variations in policy text expression and the diversity of historical case scenarios. Consequently, their matching accuracy fails to meet the practical application requirements of providing accurate and timely government services. Furthermore, existing technologies cannot efficiently process the high-dimensional correlation data formed by policy rules and historical cases, making it difficult to capture the dynamic adaptation relationship between the two. This results in delayed decision-making or excessive errors, failing to meet the need for rapid adaptation after policy updates.

[0005] Deep learning technology has advantages such as autonomous learning of complex semantic associations, efficient modeling of high-dimensional heterogeneous data, and dynamic scene adaptive adaptation. It has shown significant application potential in similar technology scenarios such as intelligent text matching, dynamic rule-adaptive question answering systems, and experience-transfer-based intelligent decision-making. However, existing technologies have not deeply integrated them with the core pain points of this scenario. Specifically, they have not designed adaptation solutions for the rule characteristics of government policy texts and the implicit experience of historical case data, making it difficult to solve the core pain point that the experience of historical cases cannot be quickly adapted to the new policies after policy updates.

[0006] Therefore, there is an urgent need for a deep learning-based AI intelligent question-answering method and system with a multi-expert architecture in the government sector. This system should be designed for enterprise policy matching intelligent question-answering scenarios, enabling rapid adaptation of historical case experience and new policy rules, improving the accuracy and timeliness of AI policy matching reasoning, and meeting the satisfaction requirements of enterprises and the public in handling affairs. Summary of the Invention

[0007] In view of this, the present invention aims to provide a multi-expert architecture AI intelligent question answering method and system in the field of government affairs, so as to solve the problem that the traditional method cannot quickly adapt historical case experience after policy updates, resulting in poor AI question answering effect.

[0008] A multi-expert architecture AI-powered intelligent question-answering method in the field of government affairs includes: A1: Collect new policy text data, enterprise policy consultation question text data, and historical policy question and answer example text data, and preprocess them respectively to obtain preprocessed new policy text, preprocessed enterprise policy consultation question text, and preprocessed historical policy question and answer example text; A2: Based on the preprocessed new policy text and the preprocessed enterprise policy consultation question text, the initial semantic features of the new policy are extracted using the Llama3 open-source big model, and then the explicit rule text fragment set is extracted through the clause boundary definition mechanism. A3: Based on the set of explicit rule text fragments and the preliminary semantic features of the new policy, the implicit constraint text corresponding to the explicit rule text fragments is extracted through the explicit-implicit rule semantic association mechanism, and then the association and integration operation is performed to obtain the set of structured policy explicit-implicit rule texts. A4: Based on the preprocessed historical policy question and answer example text, the preprocessed historical policy question and answer example text, and the set of structured policy explicit and implicit rule texts, extract the initial features of historical case experience; then, complete the semantic dimension alignment through the government semantic bridging mechanism to obtain the global semantic vector of structured policy rules and the aligned historical case experience features; A5: Based on the aligned historical case experience features and the structured policy explicit and implicit rule text set, the weights are optimized through the historical contribution adjustment mechanism to obtain the optimized historical case experience features. Then, combined with the global semantic vector of the structured policy rules, the policy-case fusion features are extracted. A6: Based on the structured policy explicit and implicit rule text set and policy-case fusion features, calculate the expert fusion weight vector, and then decode it to obtain the policy question-and-answer reasoning results.

[0009] Furthermore, step A1 also includes: A11: Collect new policy text data, including the main text of policy clauses, policy supplements, and policy explanations; preprocess the new policy text data using UTF-8 encoding and character regular expression filtering to obtain the preprocessed new policy text. A12: Collect text data of enterprise policy consultation questions, and preprocess it using the method of deduplication by sliding window to obtain the preprocessed text of enterprise policy consultation questions; A13: Export historical policy Q&A example text data from the government service backend database, including corresponding clauses of historical policies, historical consultation questions, and historical authoritative answers; preprocess the historical policy Q&A example text data using UTF-8 encoding and character regular expression filtering to obtain preprocessed historical policy Q&A example text.

[0010] Furthermore, step A2 also includes: A21: Based on the preprocessed new policy text and the preprocessed enterprise policy consultation question text, preliminary semantic features of the new policy are extracted using the Llama3 open-source large model. The calculation method is as follows: ; in, The initial semantic features of the new policy For layer normalization, For Llama 3 open source large model, For the pre-processed new policy text, This is the pre-processed text of the enterprise policy consultation questions; A22: Based on the preliminary semantic features of the new policy, a set of explicit rule text fragments is extracted through a clause boundary definition mechanism. The calculation method of the clause boundary definition mechanism is as follows: ; ; ; ; in, This is a collection of new policy text fragments divided by punctuation marks. To divide the segment according to punctuation marks, Let be the semantic features of the i-th new policy text fragment, where i is the index of the new policy text fragment. For the i-th new policy text fragment in the set of new policy text fragments, Let the boundary confidence weights be the values ​​for the i-th new policy text fragment. For the Sigmoid function, For semantic feature dimension, This is a function for calculating semantic coherence between segments. For the (i+1)th new policy text fragment in the set of new policy text fragments, A collection of text fragments containing explicit rules. This is a weighted filtering function. The boundary confidence threshold; Furthermore, the calculation method of the semantic coherence calculation function between segments in step A22 includes: ; in, These are the first and second inputs to the function for calculating semantic coherence between segments, respectively. To calculate the number of common words, This is a count of the total number of words.

[0011] It should be further explained that the Q&A scenario for government policies is characterized by highly professional policy expressions and complex sentence structures. The explicit rules and implicit constraints in the new policy text are intertwined and coexist, resulting in a blurred boundary definition of the core rules, making it difficult to directly provide clear and accurate benchmarks for subsequent adaptation to historical experience. This invention proposes a clause boundary definition mechanism. First, based on the preprocessed new policy text and the enterprise policy consultation question text, the Llama 3 open-source large model is used to extract the preliminary semantic features of the new policy, capturing the overall core connotation of the policy and the connection points with consultation needs, providing a global semantic reference for subsequent boundary definition, and avoiding isolated splitting that is detached from the core of the policy and the actual consultation scenario. Then, the new policy text is initially split by dividing it into segments according to punctuation marks, transforming the complex and lengthy policy text into basic units that can be analyzed one by one, reducing the complexity of long text processing. Next, the semantic features of each text segment are calculated, and the boundary confidence weight of each segment is calculated by combining the preliminary semantic features of the new policy and the semantic coherence between segments. The semantic coherence between segments is quantified by statistically analyzing the correlation between the number of common words and the total number of words, fully considering the semantic correlation between adjacent segments, and avoiding semantic breakage of rules due to mechanical splitting. Finally, a weight filtering function is used to select segments whose boundary confidence weights meet the threshold requirements as the explicit rule text segment set, ensuring that the selected segments have clear rule attributes and maintain semantic integrity and coherence, specifically solving the core problems of ambiguous rule boundaries and difficulty in splitting explicit and implicit rules. In existing technologies, rule-based government Q&A systems rely on manually pre-set policy rule bases and require manual delineation of rule boundaries. This not only results in long update cycles but also fails to adapt to flexible changes in policy wording. Single machine learning models lack the ability to deeply analyze the semantic logic of policy texts and are easily affected by differences in wording, leading to deviations in boundary definition. In contrast, the clause boundary definition mechanism of this invention does not require manual pre-setting of rules. It autonomously analyzes text semantic logic and automatically defines rule boundaries through semantic feature association and fragment coherence analysis. This avoids the lag of manual operation and overcomes the shortcomings of single models in modeling complex policy texts. It can efficiently cope with high-frequency policy update scenarios and significantly improve the accuracy and timeliness of explicit rule extraction.

[0012] Furthermore, step A3 also includes: A31: Based on the set of explicit rule text fragments and the preliminary semantic features of the new policy, the implicit constraint text corresponding to the explicit rule text fragments is extracted through the explicit-implicit rule semantic association mechanism. The calculation method is as follows: ; ; ; ; in, Let be the semantic features of the j-th explicit rule text fragment in the set of explicit rule text fragments. Let j be the j-th explicit rule text fragment in the set of explicit rule text fragments, where j is the index of the explicit rule text fragment. Let be the positional weights of the j-th explicit rule text fragment and the i-th new policy text fragment. It is an exponential function. To take the absolute value, n is the total number of text fragments in the new policy. Let be the semantic association weight between the explicit and implicit rules of the j-th explicit rule text fragment and the ith new policy text fragment. For cosine similarity calculation, For Hadama accumulation, Let j be the implicit constraint text fragment corresponding to the j-th explicit rule text fragment. For splicing operations, For the association weight threshold, For the intersection operation, The threshold for non-explicit rule determination; A32: Based on the set of explicit rule text fragments and the implicit constraint text fragments corresponding to the explicit rule text fragments, perform an association operation to obtain the associated set of explicit and implicit rule text fragments; A33: Sort the text positions according to the associated set of explicit and implicit rule text fragments: Sort the associated set of explicit and implicit rule text fragments in ascending order according to the order in which each explicit rule text fragment appears in the preprocessed new policy text, and then sort them according to "explicit rule text fragments: Implicit constraint text fragment: The standardized format of “” is used to integrate the sorted explicit and implicit rule pairs into a structured policy explicit and implicit rule text set.

[0013] It should be further explained that while the explicit rules in government policy texts are clear, the implicit constraints are scattered and not directly stated. The semantic relationship between these implicit constraints and the explicit rules is hidden and the logic is complex. If the corresponding explicit rules cannot be accurately matched, it will not only affect the application results of enterprises due to the omission of key constraints when inquiring, but also undermine the integrity of the explicit and implicit rules and hinder the effective adaptation of subsequent historical experience and new policies. To address the aforementioned issues, this invention constructs a semantic association mechanism for explicit and implicit rules. First, based on a set of explicit rule text fragments, the semantic features of each explicit rule text fragment are extracted using the Llama 3 open-source model, ensuring that all association operations revolve around the core connotations of the explicit rules. Then, positional weight calculation is introduced, considering the positional distance between each fragment in the new policy text and the explicit rule text fragments, effectively narrowing the search range of implicit constraints. Next, cosine similarity is used to calculate the semantic correlation between the explicit rule text fragments and each policy text fragment, and this is fused with the positional weights to obtain the semantic association weights for explicit and implicit rules. This ensures the semantic rationality of the associations while also considering the logical coherence of the textual expression, solving the mismatch problem that easily occurs when relying solely on semantics or a single positional dimension. Finally, through dual threshold filtering, text fragments with matching association weights that do not belong to the explicit rules are selected, and then concatenated to form the implicit constraint text corresponding to the explicit rules. This ensures that the extracted implicit constraints are both strongly correlated with the explicit rules and accurately distinguishable from the explicit rules themselves, achieving paired integration of explicit and implicit rules. In existing technologies, the mining of implicit constraints often relies on manual review of historical cases or policy interpretation documents. This is not only inefficient and prone to omissions or misjudgments due to subjective human judgment, but also cannot adapt to the needs of scenarios with frequent policy updates. Furthermore, a single machine learning model cannot simultaneously take into account semantic relevance and text position logic, resulting in insufficient accuracy in implicit constraint extraction. The explicit-implicit rule semantic association mechanism of this invention does not require manual intervention. Through a complete chain of semantic feature extraction, weight fusion, and precise screening, it achieves automatic and accurate association between explicit rules and implicit constraints. This not only significantly improves the efficiency and accuracy of implicit constraint extraction, but also forms a structured set of explicit-implicit rule texts, providing a complete and clear policy rule benchmark for subsequent adaptation to historical experience.

[0014] Furthermore, step A4 also includes: A41: Based on the preprocessed historical policy question and answer example text, the preprocessed enterprise policy consultation question text, and the structured policy explicit and implicit rule text set, extract the initial features of historical case experience. The calculation method is as follows: ; ; ; ; in, This is a text query vector for historical cases. This is a preprocessed example text of answers to historical policy questions. For structured policy rule key vectors, A collection of structured policy explicit and implicit rule texts. As a value vector for historical cases, For batch normalization, It is a one-dimensional convolutional layer. Initial characteristics of historical case experience As a multi-head attention mechanism, To sum element by element, For ReLU function, It is a multilayer perceptron. This is for global max pooling; A42: Based on the initial features of historical case experience and the text set of explicit and implicit rules of structured policies, semantic dimension alignment is completed through the government semantic bridging mechanism to obtain the global semantic vector of structured policy rules and the aligned features of historical case experience. The calculation method is as follows: ; ; ; ; in, For structured policy rules, global semantic vector. For global average pooling, This is the semantic alignment coefficient. For the Softmax function, For semantic alignment features, Features of historical case experience after alignment.

[0015] It should be further explained that the implementation experience in historical policy Q&A examples (interpretation of implicit conditions, supplementary information from enterprises, etc.) is mostly unstructured, while the structured explicit and implicit rules text of the new policy has a clear semantic framework. There is a significant semantic heterogeneity and dimensional difference between the two. If effective alignment cannot be achieved, the experience of historical cases will be difficult to map to the reasoning dimension of the new policy, resulting in the failure of experience reuse and the inability to provide practical support for policy Q&A. This invention first uses preprocessed historical policy question and answer example texts and enterprise policy consultation question texts to generate historical case text query vectors using the Llama 3 open-source large model. Simultaneously, a set of structured policy explicit and implicit rule texts is input into the model to obtain policy rule key vectors, allowing historical experience and policy rules to be initially modeled in the same semantic space. Then, a one-dimensional convolutional layer and batch normalization are used to process the semantic features of historical cases, obtaining historical case value vectors. This preserves the detailed information of historical experience, and batch normalization reduces interference from differences in data distribution. Furthermore, a multi-head attention mechanism is used to correlate the historical case text query vectors with the policy rule key vectors and historical case value vectors, capturing the core information related to new policy rules in historical experience. Finally, a combination of global max pooling, multilayer perceptron, and ReLU function operations further strengthens the key feature expression of historical case experience, ensuring that the initial features are both rich in experiential value and aligned with policy relevance requirements. Based on this, the present invention constructs a government semantic bridging mechanism: global average pooling is used to extract the global semantic vector of structured policy rules, providing a unified policy benchmark for semantic alignment. Then, the initial features of historical case experience are concatenated with the global semantic vector, and the semantic alignment coefficient is calculated by multilayer perceptron and Softmax function to dynamically adapt the semantic association strength between the two and avoid a single dimension dominating the alignment result. Subsequently, a weighted fusion formula is used to adaptively fuse the initial features of historical case experience with the global semantic vector of policy rules according to the alignment coefficient, which preserves the practical value of historical experience while making its semantic dimension closer to the policy rules. Finally, after layer normalization and multilayer perceptron optimization, the aligned historical case experience features are obtained, bridging the semantic gap between historical experience and new policy rules. In existing technologies, the methods for linking historical experience with new policies often rely on manual mapping, which is not only inefficient and outdated, but also prone to bias due to subjective judgment. Furthermore, single machine learning models struggle to cope with the semantic dimension differences of heterogeneous data and cannot achieve accurate alignment. The government semantic bridging mechanism of this invention requires no manual intervention. Through a combination of semantic modeling, dynamic coefficient adjustment, and adaptive fusion, it achieves automatic and accurate semantic alignment between historical case experience and new policy rules. This not only solves the semantic adaptation problem of heterogeneous data, but also allows historical experience to be effectively integrated into the reasoning framework of new policies, providing high-quality basic data for subsequent historical contribution adjustment and policy-case fusion feature extraction.

[0016] Furthermore, step A5 also includes: A51: Based on the aligned historical case experience features and the structured policy explicit and implicit rule text set, the weights are optimized through a historical contribution adjustment mechanism to obtain the optimized historical case experience features. The calculation method is as follows: ; ; ; in, To classify the characteristics of historical experience types, Weighting should be adjusted to reflect historical contributions. For optimized historical case experience features, For L1 regularization; A52: Based on the optimized historical case experience features and the global semantic vector of structured policy rules, policy-case fusion features are extracted. The calculation method is as follows: ; ; ; in, For the policy-case fusion weight matrix, This indicates an initial integration of policy and case studies. As a policy-case integration feature, This is a residual connection.

[0017] It should be further explained that although the aligned historical case experiences have achieved semantic adaptation, the applicable scenarios, core elements and the strength of the correlation between different historical cases and the new policies are different. Some historical experiences may become less adaptable due to policy adjustments. If all historical experiences are treated equally, invalid experiences will interfere with the reasoning of the new policies and reduce the accuracy of the question and answer results. This invention designs a historical contribution adjustment mechanism. First, the aligned historical case experience features are processed by one-dimensional convolution to extract historical experience type classification features to distinguish different types of historical experience (such as qualification review experience, subsidy calculation experience, etc.), providing a basis for subsequent differentiated weight allocation and avoiding generalized treatment of different types of historical experience. Then, the historical experience type classification features are concatenated with the semantic features of the structured policy explicit and implicit rule text set, and after being processed by a multilayer perceptron, the historical contribution adaptation weight is obtained through the Sigmoid function. This dynamically quantifies the degree of adaptation of each historical experience with the new policy rules, giving higher weights to historical experiences with high relevance and strong adaptability, and reducing the weights of experiences with weak adaptability, thus achieving differentiated screening of historical experiences. Finally, the aligned historical case experience features and the historical contribution adaptation weights are multiplied element-wise to strengthen the influence of high-value historical experiences. At the same time, L1 regularization is introduced to process the historical experience type classification features to prevent model overfitting. The two are then summed to obtain the optimized historical case experience features, ensuring that the optimized features focus on highly adaptable historical experiences and have good model generalization ability. Existing technologies do not consider the adaptation differences of different experiences or rely on manually setting fixed weights, which cannot dynamically adapt to changes in new policies, resulting in poor reuse of historical experience. However, the historical contribution adjustment mechanism of this invention can automatically identify the degree of adaptation between historical experience and new policies, and achieve accurate screening and optimization of historical experience through dynamic weight adjustment. This not only eliminates the interference of invalid experience, but also maximizes the supporting role of highly adaptable historical experience, laying a good foundation for the subsequent extraction of policy-case fusion features. Compared with existing technologies, its accuracy and flexibility in historical experience reuse are significantly improved.

[0018] Furthermore, step A6 also includes: A61: Based on the structured policy explicit and implicit rule text set and policy-case fusion features, the new policy interpretation expert features and expert fusion weight vector are calculated through a gating network. This includes: inputting the structured policy explicit and implicit rule text set into a Llama3 pre-trained language model for encoding to obtain the new policy interpretation expert features; then concatenating the new policy interpretation expert features with the policy-case fusion features, and inputting the concatenated result into a multilayer perceptron for processing; finally, calculating the expert fusion weight vector through the Softmax normalization function. A62: Perform layer normalization on the characteristics of experts interpreting new policies to obtain the text vector of the characteristics of experts interpreting new policies; perform layer normalization on the policy-case fusion characteristics to obtain the text vector of the policy-case fusion characteristics. A63: Based on the expert fusion weight vector, the text vectors of the new policy interpretation expert features and the text vectors of the policy-case fusion features are weighted and fused, and then decoded using a linear decoding method to obtain the policy question-and-answer reasoning result; the weighted fusion includes: multiplying the weight coefficients of the corresponding new policy interpretation expert features and the corresponding policy-case fusion features in the expert fusion weight vector with the text vectors of the new policy interpretation expert features and the policy-case fusion features of the policy-case fusion features element-by-element, and then summing them.

[0019] This invention also discloses a multi-expert architecture AI intelligent question-answering system in the field of government affairs, comprising: Text acquisition module: Collects new policy text data, enterprise policy consultation question text data, and historical policy question and answer example text data, and preprocesses them respectively to obtain preprocessed new policy text, preprocessed enterprise policy consultation question text, and preprocessed historical policy question and answer example text; The explicit rule extraction module for policy interpretation experts: Based on the preprocessed new policy text and the preprocessed enterprise policy consultation question text, the module extracts the preliminary semantic features of the new policy through the Llama 3 open-source model, and then extracts a set of explicit rule text fragments through the clause boundary definition mechanism. The implicit constraint extraction module for policy interpretation experts: Based on the set of explicit rule text fragments and the preliminary semantic features of the new policy, the implicit constraint text corresponding to the explicit rule text fragments is extracted through the explicit-implicit rule semantic association mechanism, and then the association and integration operation is performed to obtain a set of structured policy explicit-implicit rule texts. The case feature extraction module for historical case experts extracts initial features of historical case experience based on preprocessed historical policy question and answer example texts, preprocessed enterprise policy consultation question texts, and a set of structured policy explicit and implicit rule texts. Then, semantic dimension alignment is completed through the government semantic bridging mechanism to obtain the global semantic vector of structured policy rules and the aligned historical case experience features. The policy case fusion module of historical case experts: Based on the aligned historical case experience features and the structured policy explicit and implicit rule text set, the weights are optimized through the historical contribution adjustment mechanism to obtain the optimized historical case experience features. Then, combined with the global semantic vector of structured policy rules, the policy-case fusion features are extracted. Policy Q&A Output Module: Based on the structured policy explicit and implicit rule text set and policy-case fusion features, calculate the expert fusion weight vector, and then decode it to obtain the policy Q&A reasoning results.

[0020] Compared with the prior art, the beneficial effects of the present invention are as follows: (1) This invention effectively solves the problems of historical case experience being difficult to quickly adapt to new policies and insufficient accuracy of Q&A in traditional methods after policy updates. First, it collects and preprocesses data related to new policies, enterprise consultation questions and historical Q&A examples. It first extracts the preliminary semantic features and explicit rules of the new policies, then associates and mines the corresponding implicit constraints and integrates them into structured policy rules. Subsequently, it semantically aligns the features of historical case experience with the policy rules, optimizes the feature quality by dynamically adjusting the contribution of historical experience, and finally integrates the policy rules and optimized historical experience features to complete the Q&A reasoning. The overall solution avoids the lag of traditional rule-based systems and the modeling defects of single models, opens up the semantic association between new policy rules and historical implementation experience, and achieves deep integration of the two. It ensures that the Q&A results meet the latest policy requirements and are supported by historical experience, thereby improving the accuracy and timeliness of government Q&A. It can flexibly respond to high-frequency policy update scenarios and meet the needs of enterprises and the public for accurate government services.

[0021] (2) To address the issues of intertwined explicit and implicit rules, blurred rule boundaries, and difficulty in separating explicit and implicit rules in policy texts during government policy Q&A scenarios, this invention proposes the following: Based on preprocessed policy and consultation texts, preliminary semantic features are extracted using the Llama 3-model approach to obtain a global reference. The policy text is then split into basic units based on punctuation. Boundary confidence weights are calculated by combining global semantics with semantic coherence between segments (quantified by linking common words with the total number of words). Explicit rule segments that meet the threshold are then filtered using a weighted filtering function. In terms of technical effectiveness, this effectively solves the core pain point of blurred rule boundaries, avoids semantic breaks caused by mechanical splitting, ensures that the selected segments possess both clear rule attributes and semantic integrity and coherence, while reducing the complexity of long text processing and improving the accuracy and efficiency of policy rule splitting.

[0022] (3) In response to the problem that implicit constraints in government policy texts are scattered and not directly expressed, and that their semantic association with explicit rules is hidden, this invention proposes a semantic association mechanism for explicit and implicit rules: Based on a set of explicit rule text fragments, the semantic features of each explicit rule are extracted through a large model, and position weights are introduced to consider the distance between fragment positions in order to narrow the search range. Cosine similarity is used to calculate the semantic association degree of explicit and implicit rules, and position weights are fused to obtain the semantic association weight of explicit and implicit rules. Non-explicit rule fragments are filtered by double thresholds and spliced ​​together to form the corresponding implicit constraint text. This solves the problem of matching explicit and implicit rules, avoids mismatch caused by single-dimensional matching, ensures that implicit constraints are strongly correlated with explicit rules and are accurately distinguished, avoids the risk of enterprises missing key constraints in their inquiries, ensures the integrity of explicit and implicit rules, and lays the foundation for the effective adaptation of historical experience and new policies.

[0023] (4) To address the problem of the difficulty in reusing experience due to the misalignment between unstructured case experience of historical policies and structured explicit and implicit rules of new policies, this invention generates historical case query vectors and policy rule key vectors through three Llama models. The historical case value vector is obtained through one-dimensional convolution and batch normalization. The core features are enhanced by multi-head attention, global max pooling, and MLP+ReLU. Then, a government semantic bridging mechanism is constructed. Global average pooling is used to extract the global semantic vector of policies. After concatenating the initial features of historical cases, the alignment coefficient is calculated by MLP+Softmax. The alignment coefficient is weighted and fused, and then optimized by layer normalization and MLP to obtain the aligned features. This bridges the semantic gap between the two, retains the practical value of historical experience, and makes the semantics of experience closer to policy rules, thus solving the problem of the difficulty in reusing historical policy cases.

[0024] (5) In view of the difference in the correlation between historical case experience and new policies, and the problem that treating historical experience equally may lead to invalid experience interfering with reasoning and reducing the accuracy of question and answer, this invention extracts type classification features by one-dimensional convolution of historical case experience features, splices the semantic features of policy explicit and implicit rules, and obtains the historical contribution degree adaptation weight through MLP+Sigmoid. The influence of high-value experience is strengthened by element-wise multiplication, and finally the optimized features are obtained by summing. This realizes the differentiated screening and weight allocation of historical experience, effectively weakens the interference of invalid experience with weak adaptability, focuses on core experience with high correlation, avoids the generalized treatment of different types of experience, improves the generalization ability of the model, ensures the accuracy of new policy reasoning, and further optimizes the response quality and adaptation effect of policy question and answer. Attached Figure Description

[0025] Figure 1 A flowchart illustrating a multi-expert architecture AI-powered intelligent question-answering method for the government affairs field provided by this invention; Figure 2 This invention provides an example diagram of an AI-powered intelligent question-and-answer system with a multi-expert architecture in the field of government affairs. Detailed Implementation

[0026] The present invention will be further described below with reference to the accompanying drawings, but this is not intended to limit the present invention in any way. Any modifications or substitutions made based on the teachings of the present invention shall fall within the protection scope of the present invention.

[0027] Example 1: A multi-expert architecture AI-powered intelligent question-answering method in the field of government affairs, such as... Figure 1 As shown, it includes the following steps: A1: Collect new policy text data, enterprise policy consultation question text data, and historical policy question and answer example text data, and preprocess them separately to obtain preprocessed new policy text, preprocessed enterprise policy consultation question text, and preprocessed historical policy question and answer example text, including: A11: Collect new policy text data, including the main text of policy clauses, policy supplements, and policy explanations; preprocess the new policy text data using UTF-8 encoding and character regular expression filtering to obtain the preprocessed new policy text. A12: Collect text data of enterprise policy consultation questions, and preprocess it using the method of deduplication by sliding window to obtain the preprocessed text of enterprise policy consultation questions; A13: Export historical policy Q&A example text data from the government service backend database, including corresponding clauses of historical policies, historical consultation questions, and historical authoritative answers; preprocess the historical policy Q&A example text data using UTF-8 encoding and character regular expression filtering to obtain preprocessed historical policy Q&A example text.

[0028] A2: Based on the preprocessed new policy text and the preprocessed enterprise policy consultation question text, the Llama3 open-source large model is used to extract preliminary semantic features of the new policy. Then, through the clause boundary definition mechanism, a set of explicit rule text fragments is extracted, including: A21: Based on the preprocessed new policy text and the preprocessed enterprise policy consultation question text, preliminary semantic features of the new policy are extracted using the Llama3 open-source large model. The calculation method is as follows: ; in, The initial semantic features of the new policy For layer normalization, For Llama 3 open source large model, For the pre-processed new policy text, This is the pre-processed text of the enterprise policy consultation questions; A22: Based on the preliminary semantic features of the new policy, a set of explicit rule text fragments is extracted through a clause boundary definition mechanism. The calculation method of the clause boundary definition mechanism is as follows: ; ; ; ; in, This is a collection of new policy text fragments divided by punctuation marks. To divide the segment according to punctuation marks, Let be the semantic features of the i-th new policy text fragment, where i is the index of the new policy text fragment. For the i-th new policy text fragment in the set of new policy text fragments, Let the boundary confidence weight be the i-th new policy text fragment. For the Sigmoid function, For semantic feature dimension, This is a function for calculating semantic coherence between segments. For the (i+1)th new policy text fragment in the set of new policy text fragments, A collection of text fragments containing explicit rules. This is a weighted filtering function. This is the boundary confidence threshold.

[0029] Taking the inquiry from enterprises about the "R&D expense subsidy policy for micro and small enterprises" as an example, the explicit rules are the hard clauses clearly stated in the policy text, such as "micro and small enterprises that have been registered for more than one year and whose registered capital does not exceed 5 million yuan", "R&D expenses account for no less than 3% of annual revenue", and "the subsidy amount is calculated at 15% of R&D expenses, with a maximum of 500,000 yuan". These clauses are direct and specific, and are mostly concentrated in the core chapters of the policy text. Enterprises can intuitively compare their own conditions to determine whether they meet the requirements. Implicit constraints are potential requirements found in other textual fragments such as policy appendices and explanatory notes within the new policy document. For example, the policy appendices mention that "R&D expense accounting must comply with the 'Explanation of the Statistical Scope of R&D Expenses' in the appendix to this policy," which states that "R&D expenses only include direct expenditures directly related to R&D activities, such as personnel salaries, equipment purchases, and material procurement, excluding indirect expenses such as office supplies and travel expenses." The policy explanatory notes state that "applicant companies must ensure that project information is true and valid" and "R&D projects must have been filed with the relevant departments and be within the validity period." Adjacent paragraphs in the main text state that "subsidy funds only support physically operating companies" and "the registered address must be a physical operating address within the administrative region covered by the policy, excluding virtual registered addresses and affiliated addresses." Although these constraints are not listed as explicit hard clauses, they all come from different fragments of the new policy document. They are key conditions strongly related to the explicit rules and affect the application results, and are requirements that companies may easily overlook when inquiring but must meet.

[0030] Specifically, for scenarios where enterprise policy consultation issues involve multiple rounds of statements and dispersed core demands, leading to a weakened semantic connection between policies and issues, this invention also provides a calculation method to strengthen the focus of demands, replacing step A21. The calculation method is as follows: ; in, It employs a multi-head self-attention mechanism; by performing self-attention calculations on enterprise policy consultation texts, it strengthens the semantic expression related to core demands and enhances the correlation between policy texts and the core issues.

[0031] A3: Based on the set of explicit rule text fragments and the preliminary semantic features of the new policy, the implicit constraint texts corresponding to the explicit rule text fragments are extracted through the explicit-implicit rule semantic association mechanism. Then, an association and integration operation is performed to obtain a structured policy explicit-implicit rule text set, including: A31: Based on the set of explicit rule text fragments and the preliminary semantic features of the new policy, the implicit constraint text corresponding to the explicit rule text fragments is extracted through the explicit-implicit rule semantic association mechanism. The calculation method is as follows: ; ; ; ; in, Let be the semantic features of the j-th explicit rule text fragment in the set of explicit rule text fragments. Let j be the j-th explicit rule text fragment in the set of explicit rule text fragments, where j is the index of the explicit rule text fragment. Let j be the positional weights of the j-th explicit rule text fragment and the ith new policy text fragment. It is an exponential function. To take the absolute value, n is the total number of text fragments in the new policy. Let be the semantic association weight between the explicit and implicit rules of the j-th explicit rule text fragment and the ith new policy text fragment. For cosine similarity calculation, For Hadama accumulation, Let j be the implicit constraint text fragment corresponding to the j-th explicit rule text fragment. For splicing operations, For the association weight threshold, For the intersection operation, Threshold for non-explicit rule determination; A32: Based on the set of explicit rule text fragments and the implicit constraint text fragments corresponding to the explicit rule text fragments, perform an association operation to obtain the associated set of explicit and implicit rule text fragments; A33: Sort the text positions according to the associated set of explicit and implicit rule text fragments: Sort the associated set of explicit and implicit rule text fragments in ascending order according to the order in which each explicit rule text fragment appears in the preprocessed new policy text, and then sort them according to "explicit rule text fragments: Implicit constraint text fragment: The standardized format of “” is used to integrate the sorted explicit and implicit rule pairs into a structured policy explicit and implicit rule text set.

[0032] A4: Based on the preprocessed historical policy question and answer example text, the preprocessed enterprise policy consultation question text, and the structured policy explicit and implicit rule text set, extract initial features of historical case experience; then, complete semantic dimension alignment through the government semantic bridging mechanism to obtain the global semantic vector of structured policy rules and the aligned historical case experience features, including: A41: Based on the preprocessed historical policy question and answer example text, the preprocessed enterprise policy consultation question text, and the structured policy explicit and implicit rule text set, extract the initial features of historical case experience. The calculation method is as follows: ; ; ; ; in, This is a text query vector for historical cases. This is a preprocessed example text of answers to historical policy questions. For structured policy rule key vectors, A collection of structured policy explicit and implicit rule texts. As a value vector for historical cases, For batch normalization, It is a one-dimensional convolutional layer. Initial characteristics based on historical case experience. As a multi-head attention mechanism, To sum element by element, For ReLU function, It is a multilayer perceptron. This is for global max pooling; A42: Based on the initial features of historical case experience and the text set of structured policy explicit and implicit rules, semantic dimension alignment is completed through the government semantic bridging mechanism to obtain the global semantic vector of structured policy rules and the aligned historical case experience features. The calculation method is as follows: ; ; ; ; in, For structured policy rules, global semantic vector. For global average pooling, This is the semantic alignment coefficient. For the Softmax function, For semantic alignment features, Features of historical case experience after alignment.

[0033] A5: Based on the aligned historical case experience features and the structured policy explicit / implicit rule text set, weight optimization is performed through a historical contribution adjustment mechanism to obtain optimized historical case experience features. Then, combined with the global semantic vector of structured policy rules, policy-case fusion features are extracted, including: A51: Based on the aligned historical case experience features and the structured policy explicit and implicit rule text set, the weights are optimized through a historical contribution adjustment mechanism to obtain the optimized historical case experience features. The calculation method is as follows: ; ; ; in, To classify the characteristics of historical experience types, Weighting should be adjusted to reflect historical contributions. For optimized historical case experience features, For L1 regularization; A52: Based on the optimized historical case experience features and the global semantic vector of structured policy rules, policy-case fusion features are extracted. The calculation method is as follows: ; ; ; in, For the policy-case fusion weight matrix, This indicates an initial integration of policy and case studies. As a policy-case integration feature, This is a residual connection.

[0034] In this embodiment, the neural network module parameters involved in step A52 are set as follows: The multilayer perceptron has a total of 3 layers. The number of neurons in the input layer is consistent with the dimension of the global semantic vector of the structured policy rules, which is set to 768 dimensions. There are 2 hidden layers. The number of neurons in the first layer is 2048 dimensions, and the number of neurons in the second layer is 1024 dimensions. Both hidden layers use the ReLU activation function to enhance the nonlinear expressive ability of the model. The number of neurons in the output layer matches the dimension of the optimized historical case experience features, which is set to 768 dimensions to ensure that the policy-case fusion weight matrix can perform element-wise multiplication with the optimized historical case experience features. The parameters of the multilayer perceptron module corresponding to the residual connection are consistent with the parameters of the multilayer perceptron that generates the preliminary policy-case fusion features, that is, the number of neurons in the input layer, hidden layer, and output layer are 768 dimensions, 2048 dimensions, 1024 dimensions, and 768 dimensions, respectively, and the activation function is also ReLU. The weight parameters of all multilayer perceptron modules are initialized using the Xavier normal initialization method, and the bias parameters are initialized to 0.

[0035] A6: Based on the structured policy explicit and implicit rule text set and policy-case fusion features, calculate the expert fusion weight vector, then decode it to obtain the policy question-and-answer reasoning results, including: A61: Based on the structured policy explicit and implicit rule text set and policy-case fusion features, the new policy interpretation expert features and expert fusion weight vector are calculated through a gating network. This includes: inputting the structured policy explicit and implicit rule text set into a Llama3 pre-trained language model for encoding to obtain the new policy interpretation expert features; then concatenating the new policy interpretation expert features with the policy-case fusion features, and inputting the concatenated result into a multilayer perceptron for processing; finally, calculating the expert fusion weight vector through the Softmax normalization function. A62: Perform layer normalization on the characteristics of experts interpreting new policies to obtain the text vector of the characteristics of experts interpreting new policies; perform layer normalization on the policy-case fusion characteristics to obtain the text vector of the policy-case fusion characteristics. A63: Based on the expert fusion weight vector, the feature text vectors of the new policy interpretation experts and the policy-case fusion feature text vectors are weighted and fused, and then decoded using a linear decoding method to obtain the policy question-and-answer reasoning results, such as... Figure 2 As shown; the weighted fusion includes: performing element-wise multiplication operations on the weight coefficients of the new policy interpretation expert features and the weight coefficients of the policy-case fusion features in the expert fusion weight vector with the new policy interpretation expert feature text vector and the policy-case fusion feature text vector respectively, and then summing them.

[0036] The specific training method for the neural network modules involved in this invention is as follows: First, the preprocessed new policy text data, enterprise policy consultation question text data, and historical policy question and answer example text data are divided into training set, validation set, and test set according to a preset ratio for model training, parameter tuning, and performance verification; wherein Llama The open-source large model is fine-tuned based on text data specific to the government affairs sector. Other modules (including multilayer perceptrons, multi-head attention mechanisms, one-dimensional convolutional layers, gating networks, etc.) have their initial parameters set using random initialization, forming an end-to-end training framework. During training, the cross-entropy loss function is used as the optimization objective to quantify the difference between the model's output policy question-answering reasoning results and authoritative annotation results. The AdamW optimizer is selected, adaptively adjusting the learning rate to meet the parameter update needs of different modules, while a gradient pruning strategy is introduced to avoid gradient explosion during training. The accuracy of question-answering reasoning on the validation set is used as the indicator; training terminates when there is no improvement in accuracy for m consecutive training rounds, where m is the training round threshold. A cosine annealing decay strategy is used for learning rate scheduling, dynamically adjusting the learning rate according to the training rounds. Each neural network module collaboratively updates its parameters during training until the model's performance on the test set reaches the preset standard. Example 2: This invention also discloses a multi-expert architecture AI intelligent question-answering system in the field of government affairs, including: Text acquisition module: Collects new policy text data, enterprise policy consultation question text data, and historical policy question and answer example text data, and preprocesses them respectively to obtain preprocessed new policy text, preprocessed enterprise policy consultation question text, and preprocessed historical policy question and answer example text; The explicit rule extraction module for policy interpretation experts: Based on the preprocessed new policy text and the preprocessed enterprise policy consultation question text, the module extracts the preliminary semantic features of the new policy through the Llama 3 open-source model, and then extracts a set of explicit rule text fragments through the clause boundary definition mechanism. The implicit constraint extraction module for policy interpretation experts: Based on the set of explicit rule text fragments and the preliminary semantic features of the new policy, the implicit constraint text corresponding to the explicit rule text fragments is extracted through the explicit-implicit rule semantic association mechanism, and then the association and integration operation is performed to obtain a set of structured policy explicit-implicit rule texts. The case feature extraction module for historical case experts extracts initial features of historical case experience based on preprocessed historical policy question and answer example texts, preprocessed enterprise policy consultation question texts, and a set of structured policy explicit and implicit rule texts. Then, semantic dimension alignment is completed through the government semantic bridging mechanism to obtain the global semantic vector of structured policy rules and the aligned historical case experience features. The policy case fusion module of historical case experts: Based on the aligned historical case experience features and the structured policy explicit and implicit rule text set, the weights are optimized through the historical contribution adjustment mechanism to obtain the optimized historical case experience features. Then, combined with the global semantic vector of structured policy rules, the policy-case fusion features are extracted. Policy Q&A Output Module: Based on the structured policy explicit and implicit rule text set and policy-case fusion features, calculate the expert fusion weight vector, and then decode it to obtain the policy Q&A reasoning results.

[0037] It should be noted that the sequence numbers of the above embodiments of the present invention are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, apparatus, article, or method. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0038] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0039] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A multi-expert architecture AI-powered intelligent question-answering method in the field of government affairs, characterized in that, Includes the following steps: A1: Collect new policy text data, enterprise policy consultation question text data, and historical policy question and answer example text data, and preprocess them respectively to obtain preprocessed new policy text, preprocessed enterprise policy consultation question text, and preprocessed historical policy question and answer example text; A2: Based on the preprocessed new policy text and the preprocessed enterprise policy consultation question text, the initial semantic features of the new policy are extracted using the Llama 3 open-source big model, and then the explicit rule text fragment set is extracted through the clause boundary definition mechanism. A22: Based on the preliminary semantic features of the new policy, a set of explicit rule text fragments is extracted through a clause boundary definition mechanism. The calculation method of the clause boundary definition mechanism is as follows: ; ; ; ; in, The initial semantic features of the new policy For the pre-processed new policy text, Llama3 open-source large model, This is a collection of new policy text fragments divided by punctuation marks. To divide the segment according to punctuation marks, Let be the semantic features of the i-th new policy text fragment, where i is the index of the new policy text fragment. For the i-th new policy text fragment in the set of new policy text fragments, Let the boundary confidence weights be the values ​​for the i-th new policy text fragment. For the Sigmoid function, For semantic feature dimension, This is a function for calculating semantic coherence between segments. For the (i+1)th new policy text fragment in the set of new policy text fragments, A collection of text fragments containing explicit rules. This is a weighted filtering function. The boundary confidence threshold; A3: Based on the set of explicit rule text fragments and the preliminary semantic features of the new policy, the implicit constraint text corresponding to the explicit rule text fragments is extracted through the explicit-implicit rule semantic association mechanism, and then the association and integration operation is performed to obtain the set of structured policy explicit-implicit rule texts. A31: Based on the set of explicit rule text fragments and the preliminary semantic features of the new policy, the implicit constraint text corresponding to the explicit rule text fragments is extracted through the explicit-implicit rule semantic association mechanism. The calculation method is as follows: ; ; ; ; in, Let be the semantic features of the j-th explicit rule text fragment in the set of explicit rule text fragments. Let j be the j-th explicit rule text fragment in the set of explicit rule text fragments, where j is the index of the explicit rule text fragment. Let be the positional weights of the j-th explicit rule text fragment and the i-th new policy text fragment. It is an exponential function. To take the absolute value, n is the total number of text fragments in the new policy. Let be the semantic association weight between the explicit and implicit rules of the j-th explicit rule text fragment and the ith new policy text fragment. For cosine similarity calculation, For Hadama accumulation, Let j be the implicit constraint text fragment corresponding to the j-th explicit rule text fragment. For splicing operations, For the association weight threshold, For the intersection operation, The threshold for non-explicit rule determination; A4: Based on the preprocessed historical policy question and answer example text, the preprocessed enterprise policy consultation question text, and the structured policy explicit and implicit rule text set, extract the initial features of historical case experience; then complete the semantic dimension alignment through the government semantic bridging mechanism to obtain the global semantic vector of structured policy rules and the aligned historical case experience features; AA42: Based on the initial features of historical case experience and the text set of structured policy explicit and implicit rules, semantic dimension alignment is completed through the government semantic bridging mechanism to obtain the global semantic vector of structured policy rules and the aligned historical case experience features. The calculation method is as follows: ; ; ; ; in, For structured policy rules, global semantic vector. For global average pooling, A collection of structured policy explicit and implicit rule texts. It is a multilayer perceptron. This is the semantic alignment coefficient. For the Softmax function, For semantic alignment features, For the aligned historical case experience features, Initial characteristics of historical case experience For layer normalization; A5: Based on the aligned historical case experience features and the structured policy explicit and implicit rule text set, the weights are optimized through the historical contribution adjustment mechanism to obtain the optimized historical case experience features. Then, combined with the global semantic vector of the structured policy rules, the policy-case fusion features are extracted. A51: Based on the aligned historical case experience features and the structured policy explicit and implicit rule text set, the weights are optimized through a historical contribution adjustment mechanism to obtain the optimized historical case experience features. The calculation method is as follows: ; ; ; in, To classify the characteristics of historical experience types, It is a one-dimensional convolutional layer. Weighting should be adjusted to reflect historical contributions. For optimized historical case experience features, For L1 regularization; A6: Based on the structured policy explicit and implicit rule text set and policy-case fusion features, calculate the expert fusion weight vector, and then decode it to obtain the policy question-and-answer reasoning results; A61: Based on the structured policy explicit and implicit rule text set and policy-case fusion features, the new policy interpretation expert features and expert fusion weight vector are calculated through a gating network. This includes: inputting the structured policy explicit and implicit rule text set into the Llama3 pre-trained language model for encoding to obtain the new policy interpretation expert features; then concatenating the new policy interpretation expert features with the policy-case fusion features, and inputting the concatenated result into a multilayer perceptron for processing; finally, calculating the expert fusion weight vector through the Softmax normalization function.

2. The multi-expert architecture AI intelligent question answering method in the field of government affairs according to claim 1, characterized in that, Step A1 includes: A11: Collect new policy text data, including the main text of policy clauses, policy supplements, and policy explanations; preprocess the new policy text data using UTF-8 encoding and character regular expression filtering to obtain the preprocessed new policy text. A12: Collect text data of enterprise policy consultation questions, and preprocess it using the method of deduplication by sliding window to obtain the preprocessed text of enterprise policy consultation questions; A13: Export historical policy Q&A example text data from the government service backend database, including corresponding clauses of historical policies, historical consultation questions, and historical authoritative answers; preprocess the historical policy Q&A example text data using UTF-8 encoding and character regular expression filtering to obtain preprocessed historical policy Q&A example text.

3. The multi-expert architecture AI intelligent question answering method in the field of government affairs according to claim 1, characterized in that, Step A2 includes: A21: Based on the preprocessed new policy text and the preprocessed enterprise policy consultation question text, preliminary semantic features of the new policy are extracted using the Llama 3 open-source model. The calculation method is as follows: ; This is a pre-processed text of enterprise policy consultation questions.

4. The multi-expert architecture AI intelligent question answering method in the field of government affairs according to claim 3, characterized in that, The calculation method of the semantic coherence calculation function between segments in step A22 includes: ; in, These are the first and second inputs to the function for calculating semantic coherence between segments, respectively. To calculate the number of common words, This is a count of the total number of words.

5. The multi-expert architecture AI intelligent question answering method in the field of government affairs according to claim 4, characterized in that, Step A3 includes: A32: Based on the set of explicit rule text fragments and the implicit constraint text fragments corresponding to the explicit rule text fragments, perform an association operation to obtain the associated set of explicit and implicit rule text fragments. A33: Sort the text positions according to the associated set of explicit and implicit rule text fragments: Sort the associated set of explicit and implicit rule text fragments in ascending order according to the order in which each explicit rule text fragment appears in the preprocessed new policy text, and then sort them according to "explicit rule text fragments: Implicit constraint text fragment: The standardized format of “” is used to integrate the sorted explicit and implicit rule pairs into a structured policy explicit and implicit rule text set.

6. The multi-expert architecture AI intelligent question answering method in the field of government affairs according to claim 5, characterized in that, The A4 step includes: A41: Based on the preprocessed historical policy question and answer example text, the preprocessed enterprise policy consultation question text, and the structured policy explicit and implicit rule text set, extract the initial features of historical case experience. The calculation method is as follows: ; ; ; ; in, This is a text query vector for historical cases. This is a preprocessed example text of answers to historical policy questions. For structured policy rule key vectors, As a value vector for historical cases, For batch normalization, As a multi-head attention mechanism, To sum element by element, For ReLU function, This is for global max pooling.

7. The multi-expert architecture AI intelligent question answering method in the field of government affairs according to claim 6, characterized in that, Step A5 includes: A52: Based on the optimized historical case experience features and the global semantic vector of structured policy rules, policy-case fusion features are extracted. The calculation method is as follows: ; ; ; in, For the policy-case fusion weight matrix, This indicates an initial integration of policy and case studies. As a policy-case integration feature, This is a residual connection.

8. The multi-expert architecture AI intelligent question answering method in the field of government affairs according to claim 7, characterized in that, Step A6 includes: A62: Perform layer normalization on the characteristics of experts interpreting new policies to obtain the text vector of the characteristics of experts interpreting new policies; perform layer normalization on the policy-case fusion characteristics to obtain the text vector of the policy-case fusion characteristics. A63: Based on the expert fusion weight vector, the text vectors of the new policy interpretation expert features and the text vectors of the policy-case fusion features are weighted and fused, and then decoded using a linear decoding method to obtain the policy question-and-answer reasoning result; the weighted fusion includes: multiplying the weight coefficients of the corresponding new policy interpretation expert features and the corresponding policy-case fusion features in the expert fusion weight vector with the text vectors of the new policy interpretation expert features and the policy-case fusion features of the policy-case fusion features element-by-element, and then summing them.

9. A multi-expert architecture AI-powered intelligent question-answering system for the government sector, characterized in that: include: Text acquisition module: Collects new policy text data, enterprise policy consultation question text data, and historical policy question and answer example text data, and preprocesses them respectively to obtain preprocessed new policy text, preprocessed enterprise policy consultation question text, and preprocessed historical policy question and answer example text; The explicit rule extraction module for policy interpretation experts: Based on the preprocessed new policy text and the preprocessed enterprise policy consultation question text, the module extracts the preliminary semantic features of the new policy through the Llama 3 open-source model, and then extracts a set of explicit rule text fragments through the clause boundary definition mechanism. The implicit constraint extraction module for policy interpretation experts: Based on the set of explicit rule text fragments and the preliminary semantic features of the new policy, the implicit constraint text corresponding to the explicit rule text fragments is extracted through the explicit-implicit rule semantic association mechanism, and then the association and integration operation is performed to obtain a set of structured policy explicit-implicit rule texts. The case feature extraction module for historical case experts: Based on the preprocessed historical policy question and answer example text, the preprocessed corporate policy consultation question text, and the structured policy explicit and implicit rule text set, it extracts the initial features of historical case experience; Then, the semantic dimension alignment is completed through the government semantic bridging mechanism to obtain the global semantic vector of structured policy rules and the aligned historical case experience features; The policy case fusion module of historical case experts: Based on the aligned historical case experience features and the structured policy explicit and implicit rule text set, the weights are optimized through the historical contribution adjustment mechanism to obtain the optimized historical case experience features. Then, combined with the global semantic vector of structured policy rules, the policy-case fusion features are extracted. Policy Q&A Output Module: Based on the structured policy explicit and implicit rule text set and policy-case fusion features, calculate the expert fusion weight vector, and then decode it to obtain the policy Q&A reasoning result; so as to realize the multi-expert architecture AI intelligent Q&A method in the field of government affairs as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Policy and regulation intelligent question and answer method and system based on large language model

    CN120256582A

  • Double-engine government affair question and answer method based on large model fine tuning and RAG retrieval

    CN120632050A