Automatic question answering method and tax knowledge question answering method

Through the automatic question-and-answer method, the matching and correlation between the question and answer database is judged using standard question-and-answer similarity and preset thresholds, and answers are generated, solving the problems of inefficiency of traditional tax consulting services and inaccurate information, and achieving efficient and accurate tax consulting services.

CN119621920AInactive Publication Date: 2025-03-14ALIBABA CLOUD COMPUTING CO LTD

Patent Information

Application Number
CN202510164070.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-14
Publication Date
2025-03-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional tax consulting services rely on natural language models or manual answers, which have problems such as inefficiency, inaccurate information and lagging updates, making it difficult to meet users' efficient solution to complex tax problems.

Method used

An automatic question-and-answer method is provided to generate standard question-and-answer similarity by obtaining target question information and standard question-and-answer library, and to judge the matching degree and correlation between the question-and-answer library based on the preset similarity threshold, and generate answer information.

Benefits of technology

The quality and efficiency of tax consultation are improved, and accurate and relevant answers are generated by accurately reflecting the semantic correlation between the question and the Q&A library, thereby avoiding the negative impact of low-correlation questions and answers on the answer quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621920A_ABST
    Figure CN119621920A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an automatic question and answer method and a tax knowledge question and answer method. The automatic question and answer method comprises the steps of obtaining target question information and a standard question and answer library comprising at least one piece of standard question and answer information; standard question and answer similarities corresponding to the standard question and answer information are generated, and the standard question and answer similarities are similarities between the standard question and answer information and the target question information; and generating answer information corresponding to the question information based on standard question and answer similarities corresponding to the standard question and answer information, a first similarity threshold used for judging whether the target question information is matched with the standard question and answer information or not and a second similarity threshold used for judging whether the target question information is related to the standard question and answer information or not. By combining and effectively integrating multi-channel target task related knowledge, the quality and efficiency of target task consultation are improved, and important support is provided for a user to understand the target task related knowledge.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the field of artificial intelligence model technology, and in particular to an automatic question-answering method. Background Art

[0002] With the rapid increase in the number of enterprises and the continued vigor of economic activities, the demand for tax consulting and services has grown significantly. This growth has driven the exploration of more efficient and intelligent tax service solutions, and traditional tax consulting service methods are gradually unable to meet the increasingly complex task requirements.

[0003] At present, traditional tax consulting services mainly rely on natural language models or manual answers. Although they can meet the needs of tax consulting to a certain extent, they have problems such as low efficiency, inaccurate information and delayed updates, making it difficult to meet users' needs for efficient solutions to complex tax issues. Therefore, in order to solve these shortcomings, technicians in this field need an automatic question-and-answer method to improve the quality and efficiency of tax consulting. Summary of the invention

[0004] In view of this, the embodiments of this specification provide an automatic question-and-answer method, a tax knowledge question-and-answer method, and a tax knowledge question-and-answer method applied to a cloud device. One or more embodiments of this specification also relate to an automatic question-and-answer device, a tax knowledge question-and-answer device, a computing device, a computer-readable storage medium, and a computer program product to solve the technical defects existing in the prior art.

[0005] According to a first aspect of an embodiment of this specification, there is provided an automatic question-answering method, comprising: Acquire target question information and a standard question and answer library, wherein the standard question and answer library includes at least one standard question and answer information; Generate a standard question and answer similarity corresponding to each standard question and answer information, wherein the standard question and answer similarity is the similarity between the standard question and answer information and the target question information; Based on the standard question and answer similarities corresponding to each standard question and answer information, and a preset first similarity threshold and a preset second similarity threshold, answer information corresponding to the question information is generated, wherein the first similarity threshold is used to determine whether the target question information matches the standard question and answer information, and the second similarity threshold is used to determine whether the target question information is related to the standard question and answer information.

[0006] According to a second aspect of the embodiments of this specification, a tax knowledge question and answer method is provided, comprising: Acquire target tax question information and a standard question and answer library, wherein the standard question and answer library includes at least one standard question and answer information; Generate a standard question and answer similarity corresponding to each standard question and answer information, wherein the standard question and answer similarity is the similarity between the standard question and answer information and the target tax question information; Based on the standard question and answer similarities corresponding to each standard question and answer information, and a preset first similarity threshold and a preset second similarity threshold, the tax answer information corresponding to the question information is generated, wherein the first similarity threshold is used to determine whether the target tax question information matches the standard question and answer information, and the second similarity threshold is used to determine whether the target tax question information is related to the standard question and answer information.

[0007] According to a third aspect of the embodiments of this specification, a tax knowledge question and answer method is provided, which is applied to a cloud device, including: A tax knowledge answer request sent by a receiving terminal device is received, and target tax question information and a standard question and answer library are acquired according to the tax knowledge answer request, wherein the standard question and answer library includes at least one standard question and answer information; Generate a standard question and answer similarity corresponding to each standard question and answer information, wherein the standard question and answer similarity is the similarity between the standard question and answer information and the target tax question information; Based on the standard question and answer similarities corresponding to each standard question and answer information, as well as a preset first similarity threshold and a preset second similarity threshold, tax answer information corresponding to the question information is generated, and the tax answer information is sent to the end-side device, wherein the first similarity threshold is used to determine whether the target tax question information matches the standard question and answer information, and the second similarity threshold is used to determine whether the target tax question information is related to the standard question and answer information.

[0008] According to a fourth aspect of an embodiment of this specification, a computing device is provided, including: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above-mentioned automatic question-and-answer method, tax knowledge question-and-answer method, and tax knowledge question-and-answer method applied to cloud devices are implemented.

[0009] According to the fifth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned automatic question-and-answer method, tax knowledge question-and-answer method, and tax knowledge question-and-answer method applied to cloud devices.

[0010] According to the sixth aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned automatic question and answer method, tax knowledge question and answer method, and tax knowledge question and answer method applied to a cloud device.

[0011] By applying the scheme of the embodiments of this specification, by obtaining the target question information and the standard question and answer information, since the standard question and answer similarity is obtained by calculating the distance between the target question and the standard question and answer information in the semantic space, it can accurately reflect the degree of semantic association between the two, thereby improving the accuracy of the subsequent generated answers. And then based on the generated standard question and answer similarity, the preset first similarity threshold and second similarity threshold are used to judge the matching degree and correlation between the question and the question and answer library. This multi-layer judgment mechanism can effectively avoid the influence of low-correlation question and answer information on the quality of the answer, and at the same time, in complex problem scenarios, provide users with comprehensive and logical answers through highly correlated information, thereby achieving accurate and efficient answer generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 is a flow chart of an automatic question-answering method provided by an embodiment of this specification; Figure 2 It is a flow chart of a tax knowledge question and answer method provided by an embodiment of this specification; Figure 3 is a flow chart of a tax knowledge question and answer method applied to a cloud device provided by an embodiment of this specification; Figure 4 This is an architecture diagram of a tax knowledge question and answer system provided by an embodiment of this specification; Figure 5 is a processing flow chart of a tax assistant method provided by one embodiment of the present specification; Figure 6 is a structural schematic diagram of an automatic question-answering device provided by an embodiment of this specification; Figure 7 It is a structural diagram of a tax knowledge question and answer device provided by an embodiment of this specification; Figure 8 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0013] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0014] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0015] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0016] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations and standards in relevant regions, and corresponding operation entrances shall be provided for users to choose to authorize or refuse.

[0017] In one or more embodiments of this specification, a large model refers to a deep learning model with large-scale model parameters, which usually contains hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than 10 trillion model parameters. A large model can also be called a foundation model / foundation model. The large model is pre-trained with large-scale unlabeled corpus to produce a pre-trained model with more than 100 million parameters. This model can adapt to a wide range of downstream tasks, and the model has good generalization ability, such as a large-scale language model (LLM), a multi-modal pre-training model, etc.

[0018] When the big model is used in practice, only a small number of samples are needed to fine-tune the pre-trained model and it can be applied to different tasks. The big model can be widely used in natural language processing (NLP), computer vision and other fields. Specifically, it can be applied to computer vision tasks such as visual question answering (VQA), image caption (IC), image generation, as well as natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. The main application scenarios of the big model include digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc.

[0019] First, the terms involved in one or more embodiments of this specification are explained.

[0020] Retrieval-Augmented Generation (RAG): combines the advantages of information retrieval and text generation. It first retrieves relevant information from the knowledge base and then uses this information to guide the text generation process. This approach can improve the accuracy and relevance of the generated content and is particularly suitable for scenarios that require factual accuracy.

[0021] Supervised Fine-Tuning (SFT): is a model optimization technique that adapts a pre-trained model to a specific task by performing additional training on labeled data for that specific task. This approach can improve the model's performance in a specific domain while retaining its general language understanding capabilities.

[0022] BAAI General Embedding (BGE): is a vector model used to represent text semantics. It converts text into points in a high-dimensional vector space, so that texts with similar semantics are close in distance in the vector space. This representation method plays an important role in tasks such as information retrieval and text classification.

[0023] In this specification, an automatic question-and-answer method, a tax knowledge question-and-answer method, and a tax knowledge question-and-answer method applied to a cloud device are provided. One or more embodiments of this specification also involve an automatic question-and-answer device, a tax knowledge question-and-answer device, a computing device, a computer-readable storage medium, and a computer program product, which are described in detail one by one in the following embodiments.

[0024] Most of the existing tax consultation question-and-answer systems are implemented through traditional natural language processing models, which have the following main shortcomings: Limited understanding ability: Small models are weak in handling complex problems, understanding context and logical reasoning, and may not be able to accurately understand users' inquiries or relevant tax regulations. Inflexible answers: The answers of small models are often fixed templates, and may not provide the detailed information or suggestions required by users. Poor ability to handle multi-round dialogues: When conducting multi-round dialogues, small models cannot effectively track context, which can easily lead to incoherent answers or misunderstandings. Difficult model updates: Small models may be more cumbersome to update and maintain, and have a weak ability to update the knowledge base in a timely manner in the face of rapidly changing tax regulations.

[0025] See also Figure 1 , Figure 1 A flowchart of an automatic question-answering method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.

[0026] Step 102: Obtain target question information and a standard question and answer database, wherein the standard question and answer database includes at least one standard question and answer information.

[0027] In actual applications, the target question information is an accurate description of the question raised by the user; the standard question and answer library includes multiple standard question and answer information, which is a collection of questions and their corresponding answers pre-stored in the system, and is used for matching and reference with the target question information.

[0028] The target question information can be understood as the structured question expression generated by natural language processing of the original question raised by the user. This information usually includes the language expression optimized by the question rewriting model and the user demand direction determined by the intention recognition module. For example, when a user asks "How to declare personal income tax?", the target question information may be rewritten as "What is the process of personal income tax declaration?" or "What specific steps need to be completed?", thereby more accurately reflecting the user's true intention and providing clearer semantic input for subsequent retrieval and matching.

[0029] The standard question and answer database can be understood as the question and answer information. It can be understood as a collection of pre-built question and answer pairs in the system. The construction process of the standard question and answer database involves the sorting of common questions, the updating of the knowledge base, and the integration of multi-field data, so as to ensure the breadth and professionalism of the question and answer database. The standard question and answer information included therein can be understood as the pre-built question and answer pairs in the system, which are mainly used to quickly match and answer the user's target questions. The standard question and answer information includes not only the textual expression of the question, but also its corresponding answer and related auxiliary information. For example, the question and answer pair "Question: How to declare personal income tax? Answer: Log in to the tax system, fill in the declaration form, and submit the information." can help the system directly output efficient answers when matching similar questions.

