A large model-based policy question and answer method, device, equipment and medium

By using a policy question-answering method based on a large model, policy questions are rewritten and vectorized. Combined with deep learning and a knowledge base, this approach addresses the shortcomings of traditional systems in handling complex policy questions and document updates, and achieves efficient and accurate provision of policy information.

CN119513331BActive Publication Date: 2026-04-21SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
Filing Date
2024-11-28
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Traditional policy Q&A systems are unable to effectively handle complex and ever-changing policy issues and struggle to keep up with the updates and maintenance of massive amounts of policy documents, resulting in a poor user experience.

Method used

A policy question-answering method based on a large model is adopted. Policy questions are rewritten and vectorized by a pre-trained model, and accurate policy answers are generated by combining a pre-set retrieval algorithm and a policy knowledge base. This includes semantic parsing, deep learning models and web crawling mechanisms for information updates.

Benefits of technology

It improves the efficiency of handling policy-related issues and enhances the user experience, ensures the accuracy and security of answers, supports multiple input methods, and provides a flexible update mechanism and security guarantees.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119513331B_ABST
    Figure CN119513331B_ABST
Patent Text Reader

Abstract

This application discloses a policy question answering method, apparatus, device, and medium based on a large model, relating to the field of policy question answering technology. The method includes: acquiring an initial policy question sent by a user, and rewriting the initial policy question using a first pre-trained large model to obtain a rewritten policy question; vectorizing the rewritten policy question based on semantic features and question scenario features to obtain a vectorized policy question; filtering policy information stored in a preset question matching database to determine if a target policy answer corresponding to the vectorized policy question exists in the database; if not, filtering related documents corresponding to the vectorized policy question from a preset policy knowledge base, and determining prompt words corresponding to the vectorized policy question from a preset policy prompt word library to obtain the target policy answer. This not only improves the processing efficiency of policy questions based on a large model but also provides a better user experience and service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of policy question-and-answer technology, and in particular to a policy question-and-answer method, apparatus, device, and medium based on a large model. Background Technology

[0002] In recent years, the public's demand for timely and accurate policy information has been growing. Traditional policy Q&A systems typically rely on manually compiled FAQ (Frequently Asked Questions) lists or simple keyword matching algorithms. This approach has significant limitations, such as its inability to handle complex and ever-changing policy questions and its difficulty in updating and maintaining massive amounts of policy documents. Therefore, improving the efficiency of policy question processing and enhancing user experience are urgent issues that need to be addressed. Summary of the Invention

[0003] In view of this, the purpose of this invention is to provide a policy question-answering method, apparatus, device, and medium based on a large model, which can improve the processing efficiency of policy questions and enhance user experience. The specific solution is as follows:

[0004] Firstly, this application provides a policy question-answering method based on a large model, including:

[0005] The initial policy question sent by the user is obtained, and the format and content of the initial policy question are rewritten using the first pre-trained large model to obtain the rewritten policy question;

[0006] The rewritten policy problem is vectorized based on semantic features and problem scenario features to obtain a vectorized policy problem.

[0007] A preset retrieval algorithm is used to filter policy information stored in a preset question matching database to determine whether the target policy answer corresponding to the vectorized policy question exists in the preset question matching database;

[0008] If the target policy answer corresponding to the vectorized policy question does not exist in the preset question matching database, then the associated documents corresponding to the vectorized policy question are filtered from the preset policy knowledge base, and the prompt words corresponding to the vectorized policy question are determined from the preset policy prompt word library;

[0009] The associated documents and the prompt words are input into the second pre-trained large model to obtain the target policy answer corresponding to the vectorized policy question.

[0010] Optionally, the step of rewriting the format and content of the initial policy problem using the first pre-trained large model to obtain the rewritten policy problem includes:

[0011] The initial policy question is preprocessed using a pre-defined language processing technique to obtain a structured policy question.

[0012] The policy information in the structured policy questions is identified and extracted using a pre-defined semantic parsing technique, and the extracted policy information is then input into the first pre-trained large model.

[0013] The content of the initial policy problem is transformed using preset rewriting rules and the first pre-trained large model to obtain the rewritten policy problem.

