Replay processing method and device based on artificial intelligence, computer equipment and medium
By searching for relevant knowledge blocks from the preset knowledge base, splicing processing and using pretrained models for reasoning, and determining the answers in combination with the screening rules, the problem of inaccurate answers generated by the big model is solved, and more accurate and high-quality answer generation is achieved.
Patent Information
- Application Number
- CN202510450399.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-29
AI Technical Summary
The existing big model-based Q&A processing methods have insufficient accuracy, resulting in inaccurate answers generated, which may affect user decision-making and health.
By receiving user questions, the target search module is used to search for relevant knowledge blocks from the preset knowledge base, the data is merged after splicing and processing, the pre-trained model is used for inference, and the target answer is determined from the candidate answers based on the filtering rules.
Effectively limiting answers In a given knowledge base, avoiding the randomness and hallucination questions of the big model generated answers, and improving the accuracy and quality of the answers.
Smart Images

Figure CN120386841A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology and can be applied to fields such as financial technology and digital medicine, and in particular to artificial intelligence-based response processing methods, devices, computer equipment and storage media. Background Art
[0002] In the field of question-answering, current mainstream technology relies on large language models for retrieval and answer generation. However, this approach is not perfect, particularly in terms of answer accuracy. While large models offer powerful generative capabilities, their inherent randomness and hallucinations often lead to generated responses that deviate from reality and contain erroneous or fabricated information. This uncertainty significantly impacts the reliability and accuracy of question-answering systems, making it difficult for users to obtain accurate and trustworthy answers.
[0003] For example, in the financial sector, the application of large models also faces accuracy issues. For example, in investment decision support, large models may be used to analyze market trends, predict stock prices, or recommend investment portfolios. However, due to the randomness and illusory effects of large models, the investment recommendations they generate may contain misleading information, such as overly optimistic market forecasts or investment recommendations based on flawed logic. This can not only lead investors to make incorrect decisions but also result in serious financial losses.
[0004] For example, in the medical field, the accuracy of answers generated by large models is also a significant concern. In scenarios such as disease diagnosis or treatment recommendations, large models may generate diagnoses or treatment recommendations based on incomplete or erroneous information. For example, when diagnosing a complex disease, a large model may fail to fully consider individual patient differences, medical history details, or the latest medical research findings, resulting in inaccurate or outdated diagnoses. Such errors can not only delay treatment but also cause irreversible damage to a patient's health.
[0005] Therefore, given the problem of low answer accuracy of large models in the field of question answering, there is an urgent need to develop a more reliable and accurate method to improve the quality of answer generation. Summary of the invention
[0006] The purpose of the embodiments of the present application is to propose an artificial intelligence-based reply processing method, apparatus, computer equipment and storage medium to solve the technical problem of low accuracy in the existing method of generating answers based on large models.
[0007] In a first aspect, a reply processing method based on artificial intelligence is provided, comprising:
[0008] Receive questions input by users through the interface;
[0009] Based on the target retrieval module, search for a specified number of knowledge chunks related to the problem from a preset knowledge base;
[0010] Perform splicing processing on the problem and each of the knowledge chunks respectively to obtain corresponding multiple input data;
[0011] Perform merging processing on all the input data to obtain corresponding target merged data;
[0012] Perform inference processing on the target merged data based on a pre-trained model to obtain corresponding prediction results;
[0013] Analyze the prediction results to extract candidate answers from all the input data;
[0014] If there are multiple candidate answers, determine the target answer from all the candidate answers based on a preset screening rule;
[0015] Perform a reply process for the user based on the target answer.
[0016] In a second aspect, a reply processing device based on artificial intelligence is provided, including:
[0017] A receiving module, configured to receive a problem input by a user through an interface;
[0018] A search module, configured to, based on the target retrieval module, search for a specified number of knowledge chunks related to the problem from a preset knowledge base;
[0019] A splicing module, configured to perform splicing processing on the problem and each of the knowledge chunks respectively to obtain corresponding multiple input data;
[0020] A merging module, configured to perform merging processing on all the input data to obtain corresponding target merged data;
[0021] An inference module, configured to perform inference processing on the target merged data based on a pre-trained model to obtain corresponding prediction results;
[0022] An extraction module, configured to analyze the prediction results to extract candidate answers from all the input data;
[0023] A determination module, configured to, if there are multiple candidate answers, determine the target answer from all the candidate answers based on a preset screening rule;
[0024] A reply module, configured to perform a reply process for the user based on the target answer.
[0025] In a third aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned reply processing method based on artificial intelligence are implemented.
[0026] In a fourth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned reply processing method based on artificial intelligence are implemented.
[0027] In the solution implemented by the above-mentioned reply processing method, device, computer device, and storage medium based on artificial intelligence, first, a question input by a user through an interface is received; then, based on a target retrieval module, a specified number of knowledge chunks related to the question are searched from a preset knowledge base; then, the question is respectively concatenated with each of the knowledge chunks to obtain corresponding multiple input data; and all the input data are merged to obtain corresponding target merged data; subsequently, based on a pre-trained model, inference processing is performed on the target merged data to obtain a corresponding prediction result; and the prediction result is parsed to extract candidate answers from all the input data; if there are multiple candidate answers, a target answer is determined from all the candidate answers based on a preset screening rule; finally, a reply is processed for the user based on the target answer. After receiving the question input by the user through the interface, this application will, based on the use of the target retrieval module, search for a specified number of knowledge chunks related to the question from the preset knowledge base, concatenate the question with each of the knowledge chunks to obtain multiple input data, then merge all the input data to obtain the target merged data, and further perform inference processing on the target merged data based on the use of the pre-trained model to obtain a prediction result, and parse the prediction result to extract candidate answers from all the input data. Subsequently, when it is detected that there are multiple candidate answers, a target answer will be determined from all the candidate answers based on the use of the screening rule, and finally, a reply will be processed for the user based on the target answer. By combining the use of the target retrieval module and the pre-trained model to process the reply to the user's question, this application can effectively limit the answer to be within the given knowledge base, avoiding the randomness and hallucination problems existing in the answers generated by large models. In addition, when it is detected that there are multiple generated candidate answers, the most accurate and comprehensive target answer that meets the user's needs will be intelligently selected based on the use of the screening rule, effectively improving the quality and accuracy of the finally generated target answer. Description of the Drawings
[0028] To more clearly illustrate the solutions in this application, the following provides a brief introduction to the accompanying drawings required for the description of the embodiments of this application. Obviously, the accompanying drawings in the following description are some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0029] Figure 1 is an exemplary system architecture diagram to which this application can be applied;
[0030] Figure 2 is a flowchart of an embodiment of the method for processing responses based on artificial intelligence according to this application;
[0031] Figure 3 is a schematic structural diagram of an embodiment of the device for processing responses based on artificial intelligence according to this application;
[0032] Figure 4 is a schematic structural diagram of an embodiment of the computer device according to this application. Detailed implementation manners
[0033] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs; the terms used in the description of the embodiments of this application in this specification are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the description and claims of this application and the above accompanying drawings are intended to cover non-exclusive inclusion. The terms "first", "second", etc. in the description and claims of this application or the above accompanying drawings are used to distinguish different objects and not to describe a specific order.
[0034] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in connection with the embodiments can be included in at least one embodiment of this application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0035] To enable those skilled in the technical field to better understand the solutions of this application, the following will clearly and completely describe the technical solutions in the embodiments of this application in conjunction with the accompanying drawings.
[0036] Such as Figure 1As shown, system architecture 100 may include a terminal device 101, a network 102, and a server 103. Terminal device 101 may be a laptop computer 1011, a tablet computer 1012, or a mobile phone 1013. Network 102 is a medium for providing a communication link between terminal device 101 and server 103. Network 102 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0037] The user can use the terminal device 101 to interact with the server 103 via the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0038] The terminal device 101 can be various electronic devices with a display screen and supporting web browsing. In addition to the laptop computer 1011, tablet computer 1012 or mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV) player, a laptop computer and a desktop computer, etc.
[0039] The server 103 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal device 101 .
[0040] It should be noted that the artificial intelligence-based reply processing method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the artificial intelligence-based reply processing device is generally set in the server / terminal device.
[0041] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0042] Continue to refer Figure 2, which shows a flowchart of an embodiment of an artificial intelligence-based reply processing method according to the present application. According to different requirements, the order of steps in this flowchart can be changed, and some steps can be omitted. The artificial intelligence-based reply processing method provided by the embodiments of the present application can be applied to any scenario that requires question-and-answer processing, and then this artificial intelligence-based reply processing method can be applied to products in these scenarios. For example, question-and-answer scenarios in the financial field and the medical field. The artificial intelligence-based reply processing method described above includes the following steps:
[0043] Step S201, receive the question input by the user through the interface.
[0044] In this embodiment, the electronic device (such as Figure 1 the server / terminal device shown) on which the artificial intelligence-based reply processing method runs can obtain the question input by the user through the interface in a wired connection manner or a wireless connection manner. It should be noted that the above wireless connection methods can include but are not limited to 3G / 4G / 5G connections, WiFi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB (ultra wideband) connections, and other currently known or future-developed wireless connection methods. The execution subject of the present application can specifically be a reply processing system, or a question-and-answer system, which can be simply referred to as a system. The above interface is an interface pre-created in the system for question-and-answer interaction with the user. The user can input a question through the interface (such as a web page), and the question is submitted in the form of a string. The present application can be applied to question-and-answer processing business scenarios in the financial field and the medical field. Exemplarily, in the financial field, the questions raised by the user can be questions about investment, loan-related questions, insurance consultation questions, and so on. For example, a question about investment can be: I currently have 100,000 yuan in hand. Should I invest in stocks, funds, or bonds? Which method has lower risk and relatively stable returns? Loan-related questions can be: I want to apply for a 30-year mortgage. What is the interest rate? What materials do I need to provide? How to calculate the monthly repayment amount? Insurance consultation questions can be: I want to buy a critical illness insurance for myself and my family. Which insurance products in the market have high cost performance? How to choose the appropriate insurance amount and coverage.
[0045] In the medical field, the questions raised by users can be about disease symptoms, drug use consultation, health management and prevention, and so on. For example, questions about disease symptoms can be: I often feel headache and nausea recently. What disease symptoms might this be? What examinations do I need to do at the hospital? Questions about drug use consultation can be: I am taking antihypertensive drugs, but recently I have had the side effect of dry cough. Should I stop taking the drugs or switch to other drugs? Questions about health management and prevention can be: How can I develop a reasonable diet and exercise plan to prevent diabetes? Is it necessary to have regular physical examinations? What items should the physical examination include?
[0046] Step S202: Based on the target retrieval module, search for a specified number of knowledge chunks related to the question from a preset knowledge base.
[0047] In this embodiment, the above-mentioned target retrieval module corresponds to the R (retrieval module) in the Retrieval-Augmented Generation (RAG) technology. The target retrieval module can match all knowledge chunks related to the user's question from a pre-given knowledge base. The above-mentioned specified number refers to the number of these knowledge chunks, which can be represented by n. Specifically, by calling the target retrieval module and using the user's input question as the input, the target retrieval module then searches for knowledge chunks related to this question in the knowledge base. Specifically, full-text search, keyword matching and other technologies can be used for the search processing. After the search processing is completed, the target retrieval module will return n knowledge chunks related to the user's input question, and each knowledge chunk is represented in the form of a string or a document object. This application avoids the randomness and hallucination problems existing in the answers generated by the large model by restricting that the answers must be in the given knowledge base.
[0048] Step S203: Concatenate the question with each of the knowledge chunks respectively to obtain corresponding multiple input data.
[0049] In this embodiment, each obtained knowledge chunk can be traversed. For each knowledge chunk, concatenate it with the question to form an input data. The concatenation method can be simple string connection, or some special markers or delimiters can be added between the knowledge chunk and the question. In addition, the concatenated input data can be stored in a list for subsequent processing.
[0050] Step S204: Perform a merging process on all the input data to obtain corresponding target merged data.
[0051] In this embodiment, all the obtained input data can be concatenated into a batch, that is, the above-mentioned target merged data. Specifically, all the input data can be converted into a format acceptable to the model, such as a tensor (Tensor).
[0052] Step S205: Perform inference processing on the target merged data based on the pre-trained model to obtain the corresponding prediction result.
[0053] In this embodiment, the above-mentioned pre-trained model is a BERT-based QA model (which can be simply referred to as the model). The pre-trained BERT model is pre-loaded, and the model weights fine-tuned for the QA task are loaded. Then, using the batch processing function of the deep learning framework, the above-mentioned target merged data is passed to the BERT QA model. Forward propagation will be performed inside the model to process the input data, and then the model will output a two-dimensional array, that is, the above-mentioned prediction result. Each element corresponds to an input in the batch (target merged data). Each element contains the start position and end position of the answer in the input data (usually given in the form of an index), and the start position and end position of the answer in each input data are output.
[0054] Among them, there is a limitation in the BERT-based QA question-answering method, that is, it can only answer the original text. The principle of the BERT-based QA question-answering method is that given a piece of context, denoted as [x1, x2,..., xn] here, that is, the context with a length of n, the model will predict the start position and end position of the answer in this context. Assuming that the predicted start position is xi and the end position is xj, the returned answer is [xi, xi+1,..., xj]. In this way, the generation of uncertain text can be avoided, and the returned answer must be the content in the correct knowledge base. When the answer does not exist, during training, the start position and end position will both be placed at the very beginning. During the inference stage, it will be judged whether the start position and end position are legal. For example, if the end position is in front of the start position, it is considered that there is no answer, or both the end position and the start position are placed at the very beginning of the context.
[0055] Step S206: Parse the prediction result to extract candidate answers from all the input data.
[0056] In this embodiment, for the specific implementation process of parsing the prediction result to extract candidate answers from all the input data, this application will further describe the details in subsequent specific embodiments and will not elaborate too much here.
[0057] Step S207: If there are multiple candidate answers, determine the target answer from all the candidate answers based on the preset screening rules.
[0058] In this embodiment, if only one candidate answer is detected, that candidate answer is directly selected as the final target answer, and the user is subsequently replied to based on the target answer. Furthermore, if multiple candidate answers are detected, the specific implementation process of determining the target answer from all of the candidate answers based on the preset screening rules will be further described in detail in subsequent specific embodiments of this application and will not be elaborated on here.
[0059] Step S208: reply to the user based on the target answer.
[0060] In this embodiment, the target answer can be returned to the user through the interface display to complete the reply process for the user's question. In which, additional information such as the confidence level and source of the target answer can also be provided to enhance the credibility of the target answer and user experience.
[0061] This application first receives a question input by the user through the interface; then, based on the target retrieval module, searches for a specified number of knowledge blocks related to the question from a preset knowledge base; then, the question is spliced with each of the knowledge blocks to obtain corresponding multiple input data; and all the input data are merged to obtain corresponding target merged data; subsequently, the target merged data is inferred based on the pre-trained model to obtain corresponding prediction results; and the prediction results are parsed to extract candidate answers from all the input data; if the candidate answers include multiple, the target answer is determined from all the candidate answers based on preset screening rules; finally, the user is replied based on the target answer. After receiving the question input by the user through the interface, the present application will search for a specified number of knowledge blocks related to the question from the preset knowledge base based on the use of the target retrieval module, and splice the question with each knowledge block to obtain multiple input data, and then merge all the input data to obtain the target merged data, and then perform inference processing on the target merged data based on the use of the pre-trained model to obtain the prediction result, and parse the prediction result to extract the candidate answer from all the input data. Subsequently, when it is detected that the candidate answer includes multiple, it will determine the target answer from all the candidate answers based on the use of the screening rules, and finally reply to the user based on the target answer. The present application can effectively limit the answer to a given knowledge base by using the combination of the target retrieval module and the pre-trained model to reply to the user's question, avoiding the randomness and illusion problems of the answers generated by the large model. In addition, when it is detected that the generated candidate answers include multiple, it will intelligently select the most accurate and comprehensive target answer that meets the user's needs based on the use of the screening rules, effectively improving the quality and accuracy of the target answer finally generated.
[0062] In some alternative implementations, step S206 includes the following steps:
[0063] Extract the answer position index corresponding to each of the input data from the prediction result.
[0064] In this embodiment, after the pre-trained model processes the input target merged data, it outputs a two-dimensional array, that is, the prediction result. Each element of this two-dimensional array corresponds to an input in the batch (target merged data), and each element contains two values: the start position and the end position of the answer in the input text (usually given in the form of an index). Among them, the answer position index corresponding to each input data can be extracted from the prediction result output by the pre-trained model. Specifically, it can be implemented by traversing the two-dimensional array and reading the values of each element.
[0065] Filter out the valid indexes from all the answer position indexes.
[0066] In this embodiment, the valid index filtering can be performed by detecting whether the extracted answer position index is within the legal range of the corresponding input data. For each answer position index, if an index exceeds the text length of the corresponding input data, the index is regarded as an invalid index. If the index is within the text length of the corresponding input data, the index is regarded as a valid index.
[0067] Extract the corresponding answer text from all the input data based on the valid indexes.
[0068] In this embodiment, the corresponding answer text can be extracted from all the input data by using the extracted valid indexes. Specifically, the valid indexes can be converted into character positions in the text, and the corresponding character sequence can be intercepted as the answer.
[0069] Use the answer text as the candidate answer.
[0070] The present application extracts the answer position index corresponding to each of the input data from the prediction results; then filters out the valid index from all the answer position indexes; subsequently extracts the corresponding answer text from all the input data based on the valid index, and uses the answer text as the candidate answer. The present application extracts the answer position index corresponding to each of the input data from the prediction results obtained after inference processing of the target merged data based on a pre-trained model, and filters out the valid index from all the answer position indexes, and then extracts the corresponding answer text from all the input data based on the use of the valid index as the candidate answer, thereby achieving efficient and accurate determination of matching candidate answers from the input data, thereby improving the efficiency and accuracy of generating candidate answers.
[0071] In some optional implementations of this embodiment, step S207 includes the following steps:
[0072] Perform a legitimacy check on all candidate answers to obtain corresponding test results.
[0073] In this embodiment, the specific implementation process of performing the above-mentioned legitimacy detection on all the candidate answers and obtaining the corresponding detection results will be further described in detail in subsequent specific embodiments of this application and will not be elaborated on here.
[0074] All the candidate answers are filtered based on the detection result to obtain a filtered first answer.
[0075] In this embodiment, the above-mentioned test results are composed of the position verification results, the integrity verification results, and the type consistency verification results. The above-mentioned test results can be analyzed and the answers that fail the position verification, the answers that fail the integrity verification, and the answers that fail the type consistency verification can be filtered out from all candidate answers to obtain the filtered first answer.
[0076] All the first answers are clustered and de-duplicated to obtain processed second answers.
[0077] In this embodiment, the specific implementation process of clustering and deduplicating all the first answers to obtain the processed second answers will be further described in detail in subsequent specific embodiments of this application and will not be elaborated on here.
[0078] All the second answers are evaluated based on a preset evaluation strategy to obtain evaluation results of each second answer.
[0079] In this embodiment, the specific implementation process of evaluating all the second answers based on the preset evaluation strategy to obtain the evaluation results of each second answer will be further described in detail in subsequent specific embodiments of this application and will not be elaborated on here.
[0080] A designated evaluation result with the highest value is selected from all the evaluation results.
[0081] In this embodiment, numerical comparison may be performed on all evaluation results, and the designated evaluation result with the highest numerical value may be screened out based on the obtained numerical comparison results.
[0082] A third answer corresponding to the designated evaluation result is obtained from all the second answers, and the third answer is used as the target answer.
[0083] In this embodiment, the third answer is an answer corresponding to the designated evaluation result having the highest value among all the second answers.
[0084] This application performs a legitimacy check on all the candidate answers to obtain the corresponding test results; then filters all the candidate answers based on the test results to obtain the filtered first answers; then clusters and deduplicates all the first answers to obtain the processed second answers; subsequently, evaluates all the second answers based on a preset evaluation strategy to obtain the evaluation results of each second answer; further filters out the specified evaluation result with the highest value from all the evaluation results; finally, obtains the third answer corresponding to the specified evaluation result from all the second answers, and uses the third answer as the target answer. This application obtains a detection result by performing a legitimacy check on all candidate answers, and filters all candidate answers based on the detection result to obtain a filtered first answer, then clusters and deduplicates all first answers to obtain a processed second answer, and then evaluates all second answers based on the use of an evaluation strategy to obtain an evaluation result of each second answer, and filters out a designated evaluation result with the highest value from all evaluation results, and finally obtains a third answer corresponding to the designated evaluation result from all second answers as the target answer, thereby automatically and intelligently filtering, aggregating and optimizing the candidate answers to select the most accurate and comprehensive target answer that meets user needs from multiple candidate answers, effectively improving the quality and accuracy of the target answer finally generated.
[0085] In some optional implementations, performing a legitimacy check on all candidate answers to obtain corresponding test results includes the following steps:
[0086] Position verification is performed on all the candidate answers to obtain corresponding first verification results.
[0087] In this embodiment, the above-mentioned position verification refers to the verification of the starting position and the ending position. Specifically, the position verification process includes: traversing all candidate answers and checking the starting position and the ending position of each subsequent answer. Verify whether the starting position is smaller than the ending position to ensure that the answer range is valid. And check whether these two positions are within the boundaries of the input text, that is, the starting position is not less than 0, and the ending position is not greater than the text length minus 1. If the position is invalid, the answer is marked as illegal or discarded. Among them, the content of the first verification result generated includes passing the position verification or failing the position verification.
[0088] Integrity verification is performed on all the candidate answers to obtain corresponding second verification results.
[0089] In this embodiment, the integrity verification refers to text integrity checking. The integrity verification process includes: using a natural language processing library to perform syntactic analysis on the candidate answers. Checking whether the answers contain complete sentence structures, such as subject, predicate, and object. For short answers, ensuring that they are not lexical fragments caused by improper segmentation. If the answer is incomplete, it is marked or discarded. The generated second verification result includes whether the integrity verification has passed or failed.
[0090] Type consistency verification is performed on all the candidate answers to obtain corresponding third verification results.
[0091] In this embodiment, the process of type consistency verification includes: determining the type that the answer should conform to (such as numbers, dates, names, etc.) according to the question requirements. Use regular expressions to match the answers and check whether they conform to the specified type format. Alternatively, use a type checking function (such as isinstance or a custom function in Python) to verify the answer type. If the answer type does not meet the requirements, it is marked or discarded. Among them, the content of the generated third verification result includes passing the type consistency verification or failing the type consistency verification.
[0092] The first verification result, the second verification result, and the third verification result are integrated to obtain an integrated target verification result.
[0093] In this embodiment, the target verification result is a verification result set including the generated first verification result, second verification result, and third verification result.
[0094] The target verification result is used as the detection result.
[0095] This application obtains corresponding first verification results by performing position verification on all the candidate answers; performs integrity verification on all the candidate answers to obtain corresponding second verification results; performs type consistency verification on all the candidate answers to obtain corresponding third verification results; then integrates the first verification results, the second verification results, and the third verification results to obtain an integrated target verification result; and subsequently uses the target verification result as the detection result. This application obtains a first verification result by performing position verification on all candidate answers; obtains a second verification result by performing integrity verification on all candidate answers, and obtains a third verification result by performing type consistency verification on all candidate answers, and further integrates the first verification result, the second verification result, and the third verification result, so as to efficiently and accurately complete the legality detection of the candidate answers and generate corresponding target verification results, effectively improving the integrity and accuracy of the generated target verification results.
[0096] In some alternative implementation manners, the step of performing clustering and duplicate removal processing on all the first answers to obtain processed second answers includes the following steps:
[0097] Obtain a preset clustering algorithm.
[0098] In this embodiment, there is no specific limitation on the selection of the above clustering algorithm, which can be determined according to actual business requirements. For example, algorithms such as K-means and DBSCAN can be used.
[0099] Perform grouping processing on all the first answers based on the clustering algorithm to obtain corresponding multiple clustering results.
[0100] In this embodiment, according to the selected clustering algorithm, and based on the set number of clusters (such as the K value in K-means) or the clustering radius (such as the ε value in DBSCAN), all the first answers can be clustered to obtain corresponding algorithm processing results, and all the first answers can be divided into different groups according to the algorithm processing results, that is, corresponding multiple clustering results are obtained.
[0101] Perform representative analysis on each of the clustering results respectively to determine representative fourth answers from each of the clustering results.
[0102] In this embodiment, by performing representative analysis on each of the clustering results respectively, a most representative answer is selected from each clustering result. Specifically, the clustering center point (such as the centroid of K-means) can be selected as the representative answer. Alternatively, an answer with the highest score, the highest occurrence frequency, or the smallest similarity to other answers in the cluster can also be selected as the representative answer.
[0103] Deduplicate all the fourth answers to obtain the processed fifth answers.
[0104] In this embodiment, the processed fifth answers can be obtained by removing duplicate or highly similar answers from the obtained fourth answers and retaining the unique answers in each clustering result.
[0105] Use the fifth answers as the second answers.
[0106] This application obtains a preset clustering algorithm; then groups all the first answers based on the clustering algorithm to obtain corresponding multiple clustering results; then performs representative analysis on each of the clustering results to respectively determine representative fourth answers from each of the clustering results; subsequently, deduplicate all the fourth answers to obtain the processed fifth answers, and use the fifth answers as the second answers. By grouping all the first answers based on the use of the clustering algorithm to obtain corresponding multiple clustering results, then performing representative analysis on each of the clustering results to respectively determine representative fourth answers from each of the clustering results, and further deduplicating all the fourth answers to obtain the required second answers, this application realizes automatically and accurately completing the clustering and deduplication processing of the first answers, effectively improving the accuracy of the generated second answers, which is beneficial to subsequently evaluating the second answers based on the use of an evaluation strategy, so as to select the most accurate and comprehensive target answers from the second answers, and further improving the quality and accuracy of the obtained target answers.
[0107] In some alternative implementation manners of this embodiment, the evaluating all the second answers based on a preset evaluation strategy to obtain the evaluation results of the second answers includes the following steps:
[0108] Extract keywords and phrases from all the input data based on a preset natural language processing library.
[0109] In this embodiment, the above natural language processing library is a library with key information extraction function. The key information of all the input data can be extracted by using this natural language processing library to extract keywords and phrases from all the input data.
[0110] Construct a corresponding semantic graph based on the keywords and the phrases.
[0111] In this embodiment, a semantic graph is constructed by taking keywords and phrases as nodes and their relationships (such as synonyms, hyponymy relationships, causal relationships, etc.) as edges. Among them, an existing semantic library (such as WordNet) is further used to assist in constructing the semantic graph to provide additional relationship information. The weights of the edges can be assigned according to the strength or importance of the relationships.
[0112] Based on a preset graph search algorithm, the shortest path from the question to the second answer is searched in the semantic graph to obtain the corresponding path analysis result.
[0113] In this embodiment, there is no specific limitation on the selection of the above graph search algorithm, which can be determined according to actual business needs. For example, algorithms such as Dijkstra and A* can be used. Specifically, according to the selected graph search algorithm, the shortest path from the above question to the above second answer is searched in the semantic graph and used as the corresponding path analysis result. The length of the path can represent the semantic distance or relevance from the question to the answer. Among them, a threshold for the path length can be set to only retain the paths that meet the threshold conditions. If there are multiple paths, the path with the smallest weight or the shortest length is selected as the optimal path (shortest path).
[0114] Path analysis in semantic graph network analysis is mainly used to find the shortest path from question keywords to answer keywords. The shortest path here not only refers to the shortest physical distance, but more emphasizes semantic relevance and closeness. Through path analysis, a series of potential paths from the question to the answer can be obtained, and the lengths (or weights) of these paths can represent the semantic distance or relevance from the question to the answer.
[0115] Based on a preset graph algorithm, an influence evaluation is performed on the path analysis result to calculate the influence evaluation results of all the second answers corresponding to the semantic graph.
[0116] In this embodiment, there is no specific limitation on the selection of the above graph algorithm, which can be determined according to actual business needs. For example, algorithms such as PageRank and HITS can be used. Specifically, according to the selected graph algorithm and the above obtained path analysis result, the influence of each second answer in the semantic graph is calculated. Among them, the PageRank algorithm evaluates the influence of a node by the number of connections of the node and the quality of the connected nodes. The HITS algorithm divides nodes into authority nodes and hub nodes and calculates their mutual influence. In addition, according to the obtained influence evaluation results, all the second answers can be sorted or the answer with the greatest influence can be selected as the optimal answer.
[0117] Influence assessment further calculates the influence of each answer within the semantic graph based on the path results. Specifically, influence assessment algorithms (such as PageRank and HIT) consider the connections between nodes (i.e., answers) within the semantic graph, including factors such as the number of connections, the quality of the connections (i.e., the weight or length of the path), and the authority of the connecting nodes. These factors collectively determine the influence of each answer within the semantic graph.
[0118] The influence assessment result is used as the assessment result.
[0119] In this embodiment, through path analysis, the shortest paths from questions to answers can be found, and influence assessments can be performed based on these paths to select the most influential and accurate answers, thereby effectively improving the quality and accuracy of the final answers.
[0120] This application extracts keywords and phrases from all the input data based on a preset natural language processing library; and constructs a corresponding semantic graph based on the keywords and phrases; then searches for the shortest path from the question to the second answer in the semantic graph based on a preset graph search algorithm to obtain a corresponding path analysis result; then performs influence evaluation based on a preset graph algorithm and the path analysis result to calculate the influence evaluation results of all the second answers corresponding to the semantic graph; and subsequently uses the influence evaluation result as the evaluation result. This application extracts keywords and phrases from all the input data based on a natural language processing library, and constructs a corresponding semantic graph based on the keywords and phrases; then searches for the shortest path from the question to the second answer in the semantic graph based on a graph search algorithm to obtain a corresponding path analysis result; then performs influence evaluation based on the graph algorithm and the path analysis result to calculate the influence evaluation results of all the second answers corresponding to the semantic graph and use them as the corresponding evaluation result, thereby efficiently and accurately realizing the evaluation processing of the second answer and ensuring the accuracy of the evaluation result of the generated second answer. It is also beneficial to subsequently analyze and screen the evaluation results of the second answers, so that the most accurate and comprehensive target answer can be selected from the second answers, thereby helping to improve the quality and accuracy of the target answer finally obtained.
[0121] In some optional implementations of this embodiment, evaluating all the second answers based on a preset evaluation strategy to obtain an evaluation result for each second answer includes the following steps:
[0122] Call the preset multiple diversity indicator algorithms.
[0123] In this embodiment, the diversity indicator algorithm may at least include algorithms for calculating entropy, Gini coefficient, Simpson index, etc.
[0124] A target diversity indicator algorithm is determined from all the diversity indicator algorithms.
[0125] In this embodiment, there is no specific limitation on the method for determining the target diversity index algorithm. Based on actual business needs, an algorithm that matches the requirements can be determined from all diversity index algorithms to serve as the target diversity index algorithm. Alternatively, an algorithm can be randomly selected from all diversity index algorithms and used as the target diversity index algorithm.
[0126] A diversity index is calculated for each of the second answers based on the target diversity index algorithm to obtain a diversity evaluation result for each of the second answers.
[0127] In this embodiment, the frequency distribution of each second answer category can be calculated using the selected target diversity index algorithm. Then, based on the distribution, a diversity index for each second answer is calculated and used as the diversity assessment result for each second answer. A higher diversity index indicates a more diverse answer set and contains richer information.
[0128] The diversity evaluation result is used as the evaluation result.
[0129] In this embodiment, by subsequently screening out answers with higher diversity indicators from all second answers as final target answers, the diversity and accuracy of the generated target answers can be effectively improved.
[0130] The present application calls a preset plurality of diversity indicator algorithms; then determines a target diversity indicator algorithm from all the diversity indicator algorithms; then calculates and processes the diversity indicators of each second answer based on the target diversity indicator algorithm to obtain the diversity evaluation results of each second answer; and subsequently uses the diversity evaluation results as the evaluation results. The present application determines a target diversity indicator algorithm from a preset plurality of diversity indicator algorithms, and then calculates and processes the diversity indicators of each second answer based on the use of the target diversity indicator algorithm to obtain the diversity evaluation results of each second answer, and uses the diversity evaluation results of each second answer as the evaluation results of each second answer, thereby achieving efficient and accurate evaluation of the second answers and ensuring the accuracy of the evaluation results of the generated second answers. It is also beneficial to subsequently analyze and screen the evaluation results of the obtained second answers, so that the most accurate and diverse target answers can be selected from the second answers, thereby helping to improve the quality and accuracy of the target answers finally obtained.
[0131] In some optional implementations, the user information obtained is obtained with the user's consent and complies with relevant laws and policies.
[0132] In addition, the non-company software tools or components appearing in the embodiments of this application are only introduced by way of example and do not represent actual use.
[0133] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
[0134] It should be emphasized that to further ensure the privacy and security of the above target answer, the above target answer can also be stored in a node of a blockchain.
[0135] The blockchain referred to in this application is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithms. A blockchain, in essence, is a decentralized database, a string of data blocks generated by using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block. The blockchain can include a blockchain underlying platform, a platform product service layer, an application service layer, etc.
[0136] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is to use a digital computer or a machine controlled by a digital computer to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results of theory, method, technology, and application systems.
[0137] Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. Artificial intelligence software technologies mainly include several major directions such as computer vision technology, robotics, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0138] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.
[0139] It should be understood that although the steps in the flowchart of the accompanying drawings are shown in sequence according to the indication of the arrows, these steps are not necessarily executed in the sequence indicated by the arrows. Unless otherwise clearly stated in this document, there is no strict order limit for the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.
[0140] Further reference is made to Figure 3 As an implementation of the method shown above Figure 2 an embodiment of a reply processing device based on artificial intelligence is provided in this application. This device embodiment corresponds to Figure 2 the method embodiment shown, and this device can be specifically applied to various electronic devices.
[0141] As shown in Figure 3 the reply processing device 300 based on artificial intelligence described in this embodiment includes: a receiving module 301, a searching module 302, a splicing module 303, a merging module 304, an inference module 305, an extraction module 306, a determination module 307, and a reply module 308. Among them:
[0142] The receiving module 301 is configured to receive the question input by the user through the interface;
[0143] The searching module 302 is configured to search for a specified number of knowledge chunks related to the question from a preset knowledge base based on a target retrieval module;
[0144] The splicing module 303 is configured to perform splicing processing on the question and each of the knowledge chunks respectively to obtain a corresponding plurality of input data;
[0145] The merging module 304 is configured to perform merging processing on all the input data to obtain a corresponding target merged data;
[0146] The inference module 305 is configured to perform inference processing on the target merged data based on a pre-trained model to obtain a corresponding prediction result;
[0147] The extraction module 306 is configured to analyze the prediction result to extract candidate answers from all the input data;
[0148] The determination module 307 is configured to, if there are multiple candidate answers, determine a target answer from all the candidate answers based on a preset screening rule;
[0149] A reply module 308, configured to perform a reply process on the user based on the target answer.
[0150] In this embodiment, the operations respectively performed by the above modules or units correspond one by one to the steps of the artificial intelligence-based reply processing method in the foregoing embodiment, and will not be elaborated herein.
[0151] In some alternative implementation manners of this embodiment, the extraction module 306 includes:
[0152] A first extraction sub-module, configured to extract the answer position index corresponding to each input data from the prediction result;
[0153] A first screening sub-module, configured to screen out valid indexes from all the answer position indexes;
[0154] A second extraction sub-module, configured to extract the corresponding answer text from all the input data based on the valid indexes;
[0155] A first determination sub-module, configured to use the answer text as the candidate answer.
[0156] In this embodiment, the operations respectively performed by the above modules or units correspond one by one to the steps of the artificial intelligence-based reply processing method in the foregoing embodiment, and will not be elaborated herein.
[0157] In some alternative implementation manners of this embodiment, the determination module 307 includes:
[0158] A detection sub-module, configured to perform a legality detection on all the candidate answers to obtain the corresponding detection result;
[0159] A filtering sub-module, configured to perform a filtering process on all the candidate answers based on the detection result to obtain a first filtered answer;
[0160] A processing sub-module, configured to perform a clustering and duplicate removal process on all the first answers to obtain a second processed answer;
[0161] An evaluation sub-module, configured to perform an evaluation process on all the second answers based on a preset evaluation strategy to obtain the evaluation result of each second answer;
[0162] A second screening sub-module, configured to screen out a specified evaluation result with the highest value from all the evaluation results;
[0163] A second determination sub-module, configured to obtain a third answer corresponding to the specified evaluation result from all the second answers, and use the third answer as the target answer.
[0164] In this embodiment, the operations respectively performed by the above modules or units correspond one by one to the steps of the artificial intelligence-based reply processing method in the foregoing embodiment, and will not be elaborated herein.
[0165] In some optional implementation manners of this embodiment, the detection sub-module includes:
[0166] A first verification unit, configured to perform position verification on all the candidate answers to obtain corresponding first verification results;
[0167] A second verification unit, configured to perform integrity verification on all the candidate answers to obtain corresponding second verification results;
[0168] A third verification unit, configured to perform type consistency verification on all the candidate answers to obtain corresponding third verification results;
[0169] An integration unit, configured to integrate the first verification result, the second verification result, and the third verification result to obtain an integrated target verification result;
[0170] A first determination unit, configured to use the target verification result as the detection result.
[0171] In this embodiment, the operations respectively performed by the above modules or units correspond one by one to the steps of the artificial intelligence-based reply processing method in the foregoing embodiment, and will not be elaborated herein.
[0172] In some optional implementation manners of this embodiment, the processing sub-module includes:
[0173] An acquisition unit, configured to acquire a preset clustering algorithm;
[0174] A grouping unit, configured to perform grouping processing on all the first answers based on the clustering algorithm to obtain corresponding multiple clustering results;
[0175] An analysis unit, configured to respectively perform representative analysis on each of the clustering results to respectively determine representative fourth answers from each of the clustering results;
[0176] A duplicate removal unit, configured to perform duplicate removal processing on all the fourth answers to obtain processed fifth answers;
[0177] A second determination unit, configured to use the fifth answers as the second answers.
[0178] In this embodiment, the operations respectively performed by the above modules or units correspond one by one to the steps of the artificial intelligence-based reply processing method in the foregoing embodiment, and will not be elaborated herein.
[0179] In some alternative implementation manners of this embodiment, the evaluation sub-module includes:
[0180] An extraction unit, configured to extract keywords and phrases in all the input data based on a preset natural language processing library;
[0181] A construction unit, configured to construct a corresponding semantic graph based on the keywords and the phrases;
[0182] A search unit, configured to search for the shortest path from the question to the second answer in the semantic graph based on a preset graph search algorithm, and obtain a corresponding path analysis result;
[0183] An evaluation unit, configured to perform influence evaluation based on a preset graph algorithm and the path analysis result, so as to calculate the influence evaluation results corresponding to all the second answers with respect to the semantic graph;
[0184] A third determination unit, configured to use the influence evaluation result as the evaluation result.
[0185] In this embodiment, the operations respectively performed by the above modules or units correspond one by one to the steps of the artificial intelligence-based reply processing method in the foregoing embodiment, and will not be elaborated herein.
[0186] In some alternative implementation manners of this embodiment, the evaluation sub-module includes:
[0187] A calling unit, configured to call a preset variety of diversity metric algorithms;
[0188] A fourth determination unit, configured to determine a target diversity metric algorithm from all the diversity metric algorithms;
[0189] A calculation unit, configured to perform calculation processing on the diversity metrics of each of the second answers based on the target diversity metric algorithm, and obtain the diversity evaluation results of each of the second answers;
[0190] A fifth determination unit, configured to use the diversity evaluation result as the evaluation result.
[0191] In this embodiment, the operations respectively performed by the above modules or units correspond one by one to the steps of the artificial intelligence-based reply processing method in the foregoing embodiment, and will not be elaborated herein.
[0192] To solve the above technical problems, an embodiment of the present application further provides a computer device. Specifically, please refer to Figure 4 , Figure 4 which is the basic structural block diagram of the computer device in this embodiment.
[0193] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are communicatively connected to each other via a system bus. It should be noted that only the computer device 4 with components 41-43 is shown in the figure. However, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Among them, those skilled in the art of the present technology can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0194] The computer device can be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The computer device can perform human-computer interaction with the user through means such as a keyboard, a mouse, a remote control, a touchpad, or a voice control device.
[0195] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as the hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit and the external storage device of the computer device 4. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions for an artificial intelligence-based reply processing method. In addition, the memory 41 can also be used to temporarily store various data that have been output or will be output.
[0196] In some embodiments, the processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run the computer-readable instructions stored in the memory 41 or process data, such as running the computer-readable instructions of the artificial intelligence-based reply processing method.
[0197] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0198] The present application also provides another implementation manner, that is, to provide a computer-readable storage medium storing computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to execute the steps of the artificial intelligence-based reply processing method as described above.
[0199] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation manner. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc) and includes several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in the various embodiments of the present application.
[0200] Obviously, the above-described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The drawings of the present application show the preferred embodiments, but do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure content of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or perform equivalent replacements for some of the technical features. Any equivalent structure directly or indirectly using the content of the specification and drawings of the present application in other related technical fields shall be similarly within the scope of the patent protection of the present application.
Claims
1. A reply processing method based on artificial intelligence, characterized in that It includes the following steps: Receive the question input by the user through the interface; Based on the target retrieval module, search for a specified number of knowledge chunks related to the question from the preset knowledge base; Perform splicing processing on the question and each of the knowledge chunks respectively to obtain corresponding multiple input data; Perform merging processing on all the input data to obtain corresponding target merged data; Perform inference processing on the target merged data based on the pre-trained model to obtain corresponding prediction results; Analyze the prediction results to extract candidate answers from all the input data; If there are multiple candidate answers, determine the target answer from all the candidate answers based on the preset screening rules; Perform reply processing on the user based on the target answer.
2. The method for processing responses based on artificial intelligence according to claim 1, wherein The step of analyzing the prediction results to extract candidate answers from all the input data specifically includes: Extract the answer position index corresponding to each of the input data from the prediction results; Screen out valid indexes from all the answer position indexes; Extract the corresponding answer text from all the input data based on the valid indexes; Use the answer text as the candidate answer.
3. The method for reply processing based on artificial intelligence according to claim 1, wherein The step of determining the target answer from all the candidate answers based on the preset screening rules specifically includes: Perform legality detection on all the candidate answers to obtain corresponding detection results; Perform filtering processing on all the candidate answers based on the detection results to obtain the first filtered answers; Perform clustering and deduplication processing on all the first answers to obtain the second processed answers; Perform evaluation processing on all the second answers based on the preset evaluation strategy to obtain the evaluation results of each of the second answers; Screen out the specified evaluation result with the highest value from all the evaluation results; Obtain the third answer corresponding to the specified evaluation result from all the second answers and use the third answer as the target answer.
4. The method for processing responses based on artificial intelligence according to claim 3, wherein The step of performing legality detection on all the candidate answers to obtain corresponding detection results specifically includes: Perform position verification on all the candidate answers to obtain corresponding first verification results; Perform integrity verification on all the candidate answers to obtain corresponding second verification results; Perform type consistency verification on all the candidate answers to obtain corresponding third verification results; Integrate the first verification result, the second verification result, and the third verification result to obtain the integrated target verification result; Use the target verification result as the detection result.
5. The method for reply processing based on artificial intelligence according to claim 3, wherein The step of performing clustering and deduplication processing on all the first answers to obtain the second processed answers specifically includes: Obtain the preset clustering algorithm; Perform grouping processing on all the first answers based on the clustering algorithm to obtain corresponding multiple clustering results; Perform representative analysis on each of the clustering results respectively to determine the representative fourth answers from each of the clustering results; Perform deduplication processing on all the fourth answers to obtain the fifth processed answers; Use the fifth answer as the second answer.
6. The method for reply processing based on artificial intelligence according to claim 3, wherein The step of evaluating all the second answers based on a preset evaluation strategy to obtain the evaluation results of each of the second answers specifically includes: Extracting keywords and phrases from all the input data based on a preset natural language processing library; Constructing a corresponding semantic graph based on the keywords and the phrases; Searching for the shortest path from the question to the second answer in the semantic graph based on a preset graph search algorithm to obtain a corresponding path analysis result; Performing influence evaluation based on a preset graph algorithm and the path analysis result to calculate the influence evaluation results of all the second answers corresponding to the semantic graph respectively; Taking the influence evaluation result as the evaluation result.
7. The method for reply processing based on artificial intelligence according to claim 3, wherein The step of evaluating all the second answers based on a preset evaluation strategy to obtain the evaluation results of each of the second answers specifically includes: Invoking a preset variety of diversity metric algorithms; Determining a target diversity metric algorithm from all the diversity metric algorithms; Performing calculation processing of diversity metrics on each of the second answers respectively based on the target diversity metric algorithm to obtain the diversity evaluation results of each of the second answers; Taking the diversity evaluation result as the evaluation result.
8. An artificial intelligence-based reply processing device, characterized in that, Including: A receiving module, configured to receive a question input by a user through an interface; A searching module, configured to search for a specified number of knowledge chunks related to the question from a preset knowledge base based on a target retrieval module; A splicing module, configured to perform splicing processing on the question and each of the knowledge chunks respectively to obtain corresponding multiple input data; A merging module, configured to perform merging processing on all the input data to obtain corresponding target merged data; An inference module, configured to perform inference processing on the target merged data based on a pre-trained model to obtain a corresponding prediction result; An extraction module, configured to analyze the prediction result to extract candidate answers from all the input data; A determination module, configured to, if there are multiple candidate answers, determine a target answer from all the candidate answers based on a preset screening rule; A reply module, configured to perform reply processing on the user based on the target answer.
9. A computer device, characterized in that, Including a memory and a processor, wherein computer-readable instructions are stored in the memory, and when the processor executes the computer-readable instructions, the steps of the artificial intelligence-based reply processing method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that, Computer-readable instructions are stored on a computer-readable storage medium, and when the computer-readable instructions are executed by a processor, the steps of the artificial intelligence-based reply processing method according to any one of claims 1 to 7 are implemented.