[0030] It should be noted that obtaining the target question information can be understood as clarifying the user's question intention and standardizing the question expression so that subsequent steps can be processed and matched more efficiently. Specific methods for obtaining the target question information may include: extracting the initial question information from the question request and inputting it into the question rewriting model to generate the rewritten target question information; the user's question may also be grammatically optimized and semantically reconstructed through natural language processing technology, such as converting ambiguous user expressions into structured standard questions; the current question may also be combined with contextual information to merge the previous conversation history to generate a more accurate target question description, etc. This manual does not impose any restrictions on this.

[0031] By obtaining the target question information, the user's true intention can be accurately captured to ensure that subsequent processing steps can be carried out efficiently; at the same time, the rewritten and optimized target question information enables the system to understand user needs more clearly, thereby improving the matching accuracy between questions and knowledge bases or standard question and answer information; in addition, the context-based target question generation method can also cope with complex multi-round dialogue scenarios, ensuring the coherence and pertinence of the answers, thereby providing users with more complete and professional answers.

[0032] Furthermore, target problem information is obtained, including: receiving a question answering request, wherein the question answering request carries initial question information; Inputting the initial question information into a question rewriting model to obtain reference question information generated by the question rewriting model; Target question information is acquired based on the reference question information, wherein the reference question information is a question expression optimized by a question rewriting model, and the target question information is a question expression related to a target task.

[0033] In actual applications, the question answer request is an operation instruction containing question information issued by the user to the system; the initial question information is the user's original, unprocessed question content; the question rewriting model is a processing module used to optimize and standardize the user's question expression; the reference question information is the optimized question expression generated by the question rewriting model that is closer to the target semantics and context.

[0034] The question answering request can be understood as the starting point of the user's interaction with the question-answering system. By sending a question answering request, the user passes the question to the system for processing. The question answering request carries the initial question information and triggers subsequent steps such as rewriting, intent recognition, and answer generation. For example, when a user enters "How do I declare personal income tax?" on a mobile phone and clicks Send, this operation constitutes a question answering request. After the system receives the request, it will start the corresponding processing flow to accurately answer the user's question.

[0035] The initial question information can be understood as the unprocessed original question text entered by the user, which directly reflects the user's language expression and question intention. For example, the user may enter "How to pay corporate income tax?" as the initial question information. This information may contain semantic ambiguity, incomplete grammar, or missing context, which needs to be further optimized and improved so that the system can understand the question more accurately and match the appropriate answer content.

[0036] The question rewriting model can be understood as a key module for optimizing the initial question information. It improves the accuracy and standardization of question expression through knowledge rewriting and multi-round rewriting. Knowledge rewriting refers to adjusting the words and semantics in the question in combination with the professional knowledge base to make it closer to the writing format of the question-answering database or policy document. For example, rewrite "What are the benefits of corporate tax?" as "What are the tax incentives for corporate income tax?" to improve the matching degree of the search. Multi-round rewriting is to complete the omitted content based on the contextual dialogue information. For example, during the dialogue, when the user asks "What about value-added tax?" the system will complete it as "What are the preferential policies for value-added tax?" to generate a more complete rewritten question.

[0037] It should be noted that the question rewriting model includes any one of the knowledge rewriting module and the multi-round rewriting module. The training method of the knowledge rewriting module and the multi-round rewriting module can be to obtain a basic model, where the basic model can be an LLM or a natural language processing model, etc., and this specification does not impose any restrictions on this; then the basic model is trained using the question rewriting sample, so that the model can effectively handle the semantic optimization and expression standardization of the user input question; the training focus of the knowledge rewriting module is to enable the model to combine the knowledge base information in the professional field, such as term explanation, professional terminology reorganization, etc., to improve the matching degree between the question and the knowledge base content; the training of the multi-round rewriting module focuses on contextual dialogue understanding and question completion, so that the model can accurately capture the user's true intention and optimize the question expression in multiple rounds of interaction. Through these training methods, the model can more flexibly and efficiently support the rewriting needs of complex problems.

[0038] Reference question information can be understood as the expression of questions optimized by the question rewriting model, which contains both contextual semantics and is close to professional knowledge. For example, the initial question "What are the tax incentives?" may be rewritten in the reference question information as "What are the specific provisions of the tax incentives for small and micro-profit enterprises in 2023?" This rewriting not only clarifies the semantics, but also enhances the relevance of the question to the knowledge base, which helps the system recall more accurate answers.

[0039] It should be noted that obtaining target question information based on reference question information can be understood as generating a question description that is more in line with the question intent and suitable for subsequent processing by optimizing the semantic expression and structured expression of the reference question information. Specific methods for obtaining target question information based on reference question information may include: inputting the reference question information into a knowledge rewriting module, reconstructing its semantics and supplementing it with professional terms, thereby generating more standardized target question information; or directly determining the reference question information as the target question information, which is suitable for scenarios where the reference question information is sufficiently complete and conforms to the target expression; or combining contextual information and historical user conversation content to supplement and adjust the reference question information to generate a more accurate target question description, etc. This manual does not impose any restrictions on this.

[0040] This optimization enables the question-answering system to understand and process user needs more efficiently, thereby improving the accuracy of answers and user experience.

[0041] Since the question raised by the user may not be a consultation for the target task, the target question information is obtained based on the reference question information, including: Inputting the reference question information into an intention judgment model to obtain the question intention generated by the intention judgment model; In a case where the question intention is a target task consultation intention, target question information is generated based on the reference question information.

[0042] In practical applications, the intent judgment model is an intelligent module used to analyze and classify the user's intention to ask a question; the question intent is the demand direction or goal expressed by the user in the question; the target task consultation intent is the specific task-related question intention clearly raised by the user, which is used to trigger a specific task processing flow.

[0043] The intention judgment model can be understood as the core module for semantic analysis and classification of user questions. Its main function is to generate the question intent in the reference question information based on the reference question information input by the user, combined with the context and preset classification rules. For example, when a user asks "How do I apply for corporate tax registration?", the intention judgment model will identify it as "target task consultation intent"; and when a user asks "I'm a little bored recently", the model may classify it as "small talk". Through this classification, the system can more specifically select the next step of the processing process, such as entering the question-and-answer link or providing simple knowledge answers.

[0044] Question intent can be understood as the direction of user needs implicitly or explicitly expressed in the question, and is an important basis for the design of the question-answering system process. The identification of question intent can help the system decide how to handle user questions, and is the key to the system's accurate question-answering. For example, when the question intent is "greeting", the system will generate a soothing or greeting-style answer; when the question intent is "specific question consultation", the system will recall relevant data or execute a complete knowledge query process. This intent-based diversion mechanism can effectively improve the system's adaptability to different problem scenarios.

[0045] The target task consultation intention can be understood as the specific needs or goals related to a specific task clearly involved in the user's question, which is the premise for the system to trigger the task link. For example, when a user asks "How to apply for a special VAT invoice?", the intention judgment model recognizes it as a target task consultation intention, and then the system will start the corresponding question-and-answer link, retrieve relevant policy documents or QA question-and-answer information, and provide users with detailed answers. This recognition capability enables the system to efficiently respond to user needs in complex multi-intent dialogue scenarios and complete problem handling in a targeted manner.

[0046] Considering that the user's question may only give a noun without involving a specific question, and in this case the user's intention obtained by the intention recognition model is indistinguishable, after inputting the reference question information into the intention judgment model and obtaining the question intention generated by the intention judgment model, the method further includes: In the case where the question intention is indistinguishable, generating a question inquiry prompt word based on the reference question information and each standard question and answer information, and inputting the question inquiry prompt word into a question and answer model to obtain answer information generated by the question and answer model, wherein the question intention being indistinguishable indicates that the reference question information is incomplete; When the question intention is identifiable and is not the target task consultation intention, the reference question information is input into the question-answering model to obtain the answer information generated by the question-answering model.

[0047] In actual applications, question prompt words are guiding language generated by the system when the user's question intention cannot be distinguished, which is used to help users clarify their question intentions; the question-answering model is the core algorithm model used to generate answers to questions, which can generate high-quality answer content based on the input prompt words or question information.

[0048] Question prompts can be understood as tools used by the system to guide users to further clarify their question intentions when faced with vague or incomplete questions. Such prompts are usually generated based on reference question information and standard question and answer information, and are intended to help users focus on more specific questions. For example, when a user enters a vague expression such as "tax incentives", the system may generate question prompts such as "Which tax types do you want to know about preferential policies?" or "Do you need specific preferential information on corporate income tax?" In this way, users can further refine their questions, thereby helping the system to retrieve and generate answers more accurately.

[0049] It should be noted that generating question inquiry prompt words based on reference question information and various standard question and answer information can be understood as generating a guiding language structure by integrating the semantic content of the reference question information and the standard question and answer information, which is used to further clarify user needs or optimize answer generation. The specific method of generating question inquiry prompt words may include: calculating the similarity between the reference question information and various standard question and answer information, determining the question and answer information used to generate prompt words based on the above similarity, and then generating question inquiry prompt words based on the confirmed question and answer information; or directly extracting the key content in each standard question and answer information, generating question inquiry prompt words based on the generated key content to enhance the pertinence, etc., and this manual does not impose any restrictions on this.

[0050] The question-answering model can be understood as an intelligent module that performs deep semantic analysis on input questions or prompt words and generates corresponding answers. Question-answering models are usually built based on LLM, which can handle complex semantic relationships and generate logically coherent answers. For example, after the user clarifies the question and enters "What are the corporate income tax preferential policies in 2023?" The question-answering model will generate a detailed answer based on the knowledge base and policy documents, such as "The corporate income tax preferential policies in 2023 include relevant policies 1." The advantage of the question-answering model lies in its powerful language generation ability and context understanding ability, which can adapt to a variety of question-asking scenarios and provide accurate and efficient answers. By using question-asking prompt words, the question-answering model further enhances the system's performance in complex dialogues and multi-round question-answering scenarios.

[0051] Step 104: Generate a standard question and answer similarity corresponding to each standard question and answer information, wherein the standard question and answer similarity is the similarity between the standard question and answer information and the target question information.

[0052] In practical applications, the standard question-answer similarity is the degree of match between the target question information and the standard question-answer information; the standard question-answer similarity is an indicator for measuring the relevance between the question and the existing data in the question-answer library, and is used to determine whether the standard question-answer can be used directly to answer it. Exemplarily, the standard question-answer similarity can be understood as an indicator for quantifying the semantic similarity between the target question information and the standard question-answer information. It is usually calculated by natural language processing technology, including vectorized representation, cosine similarity or other related algorithms. For example, for the target question "How to declare personal income tax?" and the standard question-answer information "What are the steps for personal income tax declaration? The steps for personal income tax declaration include preparing materials, determining the declaration method, selecting the declaration channel, filling in the declaration form, calculating taxes, submitting declarations, paying taxes or refunds, saving vouchers, and annual settlement." The similarity can be measured by calculating the angle between the text vectors of the two. The higher the score, the closer the semantics of the two are.