[0014] Optionally, the step of filtering policy information stored in the preset question matching database using a preset retrieval algorithm includes:

[0015] The policy information stored in the preset question matching database is filtered using a preset retrieval algorithm and a preset question matching database to obtain the filtered policy information;

[0016] A preset deep learning model is used to perform similarity analysis between the filtered policy information and the vectorized policy question, and the results of the similarity analysis are used to determine whether the target policy answer corresponding to the vectorized policy question exists in the preset question matching database.

[0017] Optionally, the step of using a preset retrieval algorithm and a preset question matching database to filter the policy information stored in the preset question matching database to obtain filtered policy information includes:

[0018] The policy information is obtained by filtering the policy question answer pairs in the FAQ database using a preset retrieval algorithm and a FAQ database.

[0019] And / or, using a preset retrieval algorithm and a class graph library to filter policy features in the class graph library to obtain filtered policy information.

[0020] Optionally, the step of inputting the associated document and the prompt word into the second pre-trained large model to obtain the target policy answer corresponding to the vectorized policy question includes:

[0021] The associated document and the prompt words are input into the second pre-trained large model to obtain the initial policy answer, and the policy type corresponding to the policy answer is analyzed to obtain the document display type corresponding to the initial policy answer;

[0022] The document structure of the initial policy answer is adjusted based on the document display type to obtain the target policy answer corresponding to the vectorized policy question.

[0023] Optionally, the step of inputting the associated document and the prompt word into the second pre-trained large model to obtain the target policy answer corresponding to the vectorized policy question includes:

[0024] The associated document and the prompt words are input into the second pre-trained large model to obtain the initial policy answer, and the initial policy answer is screened using a pre-trained security detection model or a preset rule base to determine whether there are preset risk words in the initial policy answer;

[0025] If the initial policy answer contains risky words, the initial policy answer will be modified based on the preset answer criteria to obtain the target policy answer, and the target policy answer will be sent to the user.

[0026] Optionally, the policy question-answering method based on large models further includes:

[0027] The system monitors a preset policy information source based on a preset machine learning model to determine whether new policy data exists in the preset policy information source.

[0028] If new policy data exists, the new policy data is crawled from the preset policy information source through a preset crawling mechanism, and the policy features of the new policy data are extracted based on preset keyword extraction technology, so as to update the preset question matching database using the policy features.

[0029] Secondly, this application provides a policy question-answering device based on a large model, including...

[0030] The question rewriting module is used to obtain the initial policy question sent by the user and rewrite the format and content of the initial policy question using the first pre-trained large model to obtain the rewritten policy question;

[0031] The problem transformation module is used to vectorize the rewritten policy problem based on semantic features and problem scenario features to obtain a vectorized policy problem.

[0032] The answer determination module is used to filter policy information stored in a preset question matching database using a preset retrieval algorithm, so as to determine whether the target policy answer corresponding to the vectorized policy question exists in the preset question matching database;

[0033] The information determination module is used to filter the associated documents corresponding to the vectorized policy question from the preset policy knowledge base and determine the prompt words corresponding to the vectorized policy question from the preset policy prompt word library if the target policy answer corresponding to the vectorized policy question does not exist in the preset question matching database.

[0034] The answer generation module is used to input the associated documents and the prompt words into the second pre-trained large model to obtain the target policy answer corresponding to the vectorized policy question.

[0035] Thirdly, this application provides an electronic device, comprising:

[0036] Memory, used to store computer programs;

[0037] A processor is used to execute the computer program to implement the aforementioned policy question-answering method based on a large model.

[0038] Fourthly, this application provides a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned policy question-answering method based on a large model.

