Intelligent question and answer method and system
By matching with the preset question and answer table or using classification models to analyze user questions and extracting business keywords, the problem that traditional search engines cannot provide structured answers is solved, and efficient and accurate question and answer services are achieved.
Patent Information
- Application Number
- CN202510012569.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-04-11
AI Technical Summary
Traditional search engines cannot provide structured answers, and their natural language processing capabilities are weak, which leads to users need to find answers in documents, increasing search costs.
By obtaining the target question text entered by the target user, determine the matching result with the preset question and answer table. If the match is successful, directly feedback the structured answer results that match the question. If the match fails, use the pre-trained classification model to analyze the problem text, determine the business type and extract the business keywords, search and feedback the structured answer results in the database through flashback indexing.
It realizes rapid response to user questions, improves the real-time and accuracy of searches, provides users with personalized and efficient question-and-answer services, and reduces the time for users to search for answers in documents.
Smart Images

Figure CN119807380A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of knowledge question answering, and more specifically, to an intelligent question answering method and system. Background Art
[0002] As enterprises continue to grow, the number of various documents is also growing, and employees' search needs for various documents or questions are also growing. Currently, many question-answering systems use search engine-based technologies, the most common of which are Apache Lucene or Google's PageRank algorithm. However, these traditional search engines generally have the following problems:
[0003] (1) Unable to provide structured answers: Traditional search engines can only provide a list of documents related to user questions, but cannot provide structured answers. Users need to find answers in these documents themselves, which increases the user's search cost.
[0004] (2) Weak natural language processing capabilities: Traditional search engines mainly rely on business keyword matching. They cannot understand users’ natural language questions very well, which means that users may need to accurately enter the business keywords of the question to get a satisfactory answer. If non-business keywords or colloquial expressions are used in the question, effective results may not be obtained.
[0005] Currently, no effective solution has been proposed for the above-mentioned problems existing in traditional search engines. Summary of the invention
[0006] The embodiments of the present application provide an intelligent question-answering method and system to at least solve the technical problem that the relevant question-answering system can only output a query list related to the question but cannot output a structured answer result, causing users to spend a lot of time searching for answers to questions in documents.
[0007] According to one aspect of an embodiment of the present application, an intelligent question-answering method is provided, comprising: obtaining a target question text input by a target user; determining a matching result between the target question text and a preset question-answering table, wherein the question-answering table comprises: a preset number of question texts and a first structured answer result corresponding to each question text, and the first structured answer result comprises: a document identifier of a target document and location information of the question text corresponding to the question text in the target document; when the matching result is a successful match, the first target structured answer result corresponding to the question text matching the target question text is fed back to the target user; when the matching result is a failed match, the target question text is analyzed using a pre-trained classification model to determine the business type corresponding to the target question text, and at least one business keyword related to the business type in the target question text is determined; using each business keyword as a query condition, and using a reverse indexing method to determine at least one second target structured answer result corresponding to the query condition in a preset database, and feeding back each second target structured answer result to the target user, wherein the database comprises at least: a plurality of second structured answer results, and the second structured answer result comprises: a business keyword, a document identifier of a document where the business keyword is located, and location information of the business keyword in the corresponding document.
[0008] Optionally, determining the matching result between the target question text and a preset question and answer table includes: determining the text similarity between the target question text and each question text in the question and answer table; when the text similarity between the target question text and any question text in the question and answer table is not lower than a preset first similarity threshold, determining the matching result as a successful match; when the text similarity between the target question text and any question text in the question and answer table is lower than the first similarity threshold, determining the matching result as a failed match.
[0009] Optionally, a first target structured answer result corresponding to a question text matching a target question text is fed back to a target user, including: when a text similarity between the target question text and a first question text in a question-and-answer table is not lower than a preset second similarity threshold, the first target structured answer result corresponding to the first question text is fed back to the target user, wherein the second similarity threshold is higher than the first similarity threshold; when a text similarity between the target question text and multiple second question texts in the question-and-answer table is lower than the second similarity threshold but not lower than the first similarity threshold, multiple second question texts are fed back to the target user, and a question text selection instruction initiated by the target user based on the multiple second question texts is received, wherein the question text selection instruction includes the second question text selected by the target user; and the first target structured answer result corresponding to the second question text selected by the target user is fed back to the target user.
[0010] Optionally, a pre-trained classification model is used to analyze the target question text to determine the business type corresponding to the target question text, including: preprocessing the target question text, wherein the preprocessing includes at least one of the following: text cleaning and stemming; semantically parsing the preprocessed target question text to convert the target question text into a vector form to obtain a corresponding target text vector; analyzing the target text vector using a classification model to obtain the business type corresponding to the target question text; wherein the classification model is obtained by iterative training using a training sample set and a sample label set, wherein the training sample set includes multiple historical question texts as training samples, and the sample label set includes a business type label corresponding to each historical question text.
[0011] Optionally, determining at least one business keyword related to the business type in the target question text includes: performing word segmentation processing on the target question text to obtain multiple word units; for each word unit, determining whether the word unit is in the business vocabulary corresponding to the business type; in the case where the word unit is in the business vocabulary corresponding to the business type, using the word unit as a business keyword; in the case where the word unit is not in the business vocabulary corresponding to the business type, determining the word similarity between the word unit and each business word in the business vocabulary corresponding to the business type, and using the target business word whose word similarity is not less than a preset second similarity threshold as a business keyword.
[0012] Optionally, the database also includes: associated information of each second structured answer result, and the associated information includes at least one of the following: document publication date, user satisfaction, wherein each second target structured answer result is fed back to the target user, including: determining the target associated information of each second target structured answer result according to the database; determining the feedback priority of each second target structured answer result according to a preset dimension based on the target associated information of each second target structured answer result, wherein the preset dimension includes at least one of the following: document publication date, user satisfaction, the newer the document publication of the second target structured answer result and the higher the user satisfaction, the higher the corresponding feedback priority, and conversely, the older the document publication date of the second target structured answer result and the lower the user satisfaction feedback, the lower the corresponding feedback priority; each target structured answer result is fed back to the target user in order of feedback priority from high to low.
[0013] Optionally, after feeding back each second target structured answer result to the target user, the method includes: obtaining the total number of times the target question text is asked within a preset time period, the job information of each user who asks the target question text, the maximum number of times the target question text is asked within a unit time, the impact factor of the business type corresponding to the target question text on the enterprise operation management, and the user satisfaction of each user who asks the target question text on each second target structured answer result, wherein the job information at least includes: work department, job position; based on the total number of times the target question text is asked within a preset time period, the job information of each user who asks the target question text, the maximum number of times the target question text is asked within a unit time, the impact factor of the business type corresponding to the target question text on the enterprise operation management, and the user satisfaction of each user who asks the target question text on the second target structured answer result The influencing factor of operations management determines the importance score of the target question text to the operations management of the enterprise, and determines the quality score of each second target structured answer result corresponding to the target question text based on the user satisfaction of each user who asks the target question text with the second target structured answer result and the job information of each user who asks the target question text; determines the update index of the target question text in the question and answer table based on the importance score of the target question text to the operations management of the enterprise and the quality score of the second target structured answer result corresponding to the target question text; when the update index is higher than the preset index threshold, obtains the third structured answer result obtained by manual question and answering of the target question text, and adds the target question text and the corresponding third structured answer result to the question and answer table.
[0014] Optionally, each question text in the question-answer table is arranged from top to bottom in descending order of importance score of the question text, wherein the target question text and the corresponding structured answer result are added to the question-answer table, including: determining the target position of the target question text in the question-answer table according to the importance score of the target question text, inserting the target question text and the corresponding structured answer result into the target position in the question-answer table, and deleting the last question text and the corresponding structured answer result in the question-answer table.
[0015] According to another aspect of the embodiment of the present application, an intelligent question-answering system is also provided, including: an acquisition module for acquiring a target question text input by a target user; a matching module for determining a matching result between the target question text and a preset question-answering table, wherein the question-answering table includes: a preset number of question texts and a first structured answer result corresponding to each question text, and the first structured answer result includes: a document identifier of a target document and location information of the question text corresponding to the question text in the target document; a first feedback module for feeding back to the target user the first target structured answer result corresponding to the question text matching the target question text when the matching result is a successful match; and a second feedback module for In the case where the matching result is a match failure, the target question text is analyzed using a pre-trained classification model to determine the business type corresponding to the target question text, and to determine at least one business keyword related to the business type in the target question text; each business keyword is used as a query condition, and a reverse indexing method is used to determine at least one second target structured answer result corresponding to the query condition in a preset database, and each second target structured answer result is fed back to the target user, wherein the database includes at least: multiple second structured answer results, and the second structured answer result includes: business keywords, document identifiers of documents where the business keywords are located, and location information of the business keywords in the corresponding documents.
[0016] According to another aspect of an embodiment of the present application, a computer program product is also provided, the computer program product comprising: a computer program, wherein the above-mentioned intelligent question-answering method is implemented when the computer program is executed by a processor.
[0017] In an embodiment of the present application, the intelligent question-answering system matches the input target question text with a preset question-answering table, wherein the question-answering table stores a preset number of question texts and the first structured answer result corresponding to each question text; if the match is successful, the first target structured answer result corresponding to the question text matching the target question text is directly fed back to the target user, thereby quickly responding to the user's question; and if the match fails, a deep learning model is used to perform deep semantic analysis on the question text, identify its business type and extract business keywords related to the business type, and then, based on the business keyword query, the inverted index technology is used to search in the database, quickly locate the document containing the business keyword, and extract the structured answer result from it and feed it back to the user. This effectively solves the problem that the traditional question-answering system is insufficient in responding to novel or complex questions, while improving the real-time and accuracy of the search, and providing users with a more personalized and efficient question-answering service. This solves the technical problem that the relevant question-answering system can only output a query list related to the question, but cannot output a structured answer result, causing users to spend a lot of time searching for answers to questions in the document. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 is a flowchart of an optional intelligent question-answering method according to an embodiment of the present application;
[0020] Figure 2 is a schematic diagram of an optional question input interface according to an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of the structure of an optional intelligent question-answering system according to an embodiment of the present application;
[0022] Figure 4 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0024] It should be noted that the terms "first", "second", etc. in the specification, claims and drawings of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] In order to better understand the embodiments of the present application, some nouns or terms that appear in the description of the embodiments of the present application are first translated and explained as follows:
[0026] Inverted Index, also known as reverse index, inserted archive or reverse archive, is an indexing method used to store the mapping of the storage location of a word in a document or a group of documents under full-text search. It is the most commonly used data structure in document retrieval systems. Common inverted index forms are: a horizontal inverted index (or reverse archive index) of a record contains a list of documents that reference each word; a horizontal inverted index (or fully inverted index) of a word contains the position of each word in a document. Among them, the latter form provides more compatibility (such as phrase search), but requires more time and space to create.
[0027] Elasticsearch is a search engine based on the Luncene library. It provides a distributed, multi-tenant-capable full-text search engine with an HTTP web interface and five-schema JSON documents.
[0028] Example 1
[0029] According to an embodiment of the present application, an intelligent question-answering method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0030] Figure 1 is a flow chart of an intelligent question-answering method provided according to an embodiment of the present application, such as Figure 1 As shown, the method includes the following steps S102-S108, including:
[0031] Step S102, obtaining the target question text input by the target user.
[0032] In the technical solution provided in the above step S102, the above target question text may be a question text submitted by the target user in a text input box of the interactive interface in a natural language form, such as Figure 2 shown.
[0033] Step S104, determining the matching result between the target question text and the preset question-and-answer form.
[0034] In the technical solution provided in the above step S104, the above question-and-answer table includes: a preset number of question texts and a first structured answer result corresponding to each question text, and the first structured answer result includes: a document identifier of the target document (such as a document path) and the location information of the question text corresponding to the question text in the target document. In other words, the above question-and-answer table is a plurality of question texts and associated structured answer results stored in JSON or a similar format. The intelligent question-and-answer system determines whether there is a question text identical to the target question text in the question-and-answer table through a matching operation, so as to directly provide the target user with direct document location and answer acquisition, thereby reducing the user's information search cost.
[0035] Step S106: When the matching result is successful, the first target structured answer result corresponding to the question text matching the target question text is fed back to the target user.
[0036] In the technical solution provided in the above step S106, that is, when there is a question text identical to the target question text in the question and answer table, the intelligent question and answer system can directly feedback to the target user the first target structured answer result corresponding to the question text matching the target question text, so as to provide the user with structured questions and answers, thereby improving the response speed and accuracy of the question and answer system.
[0037] Step S108, when the matching result is a match failure, use the pre-trained classification model to analyze the target question text, determine the business type corresponding to the target question text, and determine at least one business keyword related to the business type in the target question text; use each business keyword as a query condition, and use the reverse indexing method to determine at least one second target structured answer result corresponding to the query condition in a preset database, and feed back each second target structured answer result to the target user.
[0038] In the technical solution provided in the above step S108, that is, when there is no question text identical to the target question text in the question and answer table, the intelligent question and answer system can use the deep learning network to analyze the target question text to determine the business type and further extract business keywords related to the business type. The extracted business keywords are used as query conditions to construct a query statement suitable for searching a preset database (such as Elasticsearch), which usually involves converting the query into a Boolean query, a range query or other specific query types; based on the query statement, the inverted index mechanism is used to quickly locate at least one second target structured answer result corresponding to the query business keyword, and each second target structured answer result is fed back to the target user. Among them, the preset database includes multiple second structured answer results, and the second structured answer result includes: business keywords, document identifiers of documents where business keywords are located, and location information of business keywords in corresponding documents, wherein these structured answer results can be the results obtained from historical user queries, or they can be manually written structured answers. The inverted index reverses the mapping relationship between business keywords and documents, and stores all documents where each business keyword appears and its location information in the document. In this way, the intelligent question-answering system can directly find relevant document collections through business keywords without traversing the entire document library.
[0039] The following describes each step of the intelligent question-answering method in conjunction with a specific implementation process.
[0040] As an optional implementation, in the technical solution provided in the above step S104, the method may include:
[0041] Step S1041, determining the text similarity between the target question text and each question text in the question-answer table, wherein the text similarity can be calculated by a cosine similarity algorithm, or can be measured by Euclidean distance, Manhattan distance, Jaccard similarity, etc.
[0042] Step S1042, when the text similarity between the target question text and any question text in the question-answer table is not less than a preset first similarity threshold, determining the matching result as a successful match;
[0043] Step S1043: When the text similarity between the target question text and any question text in the question-answer table is lower than a first similarity threshold, the matching result is determined to be a matching failure.
[0044] In the above embodiment, the intelligent question-answering system can use a pre-trained NLP (Natural Language Processing) model or a bag-of-words model to convert the target question text and the question text in the question-answering table into feature vectors, and these vectors can capture the main semantic information of the text, which is convenient for subsequent similarity comparison; then, based on the feature vectors, a cosine similarity algorithm is used to calculate the similarity between the target question text and each question text in the question library, wherein the cosine similarity measures the similarity between the two vectors by calculating the cosine value of the angle between them, and the value range is between -1 and 1, 1 means exactly the same, and 0 means no similarity; then, a predefined first similarity threshold is set to determine whether the target question text and the question text in the question-answering table are successfully matched; if the similarity between the target question text and any question text is not lower than this threshold, the system considers that the two are successfully matched, otherwise the match fails.
[0045] Furthermore, when the above matching result is a successful match, the intelligent question-answering system will return the first target structured answer result of the question text that is most similar to the target question text.
[0046] Optionally, the intelligent question-answering system may provide question-answering feedback according to the following rules, including:
[0047] When the text similarity between the target question text and the first question text in the question-answer table is not less than a preset second similarity threshold, feeding back a first target structured answer result corresponding to the first question text to the target user;
[0048] When the text similarity between the target question text and multiple second question texts in the question-and-answer table is lower than the second similarity threshold but not lower than the first similarity threshold, the multiple second question texts are fed back to the target user, and a question text selection instruction initiated by the target user based on the multiple second question texts is received, wherein the question text selection instruction includes the second question text selected by the target user; and the first target structured answer result corresponding to the second question text selected by the target user is fed back to the target user.
[0049] That is to say, the intelligent question answering system is designed with two different levels of similarity thresholds, where the second similarity threshold is higher than the first similarity threshold. The first level is a direct matching standard, which is used to quickly respond to highly similar questions; the second level is an alternative matching standard, which is used to deal with situations that have a certain semantic relevance to the target question but are not exactly the same.
[0050] Therefore, if the similarity between the target question text and a certain question text reaches or exceeds the second similarity threshold, the system directly feeds back the first target structured answer result of the successfully matched question text to the user without further manual intervention. If the similarity between the target question text and multiple question texts in the question-answer table is lower than the second similarity threshold, but higher than the first similarity threshold, the system presents these candidate matching question texts to the user; and the user can select one or more second question texts that are closest to their needs based on the information displayed by the system, and feed back the question text selection instruction to the system, and the system returns the first target structured answer result of the second question text selected by the user. In this process, through the user's selection instruction, the system can further refine the match and improve the accuracy of the answer.
[0051] Through the above-mentioned feedback strategy, the embodiment of the present application can not only efficiently handle highly similar questions, but also flexibly respond to questions that are semantically similar but not exactly the same in expression. Through the alternative matching process involving users, the flexibility of the intelligent question-answering system and the user's participation are improved, ensuring the accuracy and satisfaction of the answer results.
[0052] When the above matching result is a successful match, the intelligent question and answer system will use machine learning and search engines to jointly implement intelligent question and answer to feedback the corresponding second target structured answer result to the target user.
[0053] As an optional implementation, in the technical solution provided in the above step S108, the intelligent question answering system may first determine the business type corresponding to the target question text according to the following method, including:
[0054] Step 1: Preprocess the target question text, including but not limited to: text cleaning, stemming, etc. Text cleaning can remove irrelevant symbols, punctuation marks, and stop words to reduce noise interference; stemming is to restore the vocabulary to its basic form, thereby reducing the analysis error caused by word form changes.
[0055] Step 2: Perform semantic analysis on the preprocessed target question text, convert the target question text into vector form, and obtain the corresponding target text vector.
[0056] Specifically, the preprocessed target question text can be semantically parsed through a deep learning model and converted into a computable vector representation. This usually involves word embedding, such as using models such as Word2Vec, GloVe, or BERT to map each word in the text to a high-dimensional vector space and maintain the semantic relationship between words. The vectorization of the entire text can be the average or weighted average of word vectors, or through specific models such as LSTM (Long Short-Term Memory), GRU (Gated Recurrent Unit), or Transformer, directly converting the entire text into a vector representing its semantics.
[0057] Step 3: Use the classification model to analyze the target text vector and obtain the business type corresponding to the target question text.
[0058] The above-mentioned class model is iteratively trained based on the training sample set and the sample label set. The training sample set contains historical question texts, and the sample label set contains the business type label corresponding to each historical question text. The model generates a classifier that can predict the business type of new question text by learning the association between the vector representation of the historical question text and the business type. The model used can be a support vector machine (SVM), random forest, neural network (especially convolutional neural network CNN, recurrent neural network RNN or Transformer with attention mechanism), etc.
[0059] Therefore, the intelligent question answering system can input the target question text that has been preprocessed and converted into a vector form into the trained classification model, and the model will output the business type that the target question text is most likely to correspond to based on its learned patterns and rules. This recognition process is automated and can quickly and accurately determine the business information of the question, providing guidance for subsequent searches and answers.
[0060] Furthermore, the intelligent question answering system may determine at least one business keyword related to the business type in the target question text according to the following method, including:
[0061] First, the target question text is segmented to obtain multiple word units. Among them, the intelligent question answering system can use word segmentation technology (such as Jieba word segmentation, NLTK or spaCy and other NLP tools) to decompose the target question text into a series of word units, thereby providing a basis for subsequent semantic analysis and business keyword extraction. For example, when the target question text entered by the user is: "How to detect 5G drones", it can be split into multiple word units such as "how", "detection", "5G", and "drone".
[0062] Next, for each word unit, determine whether the word unit is in the business word library corresponding to the business type. Among them, the business word library is pre-built according to the specific business type, and contains common professional vocabulary in the business scenario, such as business theme dictionary (such as dedicated line, delivery, etc.) and product dictionary (such as 5G customized network, Tianyi cloud computer, etc.).
[0063] When the word unit is in the business vocabulary corresponding to the business type, the word unit is used as a business keyword.
[0064] That is, if a word unit directly matches a word in a business vocabulary corresponding to a business type, the system considers that the word unit is a key business keyword related to the current business type.
[0065] When the word unit is not in the business vocabulary corresponding to the business type, determine the word similarity between the word unit and each business word in the business vocabulary corresponding to the business type, and use the target business word whose word similarity is not less than a preset second similarity threshold as the business keyword.
[0066] That is to say, for the word units that cannot be directly matched to the business vocabulary, the system further calculates the word similarity between them and each business word in the business vocabulary, where the word similarity can be measured by cosine similarity, Euclidean distance or other suitable similarity measurement methods. At the same time, a predefined second similarity threshold is set to filter word units with high similarity to business words. If the similarity between the word unit and any business word is not less than the second similarity threshold, the word unit is also regarded as a business keyword for subsequent search and recommendation.
[0067] The embodiment of the present application can efficiently identify and expand the business keywords in the target question text through the above-mentioned business keyword extraction scheme. Even for newly appeared words or words with slightly different expressions, their potential semantic associations can be captured by calculating similarities, thereby improving the coverage and accuracy of the search.
[0068] Furthermore, business keywords corresponding to the business type in the target question text are extracted as query conditions, and a reverse indexing method is used to determine at least one second structured answer result corresponding to the query conditions in a preset database, and each target structured answer result is fed back to the target user.
[0069] That is to say, the intelligent question-answering system collects a large number of documents and uploads them to the search engine, and uses the inverted index technology to convert these documents into searchable indexes. When the user enters the question text, the system parses the question text and uses the inverted index to quickly retrieve relevant documents, thereby significantly improving the retrieval efficiency. For example, when the question text searched by the user is: "Reconnaissance 5G drones", by parsing the text, the business keywords "reconnaissance" and "drone" in the text can be extracted, and these two business keywords can be converted into executable query conditions, and the inverted index can be used to find the documents containing the two business keywords "reconnaissance" and "drone" and their locations in each document. Through the inverted index, the system can quickly find all documents containing these business keywords.
[0070] In addition, in addition to multiple second structured answer results, the above-mentioned database also includes: related information of each second structured answer result, and the related information includes but is not limited to: document publication date (which reflects the timeliness of information), user satisfaction (measures the quality of answer results and user acceptance), etc.
[0071] Optionally, the intelligent question-answering system may feed back each second target structured answer result to the target user according to the following rules, including:
[0072] First, target-related information of each second target structured answer result is determined based on the database.
[0073] Then, based on the target association information of each second target structured answer result, the feedback priority of each second target structured answer result is determined according to a preset dimension.
[0074] Among them, the above-mentioned preset dimensions include at least one of the following: document publication date, user satisfaction. The newer the document publication date of the second target structured answer result and the higher the user satisfaction, the higher the corresponding feedback priority. Conversely, the older the document publication date of the second target structured answer result and the lower the user satisfaction feedback, the lower the corresponding feedback priority.
[0075] Finally, each second target structured answer result is fed back to the target user in turn according to the feedback priority from high to low.
[0076] Optionally, the intelligent question-answering system may also feed back each second target structured answer result to the target user according to the following rules, including:
[0077] Determine the document similarity between documents within each second target structured answer result corresponding to the same business keyword, and merge at least one second target structured answer result whose document similarity is greater than a third similarity threshold, so as to reorganize the business keyword, multiple documents containing the business keyword, and the position information of the business keyword in each document into a second target structured answer result, and feed back the reorganized second target structured answer result to the target user.
[0078] Among them, the order of each document in the reorganized second target structured answer result is determined at least according to the document publication date and user satisfaction. Among them, the newer the document is published and the higher the user satisfaction is, the earlier the corresponding document is placed. Conversely, the older the document publication date is and the lower the user satisfaction is, the later the corresponding document is placed.
[0079] The embodiments of the present application use the above two feedback mechanisms to ensure that users receive the most relevant, latest, and most satisfactory information first, which not only improves the real-time and quality of feedback results, but also optimizes the user's query experience and reduces the effective workload of users in screening through large amounts of information.
[0080] As an optional implementation, after feeding back each second target structured answer result to the target user, the intelligent question and answer system may also analyze each second target structured question and answer result according to the following rules to decide whether the question and answer table needs to be updated, including:
[0081] Step 1: Obtain the total number of times the target question text is asked within a preset time period, the job information of each user who asks the target question text, the maximum number of times the target question text is asked per unit time, the impact factor of the business type corresponding to the target question text on the enterprise operation management, and the user satisfaction of each user who asks the target question text with respect to each second target structured answer result, wherein the job information includes at least: work department and job position.
[0082] The preset time period may be a fixed update cycle, such as one week, two weeks or one month, etc. The unit time may be a plurality of unit times obtained by equally dividing the preset time period, such as one hour, three hours or one day, etc. In addition, the work grades and job positions corresponding to different job information are different. The corresponding relationship between the work department and the department grade, and the corresponding relationship between the job position and the position grade are shown in Tables 1 and 2, respectively.
[0083] Table 1
[0084]
[0085]
[0086] Table 2
[0087] Job Positions Job Level intern 2 primary 4 intermediate 6 advanced 8 director 9 manager 10 Senior Manager 12 Director 14 Senior Director 16 Vice President 18 President 20
[0088] In addition, the degree of influence of different business types on enterprise operation management is also different. The embodiment of the present application quantifies the degree of influence through influence factors. The influence factors of different business types on enterprise operation management are specifically shown in Table 3 below.
[0089] Table 3
[0090]
[0091]
[0092] Step 2: Determine the importance score of the target question text to enterprise operations management based on the total number of times the target question text is asked, the job information of each user who asks the target question text, the maximum number of times the target question text is asked per unit time, and the impact factor of the business type corresponding to the target question text on enterprise operations management; and determine the quality score of each second target structured answer result corresponding to the target question text based on the user satisfaction of each user who asks the target question text with each second target structured answer result and the job information of each user who asks the target question text.
[0093] Specifically, the expression of the importance score of the above target question text to enterprise operation management can be written as:
[0094]
[0095] Among them, QS represents the importance score, DL i represents the department level of the i-th questioner (i.e. user), JL i represents the position level of the i-th questioner, n represents the total number of questioners, TM represents the total number of times the target question text is asked within the preset time period, HMF represents the maximum number of times the target question text is asked within a unit of time, DW represents the impact factor of the business type corresponding to the target question text on the enterprise operation management, and w1, w2, w3, and w4 are custom weight coefficients. Therefore, this importance score can reflect the urgency, attention, and field value of the target question text.
[0096] The expression for the quality score of each second target structured answer result corresponding to the above target question text can be written as:
[0097]
[0098] Among them, AS represents the quality score, DL irepresents the department level of the i-th questioner, JL i represents the job level of the i-th questioner, SR i represents the user satisfaction of the i-th questioner with the answer (i.e., all the second-goal structured question-answering results fed back), n represents the total number of questioners, and w5 is the custom weight coefficient.
[0099] It should be noted that, considering that user feedback on answer satisfaction is not a mandatory step (i.e., some questioners do not provide user satisfaction), at least three scores are provided for user satisfaction (for example, satisfied corresponds to 1, average corresponds to 0, and dissatisfied corresponds to -1), and if the satisfaction score is not obtained, the system automatically sets the satisfaction score to the default value (for example, 0).
[0100] Step 3: Determine the update index of the target question text in the question-answer table based on the importance score of the target question text to the enterprise operation management and the quality score of each second target structured answer result corresponding to the target question text.
[0101] Specifically, the expression for the above update index can be written as:
[0102] WS=w6·AS-w7·QS
[0103] Among them, WS represents the update index, AS represents the quality score, QS represents the importance score, and w6 and w7 are custom weight coefficients respectively.
[0104] Step 4: When the update index is higher than the preset index threshold, obtain the third structured answer result obtained by manual question and answering of the target question text, and add the target question text and the corresponding third structured answer result to the question and answer table.
[0105] Specifically, since the number of question and answer texts and corresponding structured question and answer results in the question and answer table is fixed, and each question text in the question and answer table is arranged from top to bottom in descending order according to the importance score of the question text, that is, the higher the importance score of the question text, the higher its position in the question and answer table. Therefore, the intelligent question and answer system can add the target question text and the corresponding structured answer result to the question and answer table according to the following rules, including: determining the target position of the target question text in the question and answer table according to the importance score of the target question text, inserting the target question text and the corresponding structured answer result into the target position in the question and answer table, and deleting the question text and the corresponding structured answer result at the last position in the question and answer table.
[0106] That is to say, the intelligent question-answering system manages the question-answering table by maintaining a dynamic priority queue, wherein the head of the queue is the question text with the highest importance score but a lower quality score generated by the deep learning network, and the tail of the queue is the question text with a lower importance score and a higher quality score generated by the deep learning network. Therefore, when the update index is higher than the preset index threshold, the third structured answer result obtained by manually answering the target question text is obtained, and its position in the queue is determined according to the importance score of the target question text, thereby determining the insertion position in the question-answering table. After determining the target position of the target question text, the system inserts the question text and the corresponding structured answer result into the corresponding position of the question-answering table. In order to keep the capacity of the question-answering table fixed (for example, only retaining the top ten questions and their answers), the system checks the current length of the question-answering table. If the length of the question-answering table after insertion exceeds the preset capacity, the system deletes the question text and the structured answer result at the end of the question-answering table (i.e., the tail of the queue) to ensure that the question-answering table always contains only the most important or most frequently used questions and answers.
[0107] It should be noted that the above insertion and deletion operations are performed at the database level to ensure the real-time nature of the update and the consistency of the data. The system uses the insertion and deletion functions of the database. When a new entry needs to be inserted, the insertion instruction is called; when an old entry needs to be deleted, the deletion instruction is called. In this way, the question and answer table can be dynamically maintained in the database and always remain the most important or most frequently used question set.
[0108] Through the above scheme, the embodiment of the present application can dynamically adjust the content of the question and answer form according to the importance of the question, ensuring that users see the most important and relevant questions and their structured answers first, while also maintaining the capacity control of the question and answer form, improving the information update efficiency and the user's query experience.
[0109] In the above intelligent question-answering method, the intelligent question-answering system matches the input target question text with the preset question-answering table, wherein the question-answering table stores a preset number of question texts and the first structured answer result corresponding to each question text; if the match is successful, the first target structured answer result corresponding to the question text matching the target question text is directly fed back to the target user, thereby quickly responding to the user's question; and if the match fails, a deep learning model is used to perform deep semantic analysis on the question text, identify its business type and extract business keywords related to the business type, and then, based on the business keyword query, the inverted index technology is used to search in the database, quickly locate the document containing the business keyword, and extract the structured answer result from it and feed it back to the user. This effectively solves the problem of insufficient response of the traditional question-answering system to novel or complex questions, while improving the real-time and accuracy of the search, and providing users with more personalized and efficient question-answering services.
[0110] In addition, the intelligent question-answering system can also consider dimensions such as document publication date and user satisfaction, sort the retrieved second-target structured answer results, and give priority to showing users the latest and most satisfactory information, which improves the timeliness and satisfaction of users in obtaining information. At the same time, the system can evaluate the importance of questions based on the user's department, rank and other information, and evaluate the satisfaction of answers based on user feedback, and determine whether the target question text and the corresponding second-target structured answer results are high-importance but low-quality question and answer content. If so, obtain the third-structured answer result of the manual answer to the target question and answer text, and insert the target question and answer text and its third-structured answer result into the question and answer table according to the importance score of the target question and answer text, so as to achieve personalized question processing and continuous optimization of answers.
[0111] Example 2
[0112] According to an embodiment of the present application, an intelligent question-answering device for implementing the intelligent question-answering method in Embodiment 1 is also provided. Figure 3 As shown, the intelligent question-answering device at least includes: an acquisition module 32, a matching module 34, a first feedback module 36 and a second feedback module 38, wherein:
[0113] An acquisition module 32 is used to acquire a target question text input by a target user;
[0114] A matching module 34 is used to determine the matching result between the target question text and a preset question-answer table, wherein the question-answer table includes: a preset number of question texts and a first structured answer result corresponding to each question text, and the first structured answer result includes: a document identifier of a target document and location information of the question text corresponding to the question text in the target document;
[0115] A first feedback module 36 is used to feed back a first target structured answer result corresponding to the question text matching the target question text to the target user when the matching result is successful;
[0116] The second feedback module 38 is used to analyze the target question text using a pre-trained classification model when the matching result is a matching failure, determine the business type corresponding to the target question text, and determine at least one business keyword related to the business type in the target question text; use each business keyword as a query condition, and use a reverse indexing method to determine at least one second target structured answer result corresponding to the query condition in a preset database, and feed back each second target structured answer result to the target user, wherein the database includes at least: multiple second structured answer results, and the second structured answer result includes: business keywords, document identifiers of documents where business keywords are located, and location information of business keywords in corresponding documents.
[0117] It should be noted that each module in the intelligent question and answer device in the embodiment of the present application corresponds one by one to each implementation step of the intelligent question and answer method in Example 1. Since a detailed description has been given in Example 1, some details not reflected in this embodiment can be referred to Example 1 and will not be repeated here.
[0118] Example 3
[0119] According to an embodiment of the present application, a computer program product is also provided, which includes a computer program, wherein when the computer program is executed by a processor, the intelligent question and answer method in Example 1 is implemented.
[0120] According to an embodiment of the present application, a non-volatile storage medium is also provided, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the intelligent question and answer method in Example 1 by running the computer program.
[0121] According to an embodiment of the present application, a processor is also provided, which is used to run a computer program, wherein the intelligent question and answer method in Example 1 is executed when the computer program is running.
[0122] According to an embodiment of the present application, an electronic device is also provided, which includes: a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the intelligent question and answer method in Example 1 through the computer program.
[0123] Specifically, the computer program executes the following steps when it is running: obtaining a target question text input by a target user; determining a matching result between the target question text and a preset question-and-answer table, wherein the question-and-answer table includes: a preset number of question texts and a first structured answer result corresponding to each question text, and the first structured answer result includes: a document identifier of a target document and location information of the question text corresponding to the question text in the target document; when the matching result is a successful match, the first target structured answer result corresponding to the question text matching the target question text is fed back to the target user; when the matching result is a failed match, the target question text is analyzed using a pre-trained classification model to determine the business type corresponding to the target question text, and at least one business keyword related to the business type in the target question text; using each business keyword as a query condition, using a reverse indexing method to determine at least one second target structured answer result corresponding to the query condition in a preset database, and feeding back each second target structured answer result to the target user, wherein the database includes at least: a plurality of second structured answer results, and the second structured answer result includes: a business keyword, a document identifier of a document where the business keyword is located, and location information of the business keyword in the corresponding document.
[0124] As an optional implementation, the electronic device may be in the form of a mobile terminal, a computer terminal or a similar computing device. Figure 4 FIG. 1 shows a hardware structure block diagram of an electronic device for implementing an intelligent question-answering method. Figure 4 As shown, the electronic device 40 may include one or more (402a, 402b, ..., 402n are used to illustrate) processors 402 (the processor 402 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 404 for storing data, and a transmission device 406 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 4 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 4 More or fewer components as shown, or with Figure 4 Different configurations are shown.
[0125] It should be noted that the one or more processors 402 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the electronic device 40. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0126] The memory 404 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the intelligent question-answering method in the embodiment of the present application. The processor 402 executes various functional applications and data processing by running the software programs and modules stored in the memory 404, that is, realizing the vulnerability detection method of the above-mentioned application. The memory 404 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 404 may further include a memory remotely arranged relative to the processor 402, and these remote memories may be connected to the electronic device 40 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0127] The transmission device 406 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the electronic device 40. In one example, the transmission device 406 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 406 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0128] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the electronic device 40 .
[0129] The serial numbers of the above embodiments are only for description and do not represent the advantages or disadvantages of the embodiments.
[0130] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0131] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0132] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0133] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0134] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.
[0135] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. An intelligent question-answering method, characterized in that: include: Get the target question text entered by the target user; Determine a matching result between the target question text and a preset question-and-answer table, wherein the question-and-answer table includes: a preset number of question texts and a first structured answer result corresponding to each of the question texts, and the first structured answer result includes: a document identifier of a target document and location information of the question text corresponding to the question text in the target document; In the case where the matching result is a successful match, feeding back a first target structured answer result corresponding to the question text matching the target question text to the target user; In the case where the matching result is a matching failure, the target question text is analyzed using a pre-trained classification model to determine the business type corresponding to the target question text, and to determine at least one business keyword related to the business type in the target question text; each of the business keywords is used as a query condition, and a reverse indexing method is used to determine at least one second target structured answer result corresponding to the query condition in a preset database, and each of the second target structured answer results is fed back to the target user, wherein the database includes at least: multiple second structured answer results, and the second structured answer result includes: business keywords, document identifiers of documents where the business keywords are located, and location information of the business keywords in the corresponding documents.
2. The method according to claim 1, characterized in that Determining a matching result between the target question text and a preset question-and-answer table includes: Determining the text similarity between the target question text and each question text in the question-answer table; In the case where the text similarity between the target question text and any question text in the question-answer form is not less than a preset first similarity threshold, determining that the matching result is a successful match; When the text similarity between the target question text and any question text in the question-and-answer table is lower than the first similarity threshold, the matching result is determined to be a matching failure.
3. The method according to claim 2, characterized in that Feeding back a first target structured answer result corresponding to the question text matching the target question text to the target user, including: When the text similarity between the target question text and the first question text in the question-answer form is not less than a preset second similarity threshold, feeding back a first target structured answer result corresponding to the first question text to the target user, wherein the second similarity threshold is higher than the first similarity threshold; When the text similarity between the target question text and multiple second question texts in the question-and-answer form is lower than the second similarity threshold but not lower than the first similarity threshold, the multiple second question texts are fed back to the target user, and a question text selection instruction initiated by the target user based on the multiple second question texts is received, wherein the question text selection instruction includes the second question text selected by the target user; and the first target structured answer result corresponding to the second question text selected by the target user is fed back to the target user.
4. The method according to claim 1, characterized in that: Analyzing the target question text using a pre-trained classification model to determine the business type corresponding to the target question text includes: Preprocessing the target question text, wherein the preprocessing includes at least one of the following: text cleaning and stemming; Performing semantic analysis on the preprocessed target question text, converting the target question text into a vector form, and obtaining a corresponding target text vector; Analyzing the target text vector using the classification model to obtain the business type corresponding to the target question text; The classification model is obtained by iterative training using a training sample set and a sample label set, wherein the training sample set includes a plurality of historical problem texts as training samples, and the sample label set includes a business type label corresponding to each of the historical problem texts.
5. The method according to claim 1, characterized in that Determining at least one business keyword related to the business type in the target question text includes: Performing word segmentation processing on the target question text to obtain multiple word units; For each of the word units, determining whether the word unit is in the business vocabulary corresponding to the business type; In the case where the word unit is in the business vocabulary corresponding to the business type, using the word unit as the business keyword; When the word unit is not in the business vocabulary corresponding to the business type, determine the word similarity between the word unit and each business word in the business vocabulary corresponding to the business type, and use the target business word whose word similarity is not less than a preset second similarity threshold as the business keyword.
6. The method according to claim 1, characterized in that The database also includes: associated information of each second structured answer result, and the associated information includes at least one of the following: document publication date, user satisfaction, wherein each second target structured answer result is fed back to the target user, including: Determining target association information of each of the second target structured answer results according to the database; Based on the target association information of each second target structured answer result, determining the feedback priority for each second target structured answer result according to a preset dimension, wherein the preset dimension includes at least one of the following: document publication date, user satisfaction, the newer the document publication of the second target structured answer result and the higher the user satisfaction, the higher the corresponding feedback priority, and conversely, the older the document publication date of the second target structured answer result and the lower the user satisfaction of the user feedback, the lower the corresponding feedback priority; The target structured answer results are fed back to the target user in turn according to the feedback priority from high to low.
7. The method according to claim 1, characterized in that After feeding back each of the second target structured answer results to the target user, the method includes: Obtain the total number of times the target question text is asked within a preset time period, the job information of each user who asks the target question text, the maximum number of times the target question text is asked within a unit time, the impact factor of the business type corresponding to the target question text on the enterprise operation management, and the user satisfaction of each user who asks the target question text on each second target structured answer result, wherein the job information at least includes: work department, job position; Determine the importance score of the target question text to the enterprise operation management based on the total number of times the target question text is asked within a preset time period, the job information of each user who asks the target question text, the maximum number of times the target question text is asked within a unit time, and the impact factor of the business type corresponding to the target question text on the enterprise operation management, and determine the quality score of each second target structured answer result corresponding to the target question text based on the user satisfaction of each user who asks the target question text to each second target structured answer result and the job information of each user who asks the target question text; Determining an update index of the target question text in the question-answer table according to the importance score of the target question text to the enterprise operation management and the quality score of the second target structured answer result corresponding to the target question text; When the update index is higher than a preset index threshold, a third structured answer result obtained by manually answering the target question text is obtained, and the target question text and the corresponding third structured answer result are added to the question and answer table.
8. The method according to claim 7, characterized in that The question texts in the question-answer table are arranged from top to bottom in descending order of importance scores of the question texts, wherein the target question text and the corresponding structured answer result are added to the question-answer table, including: Determine the target position of the target question text in the question and answer table according to the importance score of the target question text, insert the target question text and the corresponding structured answer result into the target position in the question and answer table, and delete the last question text and the corresponding structured answer result in the question and answer table.
9. An intelligent question-answering system, characterized in that: include: An acquisition module is used to obtain the target question text input by the target user; A matching module, used to determine the matching result between the target question text and a preset question-answer table, wherein the question-answer table includes: a preset number of question texts and a first structured answer result corresponding to each of the question texts, and the first structured answer result includes: a document identifier of a target document and location information of the question text corresponding to the question text in the target document; A first feedback module is used to feed back a first target structured answer result corresponding to the question text matching the target question text to the target user when the matching result is a successful match; The second feedback module is used to analyze the target question text using a pre-trained classification model when the matching result is a matching failure, determine the business type corresponding to the target question text, and determine at least one business keyword related to the business type in the target question text; use each of the business keywords as a query condition, and use a reverse indexing method to determine at least one second target structured answer result corresponding to the query condition in a preset database, and feed back each of the second target structured answer results to the target user, wherein the database includes at least: multiple second structured answer results, and the second structured answer result includes: business keywords, document identifiers of documents where the business keywords are located, and location information of the business keywords in the corresponding documents.
10. A computer program product, characterized in that include: A computer program, wherein when the computer program is executed by a processor, the intelligent question-answering method according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Question and answer method and device, computer equipment and program product
CN120429412A