[0053] It should be noted that generating the standard question and answer similarity corresponding to each standard question and answer information can be understood as quantifying the degree of association between the target question and the standard question and answer information by calculating the semantic or feature similarity between the two, so as to facilitate subsequent answer matching or generation optimization. Specific methods for generating standard question and answer similarity may include: calculating the similarity between the target question information and the standard question information, such as comparing the feature vectors of the two through cosine similarity, Euclidean distance or deep learning embedding model; or calculating the similarity between the joint features of the standard question information and the standard answer information and the target question information. This method can comprehensively consider the relevance of the question semantics and the answer content, etc. This manual does not impose any restrictions on this.

[0054] By obtaining the standard question and answer similarity of each standard question and answer information for the target question information, it is ensured that the system can dynamically adjust the answer generation logic to meet the needs of different problem scenarios.

[0055] Furthermore, the standard question and answer similarity corresponding to each standard question and answer information is generated, including: Inputting the target question information into the knowledge question encoding model to obtain the target question feature information generated by the knowledge matching model; Standard question and answer feature information corresponding to each standard question and answer information is obtained, and based on the target question feature information and the standard question and answer feature information corresponding to each standard question and answer information, a standard question and answer similarity corresponding to each standard question and answer information is generated.

[0056] In practical applications, the knowledge question encoding model is an algorithm module that performs feature vectorization on target questions and standard questions and answers, and is used to represent the semantic features of the questions; the target question feature information is the vectorized representation generated after the target question is processed by the knowledge question encoding model; the standard question and answer feature information is the semantic feature representation generated after the standard question and answer information is encoded by the same model.

[0057] The knowledge question encoding model can be understood as a tool that converts target questions and standard questions and answers in text form into mathematical feature vectors. Its function is to represent the semantic features of the problem through vectors, so that similar questions of different forms can be compared through the distance in the vector space. For example, in a hybrid retrieval path, the knowledge question encoding model will encode "How to declare personal income tax?" and "What is the process of personal tax declaration?" into similar feature vectors, thereby identifying the semantic similarity between the two. By using pre-trained models such as BGE (BAAI General Embedding, general vector model) and fine-tuning with data from specific fields, the knowledge question encoding model can better adapt to professional field problems and improve the accuracy of recall.

[0058] The target question feature information can be understood as a specific vector representation of the target question generated by the knowledge question encoding model, which is used for subsequent matching with the standard question and answer feature information. For example, when a user asks "What are the corporate tax exemptions?", the target question feature information may be encoded as a high-dimensional vector to represent the semantic features of the question. Through vectorized representation, the system can quickly calculate the similarity between the target question and the standard question and answer, supporting efficient retrieval and matching.

[0059] The standard question and answer feature information can be understood as the result of the system vectorizing the standard question and answer information, and is the feature representation of the standard question and answer in the semantic space. For example, "Which tax incentives are applicable to enterprises?" in the question and answer library will be encoded as a feature vector and compared with the target question feature information. By comparing the vector distance between the target question feature information and the standard question and answer feature information, the system can generate the standard question and answer similarity, thereby identifying more relevant question and answer information. This feature information not only supports semantic matching, but also can optimize the retrieval effect in combination with domain knowledge, especially playing a key role in the conversion of colloquial questions to professional expression questions.

[0060] It should be noted that based on the target question feature information and the standard question and answer feature information corresponding to each standard question and answer information, the standard question and answer similarity corresponding to each standard question and answer information is generated. It can be understood that the correlation between the target question and the standard question and answer is calculated in a variety of ways to provide a basis for subsequent answer matching and generation. Specific methods may include: calculating feature similarity information through the target question feature information and the standard question and answer information feature information, and combining the similarity between the target question information and the text of each standard question and answer information to generate text similarity information, thereby comprehensively generating standard question and answer similarity; it is also possible to directly calculate the cosine similarity through the feature information represented by vectorization to quickly determine the degree of similarity between the target question and the standard question and answer in the semantic space; it is also possible to combine the embedding layer of the deep learning model to map the feature information to a unified semantic space for matching, so as to improve the performance in semantically complex scenes, etc. This manual does not impose any restrictions on this.

[0061] In one embodiment provided in this specification, the system adopts a hybrid retrieval link, combining feature similarity information retrieval and text similarity information retrieval for two-way recall, and further improves the accuracy and relevance of the retrieval results through a refined ranking strategy. For example, vector retrieval solves the matching problem between the colloquial problems and professional expression problems in the questions sent by users through a fine-tuned knowledge question encoding model; text retrieval optimizes the sensitivity of special nouns in tax data to enhance the system's ability to capture professional terms. The optimized BGE model is used to refine the recall results to ensure that the calculation of standard question-answer similarity is more accurate and reliable.

[0062] By fine-tuning the knowledge question encoding model, standard question and answer feature information can more accurately match users' specific questions, providing a reliable foundation for complex retrieval and answer generation.

[0063] Step 106: Generate answer information corresponding to the question information based on the standard question and answer similarities corresponding to each standard question and answer information, as well as a preset first similarity threshold and a preset second similarity threshold, wherein the first similarity threshold is used to determine whether the target question information matches the standard question and answer information, and the second similarity threshold is used to determine whether the target question information is related to the standard question and answer information; the answer information is the solution content generated by the system based on the target question, which is used to directly respond to the user's question.

[0064] In actual applications, the first similarity threshold is a preset similarity standard for determining whether the target question information matches the standard question and answer information; the second similarity threshold is a preset similarity standard for evaluating the correlation between the target question information and multiple standard question and answer information, and is used to determine information integration and determine the subsequent strategy for generating the corresponding answer to the target question information.

[0065] The first similarity threshold can be understood as a standard for measuring the degree of match between the target question information and a single standard question and answer information. Its core function is to quickly determine whether the user's question is sufficiently consistent with the existing question and answer pairs, so as to directly output the corresponding preset answer. For example, when a user asks "How to calculate value-added tax?", if there is a question and answer information in the standard question and answer library with a similarity score higher than the first similarity threshold, the system will directly return "The calculation formula of value-added tax..." as the answer. The setting of this threshold is intended to improve the response speed and accuracy of the system and avoid repeated complex processing of questions with high matching degrees.

[0066] The second similarity threshold can be understood as a standard for measuring the overall relevance of the target question information and multiple standard question and answer information. When the similarity score between the target question and multiple standard question and answer information exceeds the second similarity threshold, the system will integrate these related questions and answers and generate a more comprehensive answer through prompt words. For example, when a user asks a complex question, "What are the tax exemption policies for personal income tax?", the system may recall multiple similar question and answer information, such as "Personal income tax tax exemption scope" or "Which income can enjoy tax exemption". As long as the similarity of these information exceeds the second threshold, the system will integrate these information to generate a complete answer. The purpose of the second similarity threshold is to ensure that the information referenced when generating the answer is sufficiently relevant, so as to avoid erroneous or irrelevant information interfering with the quality of the answer.

[0067] The answer information can be understood as the output generated by the system, which is used to directly meet the user's question needs. These answers may come from directly matched standard questions and answers, or they may be generated by integrating multiple related question and answer information, or by obtaining additional reference materials through extended retrieval and combining them with comprehensive answers generated by the model. For example, for a complex question "What is the new tax policy for a certain industry?" the system may extract content from the standard questions and answers and the new policy database, and generate detailed answers in combination with prompt words. This approach ensures the comprehensiveness, accuracy and practicality of the answer content, and can effectively respond to the diverse needs of users.

[0068] Further, based on the standard question and answer similarities corresponding to each standard question and answer information, and a preset first similarity threshold and a preset second similarity threshold, answer information corresponding to the question information is generated, including: Obtaining standard question and answer information sequence information based on the similarity of each standard question and answer; When the similarity of any standard question and answer is greater than or equal to the first similarity threshold, determining target standard question and answer information in each standard question and answer information based on the standard question and answer information sequence information, and generating answer information corresponding to the question information according to the target standard question and answer information; When the similarities of each standard question and answer are less than the first similarity threshold, answer information corresponding to the question information is generated based on the standard question and answer similarities corresponding to each standard question and answer information, the standard question and answer information sequence information and the second similarity threshold.

[0069] In actual applications, the standard question and answer information sequence information is generated based on the standard question and answer similarity sorting, and is used to organize and prioritize the structured data of question and answer information; the target standard question and answer information is the question and answer items with a high relevance to the target question selected from the sorted standard question and answer information, and is used to directly generate answers or support subsequent generation steps.

[0070] The order information of standard question and answer information can be understood as an index table of standard question and answer information arranged from high to low in terms of similarity, which is used to determine which standard question and answer information better matches the semantic requirements of the current question. It is generated based on the similarity calculation of each standard question and answer, and the sorting logic is used to ensure that the system prioritizes question and answer information with high similarity. For example, when a user asks "What are the policies for corporate tax incentives?" the system may generate the following order: 1) "Detailed explanation of tax incentive policies for small and medium-sized enterprises", 2) "Applicable conditions for additional deductions for R&D expenses", and 3) "Declaration process for corporate income tax incentives". Such sorting can help the system focus on question and answer information that is more likely to answer user questions, thereby improving the efficiency and accuracy of answers.

[0071] The target standard question and answer information can be understood as the question and answer content with a high degree of relevance to the target question selected from the standard question and answer information sequence information, which is an important basis for directly generating answers. When the similarity of any standard question and answer exceeds the first similarity threshold, the system will automatically use the top-ranked question and answer information as the target standard question and answer information. For example, for the user question "How to apply for a value-added tax invoice?" If the question and answer pair ranked first in similarity is "What are the application steps for a value-added tax invoice?", the system will directly output its answer. If the similarity of all standard questions and answers is lower than the first threshold, the system may further generate answers based on the second similarity threshold and related rules by integrating multiple question and answer information.

[0072] It should be noted that generating the answer information corresponding to the question information according to the target standard question and answer information can be understood as directly or indirectly generating the answer to the user's question using the content of the target standard question and answer information, so as to provide an accurate and comprehensive answer. The specific method of generating the answer information may include: directly determining the answer in the target standard question and answer information as the answer, for example, when the user question is highly matched with the target standard question and answer information, the pre-designed answer content can be directly output; it is also possible to generate a matching information prompt word template according to the target standard question and answer information, combine the target question information and the matching information prompt word template to generate the question answer prompt word, and then input the question and answer model to obtain the generated answer. This method is suitable for scenarios that require further integration and optimization of the answer content; it is also possible to combine the target standard question and answer information and the supplementary search information to generate more detailed answer content through comprehensive analysis, especially when the target standard question and answer information does not fully cover the user's question, etc. This manual does not impose any restrictions on this.

[0073] In one embodiment provided in this specification, the matching information prompt word template is: “Role: You play the role of an intelligent customer service expert in the tax field, with the core function of efficiently solving users’ tax-related consultation issues and being committed to providing users with professional tax consulting capabilities.

[0074] Skills: Skill 1: User Inquiry Handling: Quick Response: When receiving customer inquiries, quickly understand the core of the problem and respond immediately in a professional and friendly tone. Question Classification and Transfer: Accurately determine the nature of the inquiry and seamlessly transfer it to the corresponding department or manual customer service when necessary.

[0075] Restrictions: Answer style: Answer directly, do not start with "intelligent customer service" or "customer", and do not repeat the question. Data protection: Comply with corporate data security policies and privacy regulations, and do not disclose sensitive customer information. Service hours: Provide online support according to the service hours set by the company.

[0076] Sample interaction: User’s question: Do three-wheeled motorcycles need to pay vehicle purchase tax? Knowledge base: [1] Matching degree: 0.8617; target standard question and answer information 1. [2] Matching degree: 0.8586; target standard question and answer information 2. [3] Matching degree: 0.8512; target standard question and answer information 3. [4] Matching degree: 0.8498; target standard question and answer information 4. [5] Matching degree: 0.8400; target standard question and answer information 5.