[0039] In this application, an initial policy question sent by the user is first obtained, and the format and content of the initial policy question are rewritten using a first pre-trained large model to obtain a rewritten policy question. Based on semantic features and problem scenario features, the rewritten policy question is vectorized to obtain a vectorized policy question. A preset retrieval algorithm is used to filter policy information stored in a preset question matching database to determine whether a target policy answer corresponding to the vectorized policy question exists in the preset question matching database. If no target policy answer corresponding to the vectorized policy question exists in the preset question matching database, related documents corresponding to the vectorized policy question are filtered from a preset policy knowledge base, and prompt words corresponding to the vectorized policy question are determined from a preset policy prompt word library. The related documents and the prompt words are input into a second pre-trained large model to obtain the target policy answer corresponding to the vectorized policy question. As can be seen from the above, this application utilizes a pre-trained large model to rewrite policy questions sent by users, which can initially improve the accuracy of policy questions. By vectorizing the rewritten policy questions, the intent and background of the policy questions can be better understood, providing feature information for subsequent question matching. By filtering the policy information stored in the preset question matching database, it is determined whether there is a target policy answer corresponding to the vectorized policy question in the database, and based on the determination result, the corresponding target policy answer generation method is determined to ensure the accuracy of the target policy answer. In this way, this application improves the processing efficiency of policy questions based on the large model and provides a better user experience and service. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0041] Figure 1 This application discloses a flowchart of a policy question-answering method based on a large model.

[0042] Figure 2 This is a system architecture diagram of a policy question-answering method based on a large model disclosed in this application;

[0043] Figure 3 This is a schematic diagram of a policy question-answering device based on a large model disclosed in this application;

[0044] Figure 4 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0046] In recent years, the public's demand for timely and accurate policy information has been growing. Traditional policy question-and-answer systems typically rely on manually compiled FAQ lists or simple keyword matching algorithms. This approach has significant limitations, such as its inability to handle complex and ever-changing policy questions and its difficulty in updating and maintaining massive amounts of policy documents. Therefore, this application will specifically introduce a large-scale model-based policy question-and-answer method that can solve the above problems.

[0047] See Figure 1 As shown in the figure, this invention discloses a policy question-answering method based on a large model, which may include:

[0048] Step S11: Obtain the initial policy question sent by the user terminal, and rewrite the format and content of the initial policy question using the first pre-trained large model to obtain the rewritten policy question.

[0049] In this embodiment, initial policy questions sent by the user are first obtained through multiple channels. It should be noted that, to improve user experience, this embodiment not only supports traditional text input boxes but also integrates a speech recognition interface, natural language processing technology, and OCR (Optical Character Recognition) technology to allow users to ask policy questions via voice, images, and other methods.

[0050] In this embodiment, the initial policy question is preprocessed using preset language processing techniques to obtain a structured policy question. Policy information is then identified and extracted from the structured policy question using preset semantic parsing techniques, and the extracted policy information is input into the first pre-trained large-scale model. Finally, the content of the initial policy question is transformed using preset rewriting rules and the first pre-trained large-scale model to obtain a rewritten policy question. Specifically, this embodiment first preprocesses the initial policy question using preset language processing techniques, including data processing operations such as removing irrelevant symbols, word segmentation, and part-of-speech tagging. This process removes irrelevant data, providing a clear and structured policy question for subsequent processing. It should be noted that the preset language processing techniques include, but are not limited to, natural language processing, machine translation, and information retrieval. Next, policy information such as policy domain, specific matters, and time range from the structured policy question is identified and extracted using pre-defined semantic parsing technology. This policy information is then input into the first training model. Finally, the content of the initial policy question is transformed using pre-defined rewriting rules and the generative capabilities of the first pre-trained model to obtain a more standardized and structured rewritten policy question. It should be noted that the first training model can be BERT (Bidirectional Encoder Representations from Transformers) or GPT (Generative Pre-trained Transformer). In this way, rewriting the initial policy question improves the accuracy of subsequent question matching and enhances the system's robustness and generalization ability.

[0051] Step S12: Based on semantic features and problem scenario features, the rewritten policy problem is vectorized to obtain a vectorized policy problem.

[0052] In this embodiment, a combination of scenario vectorization and general vectorization is used to represent the rewritten policy issue from multiple dimensions. Scenario vectorization involves constructing a word vector space for specific scenarios such as policy domains and themes to obtain the problem scenario features of the rewritten policy issue. General vectorization utilizes general word vectors trained on a large-scale corpus to obtain the semantic features of the rewritten policy issue. By vectorizing the rewritten policy issue using these semantic features and problem scenario features to obtain a vectorized policy issue, a more comprehensive understanding of the intent and background of the initial policy issue can be achieved.

