Intelligent question and answer method and device, electronic equipment and storage medium

By constructing a professional word interpretation library and rewriting user input problems, the problem of inaccurate user input problems in the vertical field is solved, and the accuracy of knowledge retrieval and the accuracy of reply in the question-and-answer system are improved.

CN119322820AActive Publication Date: 2025-01-17BEIJING FACE WALL INTELLIGENT TECHNOLOGY CO LTD

Patent Information

Application Number
CN202411395266.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-01-17
Estimated Expiration
2044-10-08

AI Technical Summary

Technical Problem

In the vertical field, the user input problems are relatively arbitrary, which makes the keywords unable to accurately recall relevant knowledge, which in turn leads to inaccurate replies generated by the question-and-answer system.

Method used

By building a professional word interpretation library, obtaining the user's original input problems and performing matching searches, determining the target professional words and their interpretations, rewriting the user input problems, making them closer to the expression of the knowledge base, and thus searching in the knowledge base to generate replies content.

Benefits of technology

Improve the accuracy of knowledge retrieval and ensure that large language models generate more accurate replies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119322820A_ABST
    Figure CN119322820A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent question answering method and device, electronic equipment and a storage medium, and relates to the technical field of artificial intelligence. The method comprises the steps of obtaining an original input question of a user, and performing matching retrieval on the original input question in a pre-constructed professional word explanation library to obtain a target professional word matched with the original input question and an explanation of the target professional word; according to the target professional word and the explanation of the target professional word, rewriting the original input question to obtain a target input question; and performing knowledge retrieval in a pre-constructed knowledge base according to the target input question, and generating reply content for the user according to a retrieval result. According to the method, the original input question of the user is rewritten based on the professional words and explanations thereof, so that the rewritten input question and the text in the knowledge base have co-occurrence words more easily, the knowledge retrieval effect can be improved, and the accuracy of the reply content generated by the intelligent question and answer is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an intelligent question-answering method, device, electronic device and storage medium. Background Art

[0002] A large language model refers to a natural language processing model with large scale and many parameters that is trained using deep learning technology. Such models are usually based on a neural network architecture, which includes billions or even tens of billions of parameters, enabling them to learn and understand complex structures and semantic relationships in natural language. The training of large language models usually relies on a large-scale text corpus to improve the model's ability to understand and generate language. In recent years, large language models have been widely used in question-answering systems, in which relevant knowledge is mainly recalled based on the keywords included in the user's original input question, and then the large language model generates the reply content based on the recalled relevant knowledge. However, this question-answering system has certain shortcomings: in vertical fields, users' input questions are relatively random, and the keywords included in them cannot accurately recall key knowledge, resulting in inaccurate final reply content. Summary of the invention

[0003] The present invention provides an intelligent question-answering method, device, electronic equipment and storage medium.

[0004] According to another aspect of the present invention, there is provided an intelligent question-answering method, comprising:

[0005] Obtaining the user's original input question, and performing a matching search on the original input question in a pre-built professional term interpretation library to obtain a target professional term matching the original input question and an interpretation of the target professional term;

[0006] According to the target professional terms and the explanations of the target professional terms, the original input question is rewritten to obtain a target input question;

[0007] Knowledge retrieval is performed in a pre-constructed knowledge base according to the target input question, and reply content is generated for the user according to the retrieval results; wherein the professional term explanation library and the knowledge base are both constructed based on professional documents in vertical fields.

[0008] Optionally, the process of constructing the professional term interpretation library includes:

[0009] Perform document parsing and document segmentation on the professional documents in the vertical field to obtain multiple knowledge texts;

[0010] Extracting professional terms from each piece of the knowledge text, and interpreting the professional terms according to the context associated with the professional terms, to obtain a plurality of the professional terms and an explanation of each professional term;

[0011] The professional term interpretation library is constructed based on the extracted professional terms and the interpretations of the professional terms.

[0012] Optionally, extracting professional terms from each piece of the knowledge text, and interpreting the professional terms according to the context associated with the professional terms, to obtain a plurality of professional terms and an explanation of each professional term, includes:

[0013] Obtaining a pre-built language prompt; wherein the language prompt is used to guide the large language model to understand and process the knowledge text;