[0077] Your answer: Hello, three-wheeled motorcycles with a displacement of more than 150 ml are taxable vehicles and individuals need to pay vehicle purchase tax when purchasing them.

[0078] Knowledge base: The following are materials related to the question. Each material starts with a reference number. The matching degree is the degree of match between this material and the customer's consulting question. Please decide whether to refer to it based on the degree of match. For materials with a large degree of match, focus on referring to them. On the contrary, if the degree of match is low, you can refer to them in small amounts or not at all. Answer the customer's consulting questions based on the following materials. Your answers must be correct and accurate, and written by experts in an impartial and professional tone. Do not provide any information that is not related to the knowledge base, and do not summarize conclusions that are not supported by the materials: {Target standard Q&A information}.

[0079] Consulting question: The question the customer consulted is as follows: {input} After answering, please input the words 'Reference question:' and then output '{the question part in the target standard question and answer information}' in the original text after a new line.

[0080] Then, the target question information is replaced with the "input" position in the matching information prompt word template to generate the question answer prompt word. This mechanism ensures that the system can generate accurate and reliable answers in different matching situations.

[0081] The mechanism of question and answer information generation using the first similarity threshold to determine the target standard for answer information ensures that the system can generate accurate and reliable answers in different matching situations.

[0082] Further, based on the standard question and answer similarities corresponding to each standard question and answer information, the standard question and answer information sequence information and the second similarity threshold, generating answer information corresponding to the question information includes: Acquire relevant question quantity information according to each piece of standard question and answer information and the second similarity threshold, wherein the relevant question quantity information is the number of standard question and answer information whose standard question and answer similarity is greater than or equal to the second similarity; In the case where the number of related questions is greater than or equal to a preset reference question and answer number threshold, at least one reference standard question and answer information is determined in each standard question and answer information based on the number of related questions information and the standard question and answer information sequence information, and a reference question and answer prompt word template is generated according to each reference standard question and answer information; a question answer prompt word is generated based on the target question information and the reference question and answer prompt word template; When the number of related questions is less than the reference question and answer number threshold, obtaining at least one reference task knowledge information in the task knowledge database based on the target question information, and generating a reference knowledge prompt word template according to each reference task knowledge information; generating a question answer prompt word based on the target question information and the reference knowledge prompt word template; The question answer prompt words are input into the question-answering model to obtain the answer information generated by the question-answering model.

[0083] In actual applications, the information on the number of related questions is the number of qualified questions and answers counted by the system after the standard question and answer similarity analysis; the reference question and answer number threshold is the threshold of the number of related questions and answers used by the system to judge whether it is sufficient to support the generation of answers; the reference standard question and answer information is the question and answer items with a high degree of relevance to the target question selected from the standard question and answer information; the reference question and answer prompt word template is a guiding language structure generated based on the reference standard question and answer information, which is used to support the question and answer model to generate answers; the task knowledge database is a document collection that stores task-related knowledge content, which is used to supplement the deficiencies of the standard question and answer library; the reference task knowledge information is the knowledge content associated with the target question retrieved from the task knowledge database; the reference knowledge prompt word template is a guiding language structure generated based on the reference task knowledge information, which is used to support the question and answer model to generate answers.

[0084] The information on the number of related questions can be understood as the number of standard question and answer items that meet specific conditions after similarity calculation. This information reflects the degree of relevance between the target question and the standard question and answer library. For example, when a user asks "What are the corporate income tax preferential policies?" the system may count the number of question and answer items in the standard question and answer that have a similarity exceeding the second similarity threshold as 5, which represent standard questions and answers that have a high relevance to the target question.

[0085] The threshold of the number of reference questions and answers can be understood as a standard for deciding whether to directly use the reference standard question and answer information to generate answers. For example, when the system sets the threshold to 3, if the number of similar questions and answers (reference standard question and answer information) recalled is 3 or more, it is considered that the standard question and answer information is sufficient to support the generation of high-quality answers, thereby avoiding additional calls to the external knowledge base and improving response efficiency. The reference standard question and answer information can be understood as the question and answer items selected from the standard question and answer library that are highly related to the target question, which is the basis for the subsequent generation of answers. For example, for the question "How to apply for a value-added tax invoice?" The system may select the following reference standard question and answer information: "What are the application steps for a value-added tax invoice?" and "What materials are required to apply for a value-added tax invoice?" This information can directly provide support for the generation of answers. The reference question and answer prompt word template can be understood as a language framework generated based on the reference standard question and answer information, which is used to guide the question and answer model to generate more comprehensive or targeted answers.

[0086] The task knowledge database can be understood as a resource library for storing domain-related documents and policy knowledge, which is used to make up for the shortcomings of the standard question-answering library in processing complex problems. For example, when the standard question-answering library fails to recall enough similar questions and answers, the system may retrieve content related to the target question from the database of tax policies and regulations to provide a more complete answer. Reference task knowledge information can be understood as knowledge items closely related to the target question retrieved from the task knowledge database. For example, when a user asks "What are the changes in the new corporate income tax policy in 2023?", the reference task knowledge information may be "Policy Information 1". This information can provide a more authoritative supplement to complex questions. The reference knowledge prompt word template can be understood as a language framework generated based on the reference task knowledge information, which is used to help the question-answering model build a more detailed answer.

[0087] In one embodiment provided in this specification, the reference question and answer prompt word template is: “Role: You are a professional tax knowledge answering expert in a tax department, with the core function of efficiently solving customer inquiries. You will receive two materials, including the knowledge base and user questions, at the end of this article. Please answer user questions based on the steps described in the skills.

[0088] Skills: Skill 1: Question Answering: Material Reference: In this section, please refer to the knowledge base materials and give a direct answer to the user's question. Please state it in paragraphs and mark it with (1) (2) (3) (4). There should be two line breaks between each answer. : Material Introduction: In the knowledge base materials you received, each section begins with a reference number, such as [x], where x is a number that serves as the serial number of this section of material. The serial number is followed by the matching degree between this section of material and the user's question. This matching degree is not necessarily between 0 and 1. Please extract the relevant regulations of the user's question from these materials. Writing requirements: In general, please refer to materials with extremely high or higher matching degrees more often and extract answers to user questions. Scientific calculations: When it comes to numerical calculations, please think at least three times and confirm that the reasoning is correct before giving calculations and answers. Comprehensive answers: In user questions, please give comprehensive answers and output the definite answers. For uncertain contents, remind users to consult the local tax department. Do not repeat: Please keep the content coherent and comprehensive, and use neat and concise language. Do not repeat the output content. Answer style: Do not output words such as "reference knowledge base materials", "based on knowledge base materials", "your answer" in your answer. Skill 2: Reference questions: Original text output: The reference questions mentioned below can be output in their original text. Each question ending with "?" is a reference question. Please add a reference number [1], [2], [3], [4] to each reference question. There should be two line breaks between reference questions.

[0089] Answer requirements: Your answer must be correct, accurate, clearly structured, logical, and written by an expert in an impartial and professional tone. Every sentence you elaborate must have a strong basis in the knowledge base materials, allowing logical reasoning to ensure the comprehensiveness of the answer. There is no limit on the number of output tokens. The overall answer needs to cover the complete and relevant content extracted from the knowledge base. Please keep the content coherent and comprehensive, the language neat and concise, and do not repeat the output content. Except for codes and specific names, your answer must be written in the same language as the question. Do not output words such as "reference knowledge base materials", "according to knowledge base materials", "your answer:" in the answer.

[0090] Answer example: User question: Do three-wheeled motorcycles need to pay vehicle purchase tax? Knowledge base: [1] Matching degree: Refer to standard question and answer information 1. [2] Matching degree: 0.8586; Refer to standard question and answer information 2. [3] Matching degree: 0.8512; Refer to standard question and answer information 3. [4] Matching degree: 0.8498; Refer to standard question and answer information 4.

[0091] Your answer should be as follows: Hello, the question of whether three-wheeled motorcycles need to pay vehicle purchase tax mainly involves the following aspects: (1) Three-wheeled motorcycles with a displacement of more than 150 ml are taxable vehicles and individuals need to pay vehicle purchase tax when purchasing them. (2) ... Reference questions: [1]……[2]…….

[0092] Knowledge Base: The following materials are knowledge base. {Reference standard question and answer information} User Question: The user question is as follows. {input} Reference question: The reference question is as follows, and the original text can be output: "{reference standard question and answer information in the question part}". Then replace the target question information to the "input" position in the above matching information prompt word template to generate the question answer prompt word.

[0093] In another embodiment provided in this specification, the reference knowledge prompt word template is: "Role: You are a professional tax knowledge answering expert in a tax department, with the core function of efficiently solving customer inquiries. After writing this article, you will receive two materials, including the knowledge base and user questions. Please answer user questions based on the steps described in the skills, without redundancy.

[0094] Skills: Skill 1: Related regulations: Material reference: In this part, please refer to the knowledge base materials to summarize the relevant regulations. Each regulation you output is marked with alphabetical numbers abcd. Material introduction: In the knowledge base materials you received, each part begins with a reference number, such as [x], where x is a number, which is the serial number of this section of material. The serial number is followed by the matching degree between this section of material and the user's question. Please extract the relevant regulations of the user's question from these materials. Extract regulations: In the knowledge base materials, please judge one by one. If the keywords of the user's question are hit (for example, if the user mentions small-scale taxpayers, then output all regulations about small-scale taxpayers) or there is a little relevance, output them to the relevant regulations (do not bring reference numbers). Writing requirements: The relevant regulations must be comprehensive and complete. In the knowledge base materials, some announcements or regulations contain numbers, tax rates, etc. Please output them intact to the relevant regulations. Do not repeat: Please keep the content coherent and comprehensive, and the language is neat and refined. Do not repeat the output content. Skill 2: Question answering: Material reference: In this part, please refer to the knowledge base materials and give direct answers to the user's questions. Please state your questions in paragraphs and mark them with (1)(2)(3)(4) numbers. Material introduction: In the knowledge base materials you received, each part begins with a reference number, such as [x], where x is a number that serves as the serial number of this section of material. The serial number is followed by the degree of match between this section of material and the user's question. Please extract the relevant regulations for the user's question from these materials. Writing requirements: In general, please refer to materials with extremely high or higher matching degrees to extract answers to user questions. Comprehensive answers: In user questions, please output the definite answers, and remind users that they can consult the local tax department for uncertain content. Do not repeat: Please keep the content coherent and comprehensive, and the language neat and concise. Do not repeat the content. Skill 3: Output the original text of the reference questions: The reference questions mentioned below can be output in their original text.

[0095] Answer requirements: Your answer must be correct, accurate, clearly structured, logical, and written by an expert in an impartial and professional tone. Each sentence you elaborate must have a strong basis in the knowledge base material, allowing logical reasoning to ensure the comprehensiveness of the answer. There is no limit on the number of output tokens. The overall answer needs to cover the complete and relevant content extracted from the knowledge base. Please keep the content coherent and comprehensive, the language neat and concise, and do not repeat the output content. Except for codes and specific names, your answer must be written in the same language as the question.

[0096] Answer example: User question: Do three-wheeled motorcycles need to pay vehicle purchase tax? Knowledge base: [1] Matching degree: 0.8617; refer to task knowledge information 1. [2] Matching degree: 0.8586; refer to task knowledge information 2. [3] Matching degree: 0.8512; refer to task knowledge information 3. [4] Matching degree: 0.8498; refer to task knowledge information 4. [5] Matching degree: 0.8400; refer to task knowledge information 5.