[0053] Step S13: Use a preset retrieval algorithm to filter the policy information stored in the preset question matching database to determine whether the target policy answer corresponding to the vectorized policy question exists in the preset question matching database.

[0054] In this embodiment, a preset retrieval algorithm and a preset question matching database are used to filter the policy information stored in the preset question matching database to obtain filtered policy information. A preset deep learning model is then used to perform similarity analysis between the filtered policy information and the vectorized policy question, and the results of the similarity analysis are used to determine whether the target policy answer corresponding to the vectorized policy question exists in the preset question matching database. Specifically, firstly, a preset retrieval algorithm, such as the BM25 algorithm (Best Matching 25, i.e., the best matching algorithm in the 25th iteration), and a preset question matching database are used to roughly filter the policy information stored in the preset question matching database to obtain multiple filtered policy information. Then, a preset deep learning model is used to perform question analysis on the semantics, context, and other factors of the vectorized policy question to obtain question analysis results. The question analysis results are then compared with each of the multiple filtered policy information to obtain the most accurate filtered policy information. Finally, based on the filtered policy information, it is determined whether the target policy answer corresponding to the vectorized policy question exists in the preset question matching database. It should be noted that this embodiment utilizes a preset retrieval algorithm and a FAQ library to filter policy question answer pairs in the FAQ library to obtain filtered policy information, and / or utilizes a preset retrieval algorithm and a class graph library to filter policy features in the class graph library to obtain filtered policy information. That is, the preset retrieval algorithm searches the FAQ library for policy question answer pairs that match the vectorized policy question. When a matching policy question answer pair is found, the preset retrieval algorithm extracts the matching policy question answer pair as filtered policy information; and / or, the preset retrieval algorithm traverses feature nodes related to the vectorized policy question in the class graph library and analyzes the relationships between the feature nodes to determine feature information that meets the filtering criteria. For example, if the vectorized policy question is a policy question related to environmental protection, the preset retrieval algorithm will search for feature nodes associated with environmental protection labels and determine these feature nodes as feature information that meets the filtering criteria, then extract the feature information that meets the filtering criteria to obtain the filtered policy information.

[0055] In this embodiment, a preset policy information source is monitored based on a preset machine learning model to determine whether new policy data exists in the preset policy information source. If new policy data exists, it is crawled from the preset policy information source using a preset crawling mechanism, and policy features of the new policy data are extracted based on preset keyword extraction technology, so as to update the preset question matching database using the policy features. Specifically, to improve the automation level of the system, a preset machine learning model is used to learn from historical data to more accurately predict and identify new policy information. That is, the preset policy information source is monitored based on the preset machine learning model to determine whether new policy data exists in the preset policy information source, wherein the new policy data is data obtained from updates to the policy information source. If new policy data exists, it is crawled from policy information sources published by government departments, authoritative media, etc., using a preset crawling mechanism. It should be noted that during the crawling process, named entity recognition and keyword extraction technologies can be used to extract key information such as policy name, release date, and main content from the new policy data file, and the key information is structured and stored in the preset question matching database. Meanwhile, this embodiment provides a flexible rule configuration interface, allowing users to adjust the update strategy and rules of the preset problem matching database according to actual needs, so as to adapt to the special requirements of different policy areas.

[0056] In this embodiment, a version control mechanism and a permission management mechanism are introduced to ensure the security and consistency of policy documents in the preset problem matching database. The version control mechanism records multiple versions of each policy document, such as modification time and content, and allows users to view and compare the differences between different versions of the policy document as needed. This mechanism helps users track the policy change process. The permission management mechanism controls the access and modification permissions of different users to policy documents. Different permission levels are set according to the user's role and responsibilities, and identity authentication and access control policies ensure that only authorized users can access or modify policy documents. Simultaneously, a logging function is set up to record user actions and system operating status for tracking and tracing problems in case of occurrence.