[0014] The knowledge text and the language prompt are input into the large language model, so that the large language model extracts professional terms from the knowledge text according to the language prompt, and interprets the professional terms according to the context of the professional terms, and outputs multiple professional terms and explanations of each professional term.

[0015] Optionally, constructing the professional term interpretation library according to the extracted professional terms and the interpretations of the professional terms includes:

[0016] According to the professional terms and the explanations of the professional terms, an inverted index is constructed; or, the explanations of the professional terms are vectorized and a vector index between the professional terms and the explanations of the professional terms is constructed;

[0017] The professional terms and their explanations after indexing are stored in a database to obtain a professional term explanation database.

[0018] Optionally, rewriting the original input question according to the target professional term and the explanation of the target professional term to obtain the target input question includes:

[0019] The target professional terms, the explanations of the target professional terms and the original input question are input into a pre-trained question rewriting model, so that the question rewriting model rewrites the original input question according to the target professional terms and the explanations of the target professional terms to obtain a rewritten target input question.

[0020] Optionally, the process of building the knowledge base includes:

[0021] Perform document parsing and document segmentation on the professional documents in the vertical field to obtain multiple knowledge texts;

[0022] The plurality of knowledge texts are converted into text vectors through an embedding model, and each knowledge text and the text vector corresponding to the knowledge text are stored in a database to obtain the knowledge base.

[0023] According to another aspect of the present invention, there is provided an intelligent question-answering device, comprising:

[0024] A professional term search module is used to obtain the original input question of the user, and to perform a matching search on the original input question in a pre-built professional term interpretation library to obtain a target professional term that matches the original input question and an interpretation of the target professional term;

[0025] A question rewriting module, used for rewriting the original input question according to the target professional term and the explanation of the target professional term to obtain a target input question;

[0026] The knowledge retrieval and reply module is used to perform knowledge retrieval in a pre-constructed knowledge base according to the target input question, and generate reply content for the user according to the retrieval results; wherein the professional term interpretation library and the knowledge base are both constructed based on professional documents in vertical fields.

[0027] Should there be a professional vocabulary building module here, which together with the professional vocabulary retrieval module is part of the overall solution?

[0028] Optionally, the intelligent question-answering device further includes:

[0029] A text processing module is used to perform document parsing and document segmentation on professional documents in the vertical field to obtain multiple knowledge texts;

[0030] A professional explanation extraction module is used to extract professional terms from each of the knowledge texts, and to explain the professional terms according to the context associated with the professional terms, so as to obtain a plurality of the professional terms and an explanation of each professional term;

[0031] The database building module is used to build the professional term interpretation library according to the extracted professional terms and the interpretations of the professional terms.

[0032] Optionally, the professional interpretation extraction module is specifically used for:

[0033] Obtaining a pre-built language prompt; wherein the language prompt is used to guide the large language model to understand and process the knowledge text;

[0034] The knowledge text and the language prompt are input into the large language model, so that the large language model extracts professional terms from the knowledge text according to the language prompt, and interprets the professional terms according to the context of the professional terms, and outputs multiple professional terms and explanations of each professional term.

[0035] Optionally, the library building module is specifically used for:

[0036] According to the professional terms and the explanations of the professional terms, an inverted index is constructed; or, the explanations of the professional terms are vectorized and a vector index between the professional terms and the explanations of the professional terms is constructed;

[0037] The professional terms and their explanations after indexing are stored in a database to obtain a professional term explanation database.

[0038] Optionally, the question rewriting module 402 is specifically used for:

[0039] The target professional terms, the explanations of the target professional terms and the original input question are input into a pre-trained question rewriting model, so that the question rewriting model rewrites the original input question according to the target professional terms and the explanations of the target professional terms to obtain a rewritten target input question.

[0040] Optionally, it also includes a knowledge base building module for:

[0041] Perform document parsing and document segmentation on the professional documents in the vertical field to obtain multiple knowledge texts;

[0042] The plurality of knowledge texts are converted into text vectors through an embedding model, and each knowledge text and the text vector corresponding to the knowledge text are stored in a database to obtain the knowledge base.

[0043] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0044] at least one processor; and

[0045] a memory communicatively connected to at least one processor; wherein,

[0046] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the intelligent question-answering method of an embodiment of the present invention.

[0047] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to implement the intelligent question-answering method of an embodiment of the present invention when executed by a processor.