[0097] Your answer: Relevant regulations: a...b... Question answer: (1) Hello, three-wheeled motorcycles with a displacement of more than 150 ml are taxable vehicles. Individuals need to pay vehicle purchase tax when purchasing them. (2) ... Reference question: ... Knowledge Base: The following materials are knowledge base. {Reference task knowledge information} User Question: The user question is as follows. {input} Reference question: The reference question is as follows, and the original text can be output: the question part of the preset number of standard question and answer information in the standard question and answer information sorting}". Then replace the target question information with the "input" position in the above matching information prompt word template to generate the question answer prompt word.

[0098] Generating answer information through the above steps can improve the accuracy, coverage and user satisfaction of answer generation, while ensuring that the system can flexibly respond to question scenarios with different matching degrees. The purpose of filtering reference standard question and answer information or calling the task knowledge database based on the standard question and answer similarity and the number of related questions is to optimize the system's processing strategy in high-match and low-match scenarios, thereby balancing response efficiency and answer quality. By calculating the number of related questions and comparing it with the reference question and answer number threshold, it can be ensured that when the recalled standard question and answer information is sufficient, the high-quality reference standard question and answer information is directly used to generate answers.

[0099] This method effectively avoids unnecessary additional retrieval and improves the system response speed. For example, when the number of similar question and answer items recalled exceeds the preset number, the system can quickly generate answers by referring to the question and answer prompt word template to meet user needs. When the number of relevant question information is lower than the reference question and answer number threshold, the system expands to the task knowledge database for retrieval, which can make up for the problem of insufficient standard question and answer library, especially when dealing with complex or non-standardized questions. For example, when the question raised by the user fails to match enough standard questions and answers, the system can ensure the comprehensiveness and authority of the generated answers by retrieving external resources such as tax policy and regulatory documents. This mechanism improves the adaptability of the system and enables it to better handle marginal or special problem scenarios. Subsequently, the question answer prompt words are input into the question and answer model to generate answers in order to use the generation ability of the large model to comprehensively analyze the reference information and ensure the coherence and pertinence of the output answers. Whether the prompt words are generated based on the reference question and answer prompt word template or the reference knowledge prompt word template, the answer content will be further optimized through the question and answer model to meet the user's high requirements for accuracy and comprehensiveness. This process design enables the system to efficiently utilize existing resources while ensuring consistency in performance in problem scenarios of different complexity.

[0100] Furthermore, a reference knowledge prompt word template is generated according to each reference task knowledge information, including: Acquire reference knowledge quantity information based on each reference task knowledge information; In the case that the reference knowledge quantity information is greater than or equal to a preset reference knowledge quantity threshold, a reference knowledge prompt word template is generated according to each reference task knowledge information.

[0101] In practical applications, the reference knowledge quantity information is the number of knowledge items related to the target problem recalled from the task knowledge database; the reference knowledge quantity threshold is the quantity threshold for the system to judge whether the reference knowledge information is sufficient to support the generation of the answer.

[0102] The reference knowledge quantity information can be understood as the statistical results of the knowledge content related to the target problem retrieved from the task knowledge database, which reflects the system's coverage and recall ability in a specific knowledge field. For example, when a user asks "What are the specific provisions of the corporate tax preferential policies?", the system may recall 4 relevant knowledge contents from the tax law documents, such as "Preferential policies for additional deductions of R&D expenses" or "Detailed rules for tax rate adjustment of small and micro-profit enterprises". These items together constitute the reference knowledge quantity information. By counting the recalled content, the system can dynamically adjust the subsequent answer strategy.

[0103] The threshold for the number of reference knowledge can be understood as a standard threshold for judging whether the amount of reference knowledge information is sufficient to support the generation of high-quality answers. If the number of reference knowledge recalled is greater than or equal to the threshold, for example, 5, the system will consider the recalled knowledge content to be comprehensive enough, and can directly generate reference knowledge prompt word templates based on these contents to further optimize the answer generation; when the number of recalls is lower than the threshold, the system may choose to use the question-answering model to directly generate answers to avoid the quality of answers being reduced due to insufficient recalled content. For example, when a user asks a rare or non-mainstream question, if there are only 2 relevant knowledge items, the system will supplement the answer content through the generation capabilities of the large model to ensure that the user can still get a reasonable answer. Through this mechanism, the system can flexibly respond to knowledge retrieval and answer generation needs in different scenarios.

[0104] Considering that the number of questions raised by users may also be small in the target task knowledge base, the above method further includes: When the reference knowledge quantity information is less than the reference knowledge quantity threshold, the target question information is input into the question-answering model to obtain answer information generated by the question-answering model.

[0105] In order to further improve the accuracy of answer generation and further improve the user experience, in addition to directly inputting the target question information into the question and answer model to obtain the answer information generated by the question and answer model, it is also possible to generate an answer constraint prompt word template based on the recalled reference task knowledge information, and use the template and the target question information to generate question answer prompt words, and then input the question answer prompt words into the question and answer model to generate answer information.

[0106] In one embodiment provided in this specification, the answer constraint prompt word template is: “Role: You are a professional tax knowledge answering expert in a tax department, with the core function of efficiently solving customer inquiries. You will receive two materials, including the knowledge base and user questions, at the end of this article. Please answer user questions based on the steps described in the skills.

[0107] Skills: Skill 1: Problem Solving: Problem Analysis: The user's question is related to tax knowledge. Please think about what kind of tax the user's question involves and what specific question the user is asking. Your answer must be completely centered around the user's question. Material Reference: Please refer to the knowledge base materials and give a comprehensive answer to the user's question. Material Introduction: In the knowledge base materials you received, each section begins with a reference number, such as [x], where x is a number that serves as the serial number of this section of material. The serial number is followed by the matching degree between this section of material and the user's question, the question, and the answer. Please extract the relevant provisions of the user's question from these materials. Reference Requirements: Generally speaking, please refer to materials with extremely high or higher matching degrees more often to extract answers to user questions, because these materials may be more relevant to the user's question. Where digital calculations are involved, please use your mathematical genius to answer. Relevant regulations: In general, you need to refer to the knowledge base materials in a comprehensive manner. In the knowledge base materials, please judge one by one. If you hit the keywords of the user's question (for example, if the user mentions small-scale taxpayers, then output all the regulations on small-scale taxpayers; if the user asks "I have a batch of goods exported to the bonded area, is it exempt from value-added tax?", then you need to output all the special regulatory areas exempt from value-added tax) or there is a little relevance, that is, "relevant regulations", please output them organically in the answer. Comprehensive answer: When answering user questions, please give a comprehensive answer and output the confirmed answer (the content in the knowledge base materials is correct by default). For uncertain content, you can remind users to consult the local tax department. Cautious inference: When you need to draw a conclusion in the answer, please be cautious. For example, the reference material "Should the sale of 999 gold ornaments be subject to consumption tax?" does not include 999 gold ornaments as gold and silver jewelry, so you cannot draw the conclusion "For the sale of 999 gold ornaments and other gold and silver jewelry". Do not repeat: Please keep the content coherent and comprehensive, and the language neat and refined. Do not repeat the output content. Answer style: Do not output words such as "reference knowledge base materials", "based on knowledge base materials", "your answer" in the answer. Special rules: When the reference question appears "What should be done if a vehicle that is exempted from vehicle purchase tax does not meet the conditions for tax exemption?", output "Default Rule 1" as the first item (1) of the answer intactly in the answer. Skill 2: Reference questions: Original text output: In addition to the answer to the question, you also need to output the reference questions. The reference questions mentioned below can be output in their original text. Each of the reference questions ending with "?" is a reference question. Please add reference numbers [1], [2], [3], [4] to each reference question in order. There should be two line breaks between reference questions.

[0108] Answer requirements: Your answer must be correct, accurate, clearly structured, logical, and written by an expert in an impartial and professional tone. Every sentence you elaborate must have a strong basis in the knowledge base materials, allowing logical reasoning to ensure the comprehensiveness of the answer. There is no limit on the number of output tokens. The overall answer needs to cover the complete and relevant content extracted from the knowledge base. Please keep the content coherent and comprehensive, the language neat and concise, and do not repeat the output content. Except for codes and specific names, your answer must be written in the same language as the question. Do not output words such as "reference knowledge base materials", "according to knowledge base materials", "your answer:" in the answer.

[0109] Answer example: User question: Do three-wheeled motorcycles need to pay vehicle purchase tax? Knowledge base: [1] Matching degree: 0.8617; refer to task knowledge information 1. [2] Matching degree: 0.8586; refer to task knowledge information 2. [3] Matching degree: 0.8512; refer to task knowledge information 3. [4] Matching degree: 0.8498; refer to task knowledge information 4.

[0110] Your answer should be as follows: Hello, three-wheeled motorcycles with a displacement of more than 150 ml are taxable vehicles and individuals need to pay vehicle purchase tax when purchasing them. Reference questions: [1]……[2]…… Knowledge Base: The following materials are knowledge base. {Reference task knowledge information} User Question: The user question is as follows. {input} Reference question: The reference question is as follows, and the original text can be output: the question part of the preset number of standard question and answer information in the standard question and answer information sorting}". Then replace the target question information with the "input" position in the above matching information prompt word template to generate the question answer prompt word.

[0111] By presetting the reference knowledge quantity threshold to judge the generated answer information, it can effectively ensure that the system provides comprehensive and authoritative answers when the knowledge recall is sufficient, and flexibly adjust the generation strategy when the knowledge recall is insufficient to meet the answer needs in different scenarios. The setting of the reference knowledge quantity threshold enables the system to balance the accuracy and efficiency of the answers. When the recalled knowledge items reach the threshold, the answers generated based on these items have higher coverage and logic; when the recalled items are insufficient, the question-answering model is directly called to generate answers, avoiding answer deviations or user confusion caused by incomplete content. Through this mechanism, not only the quality of the answers is optimized, but also the system's adaptability in handling diverse problems is improved.

[0112] The solution of the embodiment of this specification is applied, and the efficiency and accuracy of tax consulting services are significantly improved through a two-layer judgment mechanism of similarity thresholds. When the similarity between the user's question and the standard question and answer information exceeds the first threshold, the system directly outputs the preset answer to achieve a quick response, avoiding the inefficiency of traditional manual answers. For multiple question and answer pairs recalled, when the number of similarities exceeding the second threshold reaches a certain condition, the system inputs the relevant information into the large model to generate a comprehensive answer to ensure the comprehensiveness and professionalism of the answer content. If the recall results are insufficient, the system can also expand the search from the target task knowledge base, generate prompt words in combination with the standard question and answer information, and further improve the knowledge coverage and problem-solving ability of the answer.

[0113] See also Figure 2 , Figure 2 A flow chart of a tax knowledge question and answer method provided according to an embodiment of this specification is shown, which specifically includes the following steps.

[0114] Step 202: Obtain target tax question information and a standard question and answer database, wherein the standard question and answer database includes at least one standard question and answer information.

[0115] Step 204: Generate a standard question and answer similarity corresponding to each standard question and answer information, wherein the standard question and answer similarity is the similarity between the standard question and answer information and the target tax question information.