[0057] Step S14: If the target policy answer corresponding to the vectorized policy question does not exist in the preset question matching database, then the associated documents corresponding to the vectorized policy question are filtered from the preset policy knowledge base, and the prompt words corresponding to the vectorized policy question are determined from the preset policy prompt word library.

[0058] In this embodiment, if the target policy answer corresponding to the vectorized policy question exists in the FAQ library or class graph library, the target policy answer is directly extracted and sent to the user terminal; if the target policy answer corresponding to the vectorized policy question does not exist in the preset question matching database, it means that the vectorized policy question needs to be further processed using a preset enhanced model or knowledge retrieval. That is, the associated documents corresponding to the vectorized policy question are filtered from the preset policy knowledge base, and the prompt words corresponding to the vectorized policy question are determined from the preset policy prompt word library.

[0059] Step S15: Input the associated document and the prompt word into the second pre-trained large model to obtain the target policy answer corresponding to the vectorized policy question.

[0060] In this embodiment, the associated document and the prompt words are input into a second pre-trained large model to obtain an initial policy answer. The policy type corresponding to the policy answer is then analyzed to obtain the document display type corresponding to the initial policy answer. Based on the document display type, the document structure of the initial policy answer is adjusted to obtain the target policy answer corresponding to the vectorized policy question. It is understood that in this embodiment, the associated document and the prompt words are input into a second pre-trained large model. Based on the large model's language generation capabilities and domain knowledge, an initial policy answer that is both compliant with policy requirements and easy to understand is generated. Then, the policy type corresponding to the policy answer is analyzed to obtain the document display type corresponding to the initial policy answer. The document display type includes, but is not limited to, charts, tables, and PDFs (Portable Document Format Generators). Based on the document display type, the document structure of the initial policy answer is adjusted to obtain the target policy answer corresponding to the vectorized policy question. For example, when explaining complex policy provisions or analyzing policy impacts, bar charts or pie charts with data comparisons are generated to help users understand the policy content more intuitively. For policy documents that require detailed explanation, structured PDF documents are generated, including policy background, main content, implementation points, and other detailed information for users to read and save. In addition, this embodiment sets up multi-turn dialogue and contextual understanding functions, which can dynamically adjust the content of responses based on user feedback and dialogue history.

[0061] Furthermore, to ensure the security and compliance of the answers, this embodiment utilizes a pre-trained security detection model or a preset rule base to screen the initial policy answers to determine whether they contain preset risky words. If risky words are found, the initial policy answers are modified based on preset answer standards to obtain the target policy answer, which is then sent to the user. Specifically, a comprehensive risk assessment and filtering process is performed on the initial policy answers, including sensitive word detection, inappropriate speech identification, and privacy information protection. In other words, a pre-trained security detection model or rule base is used to screen the initial policy answers to ensure that their content complies with laws, regulations, and ethical standards. For potentially risky answers, the initial policy answers are modified based on preset answer standards before being sent to the user; seriously violating content is directly rejected.

[0062] In this embodiment, a statistical module is set up to record information such as user-sent questions, system-returned answers, matching efficiency, and user satisfaction in order to optimize the large model. This statistical module not only helps evaluate the system's performance and effectiveness but also provides strong support for subsequent optimization and improvement. Simultaneously, users can express their satisfaction and suggestions regarding the target policy answers through ratings and comments. The system performs data analysis and mining based on user feedback to identify problems and shortcomings in the large model, and then makes targeted optimizations and improvements based on these issues, such as adjusting question rewriting strategies, optimizing vectorization methods, and expanding the question and knowledge bases. Through continuous optimization and improvement, the quality of answers and the user experience are continuously enhanced.