[0048] The technical solution of the embodiment of the present invention pre-builds a professional term interpretation library, and then in the process of intelligent question answering, first determines the professional terms and their interpretations that match the user's original input question, and then rewrites the user's original input question according to the determined professional terms and their interpretations. In this way, the rewritten user input question is closer to the document description in the knowledge base, so that there are co-occurring words between the rewritten user input question and the knowledge document, making it easier to retrieve relevant knowledge results, thereby improving the retrieval effect, so that the large model can generate more accurate reply content.

[0049] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0051] Figure 1 is a flowchart of an intelligent question-answering method provided according to an embodiment of the present invention;

[0052] Figure 2 is a flow chart of another intelligent question-answering method provided according to an embodiment of the present invention;

[0053] Figure 3 is a logic schematic diagram of an intelligent question-answering method provided according to an embodiment of the present invention;

[0054] Figure 4 is a structural schematic diagram of an intelligent question-answering device provided according to an embodiment of the present invention;

[0055] Figure 5 It is a structural schematic diagram of an electronic device for implementing the intelligent question-answering method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0056] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0057] Embodiment 1

[0058] Figure 1 A flowchart of an intelligent question-answering method is provided for an embodiment of the present invention. This embodiment is applicable to scenarios of intelligent question-answering based on a large language model, typically applicable to intelligent question-answering scenarios in vertical fields. The method can be executed by an intelligent question-answering device, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device.

[0059] like Figure 1 As shown, the intelligent question answering method includes:

[0060] S101, obtaining the original input question of the user, and performing a matching search on the original input question in a pre-built professional term interpretation library to obtain target professional terms matching the original input question and interpretations of the target professional terms.

[0061] In an embodiment of the present invention, a professional word interpretation library is pre-constructed based on professional documents in vertical fields, and the professional word interpretation library includes professional words extracted from professional documents in vertical fields and professional word interpretations determined according to the context of professional words. Among them, vertical field is a term in the Internet industry, which refers to a market segment that focuses on providing in-depth information and professional services in a certain industry, a certain market or a certain specific demand field. This market segment is in contrast to popular and comprehensive services or products, emphasizing professionalism, depth and unique value in the field. Exemplarily, vertical fields can be medical fields, financial fields, and insurance fields. Professional documents in vertical fields refer to detailed, in-depth and professional documents or materials written for a specific industry, field or professional demand. These documents usually contain professional knowledge, technical details, operating guidelines, standard specifications, case analysis and other contents in the field, aiming to provide users with comprehensive, accurate and practical information support.

[0062] On the basis of building a professional word interpretation library, when performing intelligent question and answer, the intelligent question and answer system based on the large language model first obtains the original input question of the user, wherein the original input question can be in text form or in voice form, which is not specifically limited here. For the original input question of the user, the target professional word and the interpretation of the target professional word that match the original input question can be determined by calculating the similarity between the original input question and the interpretation of each professional word in the professional word interpretation library. It can be understood that in the professional word interpretation library, the interpretation of professional words can be saved in the form of text vectors. In this way, to calculate the similarity between the original input question and the interpretation of each professional word in the professional word interpretation library, it is necessary to convert the original input question into a text vector, and then determine the size of the similarity by calculating the distance of the text vector. Converting the original input question into a corresponding text vector includes: if the original input question is in text form, it can be converted into a text vector through an embedding model; if the original input question is in voice form, it is converted into text through voice conversion technology, and then converted into a text vector using an embedding model. In this embodiment, a similarity threshold can be set in advance, and the professional words whose calculated similarity exceeds the threshold are used as the target professional words. It should be noted that if there are multiple target professional terms, the multiple target professional terms can be directly used together to rewrite the original input question, or the determined target professional terms can be sorted according to the degree of similarity, and a target professional term with the greatest similarity can be selected for subsequent rewriting of the original input question.

[0063] S102: rewrite the original input question according to the target professional term and the explanation of the target professional term to obtain a target input question.

[0064] In an embodiment of the present invention, when rewriting the original input question, it can be determined first whether the interpretation of the target professional term is relevant to the original input question, for example, by determining through semantic analysis; if relevant, the original input question is rewritten based on the target professional term, for example, the target professional term is used to replace the key words in the original input question, or the target professional term is used to supplement the original input question, so that the rewritten target input question can be a question including the target professional term.

