Knowledge question and answer method and device and storage medium
By matching the questions to be queried with the knowledge vector database, multiple knowledge texts are determined and information fusion is carried out, the problem of inefficient determination of failure causes and solutions in network operation and maintenance is solved, and efficient and accurate knowledge questions and answers are achieved.
Patent Information
- Application Number
- CN202311356604.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-18
- Publication Date
- 2025-05-02
AI Technical Summary
In network operation and maintenance, determining the cause of failure and solutions is inefficient and accurate, and existing search and recommendation matching methods are difficult to meet actual needs.
By obtaining the problem to be queried and matching it with the vectors in the preset knowledge vector database, multiple feature vectors are obtained; multiple knowledge texts used for problem processing are determined based on these feature vectors, and information fusion is carried out on these knowledge texts to obtain the problem query results.
This method can accurately obtain the question query results, greatly improving the efficiency and accuracy of knowledge questions and answers.
Smart Images

Figure CN119917602A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of artificial intelligence technology, and in particular to a knowledge question answering method, device, and storage medium. Background Art
[0002] With the development of technology, the functions of terminal devices (mobile phones, computers and smart homes), base stations and servers are becoming more and more abundant. As a result, it is difficult to determine the cause and solution of the fault when a fault occurs. At present, in network operation and maintenance work, the cause and solution of the fault are usually determined by simple search and recommendation matching. The fault cases retrieved by this retrieval mode are isolated case texts. The technicians still need to analyze and identify the case texts to obtain the required information. Secondly, the current search content cannot meet the actual needs in terms of accuracy, resulting in low efficiency of technicians in handling faults.
[0003] Therefore, how to improve the efficiency and accuracy of knowledge question answering is a problem that needs to be solved urgently. Summary of the invention
[0004] The embodiments of the present application provide a knowledge question answering method, device and storage medium, aiming to improve the efficiency and accuracy of knowledge question answering.
[0005] In a first aspect, an embodiment of the present application provides a knowledge question answering method, comprising:
[0006] Obtaining a question to be queried, and matching the question to be queried with vectors in a preset knowledge vector database to obtain multiple feature vectors;
[0007] Determining a plurality of knowledge texts for problem processing according to the plurality of feature vectors;
[0008] The information of each of the knowledge texts is fused according to the question to be queried to obtain a question query result.
[0009] In a second aspect, an embodiment of the present application further provides a terminal device, comprising a processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of any one of the knowledge question and answer methods provided in the specification of this application are implemented.
[0010] In a third aspect, an embodiment of the present application further provides a storage medium for computer-readable storage, characterized in that the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any knowledge question and answer method provided in the specification of this application.
[0011] The embodiment of the present application provides a knowledge question answering method, device and storage medium. The embodiment of the present application obtains a question to be queried, and matches the question to be queried with a vector in a preset knowledge vector database to obtain multiple feature vectors; according to the multiple feature vectors, multiple knowledge texts for question processing are determined; according to the question to be queried, information fusion is performed on each of the knowledge texts to obtain a question query result. By determining multiple knowledge texts for question processing and performing information fusion on each knowledge text, the present application can accurately obtain a question query result, greatly improving the efficiency and accuracy of knowledge question answering. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 A flowchart of a knowledge question answering method provided in an embodiment of the present application;
[0013] Figure 2 A flowchart of another knowledge question answering method provided in an embodiment of the present application;
[0014] Figure 3 for Figure 1 A schematic diagram of the sub-step flow chart of the knowledge question answering method in FIG.
[0015] Figure 4 A flowchart of another knowledge question answering method provided in an embodiment of the present application;
[0016] Figure 5 A schematic block diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are 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 are within the scope of protection of this application.
[0018] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0019] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this application specification, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0020] The embodiment of the present application provides a knowledge question answering method, device and storage medium. The knowledge question answering method can be applied to a terminal device, which can be an electronic device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer and a personal digital assistant. For example, the terminal device is a desktop computer, which obtains a question to be queried, and matches the question to be queried with a vector in a preset knowledge vector database to obtain multiple feature vectors; based on the multiple feature vectors, multiple knowledge texts for question processing are determined; and information fusion is performed on each of the knowledge texts according to the question to be queried to obtain a question query result.
[0021] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0022] Please refer to Figure 1 , Figure 1 A flowchart of a knowledge question and answer method provided in an embodiment of the present application.
[0023] like Figure 1 As shown, the knowledge question answering method includes steps S101 to S103.
[0024] Step S101: Obtain a question to be queried, and match the question to be queried with vectors in a preset knowledge vector database to obtain multiple feature vectors.
[0025] Among them, the question to be queried is a question that needs to be consulted. The question to be queried can be determined according to the actual situation. The embodiment of the present application does not make specific limitations on this. For example, the question to be queried may be the reason for the sudden drop after the wireless resource control link is successful.
[0026] It should be noted that the preset knowledge vector database is a database composed of knowledge vectors generated from pre-set knowledge texts. The preset knowledge vector database can be set according to actual conditions, and the embodiment of the present application does not make any specific limitations on this.
[0027] In one embodiment, if Figure 2 As shown, before step S101, steps S201 to S202 are also included.
[0028] Step S201: Acquire knowledge text information.
[0029] Among them, the knowledge text information is the answer text and explanation text corresponding to each question. The knowledge text information can be set according to actual conditions. The embodiment of the present application does not make specific limitations on this. For example, the knowledge text information includes an operation manual, an operation and maintenance guidance manual, and a work experience summary text.
[0030] In one embodiment, each knowledge text is acquired to obtain knowledge text information, and a knowledge vector database and a knowledge text library are established by acquiring the knowledge text information, thereby improving the efficiency and accuracy of knowledge question answering.
[0031] Step S202: performing text segmentation processing on the knowledge text information to obtain a plurality of short knowledge texts, and performing vector conversion on each of the short knowledge texts to generate a plurality of feature vectors.
[0032] Each knowledge text in the knowledge text information is segmented to obtain a short knowledge text corresponding to each knowledge text. The text segmentation method can be selected according to the actual situation, and the embodiment of the present application does not specifically limit this. The text segmentation method can be segmentation, semantic segmentation, character segmentation, etc.
[0033] Exemplarily, the knowledge text is segmented by fragment recognition to obtain the segment connection points, and the knowledge text is segmented according to the segment connection points to obtain multiple short knowledge texts. The knowledge text is segmented in a fragment manner to obtain multiple short knowledge texts corresponding to the knowledge text.
[0034] Exemplarily, semantic recognition is performed on the knowledge text to obtain at least two semantic information corresponding to the knowledge text, and the knowledge text is segmented based on each semantic information to obtain multiple short knowledge texts. Among them, the method of semantic recognition of knowledge text can be selected according to actual conditions, and the embodiment of the present application does not specifically limit this. For example, recognition is performed by a preset semantic recognition model. By semantically segmenting the knowledge text, multiple short knowledge texts can be accurately obtained.
[0035] Exemplarily, the key characters of the knowledge text are identified to obtain at least two key characters corresponding to the knowledge text, and the knowledge text is segmented based on each key character to obtain multiple short knowledge texts. The character recognition method can be selected according to the actual situation, and the embodiment of the present application does not specifically limit this. For example, recognition is performed by a preset key character recognition model. By segmenting the knowledge text by characters, multiple short knowledge texts can be accurately obtained.
[0036] In one embodiment, after obtaining a plurality of short knowledge texts, vector conversion is performed on each short knowledge text to generate a plurality of feature vectors, and each feature vector is stored in a preset knowledge vector database, wherein the vector conversion method can be selected according to the actual situation, and the embodiment of the present application does not make specific limitations on this. For example, a vector conversion is performed on each short knowledge text through a text2vec model to obtain a plurality of feature vectors. The preset knowledge vector database is a memory for storing feature vectors, and the memory can be selected according to the actual situation. The embodiment of the present application does not make specific limitations on this. For example, the memory can be a FAISS vector database. By performing vector conversion on a plurality of short knowledge texts, a plurality of feature vectors can be accurately obtained.
[0037] In one embodiment, the question to be queried is vector-converted to obtain a feature vector of the question to be queried, and the similarity between the feature vector of the question to be queried and each vector in the preset knowledge vector database is determined; the vectors in the preset knowledge vector database are sorted based on the similarities to obtain a vector queue, and a preset number of vectors are selected from the vector queue from high to low according to the similarity to obtain multiple feature vectors. The preset number can be set according to actual conditions, and the embodiment of the present application does not specifically limit this. For example, the preset number can be set to 10. By matching the feature vector of the question to be queried with each vector in the preset knowledge vector database, multiple feature vectors can be accurately obtained.
[0038] In one embodiment, the method of performing vector conversion on the query question to obtain the feature vector of the query question may be: performing vector conversion on the query question using a text2vec model to obtain the feature vector of the query question. Performing vector conversion on the query question using a text2vec model can accurately obtain the feature vector of the query question.
[0039] In one embodiment, the method for determining the similarity between the feature vector of the question to be queried and each vector in the preset knowledge vector database can be: calculating the cosine similarity between the feature vector of the question to be queried and each vector in the preset knowledge vector database, obtaining the cosine similarity between the feature vector of the question to be queried and each vector, and determining the cosine similarity between the feature vector of the question to be queried and each vector as the similarity between the feature vector of the question to be queried and each vector. By calculating the cosine similarity between the feature vector of the question to be queried and each vector, the similarity between the feature vector of the question to be queried and each vector can be accurately obtained.
[0040] In one embodiment, the method for determining the similarity between the feature vector of the question to be queried and each vector in the preset knowledge vector database may be: calculating the Euclidean distance between the feature vector of the question to be queried and each vector in the preset knowledge vector database, obtaining the Euclidean distance between the feature vector of the question to be queried and each vector, and determining the Euclidean distance between the feature vector of the question to be queried and each vector as the similarity between the feature vector of the question to be queried and each vector. By calculating the Euclidean distance between the feature vector of the question to be queried and each vector, the similarity between the feature vector of the question to be queried and each vector can be accurately obtained.
[0041] In one embodiment, the vectors in the preset knowledge vector database are sorted based on the similarities to obtain the vector queue in a manner that: the vectors in the preset knowledge vector database are sorted from high to low in similarity to obtain the vector queue; or the vectors in the preset knowledge vector database are sorted from low to high in similarity to obtain the vector queue. By sorting the vectors based on the similarity, the vector queue can be accurately obtained.
[0042] Step S102: Determine a plurality of knowledge texts for problem processing based on the plurality of feature vectors.
[0043] Among them, one feature vector can match one knowledge text, and multiple feature vectors can match one knowledge text.
[0044] In one embodiment, if Figure 3 As shown, step S102 includes sub-steps S1021 and S1022.
[0045] Sub-step S1021, matching short knowledge texts according to the multiple feature vectors to obtain multiple short knowledge texts, and expanding similar texts for each of the short knowledge texts to obtain multiple candidate knowledge texts.
[0046] In one embodiment, the short knowledge text where each feature vector is located is queried to obtain multiple short knowledge texts. By querying the short knowledge text where the feature vector is located, multiple short knowledge texts for question processing can be accurately obtained, which greatly improves the efficiency and accuracy of knowledge question answering.
[0047] Exemplarily, the feature vector includes feature vector A, feature vector B, feature vector C, feature vector D and feature vector E. The short knowledge text corresponding to feature vector A is short knowledge text 12, the short knowledge texts corresponding to feature vectors B and C are short knowledge text 20, the short knowledge text corresponding to feature vector C is short knowledge text 50, the short knowledge text corresponding to feature vector D is short knowledge text 52, and the short knowledge text corresponding to feature vector E is short knowledge text 107. Therefore, the short knowledge texts include short knowledge text 12, short knowledge text 20, short knowledge text 50, short knowledge text 52 and short knowledge text 107.
[0048] In one embodiment, each short knowledge text is expanded with similar texts to obtain multiple candidate knowledge texts in the following manner: the short knowledge text associated with each short knowledge text is expanded to obtain multiple candidate knowledge texts. The associated short knowledge texts can be set according to actual conditions, and the embodiment of the present application does not specifically limit this. By expanding the short knowledge text with similar texts, the knowledge question and answer is made more accurate.
[0049] Exemplarily, the context short knowledge text associated with the short knowledge text is expanded to obtain a plurality of candidate knowledge texts. The context short sentences associated with the short knowledge text are expanded to obtain a plurality of candidate knowledge texts.
[0050] Sub-step S1022: screening each of the candidate knowledge texts according to the question to be queried to obtain a plurality of knowledge texts.
[0051] In one embodiment, the intention information of the question to be queried is determined; the candidate knowledge texts are screened according to the intention information to obtain multiple knowledge texts. By screening the candidate knowledge texts according to the intention information, multiple knowledge texts can be accurately obtained, which greatly improves the accuracy of knowledge questions and answers.
[0052] For example, the intention information of the problem to be queried is the root cause of the fault, and the candidate knowledge texts whose intention information is the root cause of the fault are screened out to obtain multiple knowledge texts. For another example, the intention information of the problem to be queried is the operation steps, and the candidate knowledge texts whose intention information is the operation steps are screened out to obtain multiple knowledge texts.
[0053] Step S103: perform information fusion on each of the knowledge texts according to the question to be queried to obtain a question query result.
[0054] In one embodiment, information fusion is performed on each of the knowledge texts based on the question to be queried through a preset information fusion model to obtain a question query result. The preset information fusion model can be set according to actual conditions, and the embodiment of the present application does not specifically limit this. For example, the preset information fusion model can be a neural network model. By performing information fusion on the knowledge text through the preset information fusion model, the question query result can be accurately obtained, which greatly improves the efficiency and accuracy of knowledge question answering.
[0055] In one embodiment, if Figure 4 As shown, step S103 also includes steps S301 to S304.
[0056] Step S301: Determine the credibility of the question query result based on each of the knowledge texts and the question query result.
[0057] The text information coincidence index is calculated for each knowledge text and question query result to obtain the credibility of the question query result, wherein the text information coincidence index can be selected according to the actual situation, and the embodiment of the present application does not make specific restrictions on this. For example, the text information coincidence index can be ROUGE-L, BLEU and BERTScore, etc. By calculating the text information coincidence index for each knowledge text and question query result to obtain the credibility of the question query result, the reliability of knowledge question answering can be greatly improved.
[0058] Step S302: When the credibility of the question query result is greater than or equal to a preset first credibility, determine that the question query result is a credible question query result.
[0059] The credibility of the question query result is greater than or equal to the preset first credibility, and the question query result is determined to pass the credibility check, and the question query result is determined to be a credible question query result. Among them, the equal to the preset first credibility can be set according to actual conditions, and the embodiment of the present application does not make specific limitations on this. For example, the preset first credibility can be 0.8. By checking the credibility of the question query result, the reliability of the knowledge question answering is greatly improved.
[0060] Step S303: When the credibility of the question query result is less than or equal to a preset second credibility, determine that the question query result is an untrustworthy question query result.
[0061] When the credibility of the question query result is less than or equal to the preset second credibility, it is determined that the question query result has not passed the credibility check, and the question query result is determined to be an untrustworthy question query result. The preset second credibility can be set according to actual conditions, and the embodiment of the present application does not specifically limit this. For example, the preset second credibility can be 0.6. By checking the credibility of the question query result, the reliability of the knowledge question answering is greatly improved.
[0062] Step S304: When the credibility of the question query result is greater than the preset second credibility and less than the preset first credibility, perform a second verification on the question query result.
[0063] When the credibility of the question query result is greater than the preset second credibility and less than the preset first credibility, it is determined that the question query result needs to be verified again, and the question query result is verified twice.
[0064] In one embodiment, keyword extraction is performed on each knowledge text to generate multiple knowledge keywords, and information conflict detection words are constructed for multiple knowledge keywords and question query results to generate multiple information conflict detection words; information conflict judgment is performed on multiple information conflict detection words to obtain conflict judgment results, and when the conflict judgment result is non-conflicting, the question query result is determined to be a credible question query result; when the conflict judgment result is conflicting, the question query result is determined to be an untrustworthy question query result. By performing a secondary check on the question query result, the accuracy of the knowledge question answering is greatly improved.
[0065] In one embodiment, keyword extraction is performed on each knowledge text to generate multiple knowledge keywords in a manner as follows: keyword extraction is performed on each knowledge text through a preset summary generation model to generate multiple knowledge keywords. The preset summary generation model is a pre-trained model, and the model can be selected according to actual conditions. The embodiment of the present application does not specifically limit this. For example, the model can be a neural network model. By performing keyword extraction on each knowledge text through a preset summary generation model, multiple knowledge keywords can be accurately generated, greatly improving the accuracy of knowledge questions and answers.
[0066] In one embodiment, information conflict detection words are constructed for multiple knowledge keywords and question query results. The method of generating multiple information conflict detection words can be: the opposite of multiple knowledge keywords and question query results are extracted to obtain multiple information conflict detection words.
[0067] In one embodiment, information conflict judgment is performed on multiple information conflict detection words, and the conflict judgment result is obtained in a manner as follows: information conflict judgment is performed on multiple information conflict detection words through a preset conflict judgment model to obtain a conflict judgment result. Among them, the preset conflict judgment model can be selected according to actual conditions, and the embodiment of the present application does not make specific limitations on this. For example, the preset conflict judgment model can be a neural network model. By performing information conflict judgment on multiple information conflict detection words through a preset conflict judgment model, the conflict judgment result can be accurately obtained.
[0068] In one embodiment, when the conflict judgment result is a conflict, the question query result is determined to be an unreliable question query result, and when the conflict judgment result is a non-conflict, the question query result is determined to be a reliable question query result. The credibility of the question query result can be accurately determined through the conflict judgment result, which greatly improves the accuracy of the knowledge question answering.
[0069] In one embodiment, when it is determined that the question query result is an unreliable question query result, information fusion is performed on each of the knowledge texts based on the question to be queried and multiple information conflict detection words through a preset information fusion model to obtain an updated question query result. Information fusion is performed on each of the knowledge texts through multiple information conflict detection words, so that the question query result can be verified, which greatly improves the accuracy of knowledge questions and answers.
[0070] The knowledge question answering method in the above embodiment obtains a question to be queried and matches the question to be queried with a vector in a preset knowledge vector database to obtain multiple feature vectors; based on the multiple feature vectors, multiple knowledge texts for question processing are determined; and information fusion is performed on each of the knowledge texts according to the question to be queried to obtain a question query result. The present application can accurately obtain a question query result by determining multiple knowledge texts for question processing and performing information fusion on each knowledge text, thereby greatly improving the efficiency and accuracy of knowledge question answering.
[0071] See also Figure 5 , Figure 5 A schematic block diagram of the structure of a terminal device provided in an embodiment of the present application.
[0072] like Figure 5 As shown, the terminal device 400 includes a processor 401 and a memory 402, and the processor 401 and the memory 402 are connected via a bus 403, such as an I2C (Inter-integrated Circuit) bus.
[0073] Specifically, the processor 401 is used to provide computing and control capabilities to support the operation of the entire terminal device. The processor 401 can be a central processing unit (CPU), and the processor 401 can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0074] Specifically, the memory 402 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.
[0075] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the terminal device to which the scheme of the present application is applied. The specific terminal device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0076] The processor is used to run a computer program stored in the memory, and implement any one of the knowledge question and answer methods provided in the embodiments of the present application when executing the computer program.
[0077] In one embodiment, the processor 401 is used to run a computer program stored in a memory, and implements the following steps when executing the computer program:
[0078] Obtaining a question to be queried, and matching the question to be queried with vectors in a preset knowledge vector database to obtain multiple feature vectors;
[0079] Determining a plurality of knowledge texts for problem processing according to the plurality of feature vectors;
[0080] The information of each of the knowledge texts is fused according to the question to be queried to obtain a question query result.
[0081] In one embodiment, before matching the query question with the vectors in the preset knowledge vector database to obtain multiple feature vectors, the processor 401 is further configured to implement:
[0082] Acquire knowledge text information;
[0083] The knowledge text information is segmented to obtain a plurality of short knowledge texts, and each of the short knowledge texts is vectorized to generate a plurality of feature vectors.
[0084] In one embodiment, when matching the query question with the vectors in the preset knowledge vector database to obtain multiple feature vectors, the processor 401 is used to implement:
[0085] Performing vector conversion on the question to be queried to obtain a feature vector of the question to be queried, and determining the similarity between the feature vector of the question to be queried and each vector in the preset knowledge vector database;
[0086] The vectors in the preset knowledge vector database are sorted based on the similarities to obtain a vector queue, and a preset number of vectors are selected from the vector queue from high to low according to the similarities to obtain a plurality of feature vectors.
[0087] In one embodiment, when the processor 401 determines the plurality of knowledge texts for question processing according to the plurality of feature vectors, it is configured to implement:
[0088] Matching the short knowledge texts according to the multiple feature vectors to obtain multiple short knowledge texts, and expanding similar texts for each of the short knowledge texts to obtain multiple candidate knowledge texts;
[0089] The candidate knowledge texts are screened according to the question to be queried to obtain a plurality of knowledge texts.
[0090] In one embodiment, when the processor 401 implements the step of screening the candidate knowledge texts according to the query question to obtain multiple knowledge texts, it is configured to implement:
[0091] Determine the intent information of the question to be queried;
[0092] The candidate knowledge texts are screened according to the intention information to obtain a plurality of knowledge texts.
[0093] In one embodiment, when the processor 401 performs information fusion on each of the knowledge texts according to the question to be queried to obtain the question query result, it is configured to implement:
[0094] The information of each of the knowledge texts is fused based on the question to be queried through a preset information fusion model to obtain a question query result.
[0095] In one embodiment, after the processor 401 performs information fusion on each of the knowledge texts according to the query question to obtain the query result, it is further configured to implement:
[0096] Determining the credibility of the question query result according to each of the knowledge texts and the question query result;
[0097] In a case where the credibility of the question query result is greater than or equal to a preset first credibility, determining that the question query result is a credible question query result;
[0098] When the credibility of the question query result is less than or equal to a preset second credibility, determining that the question query result is an untrustworthy question query result;
[0099] When the credibility of the question query result is greater than the preset second credibility and less than the preset first credibility, the question query result is verified twice.
[0100] In one embodiment, when implementing the secondary verification of the question query result when the credibility of the question query result is greater than the preset second credibility and less than the preset first credibility, the processor 401 is used to implement:
[0101] Extract keywords from each of the knowledge texts to generate multiple knowledge keywords, and construct information conflict detection words from the multiple knowledge keywords and the question query results to generate multiple information conflict detection words;
[0102] Performing information conflict judgment on the multiple information conflict detection words to obtain a conflict judgment result, and when the conflict judgment result is non-conflict, determining that the question query result is a credible question query result;
[0103] When the conflict judgment result is a conflict, the question query result is determined to be an untrustworthy question query result.
[0104] In one embodiment, after the processor 401 determines that the question query result is an untrustworthy question query result when the conflict judgment result is a conflict, it is further configured to implement:
[0105] By using a preset information fusion model, information fusion is performed on each of the knowledge texts based on the question to be queried and a plurality of information conflict detection words to obtain an updated question query result.
[0106] It should be noted that technical personnel in the relevant field can clearly understand that for the convenience and brevity of description, the specific working process of the terminal device described above can refer to the corresponding process in the aforementioned knowledge question and answer method embodiment, and will not be repeated here.
[0107] An embodiment of the present application also provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any knowledge question and answer method provided in the specification of this application.
[0108] The storage medium may be an internal storage unit of the terminal device described in the foregoing embodiment, such as a hard disk or memory of the terminal device. The storage medium may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc., equipped on the terminal device.
[0109] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0110] It should be understood that the term "and / or" used in the present application specification refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0111] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application.
Claims
1. A knowledge question answering method, characterized in that: include: Obtaining a question to be queried, and matching the question to be queried with vectors in a preset knowledge vector database to obtain multiple feature vectors; Determining a plurality of knowledge texts for problem processing according to the plurality of feature vectors; The information of each of the knowledge texts is fused according to the question to be queried to obtain a question query result.
2. The knowledge question answering method according to claim 1, characterized in that: Before matching the query question with the vectors in the preset knowledge vector database to obtain a plurality of feature vectors, the method further includes: Acquire knowledge text information; The knowledge text information is segmented to obtain a plurality of short knowledge texts, and each of the short knowledge texts is vectorized to generate a plurality of feature vectors.
3. The knowledge question answering method according to claim 1, characterized in that: The query question is matched with the vectors in the preset knowledge vector database to obtain multiple feature vectors, including: Performing vector conversion on the question to be queried to obtain a feature vector of the question to be queried, and determining the similarity between the feature vector of the question to be queried and each vector in the preset knowledge vector database; The vectors in the preset knowledge vector database are sorted based on the similarities to obtain a vector queue, and a preset number of vectors are selected from the vector queue from high to low according to the similarities to obtain a plurality of feature vectors.
4. The knowledge question answering method according to claim 1, characterized in that: Determining a plurality of knowledge texts for problem processing according to the plurality of feature vectors comprises: Matching the short knowledge texts according to the multiple feature vectors to obtain multiple short knowledge texts, and expanding similar texts for each of the short knowledge texts to obtain multiple candidate knowledge texts; The candidate knowledge texts are screened according to the question to be queried to obtain a plurality of knowledge texts.
5. The knowledge question answering method according to claim 4, characterized in that: The candidate knowledge texts are screened according to the query question to obtain multiple knowledge texts, including: Determine the intent information of the question to be queried; The candidate knowledge texts are screened according to the intention information to obtain a plurality of knowledge texts.
6. The knowledge question answering method according to claim 1, characterized in that: The step of fusing information of each of the knowledge texts according to the question to be queried to obtain a question query result includes: The information of each of the knowledge texts is fused based on the question to be queried through a preset information fusion model to obtain a question query result.
7. The knowledge question answering method according to claim 1, characterized in that: After the information of each of the knowledge texts is integrated according to the question to be queried to obtain the question query result, the method further includes: Determining the credibility of the question query result according to each of the knowledge texts and the question query result; In a case where the credibility of the question query result is greater than or equal to a preset first credibility, determining that the question query result is a credible question query result; When the credibility of the question query result is less than or equal to a preset second credibility, determining that the question query result is an untrustworthy question query result; When the credibility of the question query result is greater than the preset second credibility and less than the preset first credibility, the question query result is verified twice.
8. The knowledge question answering method according to claim 7, characterized in that: When the credibility of the question query result is greater than the preset second credibility and less than the preset first credibility, performing a secondary verification on the question query result includes: Extract keywords from each of the knowledge texts to generate multiple knowledge keywords, and construct information conflict detection words from the multiple knowledge keywords and the question query results to generate multiple information conflict detection words; Performing information conflict judgment on the multiple information conflict detection words to obtain a conflict judgment result, and when the conflict judgment result is non-conflict, determining that the question query result is a credible question query result; When the conflict judgment result is a conflict, the question query result is determined to be an untrustworthy question query result.
9. The knowledge question answering method according to claim 8, characterized in that: When the conflict judgment result is a conflict, after determining that the question query result is an untrustworthy question query result, the method further includes: By using a preset information fusion model, information fusion is performed on each of the knowledge texts based on the question to be queried and a plurality of information conflict detection words to obtain an updated question query result.
10. A terminal device, characterized in that: The terminal device includes a processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of the knowledge question and answer method as described in any one of claims 1 to 9 are implemented.
11. A storage medium for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the knowledge question answering method described in any one of claims 1 to 9.