[0063] As can be seen from the above, this embodiment first obtains the initial policy question sent by the user terminal, and rewrites the format and content of the initial policy question using a first pre-trained large model to obtain a rewritten policy question; based on semantic features and problem scenario features, the rewritten policy question is vectorized to obtain a vectorized policy question; a preset retrieval algorithm is used to filter policy information stored in a preset question matching database to determine whether the preset question matching database contains a target policy answer corresponding to the vectorized policy question; if the preset question matching database does not contain a target policy answer corresponding to the vectorized policy question, then the associated documents corresponding to the vectorized policy question are filtered from a preset policy knowledge base, and the prompt words corresponding to the vectorized policy question are determined from a preset policy prompt word library; the associated documents and the prompt words are input into a second pre-trained large model to obtain the target policy answer corresponding to the vectorized policy question. As can be seen from the above, this application utilizes a pre-trained large model to rewrite policy questions sent by users, which can initially improve the accuracy of policy questions. By vectorizing the rewritten policy questions, the intent and background of the policy questions can be better understood, providing feature information for subsequent question matching. By filtering the policy information stored in the preset question matching database, it is determined whether there is a target policy answer corresponding to the vectorized policy question in the database, and based on the determination result, the corresponding target policy answer generation method is determined to ensure the accuracy of the target policy answer. In this way, this application improves the processing efficiency of policy questions based on the large model and provides a better user experience and service.

[0064] In summary, the system architecture diagram of this application is as follows: Figure 2 As shown, the process involves obtaining the user's input question, rewriting it, and then using scene vectorization and general vectorization to perform multi-dimensional vectorization to obtain a vectorized question. The vectorized question is then matched, and based on the matching results, it is located. If the vectorized question exists in the FAQ library or NL2SQL (Natural Language to SQL), the corresponding answer is directly generated and returned to the user. Otherwise, an augmented model or knowledge retrieval is used to extract related documents and prompts from a relevant knowledge base. Finally, based on a pre-trained LLM (Large Language Model), the corresponding answer is generated and returned to the user.

[0065] Accordingly, see Figure 3 As shown in the embodiments of this application, a policy question-answering device based on a large model is also provided, which may include:

[0066] The question rewriting module 11 is used to obtain the initial policy question sent by the user terminal, and rewrite the format and content of the initial policy question using the first pre-trained large model to obtain the rewritten policy question;

[0067] Problem transformation module 12 is used to perform vectorization transformation on the rewritten policy problem based on semantic features and problem scenario features to obtain vectorized policy problems;

[0068] The answer judgment module 13 is used to filter the policy information stored in the preset question matching database using a preset retrieval algorithm, so as to determine whether there is a target policy answer corresponding to the vectorized policy question in the preset question matching database;

[0069] The information determination module 14 is used to filter the associated documents corresponding to the vectorized policy question from the preset policy knowledge base and determine the prompt words corresponding to the vectorized policy question from the preset policy prompt word library if the target policy answer corresponding to the vectorized policy question does not exist in the preset question matching database.

[0070] The answer generation module 15 is used to input the associated document and the prompt words into the second pre-trained large model to obtain the target policy answer corresponding to the vectorized policy question.

[0071] As can be seen from the above, this application utilizes a pre-trained large model to rewrite policy questions sent by users, which can initially improve the accuracy of policy questions. By vectorizing the rewritten policy questions, the intent and background of the policy questions can be better understood, providing feature information for subsequent question matching. By filtering the policy information stored in the preset question matching database, it is determined whether there is a target policy answer corresponding to the vectorized policy question in the database, and based on the determination result, the corresponding target policy answer generation method is determined to ensure the accuracy of the target policy answer. In this way, this application improves the processing efficiency of policy questions based on the large model and provides a better user experience and service.

[0072] In some specific implementations, the problem rewriting module 11 includes:

[0073] The data preprocessing unit is used to preprocess the initial policy question based on a preset language processing technique to obtain a structured policy question;

[0074] The information extraction unit is used to identify and extract policy information from the structured policy questions using a preset semantic parsing technique, and input the extracted policy information into the first pre-trained large model;

[0075] The problem rewriting unit is used to transform the content of the initial policy problem using preset rewriting rules and the first pre-trained large model to obtain the rewritten policy problem.

[0076] In some specific implementations, the answer determination module 13 includes:

[0077] The information filtering submodule is used to filter the policy information stored in the preset question matching database using a preset retrieval algorithm and a preset question matching database to obtain filtered policy information;