[0065] In an optional implementation, a question rewriting model can be pre-trained, wherein the pre-trained question rewriting model can be a large language model or a separately trained general rewriting model, which is not specifically limited here. On this basis, it is only necessary to input the target professional terms, the explanation of the target professional terms and the original input question into the pre-trained question rewriting model, so that the question rewriting model rewrites the original input question according to the target professional terms and the explanation of the target professional terms to obtain the rewritten target input question.

[0066] It is understandable that the rewritten target input question includes professional terms in the vertical field. When performing subsequent knowledge retrieval, the key knowledge in the vertical field can be accurately recalled based on the included professional terms in the vertical field, thereby improving the effect of knowledge retrieval.

[0067] Exemplarily, the user's original input question is: "How much do I have to spend before I can be reimbursed?" The target professional term retrieved in the professional vocabulary search database based on the original input question is: "deductible"; the explanation of the target professional term is: "Deductible: In insurance, the amount that the insurance company does not pay. In the event of an insurance accident, if the amount of loss is less than or equal to the deductible, the insurance company will not pay; if the amount of loss exceeds the deductible, the insurance company will only pay the amount exceeding the deductible." The target input user question rewritten based on the target professional term and the explanation of the target professional term can be: "What is my deductible."

[0068] S103: performing knowledge retrieval in a pre-built knowledge base according to the target input question, and generating reply content for the user according to the retrieval result.

[0069] In an embodiment of the present invention, the knowledge base is constructed based on professional documents in a vertical field, and the construction process may include: performing document parsing processing (such as layout analysis processing and information extraction processing) and document segmentation processing on the professional documents in the vertical field to obtain a plurality of knowledge texts; it should be noted that the reason for performing document segmentation processing is to ensure that the number of words in each knowledge text is within a preset number; further, the plurality of knowledge texts are converted into text vectors through an embedding model, and each knowledge text and the text vector corresponding to the knowledge text are stored in a database to obtain the knowledge base.

[0070] After obtaining the target input question through step S102, a search can be performed directly in the knowledge base based on the target input question. For example, keywords can be extracted from the target input question to obtain multiple keywords including the target professional terms, and then a search is performed in the knowledge base based on the multiple keywords to at least obtain knowledge related to the target professional terms included in the target input question (i.e., search results); and then the large language model used for intelligent question and answer can generate reply content and feedback to the user based on the obtained knowledge related to the target professional terms, thus completing a question and answer session.

[0071] In an embodiment of the present invention, a professional term interpretation library is pre-constructed, and then in the process of intelligent question answering, the target professional term and its interpretation corresponding to the user's original input question are first determined, and then the user's original input question is rewritten according to the determined target professional term and its interpretation. The user's input question after the rewrite is closer to the document description in the knowledge base, that is, it is easier for co-occurring words to exist between the rewritten user input question and the knowledge document in the knowledge base, so that it is easier to retrieve relevant knowledge results, thereby improving the accuracy of the retrieval so that the large model can generate more accurate reply content.

[0072] Embodiment 2

[0073] Figure 2 A flowchart of an intelligent question-answering method is provided for an embodiment of the present invention. The specific process of constructing a professional word interpretation library added in this embodiment is shown in FIG. Figure 2 , the method comprises the following steps:

[0074] S201. Perform document parsing and document segmentation on the professional documents in the vertical field to obtain a plurality of knowledge texts.

[0075] In an embodiment of the present invention, the document parsing process may include layout analysis and information extraction. Among them, the layout analysis process may include: firstly, format conversion processing is performed, mainly converting the original format of the professional document (such as PDF or word) into a format that is easier for the computer to process, such as an image format; then, layout structure recognition is performed, and the layout structure of the document is analyzed using deep learning models such as convolutional neural networks (CNN). These models can identify different areas in the document, such as titles, text, pictures, tables, etc.; finally, layout feature extraction is performed, such as extracting the spatial relationship between different blocks of the document, such as position, size, arrangement order, etc. The information extraction process may include the following: extracting the title of the document from the segmented title area; for the paragraph area, it can be read and sorted line by line to identify the key content in the paragraph; for the table area, the table border and cell content can be identified, and the table content can be converted into structured data. It can be understood that the above processing is only an example, and other processing may also be included, which will not be listed one by one here. Document parsing of professional documents can integrate the extracted information to obtain structured text content; then the text content can be segmented, for example, using a fixed text length as the segmentation standard, reading the parsed document content, and segmenting when the accumulated text length reaches the set value. In addition, the document content can also be semantically analyzed and then segmented based on the semantic analysis. Finally, multiple knowledge texts are obtained.