[0116] Step 206: Generate tax answer information corresponding to the question information based on the standard question and answer similarities corresponding to each standard question and answer information, as well as a preset first similarity threshold and a preset second similarity threshold, wherein the first similarity threshold is used to determine whether the target tax question information matches the standard question and answer information, and the second similarity threshold is used to determine whether the target tax question information is related to the standard question and answer information.

[0117] In actual applications, the target tax question information is the specific question expression generated after processing the tax-related questions raised by the user; the tax answer information is the targeted answer content generated by the system based on the target tax question information, which aims to meet the user's consulting needs on tax issues.

[0118] The target tax question information can be understood as the standardized expression of the tax question input by the user after intention recognition and question rewriting, which is used to clarify the user's consultation intention. For example, the user may ask "What are the preferential policies for corporate income tax?" The system will process it into the form of "What are the specific contents of the corporate income tax preferential policies?" through the question rewriting module, making the question expression clearer and more suitable for subsequent retrieval and matching. At the same time, the target tax question information can also combine the context and standard question and answer records to provide a more precise expression for complex questions, which helps to improve the accuracy of the system response.

[0119] Tax answer information can be understood as a complete answer generated by the system based on the target tax question information. It can be an answer directly matched from the standard question and answer information, or it can be an answer generated by integrating multi-source information. For example, for the target tax question "What are the preferential policies for corporate income tax?" the system may directly output a matching standard question and answer answer, such as "Corporate income tax preferential policies include additional deductions for R&D expenses, tax exemptions for small and micro-profit enterprises, etc." If the relevant questions are not fully matched, the system can extract content from tax policy and regulatory documents and generate a more comprehensive answer in combination with prompt words to ensure that the answer content covers the core points that users care about and is sufficiently professional and logical. This mechanism can adapt to diverse user needs and improve the performance of the system in actual application scenarios.

[0120] The above is a schematic scheme of a tax knowledge question and answer method of this embodiment. It should be noted that the technical scheme of the tax knowledge question and answer method and the technical scheme of the automatic question and answer method mentioned above are of the same concept. For details not described in detail in the technical scheme of the question and answer method applied to the cloud device, please refer to the description of the technical scheme of the automatic question and answer method mentioned above.

[0121] The scheme of the embodiment of this specification is applied to effectively improve the response efficiency and answer accuracy of the tax knowledge question and answer system by utilizing a multi-layer judgment mechanism of similarity thresholds. Based on the first similarity threshold, when the similarity between the target tax question and a certain standard question and answer information meets the conditions, the preset answer is directly output, thereby quickly meeting user needs and avoiding the inefficiency caused by the lengthy manual answer process. When the similarity of multiple standard question and answer information exceeds the second similarity threshold and the number reaches the set standard, the system integrates these relevant information to generate a comprehensive answer to ensure that the answer content covers a wider range of knowledge and has a higher degree of professionalism. When the relevance of standard question and answer information is insufficient, by further expanding the retrieval mechanism, supplementary information is extracted from the target task knowledge base and combined with the existing standard questions and answers to generate prompt words, which significantly improves the flexibility and knowledge coverage of the system. This design not only meets the needs of answering complex tax issues, but also dynamically adapts to changes in different problem scenarios, providing users with more accurate and comprehensive answer support.

[0122] Corresponding to the above method embodiments, this specification also provides a tax knowledge question and answer method embodiment applied to a cloud device, see Figure 3 , Figure 3 A flowchart of a tax knowledge question and answer method applied to a cloud device provided according to an embodiment of the present specification is shown, which specifically includes the following steps.

[0123] Step 302: receiving a tax knowledge answer request sent by a terminal-side device, and acquiring target tax question information and a standard question and answer library according to the tax knowledge answer request, wherein the standard question and answer library includes at least one standard question and answer information.

[0124] Step 304: Generate a standard question and answer similarity corresponding to each standard question and answer information, wherein the standard question and answer similarity is the similarity between the standard question and answer information and the target tax question information.

[0125] Step 306: Generate tax answer information corresponding to the question information based on the standard question and answer similarities corresponding to each standard question and answer information, as well as a preset first similarity threshold and a preset second similarity threshold, and send the tax answer information to the terminal side device, wherein the first similarity threshold is used to determine whether the target tax question information matches the standard question and answer information, and the second similarity threshold is used to determine whether the target tax question information is related to the standard question and answer information.

[0126] In actual applications, cloud devices are hardware and software systems deployed on remote servers for performing complex calculations and data storage; end-side devices are terminal devices directly operated by users, such as mobile phones, tablets or computers, which are used to send requests to the system and receive results.

[0127] Cloud devices can be understood as core computing platforms that run complex algorithms and store large amounts of data. They are usually used to carry high-load tasks such as question-answering models and similarity calculations. In the tax knowledge question-answering system, cloud devices receive tax question requests sent by end-side devices, and complete question rewriting, intent recognition, similarity calculation and other steps by calling large-scale language models and knowledge bases. For example, when a user submits a query request for "corporate tax incentives" through a mobile phone, the cloud device retrieves matching data from the question-answering library and the regulatory database, generates answers after comprehensive analysis and returns them to the user. Cloud devices are characterized by strong computing power and large storage capacity, and are suitable for processing massive user requests and highly complex problems.

[0128] The end-side device can be understood as a device that interacts directly with the user, used to input questions and receive answers. The main function of the end-side device is to provide a user-friendly operation interface and support multiple input methods such as voice and text. For example, a user enters the question "How do I declare personal income tax?" through a mobile app, and the end-side device sends the request to the cloud device to receive and display the answer. End-side devices are usually lightweight and mainly rely on the computing power of cloud devices. The advantage is that they can provide users with fast and convenient question-and-answer services when hardware performance is limited. This design not only reduces the computing burden of the terminal device, but also improves the response efficiency and user experience of the overall system.

[0129] The above is a schematic scheme of a tax knowledge question and answer method applied to a cloud device in this embodiment. It should be noted that the technical scheme of the tax knowledge question and answer method applied to the cloud device belongs to the same concept as the technical scheme of the tax knowledge question and answer method described above. For details not described in detail in the technical scheme of the tax knowledge question and answer method applied to the cloud device, please refer to the description of the technical scheme of the tax knowledge question and answer method described above.

[0130] By applying the scheme of the embodiments of this specification, the system can efficiently respond to user needs by receiving the tax knowledge answer request sent by the terminal device and obtaining the target question information and standard question and answer information. By using the standard question and answer similarity generation process and the preset dual similarity threshold, the system can accurately match and judge the relevance of the target question and the standard question and answer information. When the similarity exceeds the first threshold, the matching preset answer can be directly output, which significantly improves the response speed and accuracy; and when the second threshold relevance condition is met, the answer generated by comprehensive analysis of multiple standard question and answer information ensures the completeness and professionalism of the answer, which adapts to complex and diverse tax problem scenarios.

[0131] When the standard question and answer information recall results are insufficient, the information of the target question is expanded and retrieved, and the prompt word generation technology is used to generate highly relevant tax answers and return them to the terminal device, realizing the efficient use of multi-source knowledge. The deployment architecture based on cloud devices further optimizes the efficiency of system resource utilization and knowledge coverage, which not only meets the real-time answer needs of users for diverse questions, but also avoids the efficiency bottleneck in traditional manual tax services, and comprehensively improves the service quality and user experience.

[0132] See also Figure 4 , Figure 4 The structure diagram of a tax knowledge question and answer system provided by an embodiment of the present specification is shown. The tax knowledge question and answer system may include a client 100 and a server 200; The client 100 is used to send a tax knowledge answer request to the server 200; The server 200 is used to receive the tax knowledge answer request sent by the terminal device, and obtain the target tax question information and the standard question and answer library according to the tax knowledge answer request, wherein the standard question and answer library includes at least one standard question and answer information; generate the standard question and answer similarity corresponding to each standard question and answer information, wherein the standard question and answer similarity is the similarity between the standard question and answer information and the target tax question information; based on the standard question and answer similarity corresponding to each standard question and answer information, and a preset first similarity threshold and a preset second similarity threshold, generate the tax answer information corresponding to the question information, wherein the first similarity threshold is used to determine whether the target tax question information matches the standard question and answer information, and the second similarity threshold is used to determine whether the target tax question information is related to the standard question and answer information; send the tax answer information to the client 100; The client 100 is also used to receive the tax answer information sent by the server 200.

[0133] By applying the scheme of the embodiment of this specification, the efficient processing capability of the tax knowledge question and answer system is realized through the division of labor and cooperation between the client and the server in the architecture. The client is responsible for sending the tax knowledge answer request and receiving the answer information generated by the server. This task division reduces the computing burden of the terminal device and improves the flexibility and real-time performance of request processing. Based on the received request, the server uses the similarity analysis of the target question information and the standard question and answer information, combined with the double similarity threshold for accurate judgment. When the matching degree reaches the preset conditions, highly relevant tax answer information can be quickly generated and returned to the client, thereby significantly improving the response efficiency. On the server side, the information processing for the target question adopts a combination of similarity calculation and multi-layer threshold judgment, which not only ensures the accuracy and completeness of the answer, but also adapts to tax issues of different complexity by dynamically adjusting the answer strategy. In addition, the design of the server returning the processing results to the client optimizes the resource utilization efficiency of the system, so that users can still enjoy real-time and accurate tax knowledge services under lower device performance conditions. Through the collaborative operation of the client and the server, the architecture further improves the overall performance and user experience of the system, and effectively solves the bottleneck problem of traditional tax services in efficiency and accuracy.

[0134] The tax knowledge question and answer system may include multiple clients 100 and a server 200, wherein the client 100 may be referred to as a client-side device and the server 200 may be referred to as a cloud-side device. Multiple clients 100 may establish a communication connection through the server 200. In the tax knowledge question and answer scenario, the server 200 is used to provide tax knowledge question and answer services between multiple clients 100. Multiple clients 100 may serve as a sender or a receiver, respectively, and realize communication through the server 200.

[0135] The user can interact with the server 200 through the client 100 to receive data sent by other clients 100, or send data to other clients 100, etc. In the tax knowledge question and answer scenario, the user can publish a data stream to the server 200 through the client 100, and the server 200 generates tax answer information based on the data stream and pushes the tax answer information to other clients that have established communication.

[0136] The client 100 and the server 200 are connected via a network. The network provides a medium for a communication link between the client 100 and the server 200. The network may include various connection types, such as wired or wireless communication links or optical fiber cables, etc. The data transmitted by the client 100 may need to be encoded, transcoded, compressed, etc. before being released to the server 200.

[0137] The client 100 can be a browser, an APP (Application), or a web application such as an H5 (HyperText Markup Language 5, Hypertext Markup Language Version 5) application, or a light application (also known as a mini-program, a lightweight application) or a cloud application, etc. The client 100 can be based on the software development kit (SDK, Software Development Kit) of the corresponding service provided by the server 200, such as based on the real-time communication (RTC, Real Time Communication) SDK development and acquisition. The client 100 can be deployed in an electronic device and needs to rely on the device to run or some APPs in the device to run. For example, the electronic device can have a display screen and support information browsing, such as a personal mobile terminal such as a mobile phone, a tablet computer, a personal computer, etc. Various other types of applications can also be configured in the electronic device, such as human-computer dialogue applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0138] The server 200 may include servers that provide various services, such as servers that provide communication services to multiple clients, servers for background training that support models used on clients, and servers that process data sent by clients. It should be noted that the server 200 can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. The server can also be a server of a distributed system, or a server combined with a blockchain. The server can also be a cloud server for basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDN, Content Delivery Network), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.