[0078] The answer judgment unit is used to perform similarity analysis between the filtered policy information and the vectorized policy question using a preset deep learning model, and to determine whether the target policy answer corresponding to the vectorized policy question exists in the preset question matching database based on the corresponding similarity analysis results.

[0079] In some specific implementations, the information filtering submodule includes:

[0080] The question-answer pair filtering unit is used to filter policy question-answer pairs in the FAQ database using a preset retrieval algorithm and the FAQ database to obtain filtered policy information;

[0081] The policy feature filtering unit is used to filter policy features in the class graph library using a preset retrieval algorithm and a class graph library to obtain filtered policy information.

[0082] In some specific implementations, the answer generation module 15 includes:

[0083] The display type determination unit is used to input the associated document and the prompt words into the second pre-trained large model to obtain the initial policy answer, and to analyze the policy type corresponding to the policy answer to obtain the document display type corresponding to the initial policy answer;

[0084] The answer generation unit is used to adjust the document structure of the initial policy answer based on the document display type to obtain the target policy answer corresponding to the vectorized policy question.

[0085] In some specific implementations, the answer generation module 15 includes:

[0086] The risk vocabulary judgment unit is used to input the associated document and the prompt words into the second pre-trained large model to obtain the initial policy answer, and to use the pre-trained security detection model or the preset rule base to screen the initial policy answer to determine whether there are preset risk words in the initial policy answer;

[0087] The answer sending unit is used to modify the initial policy answer based on a preset answer response standard to obtain a target policy answer if the initial policy answer contains risky words, and then send the target policy answer to the user terminal.

[0088] In some specific embodiments, the policy question-and-answer device further includes:

[0089] The new policy data determination module is used to monitor preset policy information sources based on a preset machine learning model to determine whether new policy data exists in the preset policy information sources;

[0090] The database update module is used to crawl the new policy data from the preset policy information source through a preset crawler mechanism if new policy data exists, and extract the policy features of the new policy data based on preset keyword extraction technology, so as to update the preset question matching database using the policy features.

[0091] Furthermore, embodiments of this application also disclose an electronic device, Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the policy question-answering method based on a large model disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0092] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0093] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0094] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the large-model-based policy question-and-answer method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.

[0095] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned policy question-answering method based on a large model. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0096] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0097] Those skilled in the art will further 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, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. 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.

[0098] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0099] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus 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, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0100] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A policy question-answering method based on a large model, characterized in that, include: The initial policy question sent by the user is obtained, and the format and content of the initial policy question are rewritten using the first pre-trained large model to obtain the rewritten policy question; The rewritten policy issue is vectorized based on semantic features and problem scenario features to obtain a vectorized policy issue. Specifically, the vectorization is performed by combining scenario vectorization and general vectorization. Scenario vectorization involves constructing a specific scenario word vector space for the policy domain and / or policy topic to obtain the problem scenario features of the rewritten policy issue. General vectorization utilizes general word vectors trained on a large-scale corpus to obtain the semantic features of the rewritten policy issue. A preset retrieval algorithm is used to filter policy information stored in a preset question matching database to determine whether the target policy answer corresponding to the vectorized policy question exists in the preset question matching database; wherein, the preset question matching database records and stores multiple versions of policy documents through a version control mechanism, and controls access and modification permissions for different policy documents through an access control mechanism; If the target policy answer corresponding to the vectorized policy question does not exist in the preset question matching database, then the associated documents corresponding to the vectorized policy question are filtered from the preset policy knowledge base, and the prompt words corresponding to the vectorized policy question are determined from the preset policy prompt word library; The associated documents and the prompt words are input into the second pre-trained large model to obtain the target policy answer corresponding to the vectorized policy question.

2. The policy question-answering method based on a large model according to claim 1, characterized in that, The process of rewriting the format and content of the initial policy problem using a first pre-trained large model to obtain the rewritten policy problem includes: The initial policy question is preprocessed using a pre-defined language processing technique to obtain a structured policy question. The policy information in the structured policy questions is identified and extracted using a pre-defined semantic parsing technique, and the extracted policy information is then input into the first pre-trained large model. The content of the initial policy problem is transformed using preset rewriting rules and the first pre-trained large model to obtain the rewritten policy problem.