[0076] S202, extracting professional terms from each of the knowledge texts, and interpreting the professional terms according to the context associated with the professional terms, to obtain a plurality of the professional terms and an explanation of each of the professional terms.

[0077] In an optional implementation, for a piece of knowledge text, the words included in it are converted into word vectors by word embedding, and then similar word vectors are grouped by clustering algorithm, each group may represent a professional term or concept. In addition, the professional terms included in each knowledge text can also be determined by word frequency statistics. For each extracted professional vocabulary, go back to the knowledge text to find the specific location where the vocabulary appears, and determine the sentence or paragraph where it is located. This is the context associated with the professional vocabulary, that is, the context of the professional vocabulary. Analyze the meaning and role of professional terms in context. Considering the literal meaning of professional terms and their specific meanings in specific vertical fields, the following methods can be used when interpreting vocabulary: Definition method: Give a professional definition of the vocabulary to explain its exact meaning in the field. Example method: Use specific examples to illustrate the meaning of the vocabulary to make the explanation more intuitive. Comparison method: Compare with similar vocabulary to highlight the characteristics and differences of the vocabulary.

[0078] In another optional implementation, a pre-built language prompt prompt can be obtained; wherein the language prompt prompt is used to guide the large language model to understand and process the knowledge text; the knowledge text and the language prompt are input into the large language model (a large model pre-trained for extracting professional terms and their explanations), so that the large language model extracts professional terms from the knowledge text according to the language prompt, and interprets the professional terms according to the context of the professional terms, and outputs multiple professional terms and the explanation of each professional term. It can be understood that by extracting professional vocabulary and its explanation through the large model, the efficiency and accuracy of professional terms and their explanations can be improved.

[0079] S203: construct the professional term interpretation library according to the extracted professional terms and the interpretations of the professional terms.

[0080] In an optional implementation, an inverted index is constructed based on the professional terms and the explanations of the professional terms; or, the explanations of the professional terms are vectorized and a vector index between the professional terms and the explanations of the professional terms is constructed; the professional terms and the explanations of the professional terms after the index is constructed are stored in a database to obtain a professional term interpretation database.

[0081] S204: obtaining the original input question of the user, and performing a matching search on the original input question in a pre-built professional term interpretation library to obtain target professional terms matching the original input question and interpretations of the target professional terms.

[0082] S205: rewrite the original input question according to the target professional term and the explanation of the target professional term to obtain a target input question.

[0083] S206: performing knowledge retrieval in a pre-built knowledge base according to the target input question, and generating reply content for the user according to the retrieval result.

[0084] In this embodiment, professional terms and their explanations can be extracted from professional documents in vertical fields to construct a professional term interpretation library, which is the prerequisite for rewriting the user's original input questions. That is, building a professional term interpretation library provides a basis for accurately rewriting the user's original input questions.

[0085] Embodiment 3

[0086] Figure 3 A logic diagram of an intelligent question-answering method is provided for an embodiment of the present invention. Figure 3 , the method comprises the following steps:

[0087] First, professional documents in vertical fields are obtained, and document parsing and document segmentation are performed on the professional documents in vertical fields. Then, based on the document segmentation results, two branches are divided. One branch is to construct knowledge based on the segmentation results (for example, embedding the segmented documents and storing them in the library) to obtain a knowledge base; the other branch is to extract professional terms and their explanations based on the segmentation results. The specific extraction process is shown in the above embodiment, which will not be repeated here. Then, a professional term interpretation library is constructed based on the extracted professional terms and their explanations. This is the pre-processing process.

[0088] The process of intelligent question answering includes: obtaining the user's original input question; based on the professional term interpretation library, retrieving professional terms and their explanations that match the original input question (i.e., the professional term retrieval in the figure); and finally, through a rewriting module (which can be a large language model or a general model specifically used for question rewriting), rewriting the question according to the original input question, the retrieved target professional terms and their explanations to obtain a target input question including professional terms; based on the target input question, performing knowledge retrieval from the knowledge base, and finally generating a reply based on the retrieval results and feeding it back to the user, thus ending a question and answer session.