[0139] It is worth noting that the tax knowledge question and answer method provided in the embodiments of this specification is generally executed by the server, but in other embodiments of this specification, the client may also have similar functions to the server, thereby executing the tax knowledge question and answer method provided in the embodiments of this specification. In other embodiments, the tax knowledge question and answer method provided in the embodiments of this specification may also be jointly executed by the client and the server.

[0140] The following combination Figure 5 Taking the application of the automatic question-and-answer method provided in this specification in a tax assistant as an example, the automatic question-and-answer method is further explained. Figure 5 A processing flow chart of a tax assistant method provided in one embodiment of the present specification is shown, which specifically includes the following steps.

[0141] Step 502: Receive a tax question answer request and obtain initial question information in the question answer request.

[0142] Step 504: Input the initial question information into a question rewriting model including a multi-round rewriting module and a knowledge rewriting module to obtain reference question information.

[0143] Step 506: Input the reference question information into the intent recognition model to obtain the question intent generated by the intent recognition model.

[0144] Step 508: Determine whether the question intent is indistinguishable, if so, execute step 510, if not, execute step 512.

[0145] Step 510: Generate question inquiry prompt words based on the above reference question information and various standard question and answer information, and input the above question inquiry prompt words into the question and answer model to obtain answer information generated by the question and answer model.

[0146] Step 512: Determine whether the question intention is task consultation intention, if not, execute step 514, if yes, execute step 516.

[0147] Step 514: Input the reference question information into the question-answering model to obtain the answer information generated by the question-answering model.

[0148] Step 516: Input the reference question information into the knowledge rewriting module to generate target question information, and input the target question information into the knowledge question encoding model to obtain the target question feature information generated by the knowledge question encoding model.

[0149] Step 518: Based on the target question feature information and the standard question and answer feature information corresponding to each standard question and answer information, obtain the feature similarity information of each standard question and answer information with respect to the reference question information, and based on the target question information and each standard question and answer information, obtain the text similarity information of each standard question and answer information with respect to the reference question information.

[0150] Step 520: Based on the text similarity information of the feature similarity information of each standard question and answer information, generate the standard question and answer similarity of each standard question and answer information with respect to the target question information.

[0151] Step 522: Determine whether there is standard question and answer information whose standard question and answer similarity is greater than or equal to the first similarity threshold. If so, execute step 524; if not, execute step 526.

[0152] Step 524: determine the standard question and answer information ranked first in descending order of standard question and answer similarity as the target standard question and answer information, and determine the answer information in the standard question and answer information as the answer information of the target question information.

[0153] Step 526: Determine whether the number of standard question and answer information whose standard question and answer similarity is greater than or equal to the second similarity threshold is greater than or equal to the reference question and answer number threshold; if so, execute step 528; if not, execute step 530.

[0154] Step 528: Obtain standard question and answer information whose standard question and answer similarity is greater than or equal to the second similarity threshold as reference standard question and answer information, generate question answer prompt words according to each reference standard question and answer information and target question information, and input the question answer prompt words into the question and answer model to obtain answer information generated by the question and answer model.

[0155] Step 530: Obtain at least one reference task knowledge information for the target problem information in the task knowledge database.

[0156] Step 532: Determine whether the amount of reference task knowledge information is greater than or equal to the reference question and answer quantity threshold. If so, execute step 534; if not, execute step 536.

[0157] Step 534: Generate question answer prompt words based on the reference task knowledge information and the target question information, and input the question answer prompt words into the question-answering model to obtain answer information generated by the question-answering model.

[0158] Step 536: Input the target question information into the question-answering model to obtain the answer information generated by the question-answering model.

[0159] By applying the solution of the embodiments of this specification, through the introduction of multi-round rewriting modules and knowledge rewriting modules, in-depth processing and efficient rewriting of the user's initial question information are achieved, so that the system can more accurately identify the user's true intention. Combined with the judgment logic of the intent recognition model, the system dynamically adjusts the subsequent processing flow according to the complexity and type of the question, ensuring the pertinence and accuracy of the answer content. When the intention of the question cannot be distinguished, the user's needs are further clarified by generating question inquiry prompts, which improves the flexibility of problem handling; and for questions that are clearly intended for task consultation, the system can obtain more accurate answer information through the generation of target question information and feature extraction of the knowledge question encoding model.

[0160] In the similarity judgment phase, the system screens and sorts the standard question and answer information in multiple dimensions through the combined calculation of feature similarity and text similarity. When the first similarity threshold condition is met, the matching answer information is directly output; for multiple standard question and answer information that meet the second similarity threshold condition, the system generates prompt words through reference questions and answers, and generates comprehensive answers in combination with the target question information to ensure the integrity and professionalism of the content. If the matching degree is insufficient, the system can further expand to the task knowledge database to obtain reference knowledge information, and enrich the answer content by dynamically generating prompt words, which effectively solves the problem of insufficient adaptability of traditional question and answer systems in complex scenarios, while improving the user experience and the overall efficiency of problem handling.

[0161] Corresponding to the above method embodiment, this specification also provides an automatic question-answering device embodiment, Figure 6 FIG. 1 shows a schematic diagram of the structure of an automatic question-answering device provided by an embodiment of this specification. Figure 6 As shown, the device comprises: The question acquisition module 602 is configured to acquire target question information and a standard question and answer library, wherein the standard question and answer library includes at least one standard question and answer information; A similarity calculation module 604 is configured to generate a standard question and answer similarity corresponding to each standard question and answer information, wherein the standard question and answer similarity is the similarity between the standard question and answer information and the target question information; The answer generation module 606 is configured to generate answer information corresponding to the question information based on the standard question and answer similarities corresponding to each standard question and answer information, as well as a preset first similarity threshold and a preset second similarity threshold, wherein the first similarity threshold is used to determine whether the target question information matches the standard question and answer information, and the second similarity threshold is used to determine whether the target question information is related to the standard question and answer information.

[0162] Optionally, the question acquisition module 602 is further configured to: receiving a question answering request, wherein the question answering request carries initial question information; Inputting the initial question information into a question rewriting model to obtain reference question information generated by the question rewriting model; Target question information is acquired based on the reference question information, wherein the reference question information is a question expression optimized by a question rewriting model, and the target question information is a question expression related to a target task.

[0163] Optionally, the question acquisition module 602 is further configured to: Inputting the reference question information into an intention judgment model to obtain the question intention generated by the intention judgment model; In a case where the question intention is a target task consultation intention, target question information is generated based on the reference question information.

[0164] Optionally, the automatic question-answering device further includes an inquiry module configured to: In the case where the question intention is indistinguishable, generating a question inquiry prompt word based on the reference question information and each standard question and answer information, and inputting the question inquiry prompt word into a question and answer model to obtain answer information generated by the question and answer model, wherein the question intention being indistinguishable indicates that the reference question information is incomplete; When the question intention is identifiable and is not the target task consultation intention, the reference question information is input into the question-answering model to obtain the answer information generated by the question-answering model.

[0165] Optionally, the similarity calculation module 604 is further configured to: Inputting the target question information into the knowledge question encoding model to obtain the target question feature information generated by the knowledge matching model; Standard question and answer feature information corresponding to each standard question and answer information is obtained, and based on the target question feature information and the standard question and answer feature information corresponding to each standard question and answer information, a standard question and answer similarity corresponding to each standard question and answer information is generated.

[0166] Optionally, the answer generation module 606 is further configured to: Obtaining standard question and answer information sequence information based on the similarity of each standard question and answer; When the similarity of any standard question and answer is greater than or equal to the first similarity threshold, determining target standard question and answer information in each standard question and answer information based on the standard question and answer information sequence information, and generating answer information corresponding to the question information according to the target standard question and answer information; When the similarities of each standard question and answer are less than the first similarity threshold, answer information corresponding to the question information is generated based on the standard question and answer similarities corresponding to each standard question and answer information, the standard question and answer information sequence information and the second similarity threshold.

[0167] Optionally, the answer generation module 606 is further configured to: Acquire relevant question quantity information according to each piece of standard question and answer information and the second similarity threshold, wherein the relevant question quantity information is the number of standard question and answer information whose standard question and answer similarity is greater than or equal to the second similarity; In the case where the number of related questions is greater than or equal to a preset reference question and answer number threshold, at least one reference standard question and answer information is determined in each standard question and answer information based on the number of related questions information and the standard question and answer information sequence information, and a reference question and answer prompt word template is generated according to each reference standard question and answer information; a question answer prompt word is generated based on the target question information and the reference knowledge prompt word template; When the number of related questions is less than the reference question and answer number threshold, obtaining at least one reference task knowledge information in the task knowledge database based on the target question information, and generating a reference knowledge prompt word template according to each reference task knowledge information; generating a question answer prompt word based on the target question information and the reference knowledge prompt word template; The question answer prompt words are input into the question-answering model to obtain the answer information generated by the question-answering model.

[0168] Optionally, the answer generation module 606 is further configured to: Acquire reference knowledge quantity information based on each reference task knowledge information; In the case that the reference knowledge quantity information is greater than or equal to a preset reference knowledge quantity threshold, a reference knowledge prompt word template is generated according to each reference task knowledge information.

[0169] Optionally, the automatic question-answering device further includes a default answer module configured to: When the reference knowledge quantity information is less than the reference knowledge quantity threshold, the target question information is input into the question-answering model to obtain answer information generated by the question-answering model.

[0170] The above is a schematic scheme of an automatic question-answering device of this embodiment. It should be noted that the technical scheme of the automatic question-answering device and the technical scheme of the automatic question-answering method described above are of the same concept, and the details not described in detail in the technical scheme of the automatic question-answering device can be found in the description of the technical scheme of the automatic question-answering method described above.

[0171] By applying the solution of the embodiment of this specification, accurate processing and efficient answers to user questions are achieved through a modular automatic question-answering device architecture. The question acquisition module receives question answering requests and rewrites and identifies the intent of the initial question information, ensuring that the system can accurately capture the core intent of the user's question and provides a reliable basis for subsequent processing. The similarity calculation module combines the target question feature information with the standard question and answer feature information to generate a multi-dimensional similarity judgment result, thereby achieving accurate matching and correlation analysis of the target question and standard question and answer information. This multi-level similarity calculation enhances the system's processing capabilities in complex problem scenarios.

[0172] The answer generation module uses a dual similarity threshold judgment mechanism to dynamically choose to directly generate answers or further call the knowledge database for extended retrieval based on the matching results. For situations that meet the first similarity threshold, the system quickly outputs preset answers to achieve efficient response; for situations that meet the second similarity threshold but require comprehensive analysis, the system generates prompt word templates and inputs them into the question-and-answer model to ensure the completeness and professionalism of the answers. When relevant information is insufficient, the device can also dynamically generate prompt words based on the knowledge database to further enrich the answer content. In addition, the introduction of the default answer module provides reasonable default answers when answer generation fails or data is insufficient, which improves the robustness of the system and user experience. The overall architecture significantly optimizes the efficiency and accuracy of question-and-answer systems, and solves the problem of insufficient adaptability of traditional question-and-answer systems to complex and diverse questions.