3. The policy question-answering method based on a large model according to claim 1, characterized in that, The step of using a preset retrieval algorithm to filter policy information stored in a preset question matching database includes: The policy information stored in the preset question matching database is filtered using a preset retrieval algorithm and a preset question matching database to obtain the filtered policy information; A preset deep learning model is used to perform similarity analysis between the filtered policy information and the vectorized policy question, and the results of the similarity analysis are used to determine whether the target policy answer corresponding to the vectorized policy question exists in the preset question matching database.

4. The policy question-answering method based on a large model according to claim 3, characterized in that, The step of using a preset retrieval algorithm and a preset question matching database to filter policy information stored in the preset question matching database to obtain filtered policy information includes: The policy information is obtained by filtering the policy question answer pairs in the FAQ database using a preset retrieval algorithm and a FAQ database. And / or, using a preset retrieval algorithm and a class graph library to filter policy features in the class graph library to obtain filtered policy information.

5. The policy question-answering method based on a large model according to claim 1, characterized in that, The step of inputting the associated document and the prompt words into the second pre-trained large model to obtain the target policy answer corresponding to the vectorized policy question includes: The associated document and the prompt words are input into the second pre-trained large model to obtain the initial policy answer, and the policy type corresponding to the policy answer is analyzed to obtain the document display type corresponding to the initial policy answer; The document structure of the initial policy answer is adjusted based on the document display type to obtain the target policy answer corresponding to the vectorized policy question.

6. The policy question-answering method based on a large model according to claim 1, characterized in that, The step of inputting the associated document and the prompt words into the second pre-trained large model to obtain the target policy answer corresponding to the vectorized policy question includes: The associated document and the prompt words are input into the second pre-trained large model to obtain the initial policy answer, and the initial policy answer is screened using a pre-trained security detection model or a preset rule base to determine whether there are preset risk words in the initial policy answer; If the initial policy answer contains risky words, the initial policy answer will be modified based on the preset answer criteria to obtain the target policy answer, and the target policy answer will be sent to the user.

7. The policy question-answering method based on a large model according to any one of claims 1 to 6, characterized in that, Also includes: The system monitors a preset policy information source based on a preset machine learning model to determine whether new policy data exists in the preset policy information source. If new policy data exists, the new policy data is crawled from the preset policy information source through a preset crawling mechanism, and the policy features of the new policy data are extracted based on preset keyword extraction technology, so as to update the preset question matching database using the policy features.

8. A policy question-answering device based on a large model, characterized in that, include The question rewriting module is used to obtain the initial policy question sent by the user and rewrite the format and content of the initial policy question using the first pre-trained large model to obtain the rewritten policy question; The problem transformation module is used to vectorize the rewritten policy problem based on semantic features and problem scenario features to obtain a vectorized policy problem. Specifically, the vectorization is performed by combining scenario vectorization and general vectorization. Scenario vectorization involves constructing a specific scenario word vector space for the policy domain and / or policy topic to obtain the problem scenario features of the rewritten policy problem. General vectorization utilizes general word vectors trained on a large-scale corpus to obtain the semantic features of the rewritten policy problem. The answer determination module is used to filter policy information stored in a preset question matching database using a preset retrieval algorithm to determine whether the target policy answer corresponding to the vectorized policy question exists in the preset question matching database; wherein, the preset question matching database records and stores multiple versions of policy documents through a version control mechanism and controls access and modification permissions for different policy documents through an access control mechanism; The information determination module is used to filter the associated documents corresponding to the vectorized policy question from the preset policy knowledge base and determine the prompt words corresponding to the vectorized policy question from the preset policy prompt word library if the target policy answer corresponding to the vectorized policy question does not exist in the preset question matching database. The answer generation module is used to input the associated documents and the prompt words into the second pre-trained large model to obtain the target policy answer corresponding to the vectorized policy question.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the large-model-based policy question-answering method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the policy question-answering method based on a large model as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Policy question and answer method and system based on large language model and knowledge graph technology

    CN117725170A

  • Intelligent question and answer method, system and device based on context information aggregation and medium

    CN118820443A