[0089] In an embodiment of the present invention, a professional term interpretation library is pre-constructed, and then in the process of intelligent question answering, the target professional term and its interpretation corresponding to the user's original input question are first determined, and then the user's original input question is rewritten according to the determined target professional term and its interpretation. The user's input question after the rewrite is closer to the document description in the knowledge base, that is, it is easier for co-occurring words to exist between the rewritten user input question and the knowledge document in the knowledge base, so that it is easier to retrieve relevant knowledge results, thereby improving the accuracy of the retrieval so that the large model can generate more accurate reply content.

[0090] Embodiment 4

[0091] Figure 4 This is a schematic diagram of the structure of an intelligent question-answering device provided by an embodiment of the present invention. This embodiment is applicable to scenarios where intelligent question-answering is performed based on a large language model, and is typically applicable to intelligent question-answering scenarios in vertical fields. Figure 4 As shown, the device comprises:

[0092] The professional term search module 401 is used to obtain the original input question of the user, and perform a matching search on the original input question in a pre-built professional term interpretation library to obtain a target professional term matching the original input question and an interpretation of the target professional term;

[0093] A question rewriting module 402 is used to rewrite the original input question according to the target professional term and the explanation of the target professional term to obtain a target input question;

[0094] The knowledge retrieval and reply module 403 is used to perform knowledge retrieval in a pre-constructed knowledge base according to the target input question, and generate reply content for the user according to the retrieval results; wherein the professional term interpretation library and the knowledge base are both constructed based on professional documents in vertical fields.

[0095] In an optional implementation, the method further includes:

[0096] A text processing module is used to perform document parsing and document segmentation on professional documents in the vertical field to obtain multiple knowledge texts;

[0097] A professional explanation extraction module is used to extract professional terms from each of the knowledge texts, and to explain the professional terms according to the context associated with the professional terms, so as to obtain a plurality of the professional terms and an explanation of each professional term;

[0098] The database building module is used to build the professional term interpretation library according to the extracted professional terms and the interpretations of the professional terms.

[0099] In an optional implementation, the professional explanation extraction module is specifically used to:

[0100] Obtaining a pre-built language prompt; wherein the language prompt is used to guide the large language model to understand and process the knowledge text;

[0101] The knowledge text and the language prompt are input into the large language model, so that the large language model extracts professional terms from the knowledge text according to the language prompt, and interprets the professional terms according to the context of the professional terms, and outputs multiple professional terms and explanations of each professional term.

[0102] In an optional implementation, the library building module is specifically used for:

[0103] According to the professional terms and the explanations of the professional terms, an inverted index is constructed; or, the explanations of the professional terms are vectorized and a vector index between the professional terms and the explanations of the professional terms is constructed;

[0104] The professional terms and their explanations after indexing are stored in a database to obtain a professional term explanation database.

[0105] In an optional implementation, the question rewriting module 402 is specifically used for:

[0106] The target professional terms, the explanations of the target professional terms and the original input question are input into a pre-trained question rewriting model, so that the question rewriting model rewrites the original input question according to the target professional terms and the explanations of the target professional terms to obtain a rewritten target input question.

[0107] In an optional implementation, a knowledge base construction module is further included, which is used to:

[0108] Perform document parsing and document segmentation on the professional documents in the vertical field to obtain multiple knowledge texts;

[0109] The plurality of knowledge texts are converted into text vectors through an embedding model, and each knowledge text and the text vector corresponding to the knowledge text are stored in a database to obtain the knowledge base.

[0110] The intelligent question-and-answer device provided in the embodiment of the present invention can execute the intelligent question-and-answer method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0111] Embodiment 5

[0112] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to be a controller device in a new energy vehicle. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0113] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0114] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0115] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as executing the intelligent question-answering method.

[0116] In some embodiments, the intelligent question-answering method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the intelligent question-answering method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the intelligent question-answering method in any other appropriate manner (e.g., by means of firmware).