[0173] Corresponding to the above method embodiment, this specification also provides a tax knowledge question and answer device embodiment, Figure 7 FIG. 1 shows a schematic diagram of the structure of a tax knowledge question-and-answer device provided by an embodiment of this specification. Figure 7 As shown, the device comprises: The tax question acquisition module 702 is configured to acquire target tax question information and a standard question and answer library, wherein the standard question and answer library includes at least one standard question and answer information; A similarity calculation module 704 is configured to generate a standard question and answer similarity corresponding to each standard question and answer information, wherein the standard question and answer similarity is the similarity between the standard question and answer information and the target tax question information; The answer generation and acquisition module 706 is configured to generate tax answer information corresponding to the question information based on the standard question and answer similarities corresponding to each standard question and answer information, as well as a preset first similarity threshold and a preset second similarity threshold, wherein the first similarity threshold is used to determine whether the target tax question information matches the standard question and answer information, and the second similarity threshold is used to determine whether the target tax question information is related to the standard question and answer information.

[0174] The above is a schematic scheme of a tax knowledge question and answer device of this embodiment. It should be noted that the technical scheme of the tax knowledge question and answer device and the technical scheme of the above tax knowledge question and answer method belong to the same concept, and the details not described in detail in the technical scheme of the tax knowledge question and answer device can be referred to the description of the technical scheme of the above tax knowledge question and answer method.

[0175] By applying the scheme of the embodiment of this specification, the efficiency and accuracy of tax question answering are effectively improved through a modularly designed tax knowledge question and answer device. The tax question acquisition module can extract the target question information and related standard question and answer information, laying the foundation for subsequent processing. The similarity calculation module uses the similarity analysis between the target question information and the standard question and answer information, combined with the first and second similarity thresholds, to achieve accurate judgment of the matching and relevance of the questions. This design not only ensures the rapid generation of answers in highly matched situations, but also generates more comprehensive and professional answers through comprehensive analysis when multiple related standard question and answer information exist.

[0176] When the standard question and answer information is insufficient to directly generate answers, the answer generation module further enriches the answer content by dynamically expanding the search and combining the multi-source knowledge database. This mechanism enhances the system's adaptability to complex scenarios, avoids answer bias caused by insufficient knowledge coverage, and provides supplementary answer generation support when matching conditions are insufficient. The overall device meets the diverse needs of users in different scenarios through efficient collaboration between modules, and provides a comprehensive, flexible and accurate solution for tax problem solving.

[0177] Figure 8 The structure block diagram of a computing device 800 provided according to an embodiment of the present specification is shown. The components of the computing device 800 include but are not limited to a memory 810 and a processor 820. The processor 820 is connected to the memory 810 via a bus 830, and the database 850 is used to store data.

[0178] The computing device 800 also includes an access device 840 that enables the computing device 800 to communicate via one or more networks 860. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 840 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).

[0179] In one embodiment of the present specification, the above components of the computing device 800 and Figure 8 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 8 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0180] The computing device 800 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 800 may also be a mobile or stationary server.

[0181] Among them, the processor 820 is used to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the above-mentioned automatic question-and-answer method, tax knowledge question-and-answer method, and tax knowledge question-and-answer method applied to cloud devices.

[0182] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the automatic question-and-answer method, the tax knowledge question-and-answer method, and the tax knowledge question-and-answer method applied to a cloud device belong to the same concept. For details not described in detail in the technical scheme of the computing device, please refer to the description of the technical scheme of the automatic question-and-answer method, the tax knowledge question-and-answer method, and the tax knowledge question-and-answer method applied to a cloud device.

[0183] An embodiment of the present specification also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned automatic question-and-answer method, tax knowledge question-and-answer method, and tax knowledge question-and-answer method applied to a cloud device.

[0184] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the automatic question-and-answer method, the tax knowledge question-and-answer method, and the tax knowledge question-and-answer method applied to a cloud device belong to the same concept. For details not described in detail in the technical scheme of the storage medium, please refer to the description of the technical scheme of the automatic question-and-answer method, the tax knowledge question-and-answer method, and the tax knowledge question-and-answer method applied to a cloud device.

[0185] An embodiment of the present specification also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned automatic question-and-answer method, the tax knowledge question-and-answer method, and the tax knowledge question-and-answer method applied to a cloud device.

[0186] The above is an illustrative solution of a computer program of this embodiment. It should be noted that the technical solution of the computer program and the technical solutions of the automatic question-and-answer method, the tax knowledge question-and-answer method, and the tax knowledge question-and-answer method applied to a cloud device are of the same concept. For details not described in detail in the technical solution of the computer program, please refer to the description of the technical solutions of the automatic question-and-answer method, the tax knowledge question-and-answer method, and the tax knowledge question-and-answer method applied to a cloud device.

[0187] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0188] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0189] It should be noted that, for the convenience of description, the aforementioned method embodiments are all described as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0190] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0191] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.

Claims

1. An automatic question answering method, comprising: Acquire target question information and a standard question and answer library, wherein the standard question and answer library includes at least one standard question and answer information; Generate a standard question and answer similarity corresponding to each standard question and answer information, wherein the standard question and answer similarity is the similarity between the standard question and answer information and the target question information; Based on the standard question and answer similarities corresponding to each standard question and answer information, and a preset first similarity threshold and a preset second similarity threshold, answer information corresponding to the question information is generated, wherein the first similarity threshold is used to determine whether the target question information matches the standard question and answer information, and the second similarity threshold is used to determine whether the target question information is related to the standard question and answer information.

2. The method according to claim 1, obtaining target problem information, comprising: receiving a question answering request, wherein the question answering request carries initial question information; Inputting the initial question information into a question rewriting model to obtain reference question information generated by the question rewriting model; Target question information is acquired based on the reference question information, wherein the reference question information is a question expression optimized by a question rewriting model, and the target question information is a question expression related to a target task.

3. The method according to claim 2, obtaining target question information based on the reference question information, comprising: Inputting the reference question information into an intention judgment model to obtain the question intention generated by the intention judgment model; In a case where the question intention is a target task consultation intention, target question information is generated based on the reference question information.

4. The method according to claim 3, after inputting the reference question information into the intention judgment model to obtain the question intention generated by the intention judgment model, the method further comprises: In the case where the question intention is indistinguishable, generating a question inquiry prompt word based on the reference question information and each standard question and answer information, and inputting the question inquiry prompt word into a question and answer model to obtain answer information generated by the question and answer model, wherein the question intention being indistinguishable indicates that the reference question information is incomplete; When the question intention is identifiable and is not the target task consultation intention, the reference question information is input into the question-answering model to obtain the answer information generated by the question-answering model.

5. The method according to any one of claims 1 to 4, generating the standard question and answer similarity corresponding to each standard question and answer information, comprising: Inputting the target question information into the knowledge question encoding model to obtain the target question feature information generated by the knowledge matching model; Standard question and answer feature information corresponding to each standard question and answer information is obtained, and based on the target question feature information and the standard question and answer feature information corresponding to each standard question and answer information, a standard question and answer similarity corresponding to each standard question and answer information is generated.

6. The method according to any one of claims 1 to 4, generating answer information corresponding to the question information based on the standard question and answer similarity corresponding to each standard question and answer information, and a preset first similarity threshold and a preset second similarity threshold, comprising: Obtaining standard question and answer information sequence information based on the similarity of each standard question and answer; When the similarity of any standard question and answer is greater than or equal to the first similarity threshold, determining target standard question and answer information in each standard question and answer information based on the standard question and answer information sequence information, and generating answer information corresponding to the question information according to the target standard question and answer information; When the similarities of each standard question and answer are less than the first similarity threshold, answer information corresponding to the question information is generated based on the standard question and answer similarities corresponding to each standard question and answer information, the standard question and answer information sequence information and the second similarity threshold.

7. The method according to claim 6, generating answer information corresponding to the question information based on the standard question and answer similarity corresponding to each standard question and answer information, the standard question and answer information sequence information and the second similarity threshold, comprising: Acquire relevant question quantity information according to each piece of standard question and answer information and the second similarity threshold, wherein the relevant question quantity information is the number of standard question and answer information whose standard question and answer similarity is greater than or equal to the second similarity; In the case where the number of related questions is greater than or equal to a preset reference question and answer number threshold, at least one reference standard question and answer information is determined in each standard question and answer information based on the number of related questions information and the standard question and answer information sequence information, and a reference question and answer prompt word template is generated according to each reference standard question and answer information; a question answer prompt word is generated based on the target question information and the reference question and answer prompt word template; When the number of related questions is less than the reference question and answer number threshold, obtaining at least one reference task knowledge information in the task knowledge database based on the target question information, and generating a reference knowledge prompt word template according to each reference task knowledge information; generating a question answer prompt word based on the target question information and the reference knowledge prompt word template; The question answer prompt words are input into the question-answering model to obtain the answer information generated by the question-answering model.

8. The method according to claim 7, generating a reference knowledge prompt word template according to each reference task knowledge information, comprising: Acquire reference knowledge quantity information based on each reference task knowledge information; In the case that the reference knowledge quantity information is greater than or equal to a preset reference knowledge quantity threshold, a reference knowledge prompt word template is generated according to each reference task knowledge information.

9. The method of claim 8, further comprising: When the reference knowledge quantity information is less than the reference knowledge quantity threshold, the target question information is input into the question-answering model to obtain answer information generated by the question-answering model.

10. A tax knowledge question and answer method, comprising: Acquire target tax question information and a standard question and answer library, wherein the standard question and answer library includes at least one standard question and answer information; Generate a standard question and answer similarity corresponding to each standard question and answer information, wherein the standard question and answer similarity is the similarity between the standard question and answer information and the target tax question information; Based on the standard question and answer similarities corresponding to each standard question and answer information, and a preset first similarity threshold and a preset second similarity threshold, the tax answer information corresponding to the question information is generated, wherein the first similarity threshold is used to determine whether the target tax question information matches the standard question and answer information, and the second similarity threshold is used to determine whether the target tax question information is related to the standard question and answer information.

11. A tax knowledge question and answer method, applied to a cloud device, comprising: The receiving end-side device sends a tax knowledge answer request, and acquires target tax question information and a standard question and answer library according to the tax knowledge answer request, wherein the standard question and answer library includes at least one standard question and answer information; Generate a standard question and answer similarity corresponding to each standard question and answer information, wherein the standard question and answer similarity is the similarity between the standard question and answer information and the target tax question information; Based on the standard question and answer similarities corresponding to each standard question and answer information, as well as a preset first similarity threshold and a preset second similarity threshold, tax answer information corresponding to the question information is generated, and the tax answer information is sent to the end-side device, wherein the first similarity threshold is used to determine whether the target tax question information matches the standard question and answer information, and the second similarity threshold is used to determine whether the target tax question information is related to the standard question and answer information.

12. A computing device comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer program / instructions are executed by the processor, the steps of the method described in any one of claims 1 to 11 are implemented.

13. A computer-readable storage medium storing a computer program / instruction, wherein the computer program / instruction, when executed by a processor, implements the steps of the method according to any one of claims 1 to 11.

14. A computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Medical field intention recognition method, device and equipment and storage medium

    CN112035637A

  • Question and answer interaction method and device, electronic equipment and storage medium

    CN117332067A

  • Electronic equipment, interactive knowledge acquisition method of electronic equipment and interactive system

    CN117807196A

  • Intelligent question answering method and system based on large model and knowledge base

    CN118170878A

  • Interactive question answering method, computer equipment, storage medium and program product

    CN118312581A

Cited By

  • Question and answer method and device based on large model, storage medium and electronic equipment

    CN119848222A

  • Question and answer dialogue method, system and device

    CN121255977A

  • Intelligent tax affair question-answering system integrating mixed retrieval and multi-round dialogue

    CN122311427A