[0117] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0118] The computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable intelligent question-answering device, so that when the computer programs are executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer programs may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0119] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0120] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0121] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0122] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0123] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0124] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. An intelligent question-answering method, characterized in that: include: Obtaining the user's original input question, and performing a matching search on the original input question in a pre-built professional term interpretation library to obtain a target professional term matching the original input question and an interpretation of the target professional term; According to the target professional term and the explanation of the target professional term, rewriting the original input question to obtain the target input question; Knowledge retrieval is performed in a pre-constructed knowledge base according to the target input question, and reply content is generated for the user according to the retrieval results; wherein the professional term explanation library and the knowledge base are both constructed based on professional documents in vertical fields.

2. The method according to claim 1, characterized in that The process of constructing the professional term interpretation library includes: Perform document parsing and document segmentation on the professional documents in the vertical field to obtain multiple knowledge texts; Extracting professional terms from each piece of the knowledge text, and interpreting the professional terms according to the context associated with the professional terms, to obtain a plurality of the professional terms and an explanation of each professional term; The professional term interpretation library is constructed based on the extracted professional terms and the interpretations of the professional terms.

3. The method according to claim 2, characterized in that The extracting of professional terms from each piece of the knowledge text and interpreting the professional terms according to the context associated with the professional terms to obtain a plurality of the professional terms and the interpretation of each professional term include: Obtaining a pre-built language prompt; wherein the language prompt is used to guide the large language model to understand and process the knowledge text; The knowledge text and the language prompt are input into the large language model, so that the large language model extracts professional terms from the knowledge text according to the language prompt, and interprets the professional terms according to the context of the professional terms, and outputs multiple professional terms and explanations of each professional term.

4. The method according to claim 2, characterized in that: The step of constructing the professional term explanation library based on the extracted professional terms and the explanations of the professional terms includes: According to the professional terms and the explanations of the professional terms, an inverted index is constructed; or, the explanations of the professional terms are vectorized and a vector index between the professional terms and the explanations of the professional terms is constructed; The professional terms and their explanations after indexing are stored in a database to obtain a professional term explanation database.

5. The method according to claim 1, characterized in that The step of rewriting the original input question according to the target professional term and the explanation of the target professional term to obtain the target input question includes: The target professional terms, the explanations of the target professional terms and the original input question are input into a pre-trained question rewriting model, so that the question rewriting model rewrites the original input question according to the target professional terms and the explanations of the target professional terms to obtain a rewritten target input question.

6. The method according to claim 1, characterized in that The process of building the knowledge base includes: Perform document parsing and document segmentation on the professional documents in the vertical field to obtain multiple knowledge texts; The plurality of knowledge texts are converted into text vectors through an embedding model, and each knowledge text and the text vector corresponding to the knowledge text are stored in a database to obtain the knowledge base.

7. An intelligent question-answering device, characterized in that: include: A professional term search module is used to obtain the original input question of the user, and to perform a matching search on the original input question in a pre-built professional term interpretation library to obtain a target professional term that matches the original input question and an interpretation of the target professional term; A question rewriting module, used for rewriting the original input question according to the target professional term and the explanation of the target professional term to obtain a target input question; The knowledge retrieval and reply module is used to perform knowledge retrieval in a pre-constructed knowledge base according to the target input question, and generate reply content for the user according to the retrieval results; wherein the professional term interpretation library and the knowledge base are both constructed based on professional documents in vertical fields.

8. The device according to claim 7, characterized in that Also includes: A text processing module is used to perform document parsing and document segmentation on the professional documents in the vertical field to obtain multiple knowledge texts; A professional explanation extraction module is used to extract professional terms from each of the knowledge texts, and to explain the professional terms according to the context associated with the professional terms, so as to obtain a plurality of the professional terms and an explanation of each professional term; The database building module is used to build the professional term interpretation library according to the extracted professional terms and the interpretations of the professional terms.

9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the method according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method according to any one of claims 1 to 6 when executed.

Citation Information

Patent Citations

  • Government intelligent customer service method, system, electronic device and storage medium

    CN109213910A

  • Open domain natural language reasoning question-answering system and method driven by large language model

    CN116932708A

  • Electric power knowledge semantic analysis system and method

    CN117273012A

  • Electric power professional knowledge intelligent question answering system construction method based on large language model

    CN117609421A

  • Domain question-answering system, domain question-answering construction method, electronic equipment and storage medium

    CN117909466A

Cited By

  • Intelligent auxiliary method, system and equipment for news manuscript writing and storage medium

    CN119558297A

  • Information processing method, information processing device, and computer program

    JP2026131590A